1attroff(3XCURSES)       X/Open Curses Library Functions      attroff(3XCURSES)
2
3
4

NAME

6       attroff,  attron,  attrset,  wattroff, wattron, wattrset - change fore‐
7       ground window attributes
8

SYNOPSIS

10       cc [ flag... ] file... -I /usr/xpg4/include  -L  /usr/xpg4/lib \
11        -R  /usr/xpg4/lib  -lcurses  [ library... ]
12
13       c89 [ flag... ] file... -lcurses [ library... ]
14
15       #include <curses.h>
16
17       int attroff(int attrs);
18
19
20       int attron(int attrs);
21
22
23       int attrset(int attrs);
24
25
26       int wattroff(WINDOW *win, int attrs);
27
28
29       int wattron(WINDOW *win, int attrs);
30
31
32       int wattrset(WINDOW *win, int attrs);
33
34

DESCRIPTION

36       The attroff() and attron() functions unset and set,  respectively,  the
37       specified window attributes of stdscr.  These functions only affect the
38       attributes specified; attributes  that  existed  before  the  call  are
39       retained.  The  wattroff()  and  wattron()  functions  unset or set the
40       specified attributes for window win.
41
42
43       The attrset() and wattrset() functions  change  the  specified   window
44       renditions  of  stdscr  and  win to new values;  the old values are not
45       retained.
46
47
48       The attributes that can be used are specified in the  Attributes, Color
49       Pairs, and Renditions section of the  curses(3XCURSES) man page.
50
51
52       Here  is an example that prints some text using the current window ren‐
53       dition, adds underlining, changes the  attributes,  prints  more  text,
54       then changes the  attributes back.
55
56         printw("This word is");
57         attron(A_UNDERLINE);
58         printw("underlined.");
59         attroff(A_NORMAL);
60         printw("This is back to normal text.\n");
61         refresh();
62
63

PARAMETERS

65       attrs    are the foreground window attributes to be set or unset.
66
67
68       win      Is  a  pointer to the window in which attribute changes are to
69                be made.
70
71

RETURN VALUES

73       These functions always return OK or 1.
74

ERRORS

76       None.
77

USAGE

79       All of these functions may be macros.
80

ATTRIBUTES

82       See attributes(5) for descriptions of the following attributes:
83
84
85
86
87       ┌─────────────────────────────┬─────────────────────────────┐
88       │      ATTRIBUTE TYPE         │      ATTRIBUTE VALUE        │
89       ├─────────────────────────────┼─────────────────────────────┤
90       │Interface Stability          │Standard                     │
91       ├─────────────────────────────┼─────────────────────────────┤
92       │MT-Level                     │Unsafe                       │
93       └─────────────────────────────┴─────────────────────────────┘
94

SEE ALSO

96       addch(3XCURSES),         addnstr(3XCURSES),         attr_get(3XCURSES),
97       bkgdset(3XCURSES),        curses(3XCURSES),       init_color(3XCURSES),
98       libcurses(3XCURSES), start_color(3XCURSES), attributes(5), standards(5)
99
100
101
102SunOS 5.11                        5 Jun 2002                 attroff(3XCURSES)
Impressum