jcs's openbsd hax
openbsd
at jcs 97 lines 4.4 kB view raw
1'\" t 2.\" $OpenBSD: form_win.3,v 1.11 2023/10/17 09:52:10 nicm Exp $ 3.\" 4.\"*************************************************************************** 5.\" Copyright 2018-2022,2023 Thomas E. Dickey * 6.\" Copyright 1998-2006,2010 Free Software Foundation, Inc. * 7.\" * 8.\" Permission is hereby granted, free of charge, to any person obtaining a * 9.\" copy of this software and associated documentation files (the * 10.\" "Software"), to deal in the Software without restriction, including * 11.\" without limitation the rights to use, copy, modify, merge, publish, * 12.\" distribute, distribute with modifications, sublicense, and/or sell * 13.\" copies of the Software, and to permit persons to whom the Software is * 14.\" furnished to do so, subject to the following conditions: * 15.\" * 16.\" The above copyright notice and this permission notice shall be included * 17.\" in all copies or substantial portions of the Software. * 18.\" * 19.\" THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS * 20.\" OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF * 21.\" MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. * 22.\" IN NO EVENT SHALL THE ABOVE COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, * 23.\" DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR * 24.\" OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR * 25.\" THE USE OR OTHER DEALINGS IN THE SOFTWARE. * 26.\" * 27.\" Except as contained in this notice, the name(s) of the above copyright * 28.\" holders shall not be used in advertising or otherwise to promote the * 29.\" sale, use or other dealings in this Software without prior written * 30.\" authorization. * 31.\"*************************************************************************** 32.\" 33.\" $Id: form_win.3,v 1.11 2023/10/17 09:52:10 nicm Exp $ 34.TH form_win 3 2023-07-01 "ncurses 6.4" "Library calls" 35.SH NAME 36\fBform_win\fP \- make and break form window and subwindow associations 37.SH SYNOPSIS 38\fB#include <form.h>\fP 39.sp 40\fBint set_form_win(FORM *\fIform\fB, WINDOW *\fIwin\fB);\fR 41.br 42\fBWINDOW *form_win(const FORM *\fIform\fB);\fR 43.sp 44\fBint set_form_sub(FORM *\fIform\fB, WINDOW *\fIsub\fB);\fR 45.br 46\fBWINDOW *form_sub(const FORM *\fIform\fB);\fR 47.sp 48\fBint scale_form(const FORM *\fIform\fB, int *\fIrows\fB, int *\fIcolumns\fB);\fR 49.SH DESCRIPTION 50Every form has an associated pair of \fBcurses\fP windows. 51The form window 52displays any title and border associated with the window; the form subwindow 53displays the items of the form that are currently available for selection. 54.PP 55The first four functions get and set those windows. 56It is not necessary to set 57either window; by default, the driver code uses \fBstdscr\fP for both. 58.PP 59In the \fBset_\fP functions, window argument of \fBNULL\fP is treated as though 60it were \fBstsdcr\fP. A form argument of \fBNULL\fP is treated as a request 61to change the system default form window or subwindow. 62.PP 63The function \fBscale_form\fP returns the minimum size required for the 64subwindow of \fIform\fP. 65.SH RETURN VALUE 66Routines that return pointers return \fBNULL\fP on error. 67Routines that return 68an integer return one of the following error codes: 69.TP 5 70.B E_OK 71The routine succeeded. 72.TP 5 73.B E_SYSTEM_ERROR 74System error occurred (see \fBerrno\fP(3)). 75.TP 5 76.B E_BAD_ARGUMENT 77Routine detected an incorrect or out-of-range argument. 78.TP 5 79.B E_POSTED 80The form has already been posted. 81.TP 5 82.B E_NOT_CONNECTED 83No items are connected to the form. 84.SH SEE ALSO 85\fBcurses\fP(3), 86\fBcurs_variables\fP(3), 87\fBform\fP(3). 88.SH NOTES 89The header file \fB<form.h>\fP automatically includes the header file 90\fB<curses.h>\fP. 91.SH PORTABILITY 92These routines emulate the System V forms library. 93They were not supported on 94Version 7 or BSD versions. 95.SH AUTHORS 96Juergen Pfeifer. 97Manual pages and adaptation for new curses by Eric S. Raymond.