jcs's openbsd hax
openbsd
at jcs 102 lines 4.5 kB view raw
1'\" t 2.\" $OpenBSD: form_page.3,v 1.10 2023/10/17 09:52:10 nicm Exp $ 3.\" 4.\"*************************************************************************** 5.\" Copyright 2018-2022,2023 Thomas E. Dickey * 6.\" Copyright 1998-2010,2016 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_page.3,v 1.10 2023/10/17 09:52:10 nicm Exp $ 34.TH form_page 3 2023-07-01 "ncurses 6.4" "Library calls" 35.SH NAME 36\fBform_page\fP \- set and get form page number 37.SH SYNOPSIS 38\fB#include <form.h>\fP 39.sp 40\fBint set_current_field(FORM *\fIform\fB, FIELD *\fIfield\fB);\fR 41.br 42\fBFIELD *current_field(const FORM *\fIform\fB);\fR 43.sp 44\fBint unfocus_current_field(FORM *\fIform\fB);\fR 45.sp 46\fBint set_form_page(FORM *\fIform\fB, int \fIn\fB);\fR 47.br 48\fBint form_page(const FORM *\fIform\fB);\fR 49.sp 50\fBint field_index(const FIELD *\fIfield\fB);\fR 51.SH DESCRIPTION 52The function \fBset_current_field\fP sets the current field of the given 53form; \fBcurrent_field\fP returns the current field of the given form. 54.PP 55The function \fBunfocus_current_field\fP removes the focus from the current 56field of the form. 57In such state, inquiries via \fBcurrent_field\fP shall return a NULL pointer. 58.PP 59The function \fBset_form_page\fP sets the form's page number (goes to page 60\fIn\fP of the form). 61.PP 62The function \fBform_page\fP returns the form's current page number. 63.PP 64The function \fBfield_index\fP returns the index of the field in the 65field array of the form it is connected to. 66It returns \fBERR\fP if 67the argument is the null pointer or the field is not connected. 68.SH RETURN VALUE 69Except for \fBform_page\fP, each routine returns one of the following: 70.TP 5 71.B E_OK 72The routine succeeded. 73.TP 5 74.B E_BAD_ARGUMENT 75Routine detected an incorrect or out-of-range argument. 76.TP 5 77.B E_BAD_STATE 78Routine was called from an initialization or termination function. 79.TP 5 80.B E_INVALID_FIELD 81Contents of a field are not valid. 82.TP 5 83.B E_REQUEST_DENIED 84The form driver could not process the request. 85.TP 5 86.B E_SYSTEM_ERROR 87System error occurred (see \fBerrno\fP(3)). 88. 89.SH SEE ALSO 90\fBcurses\fP(3), \fBform\fP(3). 91.SH NOTES 92The header file \fB<form.h>\fP automatically includes the header file 93\fB<curses.h>\fP. 94.SH PORTABILITY 95These routines emulate the System V forms library. 96They were not supported on 97Version 7 or BSD versions. 98.PP 99The \fBunfocus_current_field\fP function is an ncurses extension. 100.SH AUTHORS 101Juergen Pfeifer. 102Manual pages and adaptation for new curses by Eric S. Raymond.