1 .\"***************************************************************************
2 .\" Copyright 2018-2022,2023 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.28 2023/09/16 23:37:03 tom Exp $
31 .TH curs_termattrs 3X 2023-09-16 "ncurses 6.4" "Library calls"
44 \fIcurses\fR environment query routines
46 \fB#include <curses.h>\fP
48 \fBint baudrate(void);\fP
50 \fBchar erasechar(void);\fP
52 \fBint erasewchar(wchar_t *\fIch\fB);\fR
54 \fBbool has_ic(void);\fP
56 \fBbool has_il(void);\fP
58 \fBchar killchar(void);\fP
60 \fBint killwchar(wchar_t *\fIch\fB);\fR
62 \fBchar *longname(void);\fP
64 \fBattr_t term_attrs(void);\fP
66 \fBchtype termattrs(void);\fP
68 \fBchar *termname(void);\fP
72 The \fBbaudrate\fP routine returns the output speed of the terminal.
74 number returned is in bits per second, for example \fB9600\fP, and is an
76 .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.
84 The \fBhas_ic\fP routine is true if the terminal has insert- and delete-
85 character capabilities.
87 The \fBhas_il\fP routine is true if the terminal has insert- and delete-line
88 capabilities, or can simulate them using scrolling regions.
90 be used to determine if it would be appropriate to turn on physical
91 scrolling using \fBscrollok\fP(3X).
92 .SS killchar, killwchar
93 The \fBkillchar\fP routine returns the user's current line kill character.
95 The \fBkillwchar\fP routine stores the current line-kill character
96 in the location referenced by \fIch\fP.
97 If no line-kill character has been defined,
98 the routine fails and the location referenced by \fIch\fP is not changed.
100 The \fBlongname\fP routine returns a pointer to a static area
101 containing a verbose description of the current terminal.
103 length of a verbose description is 128 characters.
105 after the call to \fBinitscr\fP or \fBnewterm\fP. The area is
106 overwritten by each call to \fBnewterm\fP and is not restored by
107 \fBset_term\fP, so the value should be saved between calls to
108 \fBnewterm\fP if \fBlongname\fP is going to be used with multiple
110 .SS termattrs, term_attrs
111 If a given terminal does not support a video attribute that an
112 application program is trying to use, \fBcurses\fP may substitute a
113 different video attribute for it.
114 The \fBtermattrs\fP and \fBterm_attrs\fP functions
115 return a logical \fBOR\fP of all video attributes supported by the
116 terminal using \fBA_\fP and \fBWA_\fP constants respectively.
117 This information is useful when a \fBcurses\fP program
118 needs complete control over the appearance of the screen.
120 The \fBtermname\fP routine returns the terminal name used by \fBsetupterm\fP.
122 \fBlongname\fP and \fBtermname\fP return \fBNULL\fP on error.
124 Routines that return an integer return \fBERR\fP upon failure and \fBOK\fP
125 (SVr4 only specifies "an integer value other than \fBERR\fP") upon successful
128 Note that \fBtermattrs\fP may be a macro.
130 The XSI Curses standard, Issue 4 describes these functions.
132 return type of \fBtermattrs\fP to the new type \fBattr_t\fP.
133 Most versions of curses truncate the result returned by \fBtermname\fP to
136 \fBcurses\fP(3X), \fBcurs_initscr\fP(3X), \fBcurs_outopts\fP(3X)