]> ncurses.scripts.mit.edu Git - ncurses.git/blob - man/term_variables.3x
ncurses 5.9 - patch 20140802
[ncurses.git] / man / term_variables.3x
1 .\"***************************************************************************
2 .\" Copyright (c) 2011,2013 Free Software Foundation, Inc.                   *
3 .\"                                                                          *
4 .\" Permission is hereby granted, free of charge, to any person obtaining a  *
5 .\" copy of this software and associated documentation files (the            *
6 .\" "Software"), to deal in the Software without restriction, including      *
7 .\" without limitation the rights to use, copy, modify, merge, publish,      *
8 .\" distribute, distribute with modifications, sublicense, and/or sell       *
9 .\" copies of the Software, and to permit persons to whom the Software is    *
10 .\" furnished to do so, subject to the following conditions:                 *
11 .\"                                                                          *
12 .\" The above copyright notice and this permission notice shall be included  *
13 .\" in all copies or substantial portions of the Software.                   *
14 .\"                                                                          *
15 .\" THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS  *
16 .\" OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF               *
17 .\" MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.   *
18 .\" IN NO EVENT SHALL THE ABOVE COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM,   *
19 .\" DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR    *
20 .\" OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR    *
21 .\" THE USE OR OTHER DEALINGS IN THE SOFTWARE.                               *
22 .\"                                                                          *
23 .\" Except as contained in this notice, the name(s) of the above copyright   *
24 .\" holders shall not be used in advertising or otherwise to promote the     *
25 .\" sale, use or other dealings in this Software without prior written       *
26 .\" authorization.                                                           *
27 .\"***************************************************************************
28 .\"
29 .\" $Id: term_variables.3x,v 1.4 2013/12/21 22:17:39 tom Exp $
30 .TH term_variables 3X ""
31 .ds n 5
32 .na
33 .hy 0
34 .SH NAME
35 \fBSP\fP,
36 \fBacs_map\fP,
37 \fBboolcodes\fP,
38 \fBboolfnames\fP,
39 \fBboolnames\fP,
40 \fBcur_term\fP,
41 \fBnumcodes\fP,
42 \fBnumfnames\fP,
43 \fBnumnames\fP,
44 \fBstrcodes\fP,
45 \fBstrfnames\fP,
46 \fBstrnames\fP,
47 \fBttytype\fP
48 \- \fBcurses\fR terminfo global variables
49 .ad
50 .hy
51 .SH SYNOPSIS
52 .nf
53 \fB#include <curses.h>\fR
54 .br
55 \fB#include <term.h>\fR
56 .PP
57 \fBchtype acs_map[];\fR
58 .br
59 \fBNCURSES_CONST char * const * boolcodes;\fR
60 .br
61 \fBNCURSES_CONST char * const * boolfnames;\fR
62 .br
63 \fBNCURSES_CONST char * const * boolnames;\fR
64 .br
65 \fBTERMINAL * cur_term;\fR
66 .br
67 \fBNCURSES_CONST char * const * numcodes;\fR
68 .br
69 \fBNCURSES_CONST char * const * numfnames;\fR
70 .br
71 \fBNCURSES_CONST char * const * numnames;\fR
72 .br
73 \fBNCURSES_CONST char * const * strcodes;\fR
74 .br
75 \fBNCURSES_CONST char * const * strfnames;\fR
76 .br
77 \fBNCURSES_CONST char * const * strnames;\fR
78 .br
79 \fBchar ttytype[];\fR
80 .br
81 .fi
82 .SH DESCRIPTION
83 This page summarizes variables provided by the \fBcurses\fP library's
84 low-level terminfo interface.
85 A more complete description is given in the \fBcurs_terminfo\fP(3X) manual page.
86 .PP
87 Depending on the configuration, these may be actual variables,
88 or macros (see \fBcurs_threads\fR(3X))
89 which provide read-only access to \fIcurses\fP's state.
90 In either case, applications should treat them as read-only to avoid
91 confusing the library.
92 .SS Alternate Character Set Mapping
93 After initializing the curses or terminfo interfaces,
94 the \fBacs_map\fP array holds information used to translate cells
95 with the \fBA_ALTCHARSET\fP video attribute into line-drawing characters.
96 .PP
97 The encoding of the information in this array has changed periodically.
98 Application developers need only know that it is used for the "ACS_"
99 constants in <curses.h>.
100 .PP
101 The comparable data for the wide-character library is a private variable.
102 .SS Current Terminal Data
103 After initializing the curses or terminfo interfaces,
104 the \fBcur_term\fP contains data describing the current terminal.
105 This variable is also set as a side-effect of \fBset_term\fP(3X)
106 and \fBdelscreen\fP(3X).
107 .PP
108 It is possible to save a value of \fBcur_term\fP for subsequent
109 use as a parameter to \fBset_term\fP, for switching between screens.
110 Alternatively, one can save the return value from \fBnewterm\fP
111 or \fBsetupterm\fP to reuse in \fBset_term\fP.
112 .SS Terminfo Names
113 The \fB@TIC@\fP(1) and \fB@INFOCMP@\fP(1) programs use lookup tables for
114 the long and short names of terminfo capabilities,
115 as well as the corresponding names for termcap capabilities.
116 These are available to other applications,
117 though the hash-tables are not available.
118 .PP
119 The long terminfo capability names use a "l" (ell) in their names:
120 boolfnames
121 numfnames
122 strfnames
123 .PP
124 These are the short names for terminfo capabilities:
125 boolnames,
126 numnames, and
127 strnames.
128 .PP
129 These are the corresponding names used for termcap descriptions:
130 boolcodes,
131 numcodes, and
132 strcodes.
133 .SS Terminal Type
134 On initialization of the curses or terminfo interfaces,
135 \fBsetupterm\fP copies the terminal name to the array \fBttytype\fP.
136 .SH NOTES
137 The low-level terminfo interface is initialized using
138 .hy 0
139 \fBsetupterm\fR(3X).
140 .hy
141 The upper-level curses interface uses the low-level terminfo interface,
142 internally.
143 .SH PORTABILITY
144 X/Open Curses does not describe any of these except for \fBcur_term\fP.
145 (The inclusion of \fBcur_term\fP appears to be an oversight,
146 since other comparable low-level information is omitted by X/Open).
147 .PP
148 Other implementations may have comparable variables.
149 Some implementations provide the variables in their libraries,
150 but omit them from the header files.
151 .SH SEE ALSO
152 .hy 0
153 \fBcurses\fR(3X),
154 \fBcurs_terminfo\fR(3X),
155 \fBcurs_threads\fR(3X),
156 \fBterminfo\fR(\*n).
157 .hy