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