]> ncurses.scripts.mit.edu Git - ncurses.git/blob - man/form_field_info.3x
ncurses 6.3 - patch 20220212
[ncurses.git] / man / form_field_info.3x
1 '\" t
2 .\"***************************************************************************
3 .\" Copyright 2018-2021,2022 Thomas E. Dickey                                *
4 .\" Copyright 1998-2010,2015 Free Software Foundation, Inc.                  *
5 .\"                                                                          *
6 .\" Permission is hereby granted, free of charge, to any person obtaining a  *
7 .\" copy of this software and associated documentation files (the            *
8 .\" "Software"), to deal in the Software without restriction, including      *
9 .\" without limitation the rights to use, copy, modify, merge, publish,      *
10 .\" distribute, distribute with modifications, sublicense, and/or sell       *
11 .\" copies of the Software, and to permit persons to whom the Software is    *
12 .\" furnished to do so, subject to the following conditions:                 *
13 .\"                                                                          *
14 .\" The above copyright notice and this permission notice shall be included  *
15 .\" in all copies or substantial portions of the Software.                   *
16 .\"                                                                          *
17 .\" THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS  *
18 .\" OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF               *
19 .\" MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.   *
20 .\" IN NO EVENT SHALL THE ABOVE COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM,   *
21 .\" DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR    *
22 .\" OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR    *
23 .\" THE USE OR OTHER DEALINGS IN THE SOFTWARE.                               *
24 .\"                                                                          *
25 .\" Except as contained in this notice, the name(s) of the above copyright   *
26 .\" holders shall not be used in advertising or otherwise to promote the     *
27 .\" sale, use or other dealings in this Software without prior written       *
28 .\" authorization.                                                           *
29 .\"***************************************************************************
30 .\"
31 .\" $Id: form_field_info.3x,v 1.21 2022/02/12 20:03:40 tom Exp $
32 .TH form_field_info 3X ""
33 .ie \n(.g .ds `` \(lq
34 .el       .ds `` ``
35 .ie \n(.g .ds '' \(rq
36 .el       .ds '' ''
37 .SH NAME
38 \fBdynamic_field_info\fP,
39 \fBfield_info\fP \- retrieve field characteristics
40 .SH SYNOPSIS
41 .nf
42 \fB#include <form.h>\fP
43 .sp
44 \fBint field_info(const FIELD *\fIfield\fB,\fR
45                \fBint *\fIrows\fB, int *\fIcols\fB,\fR
46                \fBint *\fIfrow\fB, int *\fIfcol\fB,\fR
47                \fBint *\fInrow\fB, int *\fInbuf\fB);\fR
48 .sp
49 \fBint dynamic_field_info(const FIELD *\fIfield\fB,\fR
50                        \fBint *\fIrows\fB, int *\fIcols\fB, int *\fImax\fB);\fR
51 .fi
52 .SH DESCRIPTION
53 The function \fBfield_info\fP returns the sizes and other attributes passed in
54 to the field at its creation time.
55 The attributes are: height, width, row of
56 upper-left corner, column of upper-left corner, number off-screen rows, and
57 number of working buffers.
58 .PP
59 The function \fBdynamic_field_info\fP returns the actual size of the field, and
60 its maximum possible size.
61 If the field has no size limit, the location
62 addressed by the third argument will be set to 0.
63 A field can be made dynamic
64 by turning off the \fBO_STATIC\fP option with \fBfield_opts_off\fP.
65 .SH RETURN VALUE
66 These routines return one of the following:
67 .TP 5
68 .B E_OK
69 The routine succeeded.
70 .TP 5
71 .B E_SYSTEM_ERROR
72 System error occurred (see \fBerrno\fP(3)).
73 .TP 5
74 .B E_BAD_ARGUMENT
75 Routine detected an incorrect or out-of-range argument.
76 .SH SEE ALSO
77 \fBcurses\fP(3X) and related pages whose names begin \*(``form_\*('' for detailed
78 descriptions of the entry points.
79 .SH NOTES
80 The header file \fB<form.h>\fP automatically includes the header file
81 \fB<curses.h>\fP.
82 .SH PORTABILITY
83 These routines emulate the System V forms library.
84 They were not supported on
85 Version 7 or BSD versions.
86 .PP
87 A null (zero pointer) is accepted for any of the return values,
88 to ignore that value.
89 Not all implementations allow this, e.g., Solaris 2.7 does not.
90 .SH AUTHORS
91 Juergen Pfeifer.
92 Manual pages and adaptation for new curses by Eric S. Raymond.