[ Previous | Next | Table of Contents | Index | Library Home | Legal | Search ]

Technical Reference: Base Operating System and Extensions , Volume 2


attroff, attron, attrset, wattroff, wattron, or wattrset Subroutine

Purpose

Restricted window attribute control functions.

Library

Curses Library (libcurses.a)

Syntax

#include <curses.h>

 

int attroff (int *attrs);

 

int attron (int *attrs);

 

int attrset (int *attrs);

 

int wattroff (WINDOW *win, int *attsr);

 

int wattron (WINDOW *win, int *attrs);

 

int wattrset (WINDOW *win, int *attsr);

Description

These subroutines manipulate the window attributes of the current or specified window.

The attroff and wattroff subroutines turn off attrs in the current or specified specified window without affecting any others.

The attron and wattron subroutines turn on attrs in the current or specified specified window without affecting any others.

The attrset and wattrset subroutines set the background attributes of the current or specified specified window to attrs.

It unspecified whether these subroutines can be used to manipulate attributes than A_BLINK, A_BOLD, A_DIM, A_REVERSE, A_STANDOUT and A_UNDERLINE.

Parameters


*attrs Specifies which attributes to turn off.
*win Specifies the window in which to turn off the specified attributes.

Return Values

These subroutines always return either OK or 1.

Examples

For the attroff or wattroff subroutines:

  1. To turn the off underlining attribute in stdscr, enter:

    attroff(A_UNDERLINE);
    
  2. To turn off the underlining attribute in the user-defined window my_window, enter:

    wattroff(my_window, A_UNDERLINE);
    

For the attron or wattron subroutines:

  1. To turn on the underlining attribute in stdscr, enter:

    attron(A_UNDERLINE);
    
  2. To turn on the underlining attribute in the user-defined window my_window, enter:

    wattron(my_window, A_UNDERLINE);
    

For the attrset or wattrset subroutines:

  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);
    

Implementation Specifics

These subroutines are part of Base Operating System (BOS) Runtime.

Related Information

The standend (standend, standout, wstandend, or wstandout Subroutine) subroutine.

Curses Overview for Programming in AIX 5L Version 5.1 General Programming Concepts: Writing and Debugging Programs.

List of Curses Subroutines in AIX 5L Version 5.1 General Programming Concepts: Writing and Debugging Programs.

Setting Video Attributes and Curses Options in AIX 5L Version 5.1 General Programming Concepts: Writing and Debugging Programs.


[ Previous | Next | Table of Contents | Index | Library Home | Legal | Search ]