1curs_variables(3X)                                          curs_variables(3X)
2
3
4

NAME

6       COLORS, COLOR_PAIRS, COLS, ESCDELAY, LINES, TABSIZE, curscr, newscr,
7       stdscr - curses global variables
8

SYNOPSIS

10       #include <curses.h>
11
12       int COLOR_PAIRS;
13       int COLORS;
14       int COLS;
15       int ESCDELAY;
16       int LINES;
17       int TABSIZE;
18       WINDOW * curscr;
19       WINDOW * newscr;
20       WINDOW * stdscr;
21

DESCRIPTION

23       This page summarizes variables provided by the curses library.  A  more
24       complete description is given in the curses(3X) manual page.
25
26       Depending  on  the  configuration,  these  may  be actual variables, or
27       macros (see curs_threads(3X)) which provide read-only access  to  curs‐
28       es's state.  In either case, applications should treat them as read-on‐
29       ly to avoid confusing the library.
30
31   COLOR_PAIRS
32       After initializing curses, this variable contains the number  of  color
33       pairs  which  the  terminal  can  support.  Usually the number of color
34       pairs will be the product COLORS*COLORS, however  this  is  not  always
35       true:
36
37       ·   a few terminals use HLS colors, which do not follow this rule
38
39       ·   terminals  supporting  a  large number of colors are limited by the
40           number of color pairs that can be represented  in  a  signed  short
41           value.
42
43   COLORS
44       After  initializing curses, this variable contains the number of colors
45       which the terminal can support.
46
47   COLS
48       After initializing curses, this variable  contains  the  width  of  the
49       screen, i.e., the number of columns.
50
51   ESCDELAY
52       This variable holds the number of milliseconds to wait after reading an
53       escape character, to distinguish between an individual escape character
54       entered on the keyboard from escape sequences sent by cursor- and func‐
55       tion-keys (see curses(3X).
56
57   LINES
58       After initializing curses, this variable contains  the  height  of  the
59       screen, i.e., the number of lines.
60
61   TABSIZE
62       This  variable  holds  the number of columns used by the curses library
63       when converting a tab character to spaces as it adds the tab to a  win‐
64       dow (see curs_addch(3X).
65
66   The Current Screen
67       This  implementation  of  curses uses a special window curscr to record
68       its updates to the terminal screen.
69
70   The New Screen
71       This implementation of curses uses a special window newscr to hold  up‐
72       dates to the terminal screen before applying them to curscr.
73
74   The Standard Screen
75       Upon  initializing curses, a default window called stdscr, which is the
76       size of the terminal screen, is created.   Many  curses  functions  use
77       this window.
78

NOTES

80       The   curses  library  is  initialized  using  either  initscr(3X),  or
81       newterm(3X).
82
83       If curses is configured to use separate curses/terminfo libraries, most
84       of these variables reside in the curses library.
85

PORTABILITY

87       ESCDELAY  and TABSIZE are extensions, not provided in most other imple‐
88       mentations of curses.
89

SEE ALSO

91       curses(3X), curs_threads(3X), term_variables(3X), terminfo(3X), termin‐
92       fo(5).
93
94
95
96                                                            curs_variables(3X)
Impressum