]> ncurses.scripts.mit.edu Git - ncurses.git/blob - doc/html/man/curs_variables.3x.html
d97bef0ad71c62d165be8fcd66b887280f6a9109
[ncurses.git] / doc / html / man / curs_variables.3x.html
1 <!-- 
2   ****************************************************************************
3   * Copyright (c) 2010,2013 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.6 2013/12/21 18:41:32 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 http://invisible-island.net/scripts/readme.html#others_scripts">
36 <TITLE>curs_variables 3x</TITLE>
37 <link rev=made 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>curs_variables 3x</H1>
42 <HR>
43 <PRE>
44 <STRONG><A HREF="curs_variables.3x.html">curs_variables(3x)</A></STRONG>                                   <STRONG><A HREF="curs_variables.3x.html">curs_variables(3x)</A></STRONG>
45
46
47
48
49 </PRE>
50 <H2><a name="h2-NAME">NAME</a></H2><PRE>
51        <STRONG>COLORS</STRONG>, <STRONG>COLOR_PAIRS</STRONG>, <STRONG>COLS</STRONG>, <STRONG>ESCDELAY</STRONG>, <STRONG>LINES</STRONG>, <STRONG>TABSIZE</STRONG>,
52        <STRONG>curscr</STRONG>, <STRONG>newscr</STRONG>, <STRONG>stdscr</STRONG> - <STRONG>curses</STRONG> global variables
53
54
55 </PRE>
56 <H2><a name="h2-SYNOPSIS">SYNOPSIS</a></H2><PRE>
57        <STRONG>#include</STRONG> <STRONG>&lt;curses.h&gt;</STRONG>
58
59        <STRONG>int</STRONG> <STRONG>COLOR_PAIRS;</STRONG>
60        <STRONG>int</STRONG> <STRONG>COLORS;</STRONG>
61        <STRONG>int</STRONG> <STRONG>COLS;</STRONG>
62        <STRONG>int</STRONG> <STRONG>ESCDELAY;</STRONG>
63        <STRONG>int</STRONG> <STRONG>LINES;</STRONG>
64        <STRONG>int</STRONG> <STRONG>TABSIZE;</STRONG>
65        <STRONG>WINDOW</STRONG> <STRONG>*</STRONG> <STRONG>curscr;</STRONG>
66        <STRONG>WINDOW</STRONG> <STRONG>*</STRONG> <STRONG>newscr;</STRONG>
67        <STRONG>WINDOW</STRONG> <STRONG>*</STRONG> <STRONG>stdscr;</STRONG>
68
69
70 </PRE>
71 <H2><a name="h2-DESCRIPTION">DESCRIPTION</a></H2><PRE>
72        This page summarizes variables provided by the <STRONG>curses</STRONG>  li-
73        brary.   A more complete description is given in the <STRONG>curs-</STRONG>
74        <STRONG><A HREF="ncurses.3x.html">es(3x)</A></STRONG> manual page.
75
76        Depending on the configuration, these may be actual  vari-
77        ables,     or    macros    (see    <STRONG><A HREF="curs_threads.3x.html">curs_threads(3x)</A></STRONG>    and
78        <STRONG><A HREF="curs_opaque.3x.html">curs_opaque(3x)</A></STRONG>) which provide read-only access  to  <EM>curs-</EM>
79        <EM>es</EM>'s  state.   In  either  case, applications should treat
80        them as read-only to avoid confusing the library.
81
82
83 </PRE>
84 <H3><a name="h3-COLOR_PAIRS">COLOR_PAIRS</a></H3><PRE>
85        After initializing curses, this variable contains the num-
86        ber of color pairs which the terminal can support.  Usual-
87        ly the number of color pairs  will  be  the  product  <STRONG>COL-</STRONG>
88        <STRONG>ORS</STRONG>*<STRONG>COLORS</STRONG>, however this is not always true:
89
90        <STRONG>o</STRONG>   a  few  terminals  use HLS colors, which do not follow
91            this rule
92
93        <STRONG>o</STRONG>   terminals supporting a large number of colors are lim-
94            ited  by  the number of color pairs that can be repre-
95            sented in a <EM>signed</EM> <EM>short</EM> value.
96
97
98 </PRE>
99 <H3><a name="h3-COLORS">COLORS</a></H3><PRE>
100        After initializing curses, this variable contains the num-
101        ber of colors which the terminal can support.
102
103
104 </PRE>
105 <H3><a name="h3-COLS">COLS</a></H3><PRE>
106        After  initializing  curses,  this  variable  contains the
107        width of the screen, i.e., the number of columns.
108
109
110 </PRE>
111 <H3><a name="h3-ESCDELAY">ESCDELAY</a></H3><PRE>
112        This variable holds the number of milliseconds to wait af-
113        ter reading an escape character, to distinguish between an
114        individual escape character entered on the  keyboard  from
115        escape  sequences  sent  by cursor- and function-keys (see
116        <STRONG><A HREF="ncurses.3x.html">curses(3x)</A></STRONG>.
117
118
119 </PRE>
120 <H3><a name="h3-LINES">LINES</a></H3><PRE>
121        After initializing  curses,  this  variable  contains  the
122        height of the screen, i.e., the number of lines.
123
124
125 </PRE>
126 <H3><a name="h3-TABSIZE">TABSIZE</a></H3><PRE>
127        This  variable  holds  the  number  of columns used by the
128        <EM>curses</EM> library when converting a tab character  to  spaces
129        as it adds the tab to a window (see <STRONG><A HREF="curs_addch.3x.html">curs_addch(3x)</A></STRONG>.
130
131
132 </PRE>
133 <H3><a name="h3-The-Current-Screen">The Current Screen</a></H3><PRE>
134        This implementation of curses uses a special window <STRONG>curscr</STRONG>
135        to record its updates to the terminal screen.
136
137
138 </PRE>
139 <H3><a name="h3-The-New-Screen">The New Screen</a></H3><PRE>
140        This implementation of curses uses a special window <STRONG>newscr</STRONG>
141        to  hold  updates  to  the terminal screen before applying
142        them to <STRONG>curscr</STRONG>.
143
144
145 </PRE>
146 <H3><a name="h3-The-Standard-Screen">The Standard Screen</a></H3><PRE>
147        Upon initializing curses, a default window called  <STRONG>stdscr</STRONG>,
148        which  is  the  size  of  the terminal screen, is created.
149        Many curses functions use this window.
150
151
152 </PRE>
153 <H2><a name="h2-NOTES">NOTES</a></H2><PRE>
154        The   curses   library   is   initialized   using   either
155        <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>.
156
157        If  <STRONG>curses</STRONG>  is  configured to use separate curses/terminfo
158        libraries, most of these variables reside  in  the  curses
159        library.
160
161
162 </PRE>
163 <H2><a name="h2-PORTABILITY">PORTABILITY</a></H2><PRE>
164        ESCDELAY  and TABSIZE are extensions, not provided in most
165        other implementations of curses.
166
167
168 </PRE>
169 <H2><a name="h2-SEE-ALSO">SEE ALSO</a></H2><PRE>
170        <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>,
171        <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>.
172
173
174
175                                                      <STRONG><A HREF="curs_variables.3x.html">curs_variables(3x)</A></STRONG>
176 </PRE>
177 <div class="nav">
178 <ul>
179 <li><a href="#h2-NAME">NAME</a></li>
180 <li><a href="#h2-SYNOPSIS">SYNOPSIS</a></li>
181 <li><a href="#h2-DESCRIPTION">DESCRIPTION</a>
182 <ul>
183 <li><a href="#h3-COLOR_PAIRS">COLOR_PAIRS</a></li>
184 <li><a href="#h3-COLORS">COLORS</a></li>
185 <li><a href="#h3-COLS">COLS</a></li>
186 <li><a href="#h3-ESCDELAY">ESCDELAY</a></li>
187 <li><a href="#h3-LINES">LINES</a></li>
188 <li><a href="#h3-TABSIZE">TABSIZE</a></li>
189 <li><a href="#h3-The-Current-Screen">The Current Screen</a></li>
190 <li><a href="#h3-The-New-Screen">The New Screen</a></li>
191 <li><a href="#h3-The-Standard-Screen">The Standard Screen</a></li>
192 </ul>
193 </li>
194 <li><a href="#h2-NOTES">NOTES</a></li>
195 <li><a href="#h2-PORTABILITY">PORTABILITY</a></li>
196 <li><a href="#h2-SEE-ALSO">SEE ALSO</a></li>
197 </ul>
198 </div>
199 </BODY>
200 </HTML>