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