1 <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01//EN">
3 ****************************************************************************
4 * Copyright (c) 2010,2013 Free Software Foundation, Inc. *
6 * Permission is hereby granted, free of charge, to any person obtaining a *
7 * copy of this software and associated documentation files (the *
8 * "Software"), to deal in the Software without restriction, including *
9 * without limitation the rights to use, copy, modify, merge, publish, *
10 * distribute, distribute with modifications, sublicense, and/or sell *
11 * copies of the Software, and to permit persons to whom the Software is *
12 * furnished to do so, subject to the following conditions: *
14 * The above copyright notice and this permission notice shall be included *
15 * in all copies or substantial portions of the Software. *
17 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS *
18 * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF *
19 * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. *
20 * IN NO EVENT SHALL THE ABOVE COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, *
21 * DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR *
22 * OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR *
23 * THE USE OR OTHER DEALINGS IN THE SOFTWARE. *
25 * Except as contained in this notice, the name(s) of the above copyright *
26 * holders shall not be used in advertising or otherwise to promote the *
27 * sale, use or other dealings in this Software without prior written *
29 ****************************************************************************
30 * @Id: curs_variables.3x,v 1.6 2013/12/21 18:41:32 tom Exp @
34 <TITLE>curs_variables 3x</TITLE>
35 <link rev=made href="mailto:bug-ncurses@gnu.org">
36 <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
39 <H1>curs_variables 3x</H1>
42 <!-- Manpage converted by man2html 3.0.1 -->
43 <STRONG><A HREF="curs_variables.3x.html">curs_variables(3x)</A></STRONG> <STRONG><A HREF="curs_variables.3x.html">curs_variables(3x)</A></STRONG>
50 <STRONG>COLORS</STRONG>, <STRONG>COLOR_PAIRS</STRONG>, <STRONG>COLS</STRONG>, <STRONG>ESCDELAY</STRONG>, <STRONG>LINES</STRONG>, <STRONG>TABSIZE</STRONG>,
51 <STRONG>curscr</STRONG>, <STRONG>newscr</STRONG>, <STRONG>stdscr</STRONG> - <STRONG>curses</STRONG> global variables
55 <H2>SYNOPSIS</H2><PRE>
56 <STRONG>#include</STRONG> <STRONG><curses.h></STRONG>
58 <STRONG>int</STRONG> <STRONG>COLOR_PAIRS;</STRONG>
59 <STRONG>int</STRONG> <STRONG>COLORS;</STRONG>
60 <STRONG>int</STRONG> <STRONG>COLS;</STRONG>
61 <STRONG>int</STRONG> <STRONG>ESCDELAY;</STRONG>
62 <STRONG>int</STRONG> <STRONG>LINES;</STRONG>
63 <STRONG>int</STRONG> <STRONG>TABSIZE;</STRONG>
64 <STRONG>WINDOW</STRONG> <STRONG>*</STRONG> <STRONG>curscr;</STRONG>
65 <STRONG>WINDOW</STRONG> <STRONG>*</STRONG> <STRONG>newscr;</STRONG>
66 <STRONG>WINDOW</STRONG> <STRONG>*</STRONG> <STRONG>stdscr;</STRONG>
70 <H2>DESCRIPTION</H2><PRE>
71 This page summarizes variables provided by the <STRONG>curses</STRONG> li-
72 brary. A more complete description is given in the <STRONG>curs-</STRONG>
73 <STRONG><A HREF="ncurses.3x.html">es(3x)</A></STRONG> manual page.
75 Depending on the configuration, these may be actual vari-
76 ables, or macros (see <STRONG><A HREF="curs_threads.3x.html">curs_threads(3x)</A></STRONG> and
77 <STRONG><A HREF="curs_opaque.3x.html">curs_opaque(3x)</A></STRONG>) which provide read-only access to <EM>curs-</EM>
78 <EM>es</EM>'s state. In either case, applications should treat
79 them as read-only to avoid confusing the library.
81 <STRONG>COLOR_PAIRS</STRONG>
82 After initializing curses, this variable contains the num-
83 ber of color pairs which the terminal can support. Usual-
84 ly the number of color pairs will be the product <STRONG>COL-</STRONG>
85 <STRONG>ORS</STRONG>*<STRONG>COLORS</STRONG>, however this is not always true:
87 <STRONG>o</STRONG> a few terminals use HLS colors, which do not follow
90 <STRONG>o</STRONG> terminals supporting a large number of colors are lim-
91 ited by the number of color pairs that can be repre-
92 sented in a <EM>signed</EM> <EM>short</EM> value.
94 <STRONG>COLORS</STRONG>
95 After initializing curses, this variable contains the num-
96 ber of colors which the terminal can support.
99 After initializing curses, this variable contains the
100 width of the screen, i.e., the number of columns.
102 <STRONG>ESCDELAY</STRONG>
103 This variable holds the number of milliseconds to wait af-
104 ter reading an escape character, to distinguish between an
105 individual escape character entered on the keyboard from
106 escape sequences sent by cursor- and function-keys (see
107 <STRONG><A HREF="ncurses.3x.html">curses(3x)</A></STRONG>.
109 <STRONG>LINES</STRONG>
110 After initializing curses, this variable contains the
111 height of the screen, i.e., the number of lines.
113 <STRONG>TABSIZE</STRONG>
114 This variable holds the number of columns used by the
115 <EM>curses</EM> library when converting a tab character to spaces
116 as it adds the tab to a window (see <STRONG><A HREF="curs_addch.3x.html">curs_addch(3x)</A></STRONG>.
118 <STRONG>The</STRONG> <STRONG>Current</STRONG> <STRONG>Screen</STRONG>
119 This implementation of curses uses a special window <STRONG>curscr</STRONG>
120 to record its updates to the terminal screen.
122 <STRONG>The</STRONG> <STRONG>New</STRONG> <STRONG>Screen</STRONG>
123 This implementation of curses uses a special window <STRONG>newscr</STRONG>
124 to hold updates to the terminal screen before applying
125 them to <STRONG>curscr</STRONG>.
127 <STRONG>The</STRONG> <STRONG>Standard</STRONG> <STRONG>Screen</STRONG>
128 Upon initializing curses, a default window called <STRONG>stdscr</STRONG>,
129 which is the size of the terminal screen, is created.
130 Many curses functions use this window.
135 The curses library is initialized using either
136 <STRONG><A HREF="curs_initscr.3x.html">curs_initscr(3x)</A></STRONG>, or <STRONG><A HREF="curs_initscr.3x.html">curs_initscr(3x)</A></STRONG>.
138 If <STRONG>curses</STRONG> is configured to use separate curses/terminfo
139 libraries, most of these variables reside in the curses
144 <H2>PORTABILITY</H2><PRE>
145 ESCDELAY and TABSIZE are extensions, not provided in most
146 other implementations of curses.
150 <H2>SEE ALSO</H2><PRE>
151 <STRONG><A HREF="ncurses.3x.html">curses(3x)</A></STRONG>, <STRONG><A HREF="curs_opaque.3x.html">curs_opaque(3x)</A></STRONG>, <STRONG><A HREF="curs_terminfo.3x.html">curs_terminfo(3x)</A></STRONG>,
152 <STRONG><A HREF="curs_threads.3x.html">curs_threads(3x)</A></STRONG>, <STRONG><A HREF="term_variables.3x.html">term_variables(3x)</A></STRONG>, <STRONG><A HREF="terminfo.5.html">terminfo(5)</A></STRONG>.
156 <STRONG><A HREF="curs_variables.3x.html">curs_variables(3x)</A></STRONG>
160 Man(1) output converted with
161 <a href="http://www.oac.uci.edu/indiv/ehood/man2html.html">man2html</a>