p l -tag -width "COLOR_PAIR(n)" -compact -offset indent t A_NORMAL no special attributes are applied t A_STANDOUT characters are displayed in the "best" supported highlighting mode of the terminal t A_UNDERLINE characters are displayed underlined t A_REVERSE characters are displayed in inverse video t A_BLINK characters blink t A_DIM characters are displayed at a lower intensity t A_BOLD characters are displayed at a higher intensity t A_INVIS characters are added invisibly t A_PROTECT characters are protected from modification t A_ALTCHARSET characters are displayed using the alternate character set (ACS) t COLOR_PAIR(n) characters are displayed using color pair n. .El
p The .Fn attron function turns on the attributes specified in .Fa attr on .Va stdscr , while the .Fn attroff function turns off the attributes specified in .Fa attr on .Va stdscr .
p The function .Fn attrset sets the attributes of .Va stdscr to those specified in .Fa attr , turning off any others. To turn off all the attributes (including color and alternate character set), use .Fn attrset A_NORMAL .
p Multiple attributes can be manipulated by combining the attributes using a logical .Em OR . For example, .Fn attron "A_REVERSE | A_BOLD" will turn on both inverse video and higher intensity.
p The function .Fn color_set sets the color pair attribute to the pair specified in .Fa pair .
p The function .Fn getattrs returns the attributes that are currently applied to window specified by .Fa win .
p The function .Fn termattrs returns the logical .Em OR of attributes that can be applied to the screen.
p The functions .Fn wattron , .Fn wattroff , .Fn wattrset , and .Fn wcolor_set are equivalent to .Fn attron , .Fn attroff .Fn attrset , and .Fn color_set respectively, excepting that the attributes are applied to the window specified by .Fa win .
p The following functions additionally manipulate wide attributes on .Va stdscr or on the specified window. The additional wide attributes that can be manipulated are:
p l -tag -width "COLOR_PAIR(n)" -compact -offset indent t WA_STANDOUT characters are displayed in the "best" supported highlighting mode of the terminal t WA_UNDERLINE characters are displayed underlined t WA_REVERSE characters are displayed in inverse video t WA_BLINK characters blink t WA_DIM characters are displayed at a lower intensity t WA_BOLD characters are displayed at a higher intensity t WA_INVIS characters are added invisibly t WA_PROTECT characters are protected from modification t WA_ALTCHARSET characters are displayed using the alternate character set (ACS) t WA_LOW characters are displayed with low highlight t WA_TOP characters are displayed with top highlight t WA_HORIZONTAL characters are displayed with horizontal highlight t WA_VERTICAL characters are displayed with vertical highlight t WA_LEFT characters are displayed with left highlight t WA_RIGHT characters are displayed with right highlight .El
p The .Fn attr_on function turns on the wide attributes specified in .Fa attr on .Va stdscr , while the .Fn attr_off function turns off the wide attributes specified in .Fa attr on .Va stdscr .
p The function .Fn attr_set sets the wide attributes of .Va stdscr to those specified in .Fa attr and .Fa pair , turning off any others. Note that a color pair specified in .Fa pair will override any color pair specified in .Fa attr .
p The function .Fn attr_get sets .Fa attr to the wide attributes and .Fa pair to the color pair currently applied to .Va stdscr . Either of .Fa attr and .Fa pair can be .Dv NULL , if the relevant value is of no interest.
p The function .Fn term_attrs returns the logical .Em OR of wide attributes that can be applied to the screen.
p The functions .Fn wattr_on , .Fn wattr_off and .Fn wattr_set are equivalent to .Fn attr_on , .Fn attr_off and .Fn attr_set respectively, excepting that the character is added to the window specified by .Fa win .
p The function .Fn wattr_get is equivalent to .Fn attr_get , excepting that the wide attributes and color pair currently applied to .Fa win are set.
p The following constants can be used to extract the components of a .Dv chtype :
p l -tag -width "COLOR_PAIR(n)" -compact -offset indent t A_ATTRIBUTES bit-mask containing attributes part t A_CHARTEXT bit-mask containing character part t A_COLOR bit-mask containing color-pair part .El .Sh RETURN VALUES These functions return OK on success and ERR on failure. .Sh SEE ALSO .Xr curses_addch 3 , .Xr curses_addchstr 3 , .Xr curses_addstr 3 , .Xr curses_background 3 , .Xr curses_color 3 , .Xr curses_insch 3 , .Xr curses_standout 3 , .Xr curses_underscore 3 .Sh NOTES The .Fa opt argument is not currently used but is reserved for a future version of the specification. .Sh STANDARDS The .Nx Curses library complies with the X/Open Curses specification, part of the Single Unix Specification.
p The .Fn getattrs function is a .Nx extension. .Sh HISTORY These functions first appeared in .Nx 1.5 . .Sh CAVEATS Some terminals do not support characters with both color and other attributes set. In this case, the other attribute is displayed instead of the color attribute.
p The standout attribute is a higher level alias and should not be mixed with other attributes.