1curs_attr(3CURSES) Curses Library Functions curs_attr(3CURSES)
2
3
4
6 curs_attr, attroff, wattroff, attron, wattron, attrset, wattrset,
7 standend, wstandend, standout, wstandout - curses character and window
8 attribute control routines
9
11 cc [ flag ... ] file ... -lcurses [ library ... ]
12 #include <curses.h>
13
14 int attroff(int attrs);
15
16
17 int wattroff(WINDOW *win, int attrs);
18
19
20 int attron(int attrs);
21
22
23 int wattron(WINDOW *win, int attrs);
24
25
26 int attrset(int attrs);
27
28
29 int wattrset(WINDOW *win, int attrs);
30
31
32 int standend(void);
33
34
35 int wstandend(WINDOW *win);
36
37
38 int standout(void);
39
40
41 int wstandout(WINDOW *win);
42
43
45 All of these routines manipulate the current attributes of the named
46 window. The current attributes of a window are applied to all charac‐
47 ters that are written into the window with waddch(), waddstr(), and
48 wprintw(). Attributes are a property of the character, and move with
49 the character through any scrolling and insert/delete line/character
50 operations. To the extent possible on the particular terminal, they are
51 displayed as the graphic rendition of characters put on the screen.
52
53
54 The routine attrset() sets the current attributes of the given window
55 to attrs. The routine attroff() turns off the named attributes without
56 turning any other attributes on or off. The routine attron() turns on
57 the named attributes without affecting any others. The routine stand‐
58 out() is the same as attron(A_STANDOUT). The routine standend() is the
59 same as attrset(), that is, it turns off all attributes.
60
61 Attributes
62 The following video attributes, defined in <curses.h>, can be passed to
63 the routines attron(), attroff(), and attrset(), or OR-ed with the
64 characters passed to addch().
65
66 A_STANDOUT Best highlighting mode of the terminal
67
68
69 A_UNDERLINE Underlining
70
71
72 A_REVERSE Reverse video
73
74
75 A_BLINK Blinking
76
77
78 A_DIM Half bright
79
80
81 A_BOLD Extra bright or bold
82
83
84 A_ALTCHARSET Alternate character set
85
86
87 A_CHARTEXT Bit-mask to extract a character
88
89
90 COLOR_PAIR(n) Color-pair number n
91
92
93
94 The following macro is the reverse of COLOR_PAIR(n):
95
96 PAIR_NUMBER(attrs) Returns the pair number associated with the
97 COLOR_PAIR(n) attribute
98
99
101 These routines always return 1.
102
104 See attributes(5) for descriptions of the following attributes:
105
106
107
108
109 ┌─────────────────────────────┬─────────────────────────────┐
110 │ ATTRIBUTE TYPE │ ATTRIBUTE VALUE │
111 ├─────────────────────────────┼─────────────────────────────┤
112 │MT-Level │Unsafe │
113 └─────────────────────────────┴─────────────────────────────┘
114
116 curs_addch(3CURSES), curs_addstr(3CURSES), curs_printw(3CURSES),
117 curses(3CURSES), attributes(5)
118
120 The header <curses.h> automatically includes the headers <stdio.h> and
121 <unctrl.h>.
122
123
124 Note that attroff(), wattroff(), attron(), wattron(), wattrset(),
125 standend(), and standout() may be macros.
126
127
128
129SunOS 5.11 31 Dec 1996 curs_attr(3CURSES)