summaryrefslogtreecommitdiffstats
path: root/upstream/debian-unstable/man3/opaque.3ncurses
blob: 1cc8666b827ffb7bdf699e44861a8a586bce893c (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
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
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
.\"***************************************************************************
.\" Copyright 2020-2023,2024 Thomas E. Dickey                                *
.\" Copyright 2007-2014,2015 Free Software Foundation, Inc.                  *
.\"                                                                          *
.\" 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.                                                           *
.\"***************************************************************************
.\"
.\" $Id: curs_opaque.3x,v 1.43 2024/03/16 15:35:01 tom Exp $
.TH opaque 3NCURSES 2024-03-16 "ncurses 6.5" "Library calls"
.ie \n(.g \{\
.ds `` \(lq
.ds '' \(rq
.\}
.el \{\
.ie t .ds `` ``
.el   .ds `` ""
.ie t .ds '' ''
.el   .ds '' ""
.\}
.SH NAME
\fB\%is_cleared\fP,
\fB\%is_idlok\fP,
\fB\%is_idcok\fP,
\fB\%is_immedok\fP,
\fB\%is_keypad\fP,
\fB\%is_leaveok\fP,
\fB\%is_nodelay\fP,
\fB\%is_notimeout\fP,
\fB\%is_pad\fP,
\fB\%is_scrollok\fP,
\fB\%is_subwin\fP,
\fB\%is_syncok\fP,
\fB\%wgetdelay\fP,
\fB\%wgetparent\fP,
\fB\%wgetscrreg\fP \-
obtain \fIcurses\fR window properties
.SH SYNOPSIS
.nf
\fB#include <curses.h>
.PP
\fBbool is_cleared(const WINDOW *\fIwin\fP);
\fBbool is_idcok(const WINDOW *\fIwin\fP);
\fBbool is_idlok(const WINDOW *\fIwin\fP);
\fBbool is_immedok(const WINDOW *\fIwin\fP);
\fBbool is_keypad(const WINDOW *\fIwin\fP);
\fBbool is_leaveok(const WINDOW *\fIwin\fP);
\fBbool is_nodelay(const WINDOW *\fIwin\fP);
\fBbool is_notimeout(const WINDOW *\fIwin\fP);
\fBbool is_pad(const WINDOW *\fIwin\fP);
\fBbool is_scrollok(const WINDOW *\fIwin\fP);
\fBbool is_subwin(const WINDOW *\fIwin\fP);
\fBbool is_syncok(const WINDOW *\fIwin\fP);
.PP
\fBWINDOW * wgetparent(const WINDOW *\fIwin\fP);
\fBint wgetdelay(const WINDOW *\fIwin\fP);
\fBint wgetscrreg(const WINDOW *\fIwin\fP, int *\fItop\fP, int *\fIbottom\fP);
.fi
.SH DESCRIPTION
\fI\%ncurses\fP provides functions returning properties of a
\fI\%WINDOW\fP structure,
allowing it to be \*(``opaque\*('' if
the application defines the \fB\%NCURSES_OPAQUE\fP preprocessor symbol.
\fIOpacity\fP in this sense means that the members of \fIstruct\fP data
types are not directly accessible
(for instance,
through \*(``.\*('' or \*(``\->\*('' operators),
but instead must be queried and/or set via library functions.
Advantages of opacity include greater abstraction and improved
management of concurrent accesses to data structures,
keeping object states coherent.
.TP
\fBis_cleared\fP
returns the value set by \fB\%clearok\fP(3NCURSES).
.TP
\fBis_idcok\fP
returns the value set by \fB\%idcok\fP(3NCURSES).
.TP
\fBis_idlok\fP
returns the value set by \fB\%idlok\fP(3NCURSES).
.TP
\fBis_immedok\fP
returns the value set by \fB\%immedok\fP(3NCURSES).
.TP
\fBis_keypad\fP
returns the value set by \fB\%keypad\fP(3NCURSES).
.TP
\fBis_leaveok\fP
returns the value set by \fB\%leaveok\fP(3NCURSES).
.TP
\fBis_nodelay\fP
returns the value set by \fB\%nodelay\fP(3NCURSES).
.TP
\fBis_notimeout\fP
returns the value set by \fB\%notimeout\fP(3NCURSES).
.TP
\fBis_pad\fP
returns \fBTRUE\fP if the window is a pad;
that is,
it was created by \fB\%newpad\fP(3NCURSES).
.TP
\fBis_scrollok\fP
returns the value set by \fB\%scrollok\fP(3NCURSES).
.TP
\fBis_subwin\fP
returns \fBTRUE\fP if the window is a subwindow,
that is,
it was created by \fB\%subwin\fP(3NCURSES) or \fB\%derwin\fP(3NCURSES).
.TP
\fBis_syncok\fP
returns the value set by \fB\%syncok\fP(3NCURSES).
.TP
\fBwgetdelay\fP
returns the delay timeout set by \fB\%wtimeout\fP(3NCURSES).
.TP
\fBwgetparent\fP
returns the parent \fI\%WINDOW\fP pointer for subwindows,
or \fBNULL\fP for windows having no parent.
.TP
\fBwgetscrreg\fP
stores the the top and bottom rows for the scrolling margin set by
\fB\%wsetscrreg\fP(3NCURSES) in the corresponding arguments,
returning \fBERR\fP upon failure and \fBOK\fP upon successful
completion.
.SH RETURN VALUE
These functions return \fBTRUE\fP or \fBFALSE\fP except as noted.
.SH NOTES
\fI\%ncurses\fP provides both a C function and a preprocessor macro for
each function documented in this page.
.SH PORTABILITY
These routines are specific to \fI\%ncurses\fP.
They were not supported on Version 7, BSD or System V implementations.
It is recommended that any code depending on \fI\%ncurses\fP extensions
be conditioned using \fB\%NCURSES_VERSION\fP.
.SH SEE ALSO
\fB\%ncurses\fP(3NCURSES),
\fB\%inopts\fP(3NCURSES),
\fB\%outopts\fP(3NCURSES),
\fB\%threads\fP(3NCURSES),
\fB\%window\fP(3NCURSES)