- These routines manipulate the current attributes of the
- named window, which then apply to all characters that are
- written into the window with <STRONG>waddch</STRONG>, <STRONG>waddstr</STRONG> and <STRONG>wprintw</STRONG>.
- 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.
-
- These routines do not affect the attributes used when
- erasing portions of the window. See <STRONG><A HREF="curs_bkgd.3x.html">curs_bkgd(3x)</A></STRONG> for
- functions which modify the attributes used for erasing and
- clearing.
-
- Routines which do not have a <STRONG>WINDOW*</STRONG> parameter apply to
- <STRONG>stdscr</STRONG>.
-
-
-</PRE><H3><a name="h3-Window-attributes">Window attributes</a></H3><PRE>
- The <STRONG>attr_set</STRONG> and <STRONG>wattr_set</STRONG> functions set the current at-
- tributes of the given window to <EM>attrs</EM>, with color speci-
- fied by <EM>pair</EM>. X/Open specified an additional parameter
- <EM>opts</EM> which is unused in all implementations.
-
- Use <STRONG>attr_get</STRONG> and <STRONG>wattr_get</STRONG> to retrieve attributes for the
- given window.
-
- Use <STRONG>attr_on</STRONG> and <STRONG>wattr_on</STRONG> to turn on window attributes,
- i.e., values OR'd together in <EM>attr</EM>, without affecting oth-
- er attributes. Use <STRONG>attr_off</STRONG> and <STRONG>wattr_off</STRONG> to turn off
- window attributes, again values OR'd together in <EM>attr</EM>,
- without affecting other attributes.
-
-
-</PRE><H3><a name="h3-Legacy-window-attributes">Legacy window attributes</a></H3><PRE>
- Most of the window attribute routines are extensions of
- older routines which assume that color pairs are OR'd into
- the attribute parameter. These older routines use the
- same name, omitting an underscore (<STRONG>_</STRONG>).
-
- The <STRONG>attrset</STRONG> routine is a legacy feature predating SVr4
- curses but kept in X/Open Curses for the same reason that
- SVr4 curses kept it: compatibility.
-
- The remaining <STRONG>attr</STRONG>* functions operate exactly like the
- corresponding <STRONG>attr_</STRONG>* functions, except that they take ar-
- guments of type <STRONG>int</STRONG> rather than <STRONG>attr_t</STRONG>.
-
- There is no corresponding <STRONG>attrget</STRONG> function as such in
- X/Open Curses, although ncurses provides <STRONG>getattrs</STRONG> (see
- <STRONG><A HREF="curs_legacy.3x.html">curs_legacy(3x)</A></STRONG>).
-
-
-</PRE><H3><a name="h3-Change-character-rendition">Change character rendition</a></H3><PRE>
- The routine <STRONG>chgat</STRONG> changes the attributes of a given number
- of characters starting at the current cursor location of
- <STRONG>stdscr</STRONG>. It does not update the cursor and does not per-
- form wrapping. A character count of -1 or greater than
- the remaining window width means to change attributes all
- the way to the end of the current line. The <STRONG>wchgat</STRONG> func-
- tion generalizes this to any window; the <STRONG>mvwchgat</STRONG> function
- does a cursor move before acting.
-
- In these functions, the color <EM>pair</EM> argument is a color-
- pair index (as in the first argument of <EM>init</EM><STRONG>_</STRONG><EM>pair</EM>, see
- <STRONG><A HREF="curs_color.3x.html">curs_color(3x)</A></STRONG>). The <STRONG>opts</STRONG> argument is not presently used,
- but is reserved for the future (leave it <STRONG>NULL</STRONG>).
-
-
-</PRE><H3><a name="h3-Change-window-color">Change window color</a></H3><PRE>
- The routine <STRONG>color_set</STRONG> sets the current color of the given
- window to the foreground/background combination described
- by the color <EM>pair</EM> parameter. The parameter <EM>opts</EM> is re-
- served for future use; applications must supply a null
- pointer.
+ These routines manipulate the current attributes of the named window,
+ which then apply to all characters that are written into the window
+ with <STRONG>waddch</STRONG>, <STRONG>waddstr</STRONG> and <STRONG>wprintw</STRONG>. 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.
+
+ These routines do not affect the attributes used when erasing portions
+ of the window. See <STRONG><A HREF="curs_bkgd.3x.html">curs_bkgd(3x)</A></STRONG> for functions which modify the
+ attributes used for erasing and clearing.
+
+
+</PRE><H3><a name="h3-Window-Attributes">Window Attributes</a></H3><PRE>
+ There are two sets of functions:
+
+ <STRONG>o</STRONG> functions for manipulating the window attributes and color:
+ <STRONG>wattr_set</STRONG> and <STRONG>wattr_get</STRONG>.
+
+ <STRONG>o</STRONG> functions for manipulating only the window attributes (not color):
+ <STRONG>wattr_on</STRONG> and <STRONG>wattr_off</STRONG>.
+
+ The <STRONG>wattr_set</STRONG> function sets the current attributes of the given window
+ to <EM>attrs</EM>, with color specified by <EM>pair</EM>.
+
+ Use <STRONG>wattr_get</STRONG> to retrieve attributes for the given window.
+
+ Use <STRONG>attr_on</STRONG> and <STRONG>wattr_on</STRONG> to turn on window attributes, i.e., values
+ OR'd together in <EM>attr</EM>, without affecting other attributes. Use
+ <STRONG>attr_off</STRONG> and <STRONG>wattr_off</STRONG> to turn off window attributes, again values OR'd
+ together in <EM>attr</EM>, without affecting other attributes.
+
+
+</PRE><H3><a name="h3-Legacy-Window-Attributes">Legacy Window Attributes</a></H3><PRE>
+ The X/Open window attribute routines which <EM>set</EM> or <EM>get</EM>, turn <EM>on</EM> or <EM>off</EM>
+ are extensions of older routines which assume that color pairs are OR'd
+ into the attribute parameter. These newer routines use similar names,
+ because X/Open simply added an underscore (<STRONG>_</STRONG>) for the newer names.
+
+ The <STRONG>int</STRONG> datatype used in the legacy routines is treated as if it is the
+ same size as <STRONG>chtype</STRONG> (used by <STRONG><A HREF="curs_addch.3x.html">addch(3x)</A></STRONG>). It holds the common video
+ attributes (such as bold, reverse), as well as a few bits for color.
+ Those bits correspond to the <STRONG>A_COLOR</STRONG> symbol. The <STRONG>COLOR_PAIR</STRONG> macro
+ provides a value which can be OR'd into the attribute parameter. For
+ example, as long as that value fits into the <STRONG>A_COLOR</STRONG> mask, then these
+ calls produce similar results:
+
+ attrset(A_BOLD | COLOR_PAIR(<EM>pair</EM>));
+ attr_set(A_BOLD, <EM>pair</EM>, NULL);
+
+ However, if the value does not fit, then the <STRONG>COLOR_PAIR</STRONG> macro uses only
+ the bits that fit. For example, because in <EM>ncurses</EM> <STRONG>A_COLOR</STRONG> has eight
+ (8) bits, then <STRONG>COLOR_PAIR(</STRONG><EM>259</EM><STRONG>)</STRONG> is 4 (i.e., 259 is 4 more than the limit
+ 255).
+
+ The <STRONG>PAIR_NUMBER</STRONG> macro extracts a pair number from an <STRONG>int</STRONG> (or <STRONG>chtype</STRONG>).
+ For example, the <EM>input</EM> and <EM>output</EM> values in these statements would be
+ the same:
+
+ int value = A_BOLD | COLOR_PAIR(<EM>input</EM>);
+ int <EM>output</EM> = PAIR_NUMBER(value);
+
+ The <STRONG>attrset</STRONG> routine is a legacy feature predating SVr4 curses but kept
+ in X/Open Curses for the same reason that SVr4 curses kept it:
+ compatibility.
+
+ The remaining <STRONG>attr</STRONG>* functions operate exactly like the corresponding
+ <STRONG>attr_</STRONG>* functions, except that they take arguments of type <STRONG>int</STRONG> rather
+ than <STRONG>attr_t</STRONG>.
+
+ There is no corresponding <STRONG>attrget</STRONG> function as such in X/Open Curses,
+ although <EM>ncurses</EM> provides <STRONG>getattrs</STRONG> (see <STRONG><A HREF="curs_legacy.3x.html">curs_legacy(3x)</A></STRONG>).
+
+
+</PRE><H3><a name="h3-Change-Character-Rendition">Change Character Rendition</a></H3><PRE>
+ The routine <STRONG>chgat</STRONG> changes the attributes of a given number of
+ characters starting at the current cursor location of <STRONG>stdscr</STRONG>. It does
+ not update the cursor and does not perform wrapping. A character count
+ of -1 or greater than the remaining window width means to change
+ attributes all the way to the end of the current line. The <STRONG>wchgat</STRONG>
+ function generalizes this to any window; the <STRONG>mvwchgat</STRONG> function does a
+ cursor move before acting.
+
+ In these functions, the color <EM>pair</EM> argument is a color pair index (as
+ in the first argument of <STRONG>init_pair</STRONG>, see <STRONG><A HREF="curs_color.3x.html">curs_color(3x)</A></STRONG>).
+
+
+</PRE><H3><a name="h3-Change-Window-Color">Change Window Color</a></H3><PRE>
+ The routine <STRONG>color_set</STRONG> sets the current color of the given window to the
+ foreground/background combination described by the color <EM>pair</EM>
+ parameter.