1999-08-24 03:06:48 +02:00
|
|
|
.\"***************************************************************************
|
2020-02-19 17:58:06 +01:00
|
|
|
.\" Copyright 2018,2020 Thomas E. Dickey *
|
|
|
|
.\" Copyright 1998-2010,2015 Free Software Foundation, Inc. *
|
1999-08-24 03:06:48 +02:00
|
|
|
.\" *
|
|
|
|
.\" Permission is hereby granted, free of charge, to any person obtaining a *
|
|
|
|
.\" copy of this software and associated documentation files (the *
|
|
|
|
.\" "Software"), to deal in the Software without restriction, including *
|
|
|
|
.\" without limitation the rights to use, copy, modify, merge, publish, *
|
|
|
|
.\" distribute, distribute with modifications, sublicense, and/or sell *
|
|
|
|
.\" copies of the Software, and to permit persons to whom the Software is *
|
|
|
|
.\" furnished to do so, subject to the following conditions: *
|
|
|
|
.\" *
|
|
|
|
.\" The above copyright notice and this permission notice shall be included *
|
|
|
|
.\" in all copies or substantial portions of the Software. *
|
|
|
|
.\" *
|
|
|
|
.\" THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS *
|
|
|
|
.\" OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF *
|
|
|
|
.\" MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. *
|
|
|
|
.\" IN NO EVENT SHALL THE ABOVE COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, *
|
|
|
|
.\" DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR *
|
|
|
|
.\" OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR *
|
|
|
|
.\" THE USE OR OTHER DEALINGS IN THE SOFTWARE. *
|
|
|
|
.\" *
|
|
|
|
.\" Except as contained in this notice, the name(s) of the above copyright *
|
|
|
|
.\" holders shall not be used in advertising or otherwise to promote the *
|
|
|
|
.\" sale, use or other dealings in this Software without prior written *
|
|
|
|
.\" authorization. *
|
|
|
|
.\"***************************************************************************
|
|
|
|
.\"
|
2020-02-19 17:58:06 +01:00
|
|
|
.\" $Id: curs_termattrs.3x,v 1.15 2020/02/02 23:34:34 tom Exp $
|
1999-08-24 03:06:48 +02:00
|
|
|
.TH curs_termattrs 3X ""
|
|
|
|
.SH NAME
|
2002-05-21 07:30:25 +02:00
|
|
|
\fBbaudrate\fR,
|
|
|
|
\fBerasechar\fR,
|
|
|
|
\fBerasewchar\fR,
|
|
|
|
\fBhas_ic\fR,
|
|
|
|
\fBhas_il\fR,
|
|
|
|
\fBkillchar\fR,
|
|
|
|
\fBkillwchar\fR,
|
|
|
|
\fBlongname\fR,
|
|
|
|
\fBterm_attrs\fR,
|
|
|
|
\fBtermattrs\fR,
|
2014-02-28 20:18:07 +01:00
|
|
|
\fBtermname\fR \- \fBcurses\fR environment query routines
|
1999-08-24 03:06:48 +02:00
|
|
|
.SH SYNOPSIS
|
|
|
|
\fB#include <curses.h>\fR
|
2007-01-20 08:32:02 +01:00
|
|
|
.PP
|
1999-08-24 03:06:48 +02:00
|
|
|
\fBint baudrate(void);\fR
|
|
|
|
.br
|
|
|
|
\fBchar erasechar(void);\fR
|
|
|
|
.br
|
2002-05-21 07:30:25 +02:00
|
|
|
\fBint erasewchar(wchar_t *\fR\fIch\fR\fB);\fR
|
|
|
|
.br
|
2000-10-11 09:31:01 +02:00
|
|
|
\fBbool has_ic(void);\fR
|
1999-08-24 03:06:48 +02:00
|
|
|
.br
|
2000-10-11 09:31:01 +02:00
|
|
|
\fBbool has_il(void);\fR
|
1999-08-24 03:06:48 +02:00
|
|
|
.br
|
|
|
|
\fBchar killchar(void);\fR
|
|
|
|
.br
|
2002-05-21 07:30:25 +02:00
|
|
|
\fBint killwchar(wchar_t *\fR\fIch\fR\fB);\fR
|
|
|
|
.br
|
1999-08-24 03:06:48 +02:00
|
|
|
\fBchar *longname(void);\fR
|
|
|
|
.br
|
2002-05-21 07:30:25 +02:00
|
|
|
\fBattr_t term_attrs(void);\fR
|
|
|
|
.br
|
|
|
|
\fBchtype termattrs(void);\fR
|
1999-08-24 03:06:48 +02:00
|
|
|
.br
|
|
|
|
\fBchar *termname(void);\fR
|
|
|
|
.br
|
|
|
|
.SH DESCRIPTION
|
2020-02-07 09:36:41 +01:00
|
|
|
.SS baudrate
|
|
|
|
The \fBbaudrate\fR routine returns the output speed of the terminal.
|
|
|
|
The
|
1999-08-24 03:06:48 +02:00
|
|
|
number returned is in bits per second, for example \fB9600\fR, and is an
|
|
|
|
integer.
|
2020-02-07 09:36:41 +01:00
|
|
|
.SS erasechar, erasewchar
|
2007-01-20 08:32:02 +01:00
|
|
|
.PP
|
1999-08-24 03:06:48 +02:00
|
|
|
The \fBerasechar\fR routine returns the user's current erase character.
|
2007-01-20 08:32:02 +01:00
|
|
|
.PP
|
2002-05-21 07:30:25 +02:00
|
|
|
The \fBerasewchar\fR routine stores the current erase character
|
|
|
|
in the location referenced by \fIch\fR.
|
|
|
|
If no erase character has been defined, the routine fails
|
|
|
|
and the location referenced by \fIch\fR is not changed.
|
2020-02-07 09:36:41 +01:00
|
|
|
.SS has_is, has_il
|
2007-01-20 08:32:02 +01:00
|
|
|
.PP
|
1999-08-24 03:06:48 +02:00
|
|
|
The \fBhas_ic\fR routine is true if the terminal has insert- and delete-
|
|
|
|
character capabilities.
|
2007-01-20 08:32:02 +01:00
|
|
|
.PP
|
1999-08-24 03:06:48 +02:00
|
|
|
The \fBhas_il\fR routine is true if the terminal has insert- and delete-line
|
2020-02-07 09:36:41 +01:00
|
|
|
capabilities, or can simulate them using scrolling regions.
|
|
|
|
This might
|
1999-08-24 03:06:48 +02:00
|
|
|
be used to determine if it would be appropriate to turn on physical
|
|
|
|
scrolling using \fBscrollok\fR.
|
2020-02-07 09:36:41 +01:00
|
|
|
.SS killchar, killwchar
|
2007-01-20 08:32:02 +01:00
|
|
|
.PP
|
1999-08-24 03:06:48 +02:00
|
|
|
The \fBkillchar\fR routine returns the user's current line kill character.
|
2007-01-20 08:32:02 +01:00
|
|
|
.PP
|
2002-05-21 07:30:25 +02:00
|
|
|
The \fBkillwchar\fR routine stores the current line-kill character
|
|
|
|
in the location referenced by \fIch\fR.
|
|
|
|
If no line-kill character has been defined,
|
|
|
|
the routine fails and the location referenced by \fIch\fR is not changed.
|
2020-02-07 09:36:41 +01:00
|
|
|
.SS longname
|
2007-01-20 08:32:02 +01:00
|
|
|
.PP
|
1999-08-24 03:06:48 +02:00
|
|
|
The \fBlongname\fR routine returns a pointer to a static area
|
2020-02-07 09:36:41 +01:00
|
|
|
containing a verbose description of the current terminal.
|
|
|
|
The maximum
|
|
|
|
length of a verbose description is 128 characters.
|
|
|
|
It is defined only
|
1999-08-24 03:06:48 +02:00
|
|
|
after the call to \fBinitscr\fR or \fBnewterm\fR. The area is
|
|
|
|
overwritten by each call to \fBnewterm\fR and is not restored by
|
|
|
|
\fBset_term\fR, so the value should be saved between calls to
|
|
|
|
\fBnewterm\fR if \fBlongname\fR is going to be used with multiple
|
|
|
|
terminals.
|
2020-02-07 09:36:41 +01:00
|
|
|
.SS termattrs, term_attrs
|
2007-01-20 08:32:02 +01:00
|
|
|
.PP
|
2007-12-30 12:08:14 +01:00
|
|
|
If a given terminal does not support a video attribute that an
|
1999-08-24 03:06:48 +02:00
|
|
|
application program is trying to use, \fBcurses\fR may substitute a
|
2002-05-21 07:30:25 +02:00
|
|
|
different video attribute for it.
|
|
|
|
The \fBtermattrs\fR and \fBterm_attrs\fR functions
|
|
|
|
return a logical \fBOR\fR of all video attributes supported by the
|
|
|
|
terminal using \fIA_\fR and \fIWA_\fR constants respectively.
|
|
|
|
This information is useful when a \fBcurses\fR program
|
1999-08-24 03:06:48 +02:00
|
|
|
needs complete control over the appearance of the screen.
|
2020-02-07 09:36:41 +01:00
|
|
|
.SS termname
|
2007-01-20 08:32:02 +01:00
|
|
|
.PP
|
|
|
|
The \fBtermname\fR routine returns the terminal name used by \fBsetupterm\fR.
|
1999-08-24 03:06:48 +02:00
|
|
|
.SH RETURN VALUE
|
|
|
|
\fBlongname\fR and \fBtermname\fR return \fBNULL\fR on error.
|
2007-01-20 08:32:02 +01:00
|
|
|
.PP
|
1999-08-24 03:06:48 +02:00
|
|
|
Routines that return an integer return \fBERR\fR upon failure and \fBOK\fR
|
|
|
|
(SVr4 only specifies "an integer value other than \fBERR\fR") upon successful
|
|
|
|
completion.
|
|
|
|
.SH NOTES
|
|
|
|
Note that \fBtermattrs\fR may be a macro.
|
|
|
|
.SH PORTABILITY
|
2020-02-07 09:36:41 +01:00
|
|
|
The XSI Curses standard, Issue 4 describes these functions.
|
|
|
|
It changes the
|
1999-08-24 03:06:48 +02:00
|
|
|
return type of \fBtermattrs\fR to the new type \fBattr_t\fR.
|
2007-01-20 08:32:02 +01:00
|
|
|
Most versions of curses truncate the result returned by \fBtermname\fR to
|
|
|
|
14 characters.
|
1999-08-24 03:06:48 +02:00
|
|
|
.SH SEE ALSO
|
|
|
|
\fBcurses\fR(3X), \fBcurs_initscr\fR(3X), \fBcurs_outopts\fR(3X)
|