'\"macro stdmacro
.if n .pH g3x.curs_attr @(#)curs_attr	40.5 of 12/15/89
.\" Copyright 1989 AT&T
.\" ident	"@(#)svid_ti:ti_lib/curs_attr	1.4"
.nr X
.if \nX=0 .ds x} curs_attr 3X "" "\&"
.if \nX=1 .ds x} curs_attr 3X ""
.if \nX=2 .ds x} curs_attr 3X "" "\&"
.if \nX=3 .ds x} curs_attr "" "" "\&"
.TH \*(x}
.SH NAME
\f4curs_attr\f2: \f4 attroff\f1, \f4wattroff\f1, \f4attron\f1, \f4wattron\f1, \f4attrset\f1, \f4wattrset\f1, \%\f4standend\f1, \f4wstandend\f1, \f4standout\f1, \f4wstandout\f1 \- \f4curses\fP character and window attribute control routines
.SH SYNOPSIS
.nf
.ft 4
#include <curses.h>
.sp .5
int attroff(int attrs);
.sp 0.25
int wattroff(WINDOW *win, int attrs);
.sp 0.25
int attron(int attrs);
.sp 0.25
int wattron(WINDOW *win, int attrs);
.sp 0.25
int attrset(int attrs);
.sp 0.25
int wattrset(WINDOW *win, int attrs);
.sp 0.25
int standend(void);
.sp 0.25
int wstandend(WINDOW *win);
.sp 0.25
int standout(void);
.sp 0.25
int wstandout(WINDOW *win);
.ft 1
.fi
.SH DESCRIPTION
All of these routines manipulate the current attributes of the named window.
The current attributes of a window are applied to all characters that
are written into the window with \f4waddch\f1, \f4waddstr\fP
and \f4wprintw\fP.
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.
.P
The routine \f4attrset\f1 sets the current attributes of the given window to
\f2attrs\f1.
The routine \f4attroff\f1
turns off the named attributes without turning any other attributes on or off.
The routine \f4attron\f1
turns on the named attributes without affecting any others.
The routine \f4standout\f1
is the same as
\f4attron(A_STANDOUT)\f1.
The routine \f4standend\f1 is the same as \f4attrset(0)\f1, that is,
it turns off all attributes.
.SS Attributes
The following video attributes, defined in \f4<curses.h>\f1, can be
passed to the routines \f4attron\f1, \f4attroff\f1,
and \f4attrset\f1, or OR-ed with the characters passed
to \f4addch\f1.
.PP
.RS
.nf
.ta 1.5i
\f4A_STANDOUT\fP	Best highlighting mode of the terminal.
\f4A_UNDERLINE\fP	Underlining
\f4A_REVERSE\fP	Reverse video
\f4A_BLINK\fP	Blinking
\f4A_DIM\fP	Half bright
\f4A_BOLD\fP	Extra bright or bold
\f4A_ALTCHARSET\fP	Alternate character set
\f4A_CHARTEXT\fP	Bit-mask to extract a character
\f4COLOR_PAIR(\f2n\fP)\f1	Color-pair number \f2n\fP
.fi
.RE
.PP
The following macro is the reverse of \f4COLOR_PAIR(\f2n\fP)\f1:
.PP
.RS
.nf
.ta 1.5i
\f4PAIR_NUMBER(\f2attrs\fP)\f1	Returns the pair number associated
	with the \f4COLOR_PAIR(\f2n\fP)\f1 attribute.
.fi
.RE
.SH RETURN VALUE
These routines always return \f41\fP.
.SH NOTES
.P
The header file \f4<curses.h>\f1 automatically includes the header files
\f4<stdio.h>\f1 and \f4<unctrl.h>\f1.
.PP
Note that \f4attroff\f1,
\f4wattroff\f1, \f4attron\f1, \f4wattron\f1,
\f4attrset\f1,
\f4wattrset\f1,
\f4standend\f1 and \%\f4standout\f1 may be macros.
.SH SEE ALSO
.na
\f4curses\fP(3X),
\f4curs_addch\fP(3X),
\f4curs_addstr\fP(3X),
\f4curs_printw\fP(3X).
.ad
