X-Git-Url: https://ncurses.scripts.mit.edu/?a=blobdiff_plain;f=doc%2Fhtml%2Fman%2Fcurs_attr.3x.html;h=cb1449d2d1e1bd1790879ff95eece4935ace0c51;hb=e2153a14ebfb90265151d608778aaf9f403b3d24;hp=7d1f64139a069a233d163aee93976e9e47d7eb52;hpb=09ed0227b324243f636e31d876e3dc30dfc7a778;p=ncurses.git diff --git a/doc/html/man/curs_attr.3x.html b/doc/html/man/curs_attr.3x.html index 7d1f6413..cb1449d2 100644 --- a/doc/html/man/curs_attr.3x.html +++ b/doc/html/man/curs_attr.3x.html @@ -1,7 +1,7 @@
-curs_attr(3x) Library calls curs_attr(3x) @@ -121,7 +106,7 @@ attributes used for erasing and clearing. -
+
There are two sets of functions: o functions for manipulating the window attributes and color: @@ -141,7 +126,7 @@ together in attr, without affecting other attributes. -
+
The X/Open window attribute routines which set or get, turn on or off are extensions of older routines which assume that color pairs are OR'd into the attribute parameter. These newer routines use similar names, @@ -159,7 +144,7 @@ attr_set(A_BOLD, pair, NULL); However, if the value does not fit, then the COLOR_PAIR macro uses only - the bits that fit. For example, because in ncurses A_COLOR has eight + the bits that fit. For example, because in ncurses A_COLOR has eight (8) bits, then COLOR_PAIR(259) is 4 (i.e., 259 is 4 more than the limit 255). @@ -179,10 +164,10 @@ than attr_t. There is no corresponding attrget function as such in X/Open Curses, - although ncurses provides getattrs (see curs_legacy(3x)). + although ncurses provides getattrs (see curs_legacy(3x)). -
+
The routine chgat changes the attributes of a given number of characters starting at the current cursor location of stdscr. It does not update the cursor and does not perform wrapping. A character count @@ -191,11 +176,11 @@ function generalizes this to any window; the mvwchgat function does a cursor move before acting. - In these functions, the color pair argument is a color-pair index (as + In these functions, the color pair argument is a color pair index (as in the first argument of init_pair, see curs_color(3x)). -
+
The routine color_set sets the current color of the given window to the foreground/background combination described by the color pair parameter. @@ -206,7 +191,7 @@ standend is the same as attrset(A_NORMAL) or attrset(0), that is, it turns off all attributes. - X/Open does not mark these "restricted", because + X/Open Curses does not mark these "restricted", because o they have well established legacy use, and @@ -222,7 +207,7 @@ Name Description ----------------------------------------------------------------- A_NORMAL Normal display (no highlight) - A_STANDOUT Best highlighting mode of the terminal. + A_STANDOUT Best highlighting mode of the terminal A_UNDERLINE Underlining A_REVERSE Reverse video A_BLINK Blinking @@ -235,11 +220,15 @@ A_CHARTEXT Bit-mask to extract a character A_COLOR Bit-mask to extract a color (legacy routines) + You can thus use A_CHARTEXT to extract the character from a chtype, + A_ATTRIBUTES to obtain its rendering attributes, and A_COLOR to find + the color pair it uses. + These video attributes are supported by attr_on and related functions (which also support the attributes recognized by attron, etc.): Name Description - ----------------------------------------- + ----------------------------------------------------------------- WA_HORIZONTAL Horizontal highlight WA_LEFT Left highlight WA_LOW Low highlight @@ -256,106 +245,105 @@
All routines return the integer OK on success, or ERR on failure. - X/Open does not define any error conditions. + X/Open Curses does not specify any error conditions. This implementation - o returns an error if the window pointer is null. + o returns ERR if the window pointer is null. - o returns an error if the color pair parameter for wcolor_set is - outside the range 0..COLOR_PAIRS-1. + o returns ERR if the color pair parameter for wcolor_set is outside + the range 0..COLOR_PAIRS-1. - o does not return an error if either of the parameters of wattr_get - used for retrieving attribute or color-pair values is NULL. + o does not fail if either of the parameters of wattr_get used for + retrieving attribute or color pair values is NULL. - Functions with a "mv" prefix first perform a cursor movement using - wmove, and return an error if the position is outside the window, or if - the window pointer is null. + Functions prefixed with "mv" first perform cursor movement and fail if + the position (y, x) is outside the window boundaries.
These functions may be macros: - attroff, wattroff, attron, wattron, attrset, wattrset, standend + attroff, wattroff, attron, wattron, attrset, wattrset, standend and standout. - Color pair values can only be OR'd with attributes if the pair number + Color pair values can only be OR'd with attributes if the pair number is less than 256. The alternate functions such as color_set can pass a - color pair value directly. However, ncurses ABI 4 and 5 simply OR this - value within the alternate functions. You must use ncurses ABI 6 to + color pair value directly. However, ncurses ABI 4 and 5 simply OR this + value within the alternate functions. You must use ncurses ABI 6 to support more than 256 color pairs.
This implementation provides the A_ITALIC attribute for terminals which - have the enter_italics_mode (sitm) and exit_italics_mode (ritm) - capabilities. Italics are not mentioned in X/Open Curses. Unlike the - other video attributes, A_ITALIC is unrelated to the set_attributes - capabilities. This implementation makes the assumption that + have the enter_italics_mode (sitm) and exit_italics_mode (ritm) + capabilities. Italics are not mentioned in X/Open Curses. Unlike the + other video attributes, A_ITALIC is unrelated to the set_attributes + capabilities. This implementation makes the assumption that exit_attribute_mode may also reset italics. - Each of the functions added by XSI Curses has a parameter opts, which - X/Open Curses still (after more than twenty years) documents as + Each of the functions added by XSI Curses has a parameter opts, which + X/Open Curses still (after more than twenty years) documents as reserved for future use, saying that it should be NULL. This - implementation uses that parameter in ABI 6 for the functions which - have a color-pair parameter to support extended color pairs: + implementation uses that parameter in ABI 6 for the functions which + have a color pair parameter to support extended color pairs: o For functions which modify the color, e.g., wattr_set and wattr_on, - if opts is set it is treated as a pointer to int, and used to set + if opts is set it is treated as a pointer to int, and used to set the color pair instead of the short pair parameter. o For functions which retrieve the color, e.g., wattr_get, if opts is - set it is treated as a pointer to int, and used to retrieve the - color pair as an int value, in addition to retrieving it via the + set it is treated as a pointer to int, and used to retrieve the + color pair as an int value, in addition to retrieving it via the standard pointer to short parameter. - o For functions which turn attributes off, e.g., wattr_off, the opts + o For functions which turn attributes off, e.g., wattr_off, the opts parameter is ignored except except to check that it is NULL.
- These functions are described in the XSI Curses standard, Issue 4. The - standard defined the dedicated type for highlights, attr_t, which was - not defined in SVr4 curses. The functions taking attr_t arguments were - not supported under SVr4. + These functions are described in X/Open Curses, Issue 4. The standard + defined the dedicated type for highlights, attr_t, which was not + defined in SVr4 curses. The functions taking attr_t arguments were not + supported under SVr4. Very old versions of this library did not force an update of the screen - when changing the attributes. Use touchwin to force the screen to + when changing the attributes. Use touchwin to force the screen to match the updated attributes. - The XSI Curses standard states that whether the traditional functions - attron/attroff/attrset can manipulate attributes other than A_BLINK, - A_BOLD, A_DIM, A_REVERSE, A_STANDOUT, or A_UNDERLINE is "unspecified". - Under this implementation as well as SVr4 curses, these functions - correctly manipulate all other highlights (specifically, A_ALTCHARSET, + X/Open Curses states that whether the traditional functions + attron/attroff/attrset can manipulate attributes other than A_BLINK, + A_BOLD, A_DIM, A_REVERSE, A_STANDOUT, or A_UNDERLINE is "unspecified". + Under this implementation as well as SVr4 curses, these functions + correctly manipulate all other highlights (specifically, A_ALTCHARSET, A_PROTECT, and A_INVIS). - XSI Curses added these entry points: + X/Open Curses added these entry points: attr_get, attr_on, attr_off, attr_set, wattr_on, wattr_off, wattr_get, wattr_set - The new functions are intended to work with a new series of highlight + The new functions are intended to work with a new series of highlight macros prefixed with WA_. The older macros have direct counterparts in the newer set of names: Name Description - ------------------------------------------------------------ + ----------------------------------------------------------------- WA_NORMAL Normal display (no highlight) - WA_STANDOUT Best highlighting mode of the terminal. + WA_STANDOUT Best highlighting mode of the terminal WA_UNDERLINE Underlining WA_REVERSE Reverse video WA_BLINK Blinking WA_DIM Half bright WA_BOLD Extra bright or bold - WA_ALTCHARSET Alternate character set - XSI curses does not assign values to these symbols, nor does it state - whether or not they are related to the similarly-named A_NORMAL, etc.: + X/Open Curses does not assign values to these symbols, nor does it + state whether or not they are related to the similarly-named A_NORMAL, + etc.: - o The XSI curses standard specifies that each pair of corresponding - A_ and WA_-using functions operates on the same current-highlight + o X/Open Curses specifies that each pair of corresponding A_ and + WA_-using functions operates on the same current-highlight information. o However, in some implementations, those symbols have unrelated @@ -371,7 +359,7 @@ the same because it simplifies copying information between chtype and cchar_t variables. - o Because ncurses's attr_t can hold a color pair (in the A_COLOR + o Because ncurses's attr_t can hold a color pair (in the A_COLOR field), a call to wattr_on, wattr_off, or wattr_set may alter the window's color. If the color pair information in the attribute parameter is zero, no change is made to the window's color. @@ -379,7 +367,7 @@ This is consistent with SVr4 curses; X/Open Curses does not specify this. - The XSI standard extended conformance level adds new highlights + The X/Open Curses extended conformance level adds new highlights A_HORIZONTAL, A_LEFT, A_LOW, A_RIGHT, A_TOP, A_VERTICAL (and corresponding WA_ macros for each). As of August 2013, no known terminal provides these highlights (i.e., via the sgr1 capability). @@ -436,19 +424,20 @@ alternate character set implementation. A 32-bit library can be used on a 64-bit system, but not necessarily the reverse. - Year System Arch Color Char Notes - ---------------------------------------------------------------- - 1992 Solaris 5.2 32 6 17 SVr4 curses - 1992 HP-UX 9 32 no 8 SVr2 curses - 1992 AIX 3.2 32 no 23 SVr2 curses - 1994 OSF/1 r3 32 no 23 SVr2 curses - 1995 HP-UX 10.00 32 6 16 SVr3 "curses_colr" - 1995 HP-UX 10.00 32 6 8 SVr4, X/Open curses - 1995 Solaris 5.4 32/64 7 16 X/Open curses - 1996 AIX 4.2 32 7 16 X/Open curses - 1996 OSF/1 r4 32 6 16 X/Open curses - 1997 HP-UX 11.00 32 6 8 X/Open curses - 2000 U/Win 32/64 7/31 16 uses chtype + Bits + Year System Arch Color Char Notes + ------------------------------------------------------------------------ + 1992 Solaris 5.2 32 6 17 SVr4 curses + 1992 HP-UX 9 32 no 8 SVr2 curses + 1992 AIX 3.2 32 no 23 SVr2 curses + 1994 OSF/1 r3 32 no 23 SVr2 curses + 1995 HP-UX 10.00 32 6 16 SVr3 curses_colr + 1995 HP-UX 10.00 32 6 8 SVr4, X/Open curses + 1995 Solaris 5.4 32/64 7 16 X/Open curses + 1996 AIX 4.2 32 7 16 X/Open curses + 1996 OSF/1 r4 32 6 16 X/Open curses + 1997 HP-UX 11.00 32 6 8 X/Open curses + 2000 U/Win 32/64 7/31 16 uses chtype Notes: @@ -462,7 +451,7 @@ Regarding OSF/1 (and Tru64), - o These used 64-bit hardware. Like ncurses, the OSF/1 curses + o These used 64-bit hardware. Like ncurses, the OSF/1 curses interface is not customized for 32-bit and 64-bit versions. o Unlike other systems which evolved from AT&T code, OSF/1 @@ -499,7 +488,7 @@ modification to make the library 8-bit clean for nvi(1). He moved standout attribute to a structure member. - The resulting 4.4BSD curses was replaced by ncurses over the next + The resulting 4.4BSD curses was replaced by ncurses over the next ten years. o U/Win is rarely used now. @@ -511,7 +500,7 @@ -ncurses 6.4 2023-12-02 curs_attr(3x) +ncurses 6.5 2024-05-25 curs_attr(3x)