attrset or wattrset Subroutine

Purpose

Sets the current attributes of a window to the specified attributes.

Libraries

Curses Library (libcurses.a)

Syntax

#include <curses.h>

attrset( Attributes)
char *Attributes;
wattrset( Window, Attributes)
WINDOW *Window;
char *Attributes;

Description

The attrset and wattrset subroutines set the current attributes of a window to the specified attributes. The attrset subroutine sets the current attribute of stdscr. The wattrset subroutine sets the current attribute of the specified window.

Parameters

Item Description
Attributes Specifies which attributes to set.
Window Specifies the window in which to set the attributes.

Examples

  1. To set the current attribute in the stdscr global variable to blink, enter:
    attrset(A_BLINK);
  2. To set the current attribute in the user-defined window my_window to blinking, enter:
    wattrset(my_window, A_BLINK);
  3. To turn off all attributes in the stdscr global variable, enter:
    attrset(0);
  4. To turn off all attributes in the user-defined window my_window, enter:
    wattrset(my_window, 0);