]> ncurses.scripts.mit.edu Git - ncurses.git/blob - man/curs_termattrs.3x
ncurses 5.0
[ncurses.git] / man / curs_termattrs.3x
1 .\"***************************************************************************
2 .\" Copyright (c) 1998 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: curs_termattrs.3x,v 1.4 1998/03/11 21:12:53 juergen Exp $
30 .TH curs_termattrs 3X ""
31 .SH NAME
32 \fBbaudrate\fR, \fBerasechar\fR, \fBhas_ic\fR,
33 \fBhas_il\fR, \fBkillchar\fR, \fBlongname\fR, \fBtermattrs\fR,
34 \fBtermname\fR - \fBcurses\fR environment query routines
35 .SH SYNOPSIS
36 \fB#include <curses.h>\fR
37
38 \fBint baudrate(void);\fR
39 .br
40 \fBchar erasechar(void);\fR
41 .br
42 \fBint has_ic(void);\fR
43 .br
44 \fBint has_il(void);\fR
45 .br
46 \fBchar killchar(void);\fR
47 .br
48 \fBchar *longname(void);\fR
49 .br
50 \fBattr_t termattrs(void);\fR
51 .br
52 \fBchar *termname(void);\fR
53 .br
54 .SH DESCRIPTION
55 The \fBbaudrate\fR routine returns the output speed of the terminal.  The
56 number returned is in bits per second, for example \fB9600\fR, and is an
57 integer.
58
59 The \fBerasechar\fR routine returns the user's current erase character.
60
61 The \fBhas_ic\fR routine is true if the terminal has insert- and delete-
62 character capabilities.
63
64 The \fBhas_il\fR routine is true if the terminal has insert- and delete-line
65 capabilities, or can simulate them using scrolling regions.  This might
66 be used to determine if it would be appropriate to turn on physical
67 scrolling using \fBscrollok\fR.
68
69 The \fBkillchar\fR routine returns the user's current line kill character.
70
71 The \fBlongname\fR routine returns a pointer to a static area
72 containing a verbose description of the current terminal.  The maximum
73 length of a verbose description is 128 characters.  It is defined only
74 after the call to \fBinitscr\fR or \fBnewterm\fR.  The area is
75 overwritten by each call to \fBnewterm\fR and is not restored by
76 \fBset_term\fR, so the value should be saved between calls to
77 \fBnewterm\fR if \fBlongname\fR is going to be used with multiple
78 terminals.
79
80 If a given terminal doesn't support a video attribute that an
81 application program is trying to use, \fBcurses\fR may substitute a
82 different video attribute for it.  The \fBtermattrs\fR function
83 returns a logical \fBOR\fR of all video attributes supported by the
84 terminal.  This information is useful when a \fBcurses\fR program
85 needs complete control over the appearance of the screen.
86
87 The \fBtermname\fR routine returns the value of the environmental
88 variable \fBTERM\fR (truncated to 14 characters).
89 .SH RETURN VALUE
90 \fBlongname\fR and \fBtermname\fR return \fBNULL\fR on error.
91
92 Routines that return an integer return \fBERR\fR upon failure and \fBOK\fR
93 (SVr4 only specifies "an integer value other than \fBERR\fR") upon successful
94 completion.
95 .SH NOTES
96 Note that \fBtermattrs\fR may be a macro.
97 .SH PORTABILITY
98 The XSI Curses standard, Issue 4 describes these functions.  It changes the
99 return type of \fBtermattrs\fR to the new type \fBattr_t\fR.
100 .SH SEE ALSO
101 \fBcurses\fR(3X), \fBcurs_initscr\fR(3X), \fBcurs_outopts\fR(3X)
102 .\"#
103 .\"# The following sets edit modes for GNU EMACS
104 .\"# Local Variables:
105 .\"# mode:nroff
106 .\"# fill-column:79
107 .\"# End: