Next: attr-on! vs attr-set!, Previous: Attributes, Up: Attributes [Contents][Index]
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_NORMALNormal display (no highlight)
A_STANDOUTBest highlighting mode of the terminal
A_UNDERLINEUnderlining
A_REVERSEReverse video
A_BLINKBlinking
A_DIMHalf-bright
A_BOLDExtra bright or bold
A_PROTECTProtected mode
A_INVISInvisible or blank mode
A_ALTCHARSETAlternate character set
A_CHARTEXTBit-mask to extract a character
A_HORIZONTALUnsupported for now and left for future use
A_LEFTUnsupported for now and left for future use
A_LOWUnsupported for now and left for future use
A_RIGHTUnsupported for now and left for future use
A_TOPUnsupported for now and left for future use
A_VERTICALUnsupported 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))