1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
|
.\" $FreeBSD$
.\"
.TH curs_attr 3 ""
.SH NAME
\fBattroff\fR, \fBwattroff\fR, \fBattron\fR, \fBwattron\fR,
\fBattrset\fR, \fBwattrset\fR, \fBstandend\fR, \fBwstandend\fR, \fBstandout\fR,
\fBwstandout\fR - \fBncurses\fR character and window attribute control routines
.SH SYNOPSIS
\fB#include <ncurses.h>\fR
.br
\fBint attroff(int attrs);\fR
.br
\fBint wattroff(WINDOW *win, int attrs);\fR
.br
\fBint attron(int attrs);\fR
.br
\fBint wattron(WINDOW *win, int attrs);\fR
.br
\fBint attrset(int attrs);\fR
.br
\fBint wattrset(WINDOW *win, int attrs);\fR
.br
\fBint standend(void);\fR
.br
\fBint wstandend(WINDOW *win);\fR
.br
\fBint standout(void);\fR
.br
\fBint wstandout(WINDOW *win);\fR
.br
.SH DESCRIPTION
These routines manipulate the current attributes of the named window. The
current attributes of a window apply to all characters that are written into
the window with \fBwaddch\fR, \fBwaddstr\fR and \fBwprintw\fR. Attributes are
a property of the character, and move with the character through any scrolling
and insert/delete line/character operations. To the extent possible, they are
displayed as appropriate modifications to the graphic rendition of characters
put on the screen.
The routine \fBattrset\fR sets the current attributes of the given window to
\fIattrs\fR. The routine \fBattroff\fR turns off the named attributes without
turning any other attributes on or off. The routine \fBattron\fR turns on the
named attributes without affecting any others. The routine \fBstandout\fR is
the same as \fBattron(A_STANDOUT)\fR. The routine \fBstandend\fR is the same
as \fBattrset(A_NORMAL)\fR or \fBattrset(0)\fR, that is, it turns off all
attributes.
.SS Attributes
The following video attributes, defined in \fB<ncurses.h>\fR, can be passed to
the routines \fBattron\fR, \fBattroff\fR, and \fBattrset\fR, or OR-ed with the
characters passed to \fBaddch\fR.
.nf
\fBA_NORMAL\fR Normal display (no highlight)
\fBA_STANDOUT\fR Best highlighting mode of the terminal.
\fBA_UNDERLINE\fR Underlining
\fBA_REVERSE\fR Reverse video
\fBA_BLINK\fR Blinking
\fBA_DIM\fR Half bright
\fBA_BOLD\fR Extra bright or bold
\fBA_ALTCHARSET\fR Alternate character set
\fBA_CHARTEXT\fR Bit-mask to extract a character
\fBCOLOR_PAIR(\fR\fIn\fR\fB)\fR Color-pair number \fIn\fR
.fi
The following macro is the reverse of \fBCOLOR_PAIR(\fR\fIn\fR\fB)\fR:
.DS C
\fBPAIR_NUMBER(\fIattrs\fR) Returns the pair number associated
with the \fBCOLOR_PAIR(\fR\fIn\fR\fB)\fR attribute.
.DE
The return values of these routines are not meaningful (many are implemented
as macro-expanded assignments and simply return their argument). The SVr4
manual page claims (falsely) that these routines always return \fB1\fR.
.SH NOTES
Note that \fBattroff\fR, \fBwattroff\fR, \fBattron\fR, \fBwattron\fR,
\fBattrset\fR, \fBwattrset\fR, \fBstandend\fR and \fBstandout\fR may be macros.
.SH SEE ALSO
\fBncurses\fR(3), \fBcurs_addch\fR(3), \fBcurs_addstr\fR(3),
\fBcurs_printw\fR(3)
.\"#
.\"# The following sets edit modes for GNU EMACS
.\"# Local Variables:
.\"# mode:nroff
.\"# fill-column:79
.\"# End:
|