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