blob: 84b10d96d4b83018dffa3486593d15e514c8e2f2 [file] [log] [blame]
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +05301.\"***************************************************************************
micky3879b9f5e72025-07-08 18:04:53 -04002.\" Copyright 2018-2023,2024 Thomas E. Dickey *
3.\" Copyright 1998-2010,2015 Free Software Foundation, Inc. *
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +05304.\" *
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.\"
micky3879b9f5e72025-07-08 18:04:53 -040030.\" $Id: form_field_info.3x,v 1.32 2024/03/16 15:35:01 tom Exp $
31.TH form_field_info 3X 2024-03-16 "ncurses @NCURSES_MAJOR@.@NCURSES_MINOR@" "Library calls"
32.ie \n(.g \{\
33.ds `` \(lq
34.ds '' \(rq
35.\}
36.el \{\
37.ie t .ds `` ``
38.el .ds `` ""
39.ie t .ds '' ''
40.el .ds '' ""
41.\}
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +053042.SH NAME
micky3879b9f5e72025-07-08 18:04:53 -040043\fBdynamic_field_info\fP,
44\fBfield_info\fP \-
45retrieve field characteristics
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +053046.SH SYNOPSIS
micky3879b9f5e72025-07-08 18:04:53 -040047.nf
48\fB#include <form.h>
49.PP
50\fBint field_info(const FIELD *\fIfield\fP,
51 \fBint *\fIrows\fB, int *\fIcols\fB,\fR
52 \fBint *\fIfrow\fB, int *\fIfcol\fB,\fR
53 \fBint *\fInrow\fB, int *\fInbuf\fB);\fR
54.PP
55\fBint dynamic_field_info(const FIELD *\fIfield\fB,\fR
56 \fBint *\fIrows\fB, int *\fIcols\fB, int *\fImax\fB);\fR
57.fi
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +053058.SH DESCRIPTION
micky3879b9f5e72025-07-08 18:04:53 -040059The function \fBfield_info\fP returns the sizes and other attributes passed in
60to the field at its creation time.
61The attributes are: height, width, row of
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +053062upper-left corner, column of upper-left corner, number off-screen rows, and
63number of working buffers.
64.PP
micky3879b9f5e72025-07-08 18:04:53 -040065The function \fBdynamic_field_info\fP returns the actual size of the field, and
66its maximum possible size.
67If the field has no size limit, the location
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +053068addressed by the third argument will be set to 0.
69A field can be made dynamic
micky3879b9f5e72025-07-08 18:04:53 -040070by turning off the \fBO_STATIC\fP option with \fBfield_opts_off\fP.
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +053071.SH RETURN VALUE
72These routines return one of the following:
73.TP 5
74.B E_OK
75The routine succeeded.
76.TP 5
77.B E_SYSTEM_ERROR
micky3879b9f5e72025-07-08 18:04:53 -040078System error occurred (see \fBerrno\fP(3)).
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +053079.TP 5
80.B E_BAD_ARGUMENT
81Routine detected an incorrect or out-of-range argument.
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +053082.SH PORTABILITY
micky3879b9f5e72025-07-08 18:04:53 -040083These routines emulate the System V forms library.
84They were not supported on
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +053085Version 7 or BSD versions.
86.PP
87A null (zero pointer) is accepted for any of the return values,
88to ignore that value.
89Not all implementations allow this, e.g., Solaris 2.7 does not.
90.SH AUTHORS
micky3879b9f5e72025-07-08 18:04:53 -040091Juergen Pfeifer.
92Manual pages and adaptation for new curses by Eric S. Raymond.
93.SH SEE ALSO
94\fB\%curses\fP(3X) and related pages whose names begin \*(``form_\*(''
95for detailed descriptions of the entry points.