blob: efbe192a48820a5a6ee6fc9fb1b3289e196b4e1b [file] [log] [blame]
Steve Kondikae271bc2015-11-15 02:50:53 +01001.\"***************************************************************************
2.\" Copyright (c) 2010,2013 Free Software Foundation, Inc. *
3.\" *
4.\" Permission is hereby granted, free of charge, to any person obtaining a *
5.\" copy of this software and associated documentation files (the *
6.\" "Software"), to deal in the Software without restriction, including *
7.\" without limitation the rights to use, copy, modify, merge, publish, *
8.\" distribute, distribute with modifications, sublicense, and/or sell *
9.\" copies of the Software, and to permit persons to whom the Software is *
10.\" furnished to do so, subject to the following conditions: *
11.\" *
12.\" The above copyright notice and this permission notice shall be included *
13.\" in all copies or substantial portions of the Software. *
14.\" *
15.\" THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS *
16.\" OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF *
17.\" MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. *
18.\" IN NO EVENT SHALL THE ABOVE COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, *
19.\" DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR *
20.\" OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR *
21.\" THE USE OR OTHER DEALINGS IN THE SOFTWARE. *
22.\" *
23.\" Except as contained in this notice, the name(s) of the above copyright *
24.\" holders shall not be used in advertising or otherwise to promote the *
25.\" sale, use or other dealings in this Software without prior written *
26.\" authorization. *
27.\"***************************************************************************
28.\"
29.\" $Id: curs_variables.3x,v 1.6 2013/12/21 18:41:32 tom Exp $
30.TH curs_variables 3X ""
31.de bP
32.IP \(bu 4
33..
34.ds n 5
35.na
36.hy 0
37.SH NAME
38\fBCOLORS\fR,
39\fBCOLOR_PAIRS\fR,
40\fBCOLS\fR,
41\fBESCDELAY\fR,
42\fBLINES\fR,
43\fBTABSIZE\fR,
44\fBcurscr\fR,
45\fBnewscr\fR,
46\fBstdscr\fR
47\- \fBcurses\fR global variables
48.ad
49.hy
50.SH SYNOPSIS
51.nf
52\fB#include <curses.h>\fR
53.PP
54\fBint COLOR_PAIRS;\fR
55.br
56\fBint COLORS;\fR
57.br
58\fBint COLS;\fR
59.br
60\fBint ESCDELAY;\fR
61.br
62\fBint LINES;\fR
63.br
64\fBint TABSIZE;\fR
65.br
66\fBWINDOW * curscr;\fR
67.br
68\fBWINDOW * newscr;\fR
69.br
70\fBWINDOW * stdscr;\fR
71.fi
72.SH DESCRIPTION
73This page summarizes variables provided by the \fBcurses\fP library.
74A more complete description is given in the \fBcurses\fP(3X) manual page.
75.PP
76Depending on the configuration, these may be actual variables,
77or macros (see \fBcurs_threads\fR(3X) and \fBcurs_opaque\fR(3X))
78which provide read-only access to \fIcurses\fP's state.
79In either case, applications should treat them as read-only to avoid
80confusing the library.
81.SS COLOR_PAIRS
82After initializing curses, this variable contains the number of color pairs
83which the terminal can support.
84Usually the number of color pairs will be the product \fBCOLORS\fP*\fBCOLORS\fP,
85however this is not always true:
86.bP
87a few terminals use HLS colors, which do not follow this rule
88.bP
89terminals supporting a large number of colors are limited by the number
90of color pairs that can be represented in a \fIsigned short\fP value.
91.SS COLORS
92After initializing curses, this variable contains the number of colors
93which the terminal can support.
94.SS COLS
95After initializing curses, this variable contains the width of the screen,
96i.e., the number of columns.
97.SS ESCDELAY
98This variable holds the number of milliseconds to wait after reading an
99escape character,
100to distinguish between an individual escape character entered on the
101keyboard from escape sequences sent by cursor- and function-keys
102(see curses(3X).
103.SS LINES
104After initializing curses, this variable contains the height of the screen,
105i.e., the number of lines.
106.SS TABSIZE
107This variable holds the number of columns used by the \fIcurses\fP library
108when converting a tab character to spaces as it adds the tab to a window
109(see curs_addch(3X).
110.SS The Current Screen
111This implementation of curses uses a special window \fBcurscr\fP to
112record its updates to the terminal screen.
113.SS The New Screen
114This implementation of curses uses a special window \fBnewscr\fP to
115hold updates to the terminal screen before applying them to \fBcurscr\fP.
116.SS The Standard Screen
117Upon initializing curses,
118a default window called \fBstdscr\fP,
119which is the size of the terminal screen, is created.
120Many curses functions use this window.
121.SH NOTES
122The curses library is initialized using either \fBinitscr\fR(3X),
123or \fBnewterm\fR(3X).
124.PP
125If \fBcurses\fP is configured to use separate curses/terminfo libraries,
126most of these variables reside in the curses library.
127.SH PORTABILITY
128ESCDELAY and TABSIZE are extensions,
129not provided in most other implementations of curses.
130.SH SEE ALSO
131\fBcurses\fR(3X),
132\fBcurs_opaque\fR(3X),
133\fBcurs_terminfo\fR(3X),
134\fBcurs_threads\fR(3X),
135\fBterm_variables\fR(3X),
136\fBterminfo\fR(\*n).