]> ncurses.scripts.mit.edu Git - ncurses.git/blob - doc/html/man/curs_variables.3x.html
ncurses 6.1 - patch 20191207
[ncurses.git] / doc / html / man / curs_variables.3x.html
1 <!-- 
2   ****************************************************************************
3   * Copyright (c) 2010-2018,2019 Free Software Foundation, Inc.              *
4   *                                                                          *
5   * Permission is hereby granted, free of charge, to any person obtaining a  *
6   * copy of this software and associated documentation files (the            *
7   * "Software"), to deal in the Software without restriction, including      *
8   * without limitation the rights to use, copy, modify, merge, publish,      *
9   * distribute, distribute with modifications, sublicense, and/or sell       *
10   * copies of the Software, and to permit persons to whom the Software is    *
11   * furnished to do so, subject to the following conditions:                 *
12   *                                                                          *
13   * The above copyright notice and this permission notice shall be included  *
14   * in all copies or substantial portions of the Software.                   *
15   *                                                                          *
16   * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS  *
17   * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF               *
18   * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.   *
19   * IN NO EVENT SHALL THE ABOVE COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM,   *
20   * DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR    *
21   * OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR    *
22   * THE USE OR OTHER DEALINGS IN THE SOFTWARE.                               *
23   *                                                                          *
24   * Except as contained in this notice, the name(s) of the above copyright   *
25   * holders shall not be used in advertising or otherwise to promote the     *
26   * sale, use or other dealings in this Software without prior written       *
27   * authorization.                                                           *
28   ****************************************************************************
29   * @Id: curs_variables.3x,v 1.13 2019/06/01 22:51:21 tom Exp @
30 -->
31 <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01//EN">
32 <HTML>
33 <HEAD>
34 <meta http-equiv="Content-Type" content="text/html; charset=us-ascii">
35 <meta name="generator" content="Manpage converted by man2html - see https://invisible-island.net/scripts/readme.html#others_scripts">
36 <TITLE>curs_variables 3x</TITLE>
37 <link rel="author" href="mailto:bug-ncurses@gnu.org">
38 <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
39 </HEAD>
40 <BODY>
41 <H1 class="no-header">curs_variables 3x</H1>
42 <PRE>
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>
44
45
46
47
48 </PRE><H2><a name="h2-NAME">NAME</a></H2><PRE>
49        <STRONG>COLORS</STRONG>, <STRONG>COLOR_PAIRS</STRONG>, <STRONG>COLS</STRONG>, <STRONG>ESCDELAY</STRONG>, <STRONG>LINES</STRONG>, <STRONG>TABSIZE</STRONG>, <STRONG>curscr</STRONG>, <STRONG>newscr</STRONG>,
50        <STRONG>stdscr</STRONG> - <STRONG>curses</STRONG> global variables
51
52
53 </PRE><H2><a name="h2-SYNOPSIS">SYNOPSIS</a></H2><PRE>
54        <STRONG>#include</STRONG> <STRONG>&lt;curses.h&gt;</STRONG>
55
56        <STRONG>int</STRONG> <STRONG>COLOR_PAIRS;</STRONG>
57        <STRONG>int</STRONG> <STRONG>COLORS;</STRONG>
58        <STRONG>int</STRONG> <STRONG>COLS;</STRONG>
59        <STRONG>int</STRONG> <STRONG>ESCDELAY;</STRONG>
60        <STRONG>int</STRONG> <STRONG>LINES;</STRONG>
61        <STRONG>int</STRONG> <STRONG>TABSIZE;</STRONG>
62        <STRONG>WINDOW</STRONG> <STRONG>*</STRONG> <STRONG>curscr;</STRONG>
63        <STRONG>WINDOW</STRONG> <STRONG>*</STRONG> <STRONG>newscr;</STRONG>
64        <STRONG>WINDOW</STRONG> <STRONG>*</STRONG> <STRONG>stdscr;</STRONG>
65
66
67 </PRE><H2><a name="h2-DESCRIPTION">DESCRIPTION</a></H2><PRE>
68        This page summarizes variables provided by the <STRONG>curses</STRONG> library.  A  more
69        complete description is given in the <STRONG><A HREF="ncurses.3x.html">curses(3x)</A></STRONG> manual page.
70
71        Depending  on  the  configuration,  these  may  be actual variables, or
72        macros (see <STRONG><A HREF="curs_threads.3x.html">curs_threads(3x)</A></STRONG> and <STRONG><A HREF="curs_opaque.3x.html">curs_opaque(3x)</A></STRONG>) which  provide  read-
73        only  access  to  <EM>curses</EM>'s  state.  In either case, applications should
74        treat them as read-only to avoid confusing the library.
75
76
77 </PRE><H3><a name="h3-COLOR_PAIRS">COLOR_PAIRS</a></H3><PRE>
78        After initializing curses, this variable contains the number  of  color
79        pairs  which  the  terminal  can  support.  Usually the number of color
80        pairs will be the product <STRONG>COLORS</STRONG>*<STRONG>COLORS</STRONG>, however  this  is  not  always
81        true:
82
83        <STRONG>o</STRONG>   a few terminals use HLS colors, which do not follow this rule
84
85        <STRONG>o</STRONG>   terminals  supporting  a  large number of colors are limited by the
86            number of color pairs that can be represented  in  a  <EM>signed</EM>  <EM>short</EM>
87            value.
88
89
90 </PRE><H3><a name="h3-COLORS">COLORS</a></H3><PRE>
91        After  initializing curses, this variable contains the number of colors
92        which the terminal can support.
93
94
95 </PRE><H3><a name="h3-COLS">COLS</a></H3><PRE>
96        After initializing curses, this variable  contains  the  width  of  the
97        screen, i.e., the number of columns.
98
99
100 </PRE><H3><a name="h3-ESCDELAY">ESCDELAY</a></H3><PRE>
101        This variable holds the number of milliseconds to wait after reading an
102        escape character, to distinguish between an individual escape character
103        entered on the keyboard from escape sequences sent by cursor- and func-
104        tion-keys (see <STRONG><A HREF="ncurses.3x.html">curses(3x)</A></STRONG>).
105
106
107 </PRE><H3><a name="h3-LINES">LINES</a></H3><PRE>
108        After initializing curses, this variable contains  the  height  of  the
109        screen, i.e., the number of lines.
110
111
112 </PRE><H3><a name="h3-TABSIZE">TABSIZE</a></H3><PRE>
113        This  variable  holds  the number of columns used by the <EM>curses</EM> library
114        when converting a tab character to spaces as it adds the tab to a  win-
115        dow (see <STRONG><A HREF="curs_addch.3x.html">curs_addch(3x)</A></STRONG>.
116
117
118 </PRE><H3><a name="h3-The-Current-Screen">The Current Screen</a></H3><PRE>
119        This  implementation  of  curses uses a special window <STRONG>curscr</STRONG> to record
120        its updates to the terminal screen.
121
122        This is referred to as the "physical screen"  in  the  <STRONG><A HREF="curs_refresh.3x.html">curs_refresh(3x)</A></STRONG>
123        and <STRONG><A HREF="curs_outopts.3x.html">curs_outopts(3x)</A></STRONG> manual pages.
124
125
126 </PRE><H3><a name="h3-The-New-Screen">The New Screen</a></H3><PRE>
127        This  implementation of curses uses a special window <STRONG>newscr</STRONG> to hold up-
128        dates to the terminal screen before applying them to <STRONG>curscr</STRONG>.
129
130        This is referred to as the "virtual  screen"  in  the  <STRONG><A HREF="curs_kernel.3x.html">curs_kernel(3x)</A></STRONG>,
131        <STRONG><A HREF="curs_refresh.3x.html">curs_refresh(3x)</A></STRONG> and <STRONG><A HREF="curs_outopts.3x.html">curs_outopts(3x)</A></STRONG> manual pages.
132
133
134 </PRE><H3><a name="h3-The-Standard-Screen">The Standard Screen</a></H3><PRE>
135        Upon  initializing curses, a default window called <STRONG>stdscr</STRONG>, which is the
136        size of the terminal screen, is created.   Many  curses  functions  use
137        this window.
138
139
140 </PRE><H2><a name="h2-NOTES">NOTES</a></H2><PRE>
141        The   curses  library  is  initialized  using  either  <STRONG><A HREF="curs_initscr.3x.html">initscr(3x)</A></STRONG>,  or
142        <STRONG><A HREF="curs_initscr.3x.html">newterm(3x)</A></STRONG>.
143
144        If <STRONG>curses</STRONG> is configured to use separate curses/terminfo libraries, most
145        of these variables reside in the curses library.
146
147
148 </PRE><H2><a name="h2-PORTABILITY">PORTABILITY</a></H2><PRE>
149        <STRONG>TABSIZE</STRONG>  is  a feature of SVr4 curses which is not documented by X/Open
150        curses.
151
152        <STRONG>o</STRONG>   In SVr4 curses, <STRONG>TABSIZE</STRONG> is initially set from the terminal descrip-
153            tion's  <STRONG>init_tabs</STRONG> capability.  After that, it can be altered by the
154            applications using SVr4 curses.
155
156            SVr4 curses uses the current value of <STRONG>TABSIZE</STRONG> to compute the  posi-
157            tion  of  tabstops  for  updating both the virtual screen with <STRONG>add-</STRONG>
158            <STRONG><A HREF="addch.3x.html">ch(3x)</A></STRONG> as well as the physical screen with <STRONG><A HREF="curs_terminfo.3x.html">mvcur(3x)</A></STRONG>.
159
160        <STRONG>o</STRONG>   This implementation uses the current value of <STRONG>TABSIZE</STRONG> only for  up-
161            dating  the  virtual screen.  It uses the terminal description's <STRONG>it</STRONG>
162            (<STRONG>init_tabs</STRONG>) capability for computing hardware tabs (i.e., tab stops
163            on the physical screen).
164
165        <STRONG>o</STRONG>   Other  implementations  differ.  For instance, NetBSD curses allows
166            <STRONG>TABSIZE</STRONG> to be set through an environment variable.  This  implemen-
167            tation does not.
168
169            NetBSD curses does not support hardware tabs; it uses the <STRONG>init_tabs</STRONG>
170            capability and the <STRONG>TABSIZE</STRONG> variable only for updating  the  virtual
171            screen.
172
173        <STRONG>ESCDELAY</STRONG> is an extension in AIX curses:
174
175        <STRONG>o</STRONG>   In AIX, the units for <STRONG>ESCDELAY</STRONG> are <EM>fifths</EM> of a millisecond.
176
177        <STRONG>o</STRONG>   The default value for AIX's <STRONG>ESCDELAY</STRONG> is 0.1 seconds.
178
179        <STRONG>o</STRONG>   AIX  also enforces a limit of 10,000 seconds for <STRONG>ESCDELAY</STRONG>; this im-
180            plementation currently has no upper limit.
181
182        This implementation has long used <STRONG>ESCDELAY</STRONG> with units of  milliseconds,
183        making  it  impossible to be completely compatible with AIX.  Likewise,
184        most users have either decided to override the value, or rely upon  its
185        default value.
186
187
188 </PRE><H2><a name="h2-SEE-ALSO">SEE ALSO</a></H2><PRE>
189        <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>,   <STRONG><A HREF="curs_threads.3x.html">curs_threads(3x)</A></STRONG>,
190        <STRONG><A HREF="term_variables.3x.html">term_variables(3x)</A></STRONG>, <STRONG><A HREF="terminfo.5.html">terminfo(5)</A></STRONG>.
191
192
193
194                                                             <STRONG><A HREF="curs_variables.3x.html">curs_variables(3x)</A></STRONG>
195 </PRE>
196 <div class="nav">
197 <ul>
198 <li><a href="#h2-NAME">NAME</a></li>
199 <li><a href="#h2-SYNOPSIS">SYNOPSIS</a></li>
200 <li><a href="#h2-DESCRIPTION">DESCRIPTION</a>
201 <ul>
202 <li><a href="#h3-COLOR_PAIRS">COLOR_PAIRS</a></li>
203 <li><a href="#h3-COLORS">COLORS</a></li>
204 <li><a href="#h3-COLS">COLS</a></li>
205 <li><a href="#h3-ESCDELAY">ESCDELAY</a></li>
206 <li><a href="#h3-LINES">LINES</a></li>
207 <li><a href="#h3-TABSIZE">TABSIZE</a></li>
208 <li><a href="#h3-The-Current-Screen">The Current Screen</a></li>
209 <li><a href="#h3-The-New-Screen">The New Screen</a></li>
210 <li><a href="#h3-The-Standard-Screen">The Standard Screen</a></li>
211 </ul>
212 </li>
213 <li><a href="#h2-NOTES">NOTES</a></li>
214 <li><a href="#h2-PORTABILITY">PORTABILITY</a></li>
215 <li><a href="#h2-SEE-ALSO">SEE ALSO</a></li>
216 </ul>
217 </div>
218 </BODY>
219 </HTML>