blob: 6095de1ccbb27473d2e25a75ad8d18479887db0e [file] [log] [blame]
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +05301'\" t
2.\"***************************************************************************
3.\" Copyright (c) 1998-2006,2007 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_new.3x,v 1.16 2007/06/02 20:40:07 tom Exp $
31.TH form_field_new 3X ""
32.SH NAME
33\fBform_field_new\fR - create and destroy form fields
34.SH SYNOPSIS
35\fB#include <form.h>\fR
36.br
37FIELD *new_field(int height, int width,
38 int toprow, int leftcol,
39 int offscreen, int nbuffers);
40.br
41FIELD *dup_field(FIELD *field, int toprow, int leftcol);
42.br
43FIELD *link_field(FIELD *field, int toprow, int leftcol);
44.br
45int free_field(FIELD *field);
46.br
47.SH DESCRIPTION
48The function \fBnew_field\fR allocates a new field and initializes it from the
49parameters given: height, width, row of upper-left corner, column of upper-left
50corner, number off-screen rows, and number of additional working buffers.
51.PP
52The function \fBdup_field\fR duplicates a field at a new location. Most
53attributes (including current contents, size, validation type, buffer count,
54growth threshold, justification, foreground, background, pad character,
55options, and user pointer) are copied. Field status and the field page bit are
56not copied.
57.PP
58The function \fBlink_field\fR acts like \fBdup_field\fR, but the new field
59shares buffers with its parent. Attribute data is separate.
60.PP
61The function \fBfree_field\fR de-allocates storage associated with a field.
62.SH RETURN VALUE
63The function, \fBnew_field\fR, \fBdup_field\fR, \fBlink_field\fR return
64\fBNULL\fR on error.
65They set errno according to their success:
66.TP 5
67.B E_OK
68The routine succeeded.
69.TP 5
70.B E_BAD_ARGUMENT
71Routine detected an incorrect or out-of-range argument.
72.TP 5
73.B E_SYSTEM_ERROR
74System error occurred, e.g., malloc failure.
75.PP
76The function \fBfree_field\fR returns one of the following:
77.TP 5
78.B E_OK
79The routine succeeded.
80.TP 5
81.B E_BAD_ARGUMENT
82Routine detected an incorrect or out-of-range argument.
83.TP 5
84.B E_CONNECTED
85field is connected.
86.SH SEE ALSO
87\fBcurses\fR(3X), \fBform\fR(3X).
88.SH NOTES
89The header file \fB<form.h>\fR automatically includes the header file
90\fB<curses.h>\fR.
91.SH PORTABILITY
92These routines emulate the System V forms library. They were not supported on
93Version 7 or BSD versions.
94.PP
95It may be unwise to count on the set of attributes copied by
96\fBdup_field\fR being portable; the System V forms library documents are
97not very explicit about what gets copied and what does not.
98.SH AUTHORS
99Juergen Pfeifer. Manual pages and adaptation for new curses by Eric
100S. Raymond.
101.\"#
102.\"# The following sets edit modes for GNU EMACS
103.\"# Local Variables:
104.\"# mode:nroff
105.\"# fill-column:79
106.\"# End: