1 .\"***************************************************************************
2 .\" Copyright 2018-2021,2022 Thomas E. Dickey *
3 .\" Copyright 1998-2010,2015 Free Software Foundation, Inc. *
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: *
13 .\" The above copyright notice and this permission notice shall be included *
14 .\" in all copies or substantial portions of the Software. *
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. *
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 *
28 .\"***************************************************************************
30 .\" $Id: curs_termattrs.3x,v 1.19 2022/02/12 20:05:11 tom Exp $
31 .TH curs_termattrs 3X ""
43 \fBtermname\fP \- \fBcurses\fP environment query routines
45 \fB#include <curses.h>\fP
47 \fBint baudrate(void);\fP
49 \fBchar erasechar(void);\fP
51 \fBint erasewchar(wchar_t *\fIch\fB);\fR
53 \fBbool has_ic(void);\fP
55 \fBbool has_il(void);\fP
57 \fBchar killchar(void);\fP
59 \fBint killwchar(wchar_t *\fIch\fB);\fR
61 \fBchar *longname(void);\fP
63 \fBattr_t term_attrs(void);\fP
65 \fBchtype termattrs(void);\fP
67 \fBchar *termname(void);\fP
71 The \fBbaudrate\fP routine returns the output speed of the terminal.
73 number returned is in bits per second, for example \fB9600\fP, and is an
75 .SS erasechar, erasewchar
77 The \fBerasechar\fP routine returns the user's current erase character.
79 The \fBerasewchar\fP routine stores the current erase character
80 in the location referenced by \fIch\fP.
81 If no erase character has been defined, the routine fails
82 and the location referenced by \fIch\fP is not changed.
85 The \fBhas_ic\fP routine is true if the terminal has insert- and delete-
86 character capabilities.
88 The \fBhas_il\fP routine is true if the terminal has insert- and delete-line
89 capabilities, or can simulate them using scrolling regions.
91 be used to determine if it would be appropriate to turn on physical
92 scrolling using \fBscrollok\fP.
93 .SS killchar, killwchar
95 The \fBkillchar\fP routine returns the user's current line kill character.
97 The \fBkillwchar\fP routine stores the current line-kill character
98 in the location referenced by \fIch\fP.
99 If no line-kill character has been defined,
100 the routine fails and the location referenced by \fIch\fP is not changed.
103 The \fBlongname\fP routine returns a pointer to a static area
104 containing a verbose description of the current terminal.
106 length of a verbose description is 128 characters.
108 after the call to \fBinitscr\fP or \fBnewterm\fP. The area is
109 overwritten by each call to \fBnewterm\fP and is not restored by
110 \fBset_term\fP, so the value should be saved between calls to
111 \fBnewterm\fP if \fBlongname\fP is going to be used with multiple
113 .SS termattrs, term_attrs
115 If a given terminal does not support a video attribute that an
116 application program is trying to use, \fBcurses\fP may substitute a
117 different video attribute for it.
118 The \fBtermattrs\fP and \fBterm_attrs\fP functions
119 return a logical \fBOR\fP of all video attributes supported by the
120 terminal using \fBA_\fP and \fBWA_\fP constants respectively.
121 This information is useful when a \fBcurses\fP program
122 needs complete control over the appearance of the screen.
125 The \fBtermname\fP routine returns the terminal name used by \fBsetupterm\fP.
127 \fBlongname\fP and \fBtermname\fP return \fBNULL\fP on error.
129 Routines that return an integer return \fBERR\fP upon failure and \fBOK\fP
130 (SVr4 only specifies "an integer value other than \fBERR\fP") upon successful
133 Note that \fBtermattrs\fP may be a macro.
135 The XSI Curses standard, Issue 4 describes these functions.
137 return type of \fBtermattrs\fP to the new type \fBattr_t\fP.
138 Most versions of curses truncate the result returned by \fBtermname\fP to
141 \fBcurses\fP(3X), \fBcurs_initscr\fP(3X), \fBcurs_outopts\fP(3X)