Update ncurses to version 5.4.
[dragonfly.git] / lib / libncurses / man / form_hook.3
1 '\" t
2 .\"***************************************************************************
3 .\" Copyright (c) 1998 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_hook.3x,v 1.6 1999/03/20 22:37:15 Todd.Miller Exp $
31 .\" $DragonFly: src/lib/libncurses/man/form_hook.3,v 1.1 2005/03/12 19:13:54 eirikn Exp $
32 .TH form_hook 3X ""
33 .SH NAME
34 \fBform_hook\fR - set hooks for automatic invocation by applications
35 .SH SYNOPSIS
36 \fB#include <form.h>\fR
37 .br
38 int set_field_init(FORM *form, void (*func)(FORM *));
39 .br
40 void (*)(FORM *) field_init(const FORM *form);
41 .br
42 int set_field_term(FORM *form, void (*func)(FORM *));
43 .br
44 void (*)(FORM *) field_term(const FORM *form);
45 .br
46 int set_form_init(FORM *form, void (*func)(FORM *));
47 .br
48 void (*)(FORM *) form_init(const FORM *form);
49 .br
50 int set_form_term(FORM *form, void (*func)(FORM *));
51 .br
52 void (*)(FORM *) form_term(const FORM *form);
53 .br
54 .SH DESCRIPTION
55 These functions make it possible to set hook functions to be called at various
56 points in the automatic processing of input event codes by \fBform_driver\fR.
57
58 The function \fBset_field_init\fR sets a hook to be called at form-post time
59 and each time the selected field changes (after the change).  \fBfield_init\fR
60 returns the current field init hook, if any (\fBNULL\fR if there is no such
61 hook).
62
63 The function \fBset_field_term\fR sets a hook to be called at form-unpost time
64 and each time the selected field changes (before the change).  \fBfield_term\fR
65 returns the current field term hook, if any (\fBNULL\fR if there is no such
66 hook).
67
68 The function \fBset_form_init\fR sets a hook to be called at form-post time and
69 just after a page change once it is posted.  \fBform_init\fR returns the
70 current form init hook, if any (\fBNULL\fR if there is no such hook).
71
72 The function \fBset_form_term\fR sets a hook to be called at form-unpost time
73 and just before a page change once it is posted.  \fBform_init\fR
74 returns the current form term hook, if any (\fBNULL\fR if there is no such
75 hook).
76 .SH RETURN VALUE
77 Routines that return pointers return \fBNULL\fR on error.  Other routines
78 return one of the following:
79 .TP 5
80 \fBE_OK\fR
81 The routine succeeded.
82 .TP 5
83 \fBE_SYSTEM_ERROR\fR
84 System error occurred (see \fBerrno\fR).
85 .SH SEE ALSO
86 \fBcurses\fR(3X), \fBform\fR(3X).
87 .SH NOTES
88 The header file \fB<form.h>\fR automatically includes the header file
89 \fB<curses.h>\fR.
90 .SH PORTABILITY
91 These routines emulate the System V forms library.  They were not supported on
92 Version 7 or BSD versions.
93 .SH AUTHORS
94 Juergen Pfeifer.  Manual pages and adaptation for new curses by Eric
95 S. Raymond.
96 .\"#
97 .\"# The following sets edit modes for GNU EMACS
98 .\"# Local Variables:
99 .\"# mode:nroff
100 .\"# fill-column:79
101 .\"# End: