X-Git-Url: http://ncurses.scripts.mit.edu/?a=blobdiff_plain;f=doc%2Fhtml%2Fman%2Fcurs_color.3x.html;h=22964c4d2e3a8865f5a460fb248899475fa401a2;hb=a816c8dae437106bbf1661304240ff568ae3efef;hp=42ddae7d0df6c9f321db79df2da80b3d5fbd8b5e;hpb=eccca377f55c70b12e3e92621d94d1e1c1fcfb7d;p=ncurses.git diff --git a/doc/html/man/curs_color.3x.html b/doc/html/man/curs_color.3x.html index 42ddae7d..22964c4d 100644 --- a/doc/html/man/curs_color.3x.html +++ b/doc/html/man/curs_color.3x.html @@ -1,6 +1,7 @@ - @@ -34,7 +35,7 @@ curs_color 3x - + @@ -60,22 +61,22 @@ bool has_colors(void); bool can_change_color(void); - int init_pair(short pair, short f, short b); - int init_color(short color, short r, short g, short b); + int init_pair(short pair, short f, short b); + int init_color(short color, short r, short g, short b); /* extensions */ - int init_extended_pair(int pair, int f, int b); - int init_extended_color(int color, int r, int g, int b); + int init_extended_pair(int pair, int f, int b); + int init_extended_color(int color, int r, int g, int b); - int color_content(short color, short *r, short *g, short *b); - int pair_content(short pair, short *f, short *b); + int color_content(short color, short *r, short *g, short *b); + int pair_content(short pair, short *f, short *b); /* extensions */ - int extended_color_content(int color, int *r, int *g, int *b); - int extended_pair_content(int pair, int *f, int *b); + 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); + int COLOR_PAIR(int n); PAIR_NUMBER(attrs); @@ -134,8 +135,8 @@ o If the parameter passed to waddch is not blank, or it does not use the special color pair 0, curses prefers the color pair from the - parameter, if it is nonzero. Otherwise, it tries the window at- - tribute next, and finally the background character. + parameter, if it is nonzero. Otherwise, it tries the window attri- + bute next, and finally the background character. Some curses functions such as wprintw call waddch. Those do not com- bine its parameter with a color pair. Consequently those calls use on- @@ -438,6 +439,50 @@ o Color RGB values are not settable. +

HISTORY

+       SVr3.2 introduced color support to curses in 1987.
+
+       SVr4 made internal changes, e.g., moving  the  storage  for  the  color
+       state  from  SP (the SCREEN structure) to cur_term (the TERMINAL struc-
+       ture), but provided the same set of library functions.
+
+       SVr4 curses limits the number of color pairs  to  64,  reserving  color
+       pair  zero  (0)  as the terminal's initial uncolored state.  This limit
+       arises because the color pair information is a bitfield in  the  chtype
+       data type (denoted by A_COLOR).
+
+       Other implementations of curses had different limits:
+
+       o   PCCurses (1987-1990) provided for only eight (8) colors.
+
+       o   PDCurses  (1992-present)  inherited the 8-color limitation from PC-
+           Curses, but changed this to 256 in version 2.5 (2001),  along  with
+           changing chtype from 16-bits to 32-bits.
+
+       o   X/Open Curses (1992-present) added a new structure cchar_t to store
+           the character, attributes and color-pair values, allowing increased
+           range  of  color-pairs.   Both  color-pairs and color-values used a
+           signed short, limiting values to 15 bits.
+
+       o   ncurses (1992-present) uses eight bits for A_COLOR in  chtype  val-
+           ues.
+
+           Version  5.3  provided  a wide-character interface (2002), but left
+           color-pairs as part of the attributes-field.
+
+           Since version 6 (2015), ncurses uses a separate int for color-pairs
+           in the cchar_t values.  When those color-pair values fit in 8 bits,
+           ncurses allows color-pairs to be manipulated via the functions  us-
+           ing chtype values.
+
+       o   NetBSD  curses  used  6 bits from 2000 (when colors were first sup-
+           ported) until 2004.  At that point, NetBSD changed to use 10  bits.
+           As of 2021, that size is unchanged.  Like ncurses before version 6,
+           the NetBSD color-pair information is stored in the attributes field
+           of  cchar_t,  limiting the number of color-pairs by the size of the
+           bitfield.
+
+
 

PORTABILITY

        This implementation satisfies XSI Curses's minimum maximums for  COLORS
        and COLOR_PAIRS.
@@ -510,6 +555,7 @@
 
 
  • RETURN VALUE
  • NOTES
  • +
  • HISTORY
  • PORTABILITY
  • SEE ALSO