2 <BODY BGCOLOR="#99ccbb" TEXT="#000000" LINK="#4060b0" VLINK="#000080" ALINK="#ff4040">
4 <STRONG>form_hook</STRONG> - set hooks for automatic invocation by applica-
10 <STRONG>#include</STRONG> <STRONG><form.h></STRONG>
11 int set_field_init(FORM *form, void (*func)(FORM *));
12 void (*)(FORM *) field_init(const FORM *form);
13 int set_field_term(FORM *form, void (*func)(FORM *));
14 void (*)(FORM *) field_term(const FORM *form);
15 int set_form_init(FORM *form, void (*func)(FORM *));
16 void (*)(FORM *) form_init(const FORM *form);
17 int set_form_term(FORM *form, void (*func)(FORM *));
18 void (*)(FORM *) form_term(const FORM *form);
22 <H2>DESCRIPTION</H2><PRE>
23 These functions make it possible to set hook functions to
24 be called at various points in the automatic processing of
25 input event codes by <STRONG>form_driver</STRONG>.
27 The function <STRONG>set_field_init</STRONG> sets a hook to be called at
28 form-post time and each time the selected field changes
29 (after the change). <STRONG>field_init</STRONG> returns the current field
30 init hook, if any (<STRONG>NULL</STRONG> if there is no such hook).
32 The function <STRONG>set_field_term</STRONG> sets a hook to be called at
33 form-unpost time and each time the selected field changes
34 (before the change). <STRONG>field_term</STRONG> returns the current field
35 term hook, if any (<STRONG>NULL</STRONG> if there is no such hook).
37 The function <STRONG>set_form_init</STRONG> sets a hook to be called at
38 form-post time and just after a page change once it is
39 posted. <STRONG>form_init</STRONG> returns the current form init hook, if
40 any (<STRONG>NULL</STRONG> if there is no such hook).
42 The function <STRONG>set_form_term</STRONG> sets a hook to be called at
43 form-unpost time and just before a page change change once
44 it is posted. <STRONG>form_init</STRONG> returns the current form term
45 hook, if any (<STRONG>NULL</STRONG> if there is no such hook).
49 <H2>RETURN VALUE</H2><PRE>
50 Routines that return pointers return <STRONG>NULL</STRONG> on error. Other
51 routines return one of the following:
53 <STRONG>E_OK</STRONG> The routine succeeded.
55 <STRONG>E_SYSTEM_ERROR</STRONG>
56 System error occurred (see <STRONG>errno</STRONG>).
60 <H2>SEE ALSO</H2><PRE>
61 <STRONG><A HREF="ncurses.3x.html">curses(3X)</A></STRONG>, <STRONG><A HREF="form.3x.html">form(3X)</A></STRONG>.
69 <H2>PORTABILITY</H2><PRE>
70 These routines emulate the System V forms library. They
71 were not supported on Version 7 or BSD versions.
76 Juergen Pfeifer. Manual pages and adaptation for new
77 curses by Eric S. Raymond.