]> ncurses.scripts.mit.edu Git - ncurses.git/blob - doc/html/man/curs_variables.3x.html
ncurses 5.9 - patch 20130518
[ncurses.git] / doc / html / man / curs_variables.3x.html
1 <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01//EN">
2 <!-- 
3   ****************************************************************************
4   * Copyright (c) 2010 Free Software Foundation, Inc.                        *
5   *                                                                          *
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:                 *
13   *                                                                          *
14   * The above copyright notice and this permission notice shall be included  *
15   * in all copies or substantial portions of the Software.                   *
16   *                                                                          *
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.                               *
24   *                                                                          *
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       *
28   * authorization.                                                           *
29   ****************************************************************************
30   * @Id: curs_variables.3x,v 1.4 2010/12/04 18:38:55 tom Exp @
31 -->
32 <HTML>
33 <HEAD>
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">
37 </HEAD>
38 <BODY>
39 <H1>curs_variables 3x</H1>
40 <HR>
41 <PRE>
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>
44
45
46
47
48 </PRE>
49 <H2>NAME</H2><PRE>
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
52
53
54 </PRE>
55 <H2>SYNOPSIS</H2><PRE>
56        <STRONG>#include</STRONG> <STRONG>&lt;curses.h&gt;</STRONG>
57
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>
67
68
69 </PRE>
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.
74
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>)  which provide
77        read-only access to <EM>curses</EM>'s state.  In either  case,  ap-
78        plications should treat them as read-only to avoid confus-
79        ing the library.
80
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:
86
87        <STRONG>o</STRONG>   a  few  terminals  use HLS colors, which do not follow
88            this rule
89
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.
93
94    <STRONG>COLORS</STRONG>
95        After initializing curses, this variable contains the num-
96        ber of colors which the terminal can support.
97
98    <STRONG>COLS</STRONG>
99        After  initializing  curses,  this  variable  contains the
100        width of the screen, i.e., the number of columns.
101
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>.
108
109    <STRONG>LINES</STRONG>
110        After initializing  curses,  this  variable  contains  the
111        height of the screen, i.e., the number of lines.
112
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>.
117
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.
121
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>.
126
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.
131
132
133 </PRE>
134 <H2>NOTES</H2><PRE>
135        The   curses   library   is   initialized   using   either
136        <STRONG><A HREF="initscr.3x.html">initscr(3x)</A></STRONG>, or <STRONG><A HREF="newterm.3x.html">newterm(3x)</A></STRONG>.
137
138        If  <STRONG>curses</STRONG>  is  configured to use separate curses/terminfo
139        libraries, most of these variables reside  in  the  curses
140        library.
141
142
143 </PRE>
144 <H2>PORTABILITY</H2><PRE>
145        ESCDELAY  and TABSIZE are extensions, not provided in most
146        other implementations of curses.
147
148
149 </PRE>
150 <H2>SEE ALSO</H2><PRE>
151        <STRONG><A HREF="ncurses.3x.html">curses(3x)</A></STRONG>, <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>termin-</STRONG>
152        <STRONG><A HREF="terminfo.3x.html">fo(3x)</A></STRONG>, <STRONG><A HREF="terminfo.5.html">terminfo(5)</A></STRONG>.
153
154
155
156                                                      <STRONG><A HREF="curs_variables.3x.html">curs_variables(3x)</A></STRONG>
157 </PRE>
158 <HR>
159 <ADDRESS>
160 Man(1) output converted with
161 <a href="http://www.oac.uci.edu/indiv/ehood/man2html.html">man2html</a>
162 </ADDRESS>
163 </BODY>
164 </HTML>