freebsd-src/lib/libncurses/curs_attr.3
Mike Pritchard 3e6427f35f Correct man page section number references (e.g. don't use the
old 1M, 3X and 3S section numbers) and make some minor formatting
changes to silence manck.
1996-02-11 23:29:40 +00:00

85 lines
3.1 KiB
Groff

.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: