]> ncurses.scripts.mit.edu Git - ncurses.git/blob - man/form_hook.3x
ncurses 4.1
[ncurses.git] / man / form_hook.3x
1 '\" t
2 .TH form_hook 3X ""
3 .SH NAME
4 \fBform_hook\fR - set hooks for automatic invocation by applications
5 .SH SYNOPSIS
6 \fB#include <form.h>\fR
7 .br
8 int set_field_init(FORM *form, void (*func)(FORM *));
9 .br
10 void (*)(FORM *) field_init(const FORM *form);
11 .br
12 int set_field_term(FORM *form, void (*func)(FORM *));
13 .br
14 void (*)(FORM *) field_term(const FORM *form);
15 .br
16 int set_form_init(FORM *form, void (*func)(FORM *));
17 .br
18 void (*)(FORM *) form_init(const FORM *form);
19 .br
20 int set_form_term(FORM *form, void (*func)(FORM *));
21 .br
22 void (*)(FORM *) form_term(const FORM *form);
23 .br
24 .SH DESCRIPTION
25 These functions make it possible to set hook functions to be called at various
26 points in the automatic processing of input event codes by \fBform_driver\fR.
27
28 The function \fBset_field_init\fR sets a hook to be called at form-post time
29 and each time the selected field changes (after the change).  \fBfield_init\fR
30 returns the current field init hook, if any (\fBNULL\fR if there is no such
31 hook).
32
33 The function \fBset_field_term\fR sets a hook to be called at form-unpost time
34 and each time the selected field changes (before the change).  \fBfield_term\fR
35 returns the current field term hook, if any (\fBNULL\fR if there is no such
36 hook).
37
38 The function \fBset_form_init\fR sets a hook to be called at form-post time and
39 just after a page change once it is posted.  \fBform_init\fR returns the
40 current form init hook, if any (\fBNULL\fR if there is no such hook).
41
42 The function \fBset_form_term\fR sets a hook to be called at form-unpost time
43 and just before a page change change once it is posted.  \fBform_init\fR
44 returns the current form term hook, if any (\fBNULL\fR if there is no such
45 hook).
46 .SH RETURN VALUE
47 Routines that return pointers return \fBNULL\fR on error.  Other routines
48 return one of the following:
49 .TP 5
50 \fBE_OK\fR
51 The routine succeeded.
52 .TP 5
53 \fBE_SYSTEM_ERROR\fR
54 System error occurred (see \fBerrno\fR).
55 .SH SEE ALSO
56 \fBcurses\fR(3X), \fBform\fR(3X).
57 .SH NOTES
58 The header file \fB<form.h>\fR automatically includes the header file
59 \fB<curses.h>\fR.
60 .SH PORTABILITY
61 These routines emulate the System V forms library.  They were not supported on
62 Version 7 or BSD versions.
63 .SH AUTHORS
64 Juergen Pfeifer.  Manual pages and adaptation for new curses by Eric
65 S. Raymond.
66 .\"#
67 .\"# The following sets edit modes for GNU EMACS
68 .\"# Local Variables:
69 .\"# mode:nroff
70 .\"# fill-column:79
71 .\"# End: