attroff(3) — Subroutines
Digital
NAME
attroff, attron, attrset, standend, standout, wstandend, wstandout, wattroff, wattron, wattrset − attribute manipulation
SYNOPSIS
#include <curses.h>
int attroff(attrs)
int attrs;
int wattroff(win, attrs)
WINDOW ∗win;
int attrs;
int attron(attrs)
int attrs;
int wattron(win, attrs)
WINDOW ∗win;
int attrs;
int attrset(attrs)
int attrs;
int wattrset(win, attrs)
WINDOW ∗win;
int attrs;
int standend()
wstandend(win)
WINDOW ∗win;
int standout()
int wstandout(win)
WINDOW ∗win;
DESCRIPTION
These routines manipulate the current attributes of a window.
The routine attroff turns off the named attributes (attrs) of the default window without turning any other attributes on or off.
The routine attron turns on the named attributes of the default window without affecting any other attributes.
The routine attrset sets the current attributes of the default window to the named attributes attrs, which is of the type chtype, and is defined in the <curses.h> header file.
The routine standout switches on the best highlighting mode available on the terminal for the default window and it is functionally the same as attron(A_STANDOUT).
The routine standend switches off all highlighting associated with the default window. It is functionally the same as attrset(0), in that it turns off all attributes.
The routine wattroff switches off the named attributes, attrs, for the specified window. Other attributes are not changed.
The routine wattron turns on the named attributes of the specified window without affecting any others.
The routine wattrset sets the current attributes of the specified window to attrs.
The routine wstandout switches on the best highlighting mode available on the terminal for the specified window. Functionally it is the same as wattron(A_STANDOUT).
The routine wstandend switches off all highlighting associated with the specified window. Functionally it is the same as wattrset(0); that is, it turns off all attributes.
ATTRIBUTES
Attributes can be any combination of A_STANDOUT, A_REVERSE, A_BOLD, A_DIM, A_BLINK and A_UNDERLINE. These constants are defined in the <curses.h> header file.
Attributes can be combined with the C language | (or) operator.
The current attributes of a window are applied to all characters that are written into the window with addch or waddch. Attributes are properties of the character and move with the character through any scrolling and insert/delete line/character operations. Within the restrictions set by the terminal hardware they will be displayed as the graphic rendition of characters put on the screen.
The routines attroff, attron and attrset are macros.
RETURN VALUES
The attroff, wattroff, attron, wattron, attrset, wattrset, standend, wstandend, standout, and wstandout functions return OK on success and ERR on error.