2 .\" Copyright 1989 AT&T
3 .\" Portions Copyright (c) 1996, Sun Microsystems, Inc. All Rights Reserved.
4 .\" The contents of this file are subject to the terms of the Common Development and Distribution License (the "License"). You may not use this file except in compliance with the License.
5 .\" You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE or http://www.opensolaris.org/os/licensing. See the License for the specific language governing permissions and limitations under the License.
6 .\" When distributing Covered Code, include this CDDL HEADER in each file and include the License file at usr/src/OPENSOLARIS.LICENSE. If applicable, add the following below this CDDL HEADER, with the fields enclosed by brackets "[]" replaced with your own identifying information: Portions Copyright [yyyy] [name of copyright owner]
7 .TH CURS_TERMATTRS 3CURSES "Dec 31, 1996"
9 curs_termattrs, baudrate, erasechar, has_ic, has_il, killchar, longname,
10 termattrs, termname \- curses environment query routines
14 \fBcc\fR [ \fIflag\fR ... ] \fIfile\fR ... \fB-lcurses\fR [ \fIlibrary\fR ... ]
17 \fBint\fR \fBbaudrate\fR(\fBvoid\fR);
22 \fBchar\fR \fBerasechar\fR(\fBvoid\fR);
27 \fBint\fR \fBhas_ic\fR(\fBvoid\fR);
32 \fBint\fR \fBhas_il\fR(\fBvoid\fR);
37 \fBchar\fR \fBkillchar\fR(\fBvoid\fR);
42 \fBchar *\fR\fBlongname\fR(\fBvoid\fR);
47 \fBchtype\fR \fBtermattrs\fR(\fBvoid\fR);
52 \fBchar *\fR\fBtermname\fR(\fBvoid\fR);
58 The \fBbaudrate()\fR routine returns the output speed of the terminal. The
59 number returned is in bits per second, for example \fB9600\fR, and is an
63 With the \fBerasechar()\fR routine, the user's current erase character is
67 The \fBhas_ic()\fR routine is true if the terminal has insert- and
68 delete-character capabilities.
71 The \fBhas_il()\fR routine is true if the terminal has insert- and delete-line
72 capabilities, or can simulate them using scrolling regions. This might be used
73 to determine if it would be appropriate to turn on physical scrolling using
77 With the \fBkillchar()\fR routine, the user's current line kill character is
81 The \fBlongname()\fR routine returns a pointer to a static area containing a
82 verbose description of the current terminal. The maximum length of a verbose
83 description is 128 characters. It is defined only after the call to
84 \fBinitscr()\fR or \fBnewterm()\fR. The area is overwritten by each call to
85 \fBnewterm()\fR and is not restored by \fBset_term()\fR, so the value should be
86 saved between calls to \fBnewterm()\fR if \fBlongname()\fR is going to be used
87 with multiple terminals.
90 If a given terminal doesn't support a video attribute that an application
91 program is trying to use, \fBcurses\fR may substitute a different video
92 attribute for it. The \fBtermattrs()\fR function returns a logical OR of all
93 video attributes supported by the terminal. This information is useful when a
94 \fBcurses\fR program needs complete control over the appearance of the screen.
97 The \fBtermname()\fR routine returns the value of the environment variable
98 \fBTERM\fR (truncated to 14 characters).
102 \fBlongname()\fR and \fBtermname()\fR return \fINULL\fR on error.
105 Routines that return an integer return \fBERR\fR upon failure and an integer
106 value other than \fBERR\fR upon successful completion.
110 See \fBattributes\fR(5) for descriptions of the following attributes:
118 ATTRIBUTE TYPE ATTRIBUTE VALUE
126 \fBcurs_initscr\fR(3CURSES), \fBcurs_outopts\fR(3CURSES),
127 \fBcurses\fR(3CURSES), \fBattributes\fR(5)
131 The header <\fBcurses.h\fR> automatically includes the headers <\fBstdio.h\fR>
132 and <\fBunctrl.h\fR>.
135 Note that \fBtermattrs()\fR may be a macro.