]> ncurses.scripts.mit.edu Git - ncurses.git/blob - doc/html/man/curs_termattrs.3x.html
ncurses 5.2
[ncurses.git] / doc / html / man / curs_termattrs.3x.html
1 <HTML>
2 <BODY>
3 <PRE>
4 <!-- Manpage converted by man2html 3.0.1 -->
5
6 </PRE>
7 <H2>NAME</H2><PRE>
8        <B>baudrate</B>,  <B>erasechar</B>,  <B>has_ic</B>, <B>has_il</B>, <B>killchar</B>, <B>longname</B>,
9        <B>termattrs</B>, <B>termname</B> - <B>curses</B> environment query routines
10
11
12 </PRE>
13 <H2>SYNOPSIS</H2><PRE>
14        <B>#include</B> <B>&lt;curses.h&gt;</B>
15
16        <B>int</B> <B>baudrate(void);</B>
17        <B>char</B> <B>erasechar(void);</B>
18        <B>bool</B> <B>has_ic(void);</B>
19        <B>bool</B> <B>has_il(void);</B>
20        <B>char</B> <B>killchar(void);</B>
21        <B>char</B> <B>*longname(void);</B>
22        <B>attr_t</B> <B>termattrs(void);</B>
23        <B>char</B> <B>*termname(void);</B>
24
25
26 </PRE>
27 <H2>DESCRIPTION</H2><PRE>
28        The <B>baudrate</B> routine returns the output speed of the  ter-
29        minal.   The  number  returned  is in bits per second, for
30        example <B>9600</B>, and is an integer.
31
32        The <B>erasechar</B> routine returns  the  user's  current  erase
33        character.
34
35        The <B>has_ic</B> routine is true if the terminal has insert- and
36        delete- character capabilities.
37
38        The <B>has_il</B> routine is true if the terminal has insert- and
39        delete-line  capabilities,  or  can  simulate  them  using
40        scrolling regions.  This might be used to determine if  it
41        would  be  appropriate to turn on physical scrolling using
42        <B>scrollok</B>.
43
44        The <B>killchar</B> routine returns the user's current line  kill
45        character.
46
47        The  <B>longname</B>  routine  returns a pointer to a static area
48        containing a verbose description of the current  terminal.
49        The maximum length of a verbose description is 128 charac-
50        ters.  It is defined only after the  call  to  <B>initscr</B>  or
51        <B>newterm</B>.   The area is overwritten by each call to <B>newterm</B>
52        and is not restored by <B>set_term</B>, so the  value  should  be
53        saved  between calls to <B>newterm</B> if <B>longname</B> is going to be
54        used with multiple terminals.
55
56        If a given terminal doesn't support a video attribute that
57        an  application  program is trying to use, <B>curses</B> may sub-
58        stitute a different video attribute for it.  The <B>termattrs</B>
59        function returns a logical <B>OR</B> of all video attributes sup-
60        ported by the terminal.  This information is useful when a
61        <B>curses</B>  program needs complete control over the appearance
62        of the screen.
63
64        The  <B>termname</B>   routine   returns   the   value   of   the
65        environmental  variable <B>TERM</B> (truncated to 14 characters).
66
67
68 </PRE>
69 <H2>RETURN VALUE</H2><PRE>
70        <B>longname</B> and <B>termname</B> return <B>NULL</B> on error.
71
72        Routines that return an integer return  <B>ERR</B>  upon  failure
73        and  <B>OK</B>  (SVr4 only specifies "an integer value other than
74        <B>ERR</B>") upon successful completion.
75
76
77 </PRE>
78 <H2>NOTES</H2><PRE>
79        Note that <B>termattrs</B> may be a macro.
80
81
82 </PRE>
83 <H2>PORTABILITY</H2><PRE>
84        The XSI Curses standard, Issue  4  describes  these  func-
85        tions.  It changes the return type of <B>termattrs</B> to the new
86        type <B>attr_t</B>.
87
88
89 </PRE>
90 <H2>SEE ALSO</H2><PRE>
91        <B><A HREF="ncurses.3x.html">curses(3x)</A></B>, <B><A HREF="curs_initscr.3x.html">curs_initscr(3x)</A></B>, <B><A HREF="curs_outopts.3x.html">curs_outopts(3x)</A></B>
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127 </PRE>
128 <HR>
129 <ADDRESS>
130 Man(1) output converted with
131 <a href="http://www.oac.uci.edu/indiv/ehood/man2html.html">man2html</a>
132 </ADDRESS>
133 </BODY>
134 </HTML>