curses_attributes(3) - NetBSD Manual Pages

CURSES_ATTRIBUTES(3)    NetBSD Library Functions Manual   CURSES_ATTRIBUTES(3)


NAME
curses_attributes, attron, attroff, attrset, wattron, wattroff, wattrset, getattrs, attr_on, attr_off, attr_set, color_set, attr_get, wattr_on, wattr_off, wattr_set, wcolor_set, wattr_get -- curses general attribute manipulation routines
LIBRARY
Curses Library (libcurses, -lcurses)
SYNOPSIS
#include <curses.h> int attron(int attr); int attroff(int attr); int attrset(int attr); int wattron(WINDOW * win, int attr); int wattroff(WINDOW * win, int attr); int wattrset(WINDOW * win, int attr); chtype getattrs(WINDOW *win); int attr_on(attr_t attr, void *opt); int attr_off(attr_t attr, void *opt); int attr_set(attr_t attr, short pair, void *opt); int color_set(short pair, void *opt); int attr_get(attr_t *attr, short *pair, void *opt); int wattr_on(WINDOW *win, attr_t attr, void *opt); int wattr_off(WINDOW *win, attr_t attr, void *opt); int wattr_set(WINDOW *win, attr_t attr, short pair, void *opt); int wcolor_set(WINDOW *win, short pair, void *opt); int wattr_get(WINDOW *win, attr_t *attr, short *pair, void *opt);
DESCRIPTION
These functions manipulate attributes on stdscr or on the specified win- dow. The attributes that can be manipulated are: A_NORMAL no special attributes are applied A_STANDOUT characters are displayed in standout mode A_UNDERLINE characters are displayed underlined A_REVERSE characters are displayed in inverse video A_BLINK characters blink A_DIM characters are displayed at a lower intensity A_BOLD characters are displayed at a higher intensity A_BLANK characters are added as blanks A_PROTECT characters are protected from modification A_ALTCHARSET characters are displayed using the alternate charac- ter set (ACS) COLOR_PAIR(n) characters are displayed using color pair n. The functions attron() and attr_on() turn on the attributes specified in attr on stdscr. The functions attroff() and attr_off() turn off the attributes specified in attr on stdscr. The function attrset() sets the attributes of stdscr to those specified in attr, turning off any others. To turn off all the attributes (includ- ing color and alternate character set), use attrset(A_NORMAL). Multiple attributes can be manipulated by combining the attributes using a logical OR. For example, attron(A_REVERSE | A_BOLD) will turn on both inverse video and higher intensity. The function attr_set() sets the attributes of stdscr to those specified in attr and pair, turning off any others. Note that a color pair speci- fied in pair will override any color pair specified in attr. The function color_set() sets the color pair attribute to the pair speci- fied in pair. The functions wattron(), wattr_on(), wattroff(), wattr_on(), wattrset(), wattr_set() and wcolor_set() are equivalent to attron(), attr_on(), attroff() attr_off(), attrset(), attr_set() and color_set() respectively, excepting that the character is added to the window specified by win. The function getattrs() returns the attributes that are currently applied to window specified by win. The function attr_get() sets attr to the attributes and pair to the color pair currently applied to stdscr. Either of attr and pair can be NULL, if the relevant value is of no interest. The function wattr_get() is equivalent to attr_get(), excepting that the attributes and color pair currently applied to win are set.
RETURN VALUES
These functions return OK on success and ERR on failure.
SEE ALSO
curses_addch(3), curses_addchstr(3), curses_addstr(3), curses_background(3), curses_color(3), curses_insertch(3), curses_standout(3), curses_underscore(3)
NOTES
The opt argument is not currently used but is reserved for a future ver- sion of the specification.
STANDARDS
The NetBSD Curses library complies with the X/Open Curses specification, part of the Single Unix Specification.
HISTORY
These functions first appeared in NetBSD 1.5.
BUGS
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. NetBSD 4.0 May 21, 2003 NetBSD 4.0

Powered by man-cgi (2024-08-26). Maintained for NetBSD by Kimmo Suominen. Based on man-cgi by Panagiotis Christias.