Next: , Previous: , Up: Attributes   [Contents][Index]


4.8.1 The details

Let’s get into more details of attributes. The functions attr-on!, attr-off!, attr-set!, and their sister functions attr-get etc., can be used to switch attributes on and off, get attributes, and produce a colorful display.

The functions attr-on! and attr-off! take a bit-mask of attributes and switch them on or off respectively. The following video attributes can be passed to these functions.

A_NORMAL

Normal display (no highlight)

A_STANDOUT

Best highlighting mode of the terminal

A_UNDERLINE

Underlining

A_REVERSE

Reverse video

A_BLINK

Blinking

A_DIM

Half-bright

A_BOLD

Extra bright or bold

A_PROTECT

Protected mode

A_INVIS

Invisible or blank mode

A_ALTCHARSET

Alternate character set

A_CHARTEXT

Bit-mask to extract a character

A_HORIZONTAL

Unsupported for now and left for future use

A_LEFT

Unsupported for now and left for future use

A_LOW

Unsupported for now and left for future use

A_RIGHT

Unsupported for now and left for future use

A_TOP

Unsupported for now and left for future use

A_VERTICAL

Unsupported for now and left for future use

(color-pair n)

A procedure that returns the bit mask for a color-pair

Colors are explained in the next sections.

We can logior any number of attributes to get a combined effect. If you wanted the character in window win to have reverse video with blinking characters, you can use

(attr-on! win (logior A_REVERSE A_BLINK))