Amit Daniel Kachhap | e6a01f5 | 2011-07-20 11:45:59 +0530 | [diff] [blame] | 1 | <!-- |
| 2 | **************************************************************************** |
Steve Kondik | ae271bc | 2015-11-15 02:50:53 +0100 | [diff] [blame^] | 3 | * Copyright (c) 1998-2010,2015 Free Software Foundation, Inc. * |
Amit Daniel Kachhap | e6a01f5 | 2011-07-20 11:45:59 +0530 | [diff] [blame] | 4 | * * |
| 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: * |
| 12 | * * |
| 13 | * The above copyright notice and this permission notice shall be included * |
| 14 | * in all copies or substantial portions of the Software. * |
| 15 | * * |
| 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. * |
| 23 | * * |
| 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 * |
| 27 | * authorization. * |
| 28 | **************************************************************************** |
Steve Kondik | ae271bc | 2015-11-15 02:50:53 +0100 | [diff] [blame^] | 29 | * @Id: curs_termattrs.3x,v 1.13 2015/07/21 00:03:34 tom Exp @ |
Amit Daniel Kachhap | e6a01f5 | 2011-07-20 11:45:59 +0530 | [diff] [blame] | 30 | --> |
Steve Kondik | ae271bc | 2015-11-15 02:50:53 +0100 | [diff] [blame^] | 31 | <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01//EN"> |
Amit Daniel Kachhap | e6a01f5 | 2011-07-20 11:45:59 +0530 | [diff] [blame] | 32 | <HTML> |
| 33 | <HEAD> |
Steve Kondik | ae271bc | 2015-11-15 02:50:53 +0100 | [diff] [blame^] | 34 | <meta http-equiv="Content-Type" content="text/html; charset=us-ascii"> |
| 35 | <meta name="generator" content="Manpage converted by man2html - see http://invisible-island.net/scripts/readme.html#others_scripts"> |
Amit Daniel Kachhap | e6a01f5 | 2011-07-20 11:45:59 +0530 | [diff] [blame] | 36 | <TITLE>curs_termattrs 3x</TITLE> |
| 37 | <link rev=made href="mailto:bug-ncurses@gnu.org"> |
| 38 | <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1"> |
| 39 | </HEAD> |
| 40 | <BODY> |
Steve Kondik | ae271bc | 2015-11-15 02:50:53 +0100 | [diff] [blame^] | 41 | <H1 class="no-header">curs_termattrs 3x</H1> |
Amit Daniel Kachhap | e6a01f5 | 2011-07-20 11:45:59 +0530 | [diff] [blame] | 42 | <PRE> |
Amit Daniel Kachhap | e6a01f5 | 2011-07-20 11:45:59 +0530 | [diff] [blame] | 43 | <STRONG><A HREF="curs_termattrs.3x.html">curs_termattrs(3x)</A></STRONG> <STRONG><A HREF="curs_termattrs.3x.html">curs_termattrs(3x)</A></STRONG> |
| 44 | |
| 45 | |
| 46 | |
| 47 | |
| 48 | </PRE> |
Steve Kondik | ae271bc | 2015-11-15 02:50:53 +0100 | [diff] [blame^] | 49 | <H2><a name="h2-NAME">NAME</a></H2><PRE> |
Amit Daniel Kachhap | e6a01f5 | 2011-07-20 11:45:59 +0530 | [diff] [blame] | 50 | <STRONG>baudrate</STRONG>, <STRONG>erasechar</STRONG>, <STRONG>erasewchar</STRONG>, <STRONG>has_ic</STRONG>, <STRONG>has_il</STRONG>, <STRONG>killchar</STRONG>, |
| 51 | <STRONG>killwchar</STRONG>, <STRONG>longname</STRONG>, <STRONG>term_attrs</STRONG>, <STRONG>termattrs</STRONG>, <STRONG>termname</STRONG> - |
| 52 | <STRONG>curses</STRONG> environment query routines |
| 53 | |
| 54 | |
| 55 | </PRE> |
Steve Kondik | ae271bc | 2015-11-15 02:50:53 +0100 | [diff] [blame^] | 56 | <H2><a name="h2-SYNOPSIS">SYNOPSIS</a></H2><PRE> |
Amit Daniel Kachhap | e6a01f5 | 2011-07-20 11:45:59 +0530 | [diff] [blame] | 57 | <STRONG>#include</STRONG> <STRONG><curses.h></STRONG> |
| 58 | |
| 59 | <STRONG>int</STRONG> <STRONG>baudrate(void);</STRONG> |
| 60 | <STRONG>char</STRONG> <STRONG>erasechar(void);</STRONG> |
| 61 | <STRONG>int</STRONG> <STRONG>erasewchar(wchar_t</STRONG> <STRONG>*</STRONG><EM>ch</EM><STRONG>);</STRONG> |
| 62 | <STRONG>bool</STRONG> <STRONG>has_ic(void);</STRONG> |
| 63 | <STRONG>bool</STRONG> <STRONG>has_il(void);</STRONG> |
| 64 | <STRONG>char</STRONG> <STRONG>killchar(void);</STRONG> |
| 65 | <STRONG>int</STRONG> <STRONG>killwchar(wchar_t</STRONG> <STRONG>*</STRONG><EM>ch</EM><STRONG>);</STRONG> |
| 66 | <STRONG>char</STRONG> <STRONG>*longname(void);</STRONG> |
| 67 | <STRONG>attr_t</STRONG> <STRONG>term_attrs(void);</STRONG> |
| 68 | <STRONG>chtype</STRONG> <STRONG>termattrs(void);</STRONG> |
| 69 | <STRONG>char</STRONG> <STRONG>*termname(void);</STRONG> |
| 70 | |
| 71 | |
| 72 | </PRE> |
Steve Kondik | ae271bc | 2015-11-15 02:50:53 +0100 | [diff] [blame^] | 73 | <H2><a name="h2-DESCRIPTION">DESCRIPTION</a></H2><PRE> |
| 74 | |
| 75 | </PRE> |
| 76 | <H3><a name="h3-baudrate">baudrate</a></H3><PRE> |
Amit Daniel Kachhap | e6a01f5 | 2011-07-20 11:45:59 +0530 | [diff] [blame] | 77 | The <STRONG>baudrate</STRONG> routine returns the output speed of the ter- |
| 78 | minal. The number returned is in bits per second, for |
| 79 | example <STRONG>9600</STRONG>, and is an integer. |
| 80 | |
Steve Kondik | ae271bc | 2015-11-15 02:50:53 +0100 | [diff] [blame^] | 81 | |
| 82 | </PRE> |
| 83 | <H3><a name="h3-erasechar_-erasewchar">erasechar, erasewchar</a></H3><PRE> |
Amit Daniel Kachhap | e6a01f5 | 2011-07-20 11:45:59 +0530 | [diff] [blame] | 84 | The <STRONG>erasechar</STRONG> routine returns the user's current erase |
| 85 | character. |
| 86 | |
| 87 | The <STRONG>erasewchar</STRONG> routine stores the current erase character |
| 88 | in the location referenced by <EM>ch</EM>. If no erase character |
| 89 | has been defined, the routine fails and the location ref- |
| 90 | erenced by <EM>ch</EM> is not changed. |
| 91 | |
Steve Kondik | ae271bc | 2015-11-15 02:50:53 +0100 | [diff] [blame^] | 92 | |
| 93 | </PRE> |
| 94 | <H3><a name="h3-has_is_-has_il">has_is, has_il</a></H3><PRE> |
Amit Daniel Kachhap | e6a01f5 | 2011-07-20 11:45:59 +0530 | [diff] [blame] | 95 | The <STRONG>has_ic</STRONG> routine is true if the terminal has insert- and |
| 96 | delete- character capabilities. |
| 97 | |
| 98 | The <STRONG>has_il</STRONG> routine is true if the terminal has insert- and |
| 99 | delete-line capabilities, or can simulate them using |
| 100 | scrolling regions. This might be used to determine if it |
| 101 | would be appropriate to turn on physical scrolling using |
| 102 | <STRONG>scrollok</STRONG>. |
| 103 | |
Steve Kondik | ae271bc | 2015-11-15 02:50:53 +0100 | [diff] [blame^] | 104 | |
| 105 | </PRE> |
| 106 | <H3><a name="h3-killchar_-killwchar">killchar, killwchar</a></H3><PRE> |
Amit Daniel Kachhap | e6a01f5 | 2011-07-20 11:45:59 +0530 | [diff] [blame] | 107 | The <STRONG>killchar</STRONG> routine returns the user's current line kill |
| 108 | character. |
| 109 | |
| 110 | The <STRONG>killwchar</STRONG> routine stores the current line-kill charac- |
| 111 | ter in the location referenced by <EM>ch</EM>. If no line-kill |
| 112 | character has been defined, the routine fails and the |
| 113 | location referenced by <EM>ch</EM> is not changed. |
| 114 | |
Steve Kondik | ae271bc | 2015-11-15 02:50:53 +0100 | [diff] [blame^] | 115 | |
| 116 | </PRE> |
| 117 | <H3><a name="h3-longname">longname</a></H3><PRE> |
Amit Daniel Kachhap | e6a01f5 | 2011-07-20 11:45:59 +0530 | [diff] [blame] | 118 | The <STRONG>longname</STRONG> routine returns a pointer to a static area |
| 119 | containing a verbose description of the current terminal. |
| 120 | The maximum length of a verbose description is 128 charac- |
| 121 | ters. It is defined only after the call to <STRONG>initscr</STRONG> or |
| 122 | <STRONG>newterm</STRONG>. The area is overwritten by each call to <STRONG>newterm</STRONG> |
| 123 | and is not restored by <STRONG>set_term</STRONG>, so the value should be |
| 124 | saved between calls to <STRONG>newterm</STRONG> if <STRONG>longname</STRONG> is going to be |
| 125 | used with multiple terminals. |
| 126 | |
Steve Kondik | ae271bc | 2015-11-15 02:50:53 +0100 | [diff] [blame^] | 127 | |
| 128 | </PRE> |
| 129 | <H3><a name="h3-termattrs_-term_attrs">termattrs, term_attrs</a></H3><PRE> |
Amit Daniel Kachhap | e6a01f5 | 2011-07-20 11:45:59 +0530 | [diff] [blame] | 130 | If a given terminal does not support a video attribute |
| 131 | that an application program is trying to use, <STRONG>curses</STRONG> may |
Steve Kondik | ae271bc | 2015-11-15 02:50:53 +0100 | [diff] [blame^] | 132 | substitute a different video attribute for it. The <STRONG>ter-</STRONG> |
| 133 | <STRONG>mattrs</STRONG> and <STRONG>term_attrs</STRONG> functions return a logical <STRONG>OR</STRONG> of all |
| 134 | video attributes supported by the terminal using <EM>A</EM><STRONG>_</STRONG> and |
| 135 | <EM>WA</EM><STRONG>_</STRONG> constants respectively. This information is useful |
| 136 | when a <STRONG>curses</STRONG> program needs complete control over the |
Amit Daniel Kachhap | e6a01f5 | 2011-07-20 11:45:59 +0530 | [diff] [blame] | 137 | appearance of the screen. |
| 138 | |
Steve Kondik | ae271bc | 2015-11-15 02:50:53 +0100 | [diff] [blame^] | 139 | |
| 140 | </PRE> |
| 141 | <H3><a name="h3-termname">termname</a></H3><PRE> |
Amit Daniel Kachhap | e6a01f5 | 2011-07-20 11:45:59 +0530 | [diff] [blame] | 142 | The <STRONG>termname</STRONG> routine returns the terminal name used by |
| 143 | <STRONG>setupterm</STRONG>. |
| 144 | |
| 145 | |
| 146 | </PRE> |
Steve Kondik | ae271bc | 2015-11-15 02:50:53 +0100 | [diff] [blame^] | 147 | <H2><a name="h2-RETURN-VALUE">RETURN VALUE</a></H2><PRE> |
Amit Daniel Kachhap | e6a01f5 | 2011-07-20 11:45:59 +0530 | [diff] [blame] | 148 | <STRONG>longname</STRONG> and <STRONG>termname</STRONG> return <STRONG>NULL</STRONG> on error. |
| 149 | |
| 150 | Routines that return an integer return <STRONG>ERR</STRONG> upon failure |
| 151 | and <STRONG>OK</STRONG> (SVr4 only specifies "an integer value other than |
| 152 | <STRONG>ERR</STRONG>") upon successful completion. |
| 153 | |
| 154 | |
| 155 | </PRE> |
Steve Kondik | ae271bc | 2015-11-15 02:50:53 +0100 | [diff] [blame^] | 156 | <H2><a name="h2-NOTES">NOTES</a></H2><PRE> |
Amit Daniel Kachhap | e6a01f5 | 2011-07-20 11:45:59 +0530 | [diff] [blame] | 157 | Note that <STRONG>termattrs</STRONG> may be a macro. |
| 158 | |
| 159 | |
| 160 | </PRE> |
Steve Kondik | ae271bc | 2015-11-15 02:50:53 +0100 | [diff] [blame^] | 161 | <H2><a name="h2-PORTABILITY">PORTABILITY</a></H2><PRE> |
Amit Daniel Kachhap | e6a01f5 | 2011-07-20 11:45:59 +0530 | [diff] [blame] | 162 | The XSI Curses standard, Issue 4 describes these func- |
| 163 | tions. It changes the return type of <STRONG>termattrs</STRONG> to the new |
| 164 | type <STRONG>attr_t</STRONG>. Most versions of curses truncate the result |
| 165 | returned by <STRONG>termname</STRONG> to 14 characters. |
| 166 | |
| 167 | |
| 168 | </PRE> |
Steve Kondik | ae271bc | 2015-11-15 02:50:53 +0100 | [diff] [blame^] | 169 | <H2><a name="h2-SEE-ALSO">SEE ALSO</a></H2><PRE> |
Amit Daniel Kachhap | e6a01f5 | 2011-07-20 11:45:59 +0530 | [diff] [blame] | 170 | <STRONG><A HREF="ncurses.3x.html">curses(3x)</A></STRONG>, <STRONG><A HREF="curs_initscr.3x.html">curs_initscr(3x)</A></STRONG>, <STRONG><A HREF="curs_outopts.3x.html">curs_outopts(3x)</A></STRONG> |
| 171 | |
| 172 | |
| 173 | |
| 174 | <STRONG><A HREF="curs_termattrs.3x.html">curs_termattrs(3x)</A></STRONG> |
| 175 | </PRE> |
Steve Kondik | ae271bc | 2015-11-15 02:50:53 +0100 | [diff] [blame^] | 176 | <div class="nav"> |
| 177 | <ul> |
| 178 | <li><a href="#h2-NAME">NAME</a></li> |
| 179 | <li><a href="#h2-SYNOPSIS">SYNOPSIS</a></li> |
| 180 | <li><a href="#h2-DESCRIPTION">DESCRIPTION</a> |
| 181 | <ul> |
| 182 | <li><a href="#h3-baudrate">baudrate</a></li> |
| 183 | <li><a href="#h3-erasechar_-erasewchar">erasechar, erasewchar</a></li> |
| 184 | <li><a href="#h3-has_is_-has_il">has_is, has_il</a></li> |
| 185 | <li><a href="#h3-killchar_-killwchar">killchar, killwchar</a></li> |
| 186 | <li><a href="#h3-longname">longname</a></li> |
| 187 | <li><a href="#h3-termattrs_-term_attrs">termattrs, term_attrs</a></li> |
| 188 | <li><a href="#h3-termname">termname</a></li> |
| 189 | </ul> |
| 190 | </li> |
| 191 | <li><a href="#h2-RETURN-VALUE">RETURN VALUE</a></li> |
| 192 | <li><a href="#h2-NOTES">NOTES</a></li> |
| 193 | <li><a href="#h2-PORTABILITY">PORTABILITY</a></li> |
| 194 | <li><a href="#h2-SEE-ALSO">SEE ALSO</a></li> |
| 195 | </ul> |
| 196 | </div> |
Amit Daniel Kachhap | e6a01f5 | 2011-07-20 11:45:59 +0530 | [diff] [blame] | 197 | </BODY> |
| 198 | </HTML> |