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 -->
46 <STRONG>form_driver</STRONG> - command-processing loop of the form system
50 <H2>SYNOPSIS</H2><PRE>
51 <STRONG>#include</STRONG> <STRONG><form.h></STRONG>
52 int form_driver(FORM *form, int c);
56 <H2>DESCRIPTION</H2><PRE>
57 Once a form has been posted (displayed), you should funnel
58 input events to it through <STRONG>form_driver</STRONG>. This routine has
59 two major input cases; either the input is a form naviga-
60 tion request or it's a printable ASCII character. The
61 form driver requests are as follows:
64 Move to the next page.
67 Move to the previous page.
70 Move to the first page.
73 Move to the last field.
77 Move to the next field.
80 Move to the previous field.
83 Move to the first field.
86 Move to the last field.
89 Move to the sorted next field.
92 Move to the sorted previous field.
95 Move to the sorted first field.
98 Move to the sorted last field.
101 Move left to a field.
104 Move right to a field.
110 Move down to a field.
114 Move to the next char.
117 Move to the previous char.
120 Move to the next line.
123 Move to the previous line.
126 Move to the next word.
129 Move to the previous word.
132 Move to the beginning of the field.
135 Move to the end of the field.
138 Move to the beginning of the line.
141 Move to the end of the line.
144 Move left in the field.
147 Move right in the field.
150 Move up in the field.
153 Move down in the field.
158 Insert or overlay a new line.
161 Insert a blank at the cursor.
164 Insert a blank line at the cursor.
167 Delete character at the cursor.
170 Delete character before the cursor.
173 Delete line at the cursor.
176 Delete blank-delimited word at the cursor.
179 Clear to end of line from cursor.
182 Clear to end of field from cursor.
185 Clear the entire field.
195 Scroll the field forward a line.
198 Scroll the field backward a line.
201 Scroll the field forward a page.
204 Scroll the field backward a page.
207 Scroll the field forward half a page.
210 Scroll the field backward half a page.
213 Scroll the field forward a character.
216 Scroll the field backward a character.
219 Horizontal scroll the field forward a line.
222 Horizontal scroll the field backward a line.
225 Horizontal scroll the field forward half a line.
228 Horizontal scroll the field backward half a line.
235 Display next field choice.
238 Display previous field choice.
240 If the second argument is a printable ASCII character, the
241 driver places it in the current position in the current
242 field. If it is one of the forms requests listed above,
243 that request is executed.
245 If the second argument is neither printable ASCII nor one
246 of the above pre-defined form requests, the driver assumes
247 it is an application-specific command and returns
248 <STRONG>E_UNKNOWN_COMMAND</STRONG>. Application-defined commands should be
249 defined relative to <STRONG>MAX_COMMAND</STRONG>, the maximum value of
250 these pre-defined requests.
254 <H2>RETURN VALUE</H2><PRE>
255 <STRONG>form_driver</STRONG> return one of the following error codes:
257 <STRONG>E_OK</STRONG> The routine succeeded.
259 <STRONG>E_SYSTEM_ERROR</STRONG>
260 System error occurred (see <STRONG>errno</STRONG>).
262 <STRONG>E_BAD_ARGUMENT</STRONG>
263 Routine detected an incorrect or out-of-range argu-
266 <STRONG>E_BAD_STATE</STRONG>
267 Routine was called from an initialization or
268 termination function.
270 <STRONG>E_NOT_POSTED</STRONG>
271 The form has not been posted.
273 <STRONG>E_UNKNOWN_COMMAND</STRONG>
274 The form driver code saw an unknown request code.
276 <STRONG>E_INVALID_FIELD</STRONG>
277 Contents of field is invalid.
279 <STRONG>E_REQUEST_DENIED</STRONG>
280 The form driver could not process the request.
284 <H2>SEE ALSO</H2><PRE>
285 <STRONG><A HREF="ncurses.3x.html">curses(3x)</A></STRONG>, <STRONG><A HREF="form.3x.html">form(3x)</A></STRONG>.
290 The header file <STRONG><form.h></STRONG> automatically includes the header
291 files <STRONG><curses.h></STRONG>.
295 <H2>PORTABILITY</H2><PRE>
296 These routines emulate the System V forms library. They
297 were not supported on Version 7 or BSD versions.
301 <H2>AUTHORS</H2><PRE>
302 Juergen Pfeifer. Manual pages and adaptation for new
303 curses by Eric S. Raymond.
333 Man(1) output converted with
334 <a href="http://www.oac.uci.edu/indiv/ehood/man2html.html">man2html</a>