DOC HOME SITE MAP MAN PAGES GNU INFO SEARCH
 

curs_attr(S)


curs_attr: attroff, wattroff, attron, wattron, attrset, wattrset, standend, wstandend, standout, wstandout -- curses character and window attribute control routines

Syntax

cc ... -lcurses

#include <curses.h>

int attroff(chtype attrs); int wattroff(WINDOW *win, chtype attrs); int attron(chtype attrs); int wattron(WINDOW *win, chtype attrs); int attrset(chtype attrs); int wattrset(WINDOW *win, chtype attrs); int standend(void); int wstandend(WINDOW *win); int standout(void); int wstandout(WINDOW *win);

Description

Video attributes

All of these routines manipulate the current attributes of the specified window. The current attributes of a window are applied to all characters that are written into the window using waddch(S), waddstr(S), and wprintw(S). Attributes are a property of the character, and move with the character through any scrolling and insert/delete line/character operations. To the extent possible on the particular terminal, they are displayed as the graphic rendition of characters put on the screen.

attrset, attroff, and attron

The routine attrset(S) sets the current attributes of the given window to attrs. The routine attroff(S) turns off the specified attributes without turning any other attributes on or off. The routine attron(S) turns on the specified attributes without affecting any others.

standout and standend

The routine standout(S) is the same as attron(A_STANDOUT).

The routine standend(S) is the same as attrset(0), that is, it turns off all attributes.

Attributes

The following video attributes, defined in curses.h, can be passed to the routines attron( ), attroff( ), and attrset( ), or ORed with the characters passed to addch(S).


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_ALTCHARSET
Alternate character set

A_CHARTEXT
Bit-mask to extract a character

COLOR_PAIR(n)
Color-pair number n

The following macro is the reverse of COLOR_PAIR(n):


PAIR_NUMBER(attrs)
Return the pair number associated with the COLOR_PAIR(n) attribute.

Return values

These routines always return 1.

Warning

The header file curses.h automatically includes the header files stdio.h and unctrl.h.

The following can be macros: attroff( ), attron( ), attrset( ), wattroff(S), wattron(S), wattrset(S), standend( ), and standout( ).

Files


/usr/lib/libcurses.a
the library

See also

curses(S), curs_addch(S), curs_addstr(S), curs_printw(S)

Standards conformance

attroff(S), wattroff(S), attron(S), wattron(S), attrset(S), wattrset(S), standend(S), wstandend(S), standout(S), and wstandout(S) are not part of any currently supported standard; they were developed by UNIX System Laboratories, Inc. and are maintained by The SCO Group.
© 2003 Caldera International, Inc. All rights reserved.
SCO OpenServer Release 5.0.7 -- 11 February 2003