]> ncurses.scripts.mit.edu Git - ncurses.git/blob - man/form_field_info.3x
ncurses 6.4 - patch 20231001
[ncurses.git] / man / form_field_info.3x
1 '\" t
2 .\"***************************************************************************
3 .\" Copyright 2018-2022,2023 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.27 2023/09/30 21:38:11 tom Exp $
32 .TH form_field_info 3X 2023-09-30 "ncurses 6.4" "Library calls"
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 \-
40 retrieve field characteristics
41 .SH SYNOPSIS
42 .nf
43 \fB#include <form.h>\fP
44 .sp
45 \fBint field_info(const FIELD *\fIfield\fB,\fR
46                \fBint *\fIrows\fB, int *\fIcols\fB,\fR
47                \fBint *\fIfrow\fB, int *\fIfcol\fB,\fR
48                \fBint *\fInrow\fB, int *\fInbuf\fB);\fR
49 .sp
50 \fBint dynamic_field_info(const FIELD *\fIfield\fB,\fR
51                        \fBint *\fIrows\fB, int *\fIcols\fB, int *\fImax\fB);\fR
52 .fi
53 .SH DESCRIPTION
54 The function \fBfield_info\fP returns the sizes and other attributes passed in
55 to the field at its creation time.
56 The attributes are: height, width, row of
57 upper-left corner, column of upper-left corner, number off-screen rows, and
58 number of working buffers.
59 .PP
60 The function \fBdynamic_field_info\fP returns the actual size of the field, and
61 its maximum possible size.
62 If the field has no size limit, the location
63 addressed by the third argument will be set to 0.
64 A field can be made dynamic
65 by turning off the \fBO_STATIC\fP option with \fBfield_opts_off\fP.
66 .SH RETURN VALUE
67 These routines return one of the following:
68 .TP 5
69 .B E_OK
70 The routine succeeded.
71 .TP 5
72 .B E_SYSTEM_ERROR
73 System error occurred (see \fBerrno\fP(3)).
74 .TP 5
75 .B E_BAD_ARGUMENT
76 Routine detected an incorrect or out-of-range argument.
77 .SH NOTES
78 The header file \fB<form.h>\fP automatically includes the header file
79 \fB<curses.h>\fP.
80 .SH PORTABILITY
81 These routines emulate the System V forms library.
82 They were not supported on
83 Version 7 or BSD versions.
84 .PP
85 A null (zero pointer) is accepted for any of the return values,
86 to ignore that value.
87 Not all implementations allow this, e.g., Solaris 2.7 does not.
88 .SH AUTHORS
89 Juergen Pfeifer.
90 Manual pages and adaptation for new curses by Eric S. Raymond.
91 .SH SEE ALSO
92 \fB\%curses\fP(3X) and related pages whose names begin \*(``form_\*(''
93 for detailed descriptions of the entry points.