]> ncurses.scripts.mit.edu Git - ncurses.git/blob - doc/html/man/term_variables.3x.html
ncurses 6.0 - patch 20150926
[ncurses.git] / doc / html / man / term_variables.3x.html
1 <!-- 
2   ****************************************************************************
3   * Copyright (c) 2011-2013,2015 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: term_variables.3x,v 1.6 2015/04/22 00:34:49 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>term_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 class="no-header">term_variables 3x</H1>
42 <PRE>
43 <STRONG><A HREF="term_variables.3x.html">term_variables(3x)</A></STRONG>                                   <STRONG><A HREF="term_variables.3x.html">term_variables(3x)</A></STRONG>
44
45
46
47
48 </PRE>
49 <H2><a name="h2-NAME">NAME</a></H2><PRE>
50        <STRONG>SP</STRONG>, <STRONG>acs_map</STRONG>, <STRONG>boolcodes</STRONG>, <STRONG>boolfnames</STRONG>, <STRONG>boolnames</STRONG>, <STRONG>cur_term</STRONG>,
51        <STRONG>numcodes</STRONG>, <STRONG>numfnames</STRONG>, <STRONG>numnames</STRONG>, <STRONG>strcodes</STRONG>, <STRONG>strfnames</STRONG>,
52        <STRONG>strnames</STRONG>, <STRONG>ttytype</STRONG> - <STRONG>curses</STRONG> terminfo 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        <STRONG>#include</STRONG> <STRONG>&lt;term.h&gt;</STRONG>
59
60        <STRONG>chtype</STRONG> <STRONG>acs_map[];</STRONG>
61
62        <STRONG>TERMINAL</STRONG> <STRONG>*</STRONG> <STRONG>cur_term;</STRONG>
63
64        <STRONG>char</STRONG> <STRONG>ttytype[];</STRONG>
65
66        <STRONG>NCURSES_CONST</STRONG> <STRONG>char</STRONG> <STRONG>*</STRONG> <STRONG>const</STRONG> <STRONG>*</STRONG> <STRONG>boolcodes;</STRONG>
67        <STRONG>NCURSES_CONST</STRONG> <STRONG>char</STRONG> <STRONG>*</STRONG> <STRONG>const</STRONG> <STRONG>*</STRONG> <STRONG>boolfnames;</STRONG>
68        <STRONG>NCURSES_CONST</STRONG> <STRONG>char</STRONG> <STRONG>*</STRONG> <STRONG>const</STRONG> <STRONG>*</STRONG> <STRONG>boolnames;</STRONG>
69
70        <STRONG>NCURSES_CONST</STRONG> <STRONG>char</STRONG> <STRONG>*</STRONG> <STRONG>const</STRONG> <STRONG>*</STRONG> <STRONG>numcodes;</STRONG>
71        <STRONG>NCURSES_CONST</STRONG> <STRONG>char</STRONG> <STRONG>*</STRONG> <STRONG>const</STRONG> <STRONG>*</STRONG> <STRONG>numfnames;</STRONG>
72        <STRONG>NCURSES_CONST</STRONG> <STRONG>char</STRONG> <STRONG>*</STRONG> <STRONG>const</STRONG> <STRONG>*</STRONG> <STRONG>numnames;</STRONG>
73
74        <STRONG>NCURSES_CONST</STRONG> <STRONG>char</STRONG> <STRONG>*</STRONG> <STRONG>const</STRONG> <STRONG>*</STRONG> <STRONG>strcodes;</STRONG>
75        <STRONG>NCURSES_CONST</STRONG> <STRONG>char</STRONG> <STRONG>*</STRONG> <STRONG>const</STRONG> <STRONG>*</STRONG> <STRONG>strfnames;</STRONG>
76        <STRONG>NCURSES_CONST</STRONG> <STRONG>char</STRONG> <STRONG>*</STRONG> <STRONG>const</STRONG> <STRONG>*</STRONG> <STRONG>strnames;</STRONG>
77
78
79 </PRE>
80 <H2><a name="h2-DESCRIPTION">DESCRIPTION</a></H2><PRE>
81        This  page summarizes variables provided by the <STRONG>curses</STRONG> li-
82        brary's low-level terminfo interface.  A more complete de-
83        scription is given in the <STRONG><A HREF="curs_terminfo.3x.html">curs_terminfo(3x)</A></STRONG> manual page.
84
85        Depending  on the configuration, these may be actual vari-
86        ables, or  macros  (see  <STRONG><A HREF="curs_threads.3x.html">curs_threads(3x)</A></STRONG>)  which  provide
87        read-only  access  to <EM>curses</EM>'s state.  In either case, ap-
88        plications should treat them as read-only to avoid confus-
89        ing the library.
90
91
92 </PRE>
93 <H3><a name="h3-Alternate-Character-Set-Mapping">Alternate Character Set Mapping</a></H3><PRE>
94        After  initializing the curses or terminfo interfaces, the
95        <STRONG>acs_map</STRONG> array holds information used  to  translate  cells
96        with  the  <STRONG>A_ALTCHARSET</STRONG>  video attribute into line-drawing
97        characters.
98
99        The encoding of the information in this array has  changed
100        periodically.   Application developers need only know that
101        it is used for the "ACS_" constants in &lt;curses.h&gt;.
102
103        The comparable data for the wide-character  library  is  a
104        private variable.
105
106
107 </PRE>
108 <H3><a name="h3-Current-Terminal-Data">Current Terminal Data</a></H3><PRE>
109        After  initializing the curses or terminfo interfaces, the
110        <STRONG>cur_term</STRONG> contains data describing  the  current  terminal.
111        This variable is also set as a side-effect of <STRONG><A HREF="curs_initscr.3x.html">curs_initscr(3x)</A></STRONG>
112        and <STRONG><A HREF="curs_initscr.3x.html">curs_initscr(3x)</A></STRONG>.
113
114        It is possible to save a value of <STRONG>cur_term</STRONG> for  subsequent
115        use  as  a  parameter  to  <STRONG>set_term</STRONG>, for switching between
116        screens.  Alternatively, one can  save  the  return  value
117        from <STRONG>newterm</STRONG> or <STRONG>setupterm</STRONG> to reuse in <STRONG>set_term</STRONG>.
118
119
120 </PRE>
121 <H3><a name="h3-Terminfo-Names">Terminfo Names</a></H3><PRE>
122        The  <STRONG><A HREF="tic.1m.html">tic(1m)</A></STRONG>  and <STRONG><A HREF="infocmp.1m.html">infocmp(1m)</A></STRONG> programs use lookup tables for
123        the long and short names of terminfo capabilities, as well
124        as  the  corresponding  names  for  termcap  capabilities.
125        These are available to other  applications,  although  the
126        hash-tables used by the terminfo and termcap functions are
127        not available.
128
129        The long terminfo capability names  use  a  "l"  (ell)  in
130        their names: <STRONG>boolfnames</STRONG>, <STRONG>numfnames</STRONG>, and <STRONG>strfnames</STRONG>.
131
132        These are the short names for terminfo capabilities: <STRONG>bool-</STRONG>
133        <STRONG>names</STRONG>, <STRONG>numnames</STRONG>, and <STRONG>strnames</STRONG>.
134
135        These are the corresponding names  used  for  termcap  de-
136        scriptions: <STRONG>boolcodes</STRONG>, <STRONG>numcodes</STRONG>, and <STRONG>strcodes</STRONG>.
137
138
139 </PRE>
140 <H3><a name="h3-Terminal-Type">Terminal Type</a></H3><PRE>
141        On  initialization  of  the curses or terminfo interfaces,
142        <STRONG>setupterm</STRONG> copies the terminal name to the array <STRONG>ttytype</STRONG>.
143
144
145 </PRE>
146 <H3><a name="h3-Terminfo-Names">Terminfo Names</a></H3><PRE>
147        In addition to the variables, <STRONG>&lt;term.h&gt;</STRONG> also defines a sym-
148        bol  for each terminfo capability <EM>long</EM> <EM>name</EM>.  These are in
149        terms of the symbol <STRONG>CUR</STRONG>, which is defined
150
151        #define CUR cur_term-&gt;type.
152
153        These symbols provide a faster method of accessing termin-
154        fo capabilities than using <STRONG><A HREF="tigetstr.3x.html">tigetstr(3x)</A></STRONG>, etc.
155
156
157 </PRE>
158 <H2><a name="h2-NOTES">NOTES</a></H2><PRE>
159        The  low-level  terminfo  interface  is  initialized using
160        <STRONG><A HREF="curs_terminfo.3x.html">curs_terminfo(3x)</A></STRONG>.  The upper-level curses interface uses  the
161        low-level terminfo interface, internally.
162
163
164 </PRE>
165 <H2><a name="h2-PORTABILITY">PORTABILITY</a></H2><PRE>
166        X/Open  Curses  does  not describe any of these except for
167        <STRONG>cur_term</STRONG>.  (The inclusion of <STRONG>cur_term</STRONG>  appears  to  be  an
168        oversight, since other comparable low-level information is
169        omitted by X/Open).
170
171        Other implementations may have comparable variables.  Some
172        implementations  provide the variables in their libraries,
173        but omit them from the header files.
174
175        All implementations which provide terminfo interfaces  add
176        definitions  as  described  in the <STRONG>Terminfo</STRONG> <STRONG>Names</STRONG> section.
177        Most, but not all, base the definition upon  the  <STRONG>cur_term</STRONG>
178        variable.
179
180
181 </PRE>
182 <H2><a name="h2-SEE-ALSO">SEE ALSO</a></H2><PRE>
183        <STRONG><A HREF="ncurses.3x.html">curses(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>,
184        <STRONG><A HREF="terminfo.5.html">terminfo(5)</A></STRONG>.
185
186
187
188                                                      <STRONG><A HREF="term_variables.3x.html">term_variables(3x)</A></STRONG>
189 </PRE>
190 <div class="nav">
191 <ul>
192 <li><a href="#h2-NAME">NAME</a></li>
193 <li><a href="#h2-SYNOPSIS">SYNOPSIS</a></li>
194 <li><a href="#h2-DESCRIPTION">DESCRIPTION</a>
195 <ul>
196 <li><a href="#h3-Alternate-Character-Set-Mapping">Alternate Character Set Mapping</a></li>
197 <li><a href="#h3-Current-Terminal-Data">Current Terminal Data</a></li>
198 <li><a href="#h3-Terminfo-Names">Terminfo Names</a></li>
199 <li><a href="#h3-Terminal-Type">Terminal Type</a></li>
200 <li><a href="#h3-Terminfo-Names">Terminfo Names</a></li>
201 </ul>
202 </li>
203 <li><a href="#h2-NOTES">NOTES</a></li>
204 <li><a href="#h2-PORTABILITY">PORTABILITY</a></li>
205 <li><a href="#h2-SEE-ALSO">SEE ALSO</a></li>
206 </ul>
207 </div>
208 </BODY>
209 </HTML>