X-Git-Url: http://ncurses.scripts.mit.edu/?p=ncurses.git;a=blobdiff_plain;f=doc%2Fhtml%2Fman%2Fcurs_color.3x.html;h=735c6f954230ad24b66f798a627af3dda8dcdd27;hp=dadd9a1ad900f884c78ebdefa05d29a9554153df;hb=17c5992a16be94247b83f2bbb9accdd9b7e7bb72;hpb=ed646e3f683083e787c6ba773364401dc9fa9d40 diff --git a/doc/html/man/curs_color.3x.html b/doc/html/man/curs_color.3x.html index dadd9a1a..735c6f95 100644 --- a/doc/html/man/curs_color.3x.html +++ b/doc/html/man/curs_color.3x.html @@ -1,6 +1,6 @@
- +start_color, has_colors, can_change_color, init_pair, init_color, - color_content, pair_content, COLOR_PAIR, PAIR_NUMBER - curses color - manipulation routines + color_content, pair_content, reset_color_pairs, COLOR_PAIR, PAIR_NUMBER + - curses color manipulation routines
@@ -71,6 +71,9 @@ int extended_color_content(int color, int *r, int *g, int *b); int extended_pair_content(int pair, int *f, int *b); + /* extensions */ + void reset_color_pairs(void); + int COLOR_PAIR(int n); PAIR_NUMBER(attrs); @@ -263,83 +266,88 @@ ors (color number -1) if you first invoke the use_default_colors(3x) routine. + The extension reset_color_pairs tells ncurses to discard all of the + color-pair information which was set with init_pair. It also touches + the current- and standard-screens, allowing an application to switch + color palettes rapidly. +
- The init_color routine changes the definition of a color. It takes + The init_color routine changes the definition of a color. It takes four arguments: the number of the color to be changed followed by three RGB values (for the amounts of red, green, and blue components). - o The first argument must be a legal color value; default colors are - not allowed here. (See the section Colors for the default color + o The first argument must be a legal color value; default colors are + not allowed here. (See the section Colors for the default color index.) - o Each of the last three arguments must be a value in the range 0 + o Each of the last three arguments must be a value in the range 0 through 1000. - When init_color is used, all occurrences of that color on the screen + When init_color is used, all occurrences of that color on the screen immediately change to the new definition.
The color_content routine gives programmers a way to find the intensity - of the red, green, and blue (RGB) components in a color. It requires - four arguments: the color number, and three addresses of shorts for - storing the information about the amounts of red, green, and blue com- + of the red, green, and blue (RGB) components in a color. It requires + four arguments: the color number, and three addresses of shorts for + storing the information about the amounts of red, green, and blue com- ponents in the given color. - o The first argument must be a legal color value, i.e., 0 through + o The first argument must be a legal color value, i.e., 0 through COLORS-1, inclusive. - o The values that are stored at the addresses pointed to by the last - three arguments are in the range 0 (no component) through 1000 + o The values that are stored at the addresses pointed to by the last + three arguments are in the range 0 (no component) through 1000 (maximum amount of component), inclusive.
- The pair_content routine allows programmers to find out what colors a - given color-pair consists of. It requires three arguments: the color- + The pair_content routine allows programmers to find out what colors a + given color-pair consists of. It requires three arguments: the color- pair number, and two addresses of shorts for storing the foreground and the background color numbers. - o The first argument must be a legal color value, i.e., in the range + o The first argument must be a legal color value, i.e., in the range 1 through COLOR_PAIRS-1, inclusive. - o The values that are stored at the addresses pointed to by the sec- - ond and third arguments are in the range 0 through COLORS, inclu- + o The values that are stored at the addresses pointed to by the sec- + ond and third arguments are in the range 0 through COLORS, inclu- sive.
- PAIR_NUMBER(attrs) extracts the color value from its attrs parameter + PAIR_NUMBER(attrs) extracts the color value from its attrs parameter and returns it as a color pair number.
Its inverse COLOR_PAIR(n) converts a color pair number to an attribute. - Attributes can hold color pairs in the range 0 to 255. If you need a - color pair larger than that, you must use functions such as attr_set - (which pass the color pair as a separate parameter) rather than the + Attributes can hold color pairs in the range 0 to 255. If you need a + color pair larger than that, you must use functions such as attr_set + (which pass the color pair as a separate parameter) rather than the legacy functions such as attrset.
The routines can_change_color and has_colors return TRUE or FALSE. - All other routines return the integer ERR upon failure and an OK (SVr4 - specifies only "an integer value other than ERR") upon successful com- + All other routines return the integer ERR upon failure and an OK (SVr4 + specifies only "an integer value other than ERR") upon successful com- pletion. - X/Open defines no error conditions. This implementation will return - ERR on attempts to use color values outside the range 0 to COLORS-1 - (except for the default colors extension), or use color pairs outside - the range 0 to COLOR_PAIRS-1. Color values used in init_color must be + X/Open defines no error conditions. This implementation will return + ERR on attempts to use color values outside the range 0 to COLORS-1 + (except for the default colors extension), or use color pairs outside + the range 0 to COLOR_PAIRS-1. Color values used in init_color must be in the range 0 to 1000. An error is returned from all functions if the terminal has not been initialized. An error is returned from secondary functions such as init_pair if start_color was not called. init_color returns an error if the terminal does not support this feature, - e.g., if the initialize_color capability is absent from the + e.g., if the initialize_color capability is absent from the terminal description. start_color @@ -347,60 +355,62 @@
- In the ncurses implementation, there is a separate color activation - flag, color palette, color pairs table, and associated COLORS and COL- - OR_PAIRS counts for each screen; the start_color function only affects + In the ncurses implementation, there is a separate color activation + flag, color palette, color pairs table, and associated COLORS and COL- + OR_PAIRS counts for each screen; the start_color function only affects the current screen. The SVr4/XSI interface is not really designed with - this in mind, and historical implementations may use a single shared + this in mind, and historical implementations may use a single shared color palette. - Setting an implicit background color via a color pair affects only - character cells that a character write operation explicitly touches. - To change the background color used when parts of a window are blanked + Setting an implicit background color via a color pair affects only + character cells that a character write operation explicitly touches. + To change the background color used when parts of a window are blanked by erasing or scrolling operations, see curs_bkgd(3x). - Several caveats apply on older x86 machines (e.g., i386, i486) with + Several caveats apply on older x86 machines (e.g., i386, i486) with VGA-compatible graphics: - o COLOR_YELLOW is actually brown. To get yellow, use COLOR_YELLOW + o COLOR_YELLOW is actually brown. To get yellow, use COLOR_YELLOW combined with the A_BOLD attribute. - o The A_BLINK attribute should in theory cause the background to go + o The A_BLINK attribute should in theory cause the background to go bright. This often fails to work, and even some cards for which it - mostly works (such as the Paradise and compatibles) do the wrong - thing when you try to set a bright "yellow" background (you get a + mostly works (such as the Paradise and compatibles) do the wrong + thing when you try to set a bright "yellow" background (you get a blinking yellow foreground instead). o Color RGB values are not settable.
- This implementation satisfies XSI Curses's minimum maximums for COLORS + This implementation satisfies XSI Curses's minimum maximums for COLORS and COLOR_PAIRS. - The init_pair routine accepts negative values of foreground and back- - ground color to support the use_default_colors(3x) extension, but only + The init_pair routine accepts negative values of foreground and back- + ground color to support the use_default_colors(3x) extension, but only if that routine has been first invoked. The assumption that COLOR_BLACK is the default background color for all - terminals can be modified using the assume_default_colors(3x) exten- + terminals can be modified using the assume_default_colors(3x) exten- sion. - This implementation checks the pointers, e.g., for the values returned + This implementation checks the pointers, e.g., for the values returned by color_content and pair_content, and will treat those as optional pa- rameters when null. - X/Open Curses does not specify a limit for the number of colors and + X/Open Curses does not specify a limit for the number of colors and color pairs which a terminal can support. However, in its use of short - for the parameters, it carries over SVr4's implementation detail for + for the parameters, it carries over SVr4's implementation detail for the compiled terminfo database, which uses signed 16-bit numbers. This - implementation provides extended versions of those functions which use - short parameters, allowing applications to use larger color- and pair- + implementation provides extended versions of those functions which use + short parameters, allowing applications to use larger color- and pair- numbers. + The reset_color_pairs function is an extension of ncurses. +
- curses(3x), curs_initscr(3x), curs_attr(3x), curs_variables(3x), de- + curses(3x), curs_initscr(3x), curs_attr(3x), curs_variables(3x), de- fault_colors(3x)