mirror of
https://git.hardenedbsd.org/hardenedbsd/HardenedBSD.git
synced 2024-11-17 16:10:46 +01:00
88 lines
3.2 KiB
Groff
88 lines
3.2 KiB
Groff
.TH curs_attr 3X ""
|
|
.SH NAME
|
|
\fBcurs_attr\fR: \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 \fBattrest(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 neaningful (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 BUGS
|
|
As of 1.8.2, ncurses attributes still have a tendency to stick on in some
|
|
circumstances where SVr4 curses attributes would turn off.
|
|
.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(3X), \fBcurs_addch\fR(3X), \fBcurs_addstr\fR(3X),
|
|
\fBcurs_printw\fR(3X)
|
|
.\"#
|
|
.\"# The following sets edit modes for GNU EMACS
|
|
.\"# Local Variables:
|
|
.\"# mode:nroff
|
|
.\"# fill-column:79
|
|
.\"# End:
|