Copyright 1989 AT&T
Portions Copyright (c) 1996, Sun Microsystems, Inc. All Rights Reserved.
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.
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.
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]
cc [ flag ... ] file ... -lcurses [ library ... ] #include <curses.h> int attroff(int attrs);
int wattroff(WINDOW *win, int attrs);
int attron(int attrs);
int wattron(WINDOW *win, int attrs);
int attrset(int attrs);
int wattrset(WINDOW *win, int attrs);
int standend(void);
int wstandend(WINDOW *win);
int standout(void);
int wstandout(WINDOW *win);
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 waddch(), waddstr(), and wprintw(). 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.
The routine attrset() sets the current attributes of the given window to attrs. The routine attroff() turns off the named attributes without turning any other attributes on or off. The routine attron() turns on the named attributes without affecting any others. The routine standout() is the same as attron(A_STANDOUT). The routine standend() is the same as attrset(), that is, it turns off all attributes.
The following video attributes, defined in <curses.h>, can be passed to the routines attron(), attroff(), and attrset(), or OR-ed with the characters passed to addch(). A_STANDOUT
Best highlighting mode of the terminal
Underlining
Reverse video
Blinking
Half bright
Extra bright or bold
Alternate character set
Bit-mask to extract a character
Color-pair number n
The following macro is the reverse of COLOR_PAIR(n): PAIR_NUMBER(attrs)
Returns the pair number associated with the COLOR_PAIR(n) attribute
These routines always return 1.
See attributes(7) for descriptions of the following attributes:
ATTRIBUTE TYPE ATTRIBUTE VALUE |
MT-Level Unsafe |
curs_addch (3CURSES), curs_addstr (3CURSES), curs_printw (3CURSES), curses (3CURSES), attributes (7)
The header <curses.h> automatically includes the headers <stdio.h> and <unctrl.h>.
Note that attroff(), wattroff(), attron(), wattron(), wattrset(), standend(), and standout() may be macros.