1 <!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML 2.0//EN">
3 ****************************************************************************
4 * Copyright (c) 1998,2002 Free Software Foundation, Inc. *
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: *
14 * The above copyright notice and this permission notice shall be included *
15 * in all copies or substantial portions of the Software. *
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. *
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 *
29 ****************************************************************************
30 * @Id: form_driver.3x,v 1.9 2002/02/16 22:39:52 tom Exp @
34 <TITLE>form_driver 3x</TITLE>
35 <link rev=made href="mailto:bug-ncurses@gnu.org">
36 <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
39 <H1>form_driver 3x</H1>
42 <!-- Manpage converted by man2html 3.0.1 -->
43 <STRONG><A HREF="form_driver.3x.html">form_driver(3x)</A></STRONG> <STRONG><A HREF="form_driver.3x.html">form_driver(3x)</A></STRONG>
50 <STRONG>form_driver</STRONG> - command-processing loop of the form system
54 <H2>SYNOPSIS</H2><PRE>
55 <STRONG>#include</STRONG> <STRONG><form.h></STRONG>
56 int form_driver(FORM *form, int c);
60 <H2>DESCRIPTION</H2><PRE>
61 Once a form has been posted (displayed), you should funnel
62 input events to it through <STRONG>form_driver</STRONG>. This routine has
63 two major input cases; either the input is a form naviga-
64 tion request or it's a printable ASCII character. The
65 form driver requests are as follows:
68 Move to the next page.
71 Move to the previous page.
74 Move to the first page.
77 Move to the last field.
81 Move to the next field.
84 Move to the previous field.
87 Move to the first field.
90 Move to the last field.
93 Move to the sorted next field.
96 Move to the sorted previous field.
99 Move to the sorted first field.
102 Move to the sorted last field.
105 Move left to a field.
108 Move right to a field.
114 Move down to a field.
118 Move to the next char.
121 Move to the previous char.
124 Move to the next line.
127 Move to the previous line.
130 Move to the next word.
133 Move to the previous word.
136 Move to the beginning of the field.
139 Move to the end of the field.
142 Move to the beginning of the line.
145 Move to the end of the line.
148 Move left in the field.
151 Move right in the field.
154 Move up in the field.
157 Move down in the field.
161 Insert or overlay a new line.
164 Insert a blank at the cursor.
167 Insert a blank line at the cursor.
170 Delete character at the cursor.
173 Delete character before the cursor.
176 Delete line at the cursor.
179 Delete blank-delimited word at the cursor.
182 Clear to end of line from cursor.
185 Clear to end of field from cursor.
188 Clear the entire field.
198 Scroll the field forward a line.
201 Scroll the field backward a line.
204 Scroll the field forward a page.
207 Scroll the field backward a page.
210 Scroll the field forward half a page.
213 Scroll the field backward half a page.
217 Scroll the field forward a character.
220 Scroll the field backward a character.
223 Horizontal scroll the field forward a line.
226 Horizontal scroll the field backward a line.
229 Horizontal scroll the field forward half a line.
232 Horizontal scroll the field backward half a line.
239 Display next field choice.
242 Display previous field choice.
244 If the second argument is a printable ASCII character, the
245 driver places it in the current position in the current
246 field. If it is one of the forms requests listed above,
247 that request is executed.
249 If the second argument is neither printable ASCII nor one
250 of the above pre-defined form requests, the driver assumes
251 it is an application-specific command and returns
252 <STRONG>E_UNKNOWN_COMMAND</STRONG>. Application-defined commands should be
253 defined relative to <STRONG>MAX_COMMAND</STRONG>, the maximum value of
254 these pre-defined requests.
258 <H2>RETURN VALUE</H2><PRE>
259 <STRONG>form_driver</STRONG> return one of the following error codes:
261 <STRONG>E_OK</STRONG> The routine succeeded.
263 <STRONG>E_SYSTEM_ERROR</STRONG>
264 System error occurred (see <STRONG>errno</STRONG>).
266 <STRONG>E_BAD_ARGUMENT</STRONG>
267 Routine detected an incorrect or out-of-range argu-
270 <STRONG>E_BAD_STATE</STRONG>
271 Routine was called from an initialization or termina-
274 <STRONG>E_NOT_POSTED</STRONG>
275 The form has not been posted.
277 <STRONG>E_UNKNOWN_COMMAND</STRONG>
278 The form driver code saw an unknown request code.
280 <STRONG>E_INVALID_FIELD</STRONG>
281 Contents of field is invalid.
283 <STRONG>E_REQUEST_DENIED</STRONG>
284 The form driver could not process the request.
288 <H2>SEE ALSO</H2><PRE>
289 <STRONG><A HREF="ncurses.3x.html">curses(3x)</A></STRONG>, <STRONG><A HREF="form.3x.html">form(3x)</A></STRONG>.
294 The header file <STRONG><form.h></STRONG> automatically includes the header
295 files <STRONG><curses.h></STRONG>.
299 <H2>PORTABILITY</H2><PRE>
300 These routines emulate the System V forms library. They
301 were not supported on Version 7 or BSD versions.
305 <H2>AUTHORS</H2><PRE>
306 Juergen Pfeifer. Manual pages and adaptation for new
307 curses by Eric S. Raymond.
311 <STRONG><A HREF="form_driver.3x.html">form_driver(3x)</A></STRONG>
315 Man(1) output converted with
316 <a href="http://www.oac.uci.edu/indiv/ehood/man2html.html">man2html</a>