| 1 | .\"*************************************************************************** | 
|---|
| 2 | .\" Copyright (c) 1998-2002,2003 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.9 2003/12/27 18:37:47 tom Exp $ | 
|---|
| 30 | .TH curs_termattrs 3X "" | 
|---|
| 31 | .SH NAME | 
|---|
| 32 | \fBbaudrate\fR, | 
|---|
| 33 | \fBerasechar\fR, | 
|---|
| 34 | \fBerasewchar\fR, | 
|---|
| 35 | \fBhas_ic\fR, | 
|---|
| 36 | \fBhas_il\fR, | 
|---|
| 37 | \fBkillchar\fR, | 
|---|
| 38 | \fBkillwchar\fR, | 
|---|
| 39 | \fBlongname\fR, | 
|---|
| 40 | \fBterm_attrs\fR, | 
|---|
| 41 | \fBtermattrs\fR, | 
|---|
| 42 | \fBtermname\fR - \fBcurses\fR environment query routines | 
|---|
| 43 | .SH SYNOPSIS | 
|---|
| 44 | \fB#include <curses.h>\fR | 
|---|
| 45 | .PP | 
|---|
| 46 | \fBint baudrate(void);\fR | 
|---|
| 47 | .br | 
|---|
| 48 | \fBchar erasechar(void);\fR | 
|---|
| 49 | .br | 
|---|
| 50 | \fBint erasewchar(wchar_t *\fR\fIch\fR\fB);\fR | 
|---|
| 51 | .br | 
|---|
| 52 | \fBbool has_ic(void);\fR | 
|---|
| 53 | .br | 
|---|
| 54 | \fBbool has_il(void);\fR | 
|---|
| 55 | .br | 
|---|
| 56 | \fBchar killchar(void);\fR | 
|---|
| 57 | .br | 
|---|
| 58 | \fBint killwchar(wchar_t *\fR\fIch\fR\fB);\fR | 
|---|
| 59 | .br | 
|---|
| 60 | \fBchar *longname(void);\fR | 
|---|
| 61 | .br | 
|---|
| 62 | \fBattr_t term_attrs(void);\fR | 
|---|
| 63 | .br | 
|---|
| 64 | \fBchtype termattrs(void);\fR | 
|---|
| 65 | .br | 
|---|
| 66 | \fBchar *termname(void);\fR | 
|---|
| 67 | .br | 
|---|
| 68 | .SH DESCRIPTION | 
|---|
| 69 | The \fBbaudrate\fR routine returns the output speed of the terminal.  The | 
|---|
| 70 | number returned is in bits per second, for example \fB9600\fR, and is an | 
|---|
| 71 | integer. | 
|---|
| 72 | .PP | 
|---|
| 73 | The \fBerasechar\fR routine returns the user's current erase character. | 
|---|
| 74 | .PP | 
|---|
| 75 | The \fBerasewchar\fR routine stores the current erase character | 
|---|
| 76 | in the location referenced by \fIch\fR. | 
|---|
| 77 | If no erase character has been defined, the routine fails | 
|---|
| 78 | and the location referenced by \fIch\fR is not changed. | 
|---|
| 79 | .PP | 
|---|
| 80 | The \fBhas_ic\fR routine is true if the terminal has insert- and delete- | 
|---|
| 81 | character capabilities. | 
|---|
| 82 | .PP | 
|---|
| 83 | The \fBhas_il\fR routine is true if the terminal has insert- and delete-line | 
|---|
| 84 | capabilities, or can simulate them using scrolling regions.  This might | 
|---|
| 85 | be used to determine if it would be appropriate to turn on physical | 
|---|
| 86 | scrolling using \fBscrollok\fR. | 
|---|
| 87 | .PP | 
|---|
| 88 | The \fBkillchar\fR routine returns the user's current line kill character. | 
|---|
| 89 | .PP | 
|---|
| 90 | The \fBkillwchar\fR routine stores the current line-kill character | 
|---|
| 91 | in the location referenced by \fIch\fR. | 
|---|
| 92 | If no line-kill character has been defined, | 
|---|
| 93 | the routine fails and the location referenced by \fIch\fR is not changed. | 
|---|
| 94 | .PP | 
|---|
| 95 | The \fBlongname\fR routine returns a pointer to a static area | 
|---|
| 96 | containing a verbose description of the current terminal.  The maximum | 
|---|
| 97 | length of a verbose description is 128 characters.  It is defined only | 
|---|
| 98 | after the call to \fBinitscr\fR or \fBnewterm\fR.  The area is | 
|---|
| 99 | overwritten by each call to \fBnewterm\fR and is not restored by | 
|---|
| 100 | \fBset_term\fR, so the value should be saved between calls to | 
|---|
| 101 | \fBnewterm\fR if \fBlongname\fR is going to be used with multiple | 
|---|
| 102 | terminals. | 
|---|
| 103 | .PP | 
|---|
| 104 | If a given terminal doesn't support a video attribute that an | 
|---|
| 105 | application program is trying to use, \fBcurses\fR may substitute a | 
|---|
| 106 | different video attribute for it. | 
|---|
| 107 | The \fBtermattrs\fR and \fBterm_attrs\fR functions | 
|---|
| 108 | return a logical \fBOR\fR of all video attributes supported by the | 
|---|
| 109 | terminal using \fIA_\fR and \fIWA_\fR constants respectively. | 
|---|
| 110 | This information is useful when a \fBcurses\fR program | 
|---|
| 111 | needs complete control over the appearance of the screen. | 
|---|
| 112 | .PP | 
|---|
| 113 | The \fBtermname\fR routine returns the terminal name used by \fBsetupterm\fR. | 
|---|
| 114 | .SH RETURN VALUE | 
|---|
| 115 | \fBlongname\fR and \fBtermname\fR return \fBNULL\fR on error. | 
|---|
| 116 | .PP | 
|---|
| 117 | Routines that return an integer return \fBERR\fR upon failure and \fBOK\fR | 
|---|
| 118 | (SVr4 only specifies "an integer value other than \fBERR\fR") upon successful | 
|---|
| 119 | completion. | 
|---|
| 120 | .SH NOTES | 
|---|
| 121 | Note that \fBtermattrs\fR may be a macro. | 
|---|
| 122 | .SH PORTABILITY | 
|---|
| 123 | The XSI Curses standard, Issue 4 describes these functions.  It changes the | 
|---|
| 124 | return type of \fBtermattrs\fR to the new type \fBattr_t\fR. | 
|---|
| 125 | Most versions of curses truncate the result returned by \fBtermname\fR to | 
|---|
| 126 | 14 characters. | 
|---|
| 127 | .SH SEE ALSO | 
|---|
| 128 | \fBcurses\fR(3X), \fBcurs_initscr\fR(3X), \fBcurs_outopts\fR(3X) | 
|---|
| 129 | .\"# | 
|---|
| 130 | .\"# The following sets edit modes for GNU EMACS | 
|---|
| 131 | .\"# Local Variables: | 
|---|
| 132 | .\"# mode:nroff | 
|---|
| 133 | .\"# fill-column:79 | 
|---|
| 134 | .\"# End: | 
|---|