Debian Codegraph @

upstream/debian-unstable/man3/win.3form

raw
1 .\"***************************************************************************
2 .\" Copyright 2018-2023,2024 Thomas E. Dickey *
3 .\" Copyright 1998-2006,2010 Free Software Foundation, Inc. *
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 .\"***************************************************************************
29 .\"
30 .\" $Id: form_win.3x,v 1.37 2024/12/28 21:26:21 tom Exp $
31 .TH win 3FORM 2024-12-28 "ncurses 6.6" "Library calls"
32 .SH NAME
33 \fBform_win\fP \-
34 make and break form window and subwindow associations
35 .SH SYNOPSIS
36 .nf
37 \fB#include <form.h>
38 .PP
39 \fBint set_form_win(FORM *\fIform\fP, WINDOW *\fIwin\fP);
40 \fBWINDOW *form_win(const FORM *\fIform\fP);
41 .PP
42 \fBint set_form_sub(FORM *\fIform\fP, WINDOW *\fIsub\fP);
43 \fBWINDOW *form_sub(const FORM *\fIform\fP);
44 .PP
45 \fBint scale_form(const FORM *\fIform\fP, int *\fIrows\fP, int *\fIcolumns\fP);
46 .fi
47 .SH DESCRIPTION
48 Every form has an associated pair of \fBcurses\fP windows.
49 The form window
50 displays any title and border associated with the window; the form subwindow
51 displays the items of the form that are currently available for selection.
52 .PP
53 The first four functions get and set those windows.
54 It is not necessary to set
55 either window; by default, the driver code uses \fBstdscr\fP for both.
56 .PP
57 In the \fBset_\fP functions, window argument of
58 .I NULL
59 is treated as though
60 it were \fBstsdcr\fP. A form argument of
61 .I NULL
62 is treated as a request
63 to change the system default form window or subwindow.
64 .PP
65 The function \fBscale_form\fP returns the minimum size required for the
66 subwindow of \fIform\fP.
67 .SH RETURN VALUE
68 Routines that return pointers return
69 .I NULL
70 on error.
71 Routines that return
72 an integer return one of the following error codes:
73 .TP 5
74 .B E_OK
75 The routine succeeded.
76 .TP 5
77 .B E_SYSTEM_ERROR
78 System error occurred (see \fBerrno\fP(3)).
79 .TP 5
80 .B E_BAD_ARGUMENT
81 Routine detected an incorrect or out-of-range argument.
82 .TP 5
83 .B E_POSTED
84 The form has already been posted.
85 .TP 5
86 .B E_NOT_CONNECTED
87 No items are connected to the form.
88 .SH PORTABILITY
89 These routines emulate the System V forms library.
90 They were not supported on
91 Version 7 or BSD versions.
92 .SH AUTHORS
93 Juergen Pfeifer.
94 Manual pages and adaptation for new curses by Eric S. Raymond.
95 .SH SEE ALSO
96 \fB\%ncurses\fP(3NCURSES),
97 \fB\%curses_variables\fP(3NCURSES),
98 \fB\%form\fP(3FORM)