2 .\" Copyright 1989 AT&T
3 .\" Portions Copyright (c) 1996, Sun Microsystems, Inc. All Rights Reserved.
4 .\" The contents of this file are subject to the terms of the Common Development and Distribution License (the "License"). You may not use this file except in compliance with the License.
5 .\" You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE or http://www.opensolaris.org/os/licensing. See the License for the specific language governing permissions and limitations under the License.
6 .\" When distributing Covered Code, include this CDDL HEADER in each file and include the License file at usr/src/OPENSOLARIS.LICENSE. If applicable, add the following below this CDDL HEADER, with the fields enclosed by brackets "[]" replaced with your own identifying information: Portions Copyright [yyyy] [name of copyright owner]
7 .TH CURS_ATTR 3CURSES "Dec 31, 1996"
9 curs_attr, attroff, wattroff, attron, wattron, attrset, wattrset, standend,
10 wstandend, standout, wstandout \- curses character and window attribute control
15 \fBcc\fR [ \fIflag\fR ... ] \fIfile\fR ... \fB-lcurses\fR [ \fIlibrary\fR ... ]
18 \fBint\fR \fBattroff\fR(\fBint\fR \fIattrs\fR);
23 \fBint\fR \fBwattroff\fR(\fBWINDOW *\fR\fIwin\fR, \fBint\fR \fIattrs\fR);
28 \fBint\fR \fBattron\fR(\fBint\fR \fIattrs\fR);
33 \fBint\fR \fBwattron\fR(\fBWINDOW *\fR\fIwin\fR, \fBint\fR \fIattrs\fR);
38 \fBint\fR \fBattrset\fR(\fBint\fR \fIattrs\fR);
43 \fBint\fR \fBwattrset\fR(\fBWINDOW *\fR\fIwin\fR, \fBint\fR \fIattrs\fR);
48 \fBint\fR \fBstandend\fR(\fBvoid\fR);
53 \fBint\fR \fBwstandend\fR(\fBWINDOW *\fR\fIwin\fR);
58 \fBint\fR \fBstandout\fR(\fBvoid\fR);
63 \fBint\fR \fBwstandout\fR(\fBWINDOW *\fR\fIwin\fR);
69 All of these routines manipulate the current attributes of the named window.
70 The current attributes of a window are applied to all characters that are
71 written into the window with \fBwaddch()\fR, \fBwaddstr()\fR, and
72 \fBwprintw()\fR. Attributes are a property of the character, and move with the
73 character through any scrolling and insert/delete line/character operations. To
74 the extent possible on the particular terminal, they are displayed as the
75 graphic rendition of characters put on the screen.
78 The routine \fBattrset()\fR sets the current attributes of the given window to
79 \fIattrs\fR. The routine \fBattroff()\fR turns off the named attributes without
80 turning any other attributes on or off. The routine \fBattron()\fR turns on the
81 named attributes without affecting any others. The routine \fBstandout()\fR is
82 the same as \fBattron(\fR\fBA_STANDOUT)\fR. The routine \fBstandend()\fR is the
83 same as \fBattrset()\fR, that is, it turns off all attributes.
87 The following video attributes, defined in \fB<curses.h>\fR, can be passed to
88 the routines \fBattron()\fR, \fBattroff()\fR, and \fBattrset()\fR, or OR-ed
89 with the characters passed to \fBaddch()\fR.
96 Best highlighting mode of the terminal
150 Alternate character set
159 Bit-mask to extract a character
165 \fBCOLOR_PAIR(\fIn\fR)\fR
168 Color-pair number \fIn\fR
173 The following macro is the reverse of \fBCOLOR_PAIR(\fR\fIn\fR\fB):\fR
177 \fBPAIR_NUMBER(\fIattrs\fR)\fR
180 Returns the pair number associated with the \fBCOLOR_PAIR(\fR\fIn\fR) attribute
186 These routines always return 1.
190 See \fBattributes\fR(5) for descriptions of the following attributes:
198 ATTRIBUTE TYPE ATTRIBUTE VALUE
206 \fBcurs_addch\fR(3CURSES), \fBcurs_addstr\fR(3CURSES),
207 \fBcurs_printw\fR(3CURSES), \fBcurses\fR(3CURSES), \fBattributes\fR(5)
211 The header <\fBcurses.h\fR> automatically includes the headers <\fBstdio.h\fR>
212 and <\fBunctrl.h\fR>.
215 Note that \fBattroff()\fR, \fBwattroff()\fR, \fBattron()\fR, \fBwattron()\fR,
216 \fBwattrset()\fR, \fBstandend()\fR, and \fBstandout()\fR may be macros.