2 .\" Copyright 1989 AT&T
3 .\" Portions Copyright (c) 1996, Sun Microsystems, Inc. All Rights Reserved.
4 .\" The contents of this file are subject to the terms of the Common Development and Distribution License (the "License"). You may not use this file except in compliance with the License.
5 .\" You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE or http://www.opensolaris.org/os/licensing. See the License for the specific language governing permissions and limitations under the License.
6 .\" When distributing Covered Code, include this CDDL HEADER in each file and include the License file at usr/src/OPENSOLARIS.LICENSE. If applicable, add the following below this CDDL HEADER, with the fields enclosed by brackets "[]" replaced with your own identifying information: Portions Copyright [yyyy] [name of copyright owner]
7 .TH FORM_HOOK 3CURSES "Dec 31, 1996"
9 form_hook, set_form_init, form_init, set_form_term, form_term, set_field_init,
10 field_init, set_field_term, field_term \- assign application-specific routines
11 for invocation by forms
15 \fBcc\fR [ \fIflag\fR... ] \fIfile\fR... \fB-lform\fR \fB -lcurses \fR [ \fIlibrary\fR... ]
20 \fBint\fR \fBset_form_init\fR(\fBFORM *\fR\fIform\fR, \fBvoid (*func)(FORM*)\fR);
25 \fBvoid\fR \fB(*form_init)\fR(\fBFORM *\fR\fIform\fR);
30 \fBint\fR \fBset_form_term\fR(\fBFORM *\fR\fIform\fR, \fBvoid (*func)(FORM*)\fR);
35 \fBvoid\fR \fB(*form_term)\fR(\fBFORM *\fR\fIform\fR);
40 \fBint\fR \fBset_field_init\fR(\fBFORM *\fR\fIform\fR, \fBvoid (*func)(FORM*)\fR);
45 \fBvoid\fR \fB(*field_init)\fR(\fBFORM *\fR\fIform\fR);
50 \fBint\fR \fBset_field_term\fR(\fBFORM *\fR\fIform\fR, \fBvoid (*func)(FORM*)\fR);
55 \fBvoid\fR \fB(*field_term)\fR(\fBFORM *\fR\fIform\fR);
61 These routines allow the programmer to assign application specific routines to
62 be executed automatically at initialization and termination points in the
63 \fBforms\fR application. The user need not specify any application-defined
64 initialization or termination routines at all, but they may be helpful for
65 displaying messages or page numbers and other chores.
68 \fBset_form_init()\fR assigns an application-defined initialization function to
69 be called when the \fIform\fR is posted and just after a page change.
70 \fBform_init()\fR returns a pointer to the initialization function, if any.
73 \fBset_form_term()\fR assigns an application-defined function to be called when
74 the \fIform\fR is unposted and just before a page change. \fBform_term()\fR
75 returns a pointer to the function, if any.
78 \fBset_field_init()\fR assigns an application-defined function to be called
79 when the \fIform\fR is posted and just after the current field changes.
80 \fBfield_init()\fR returns a pointer to the function, if any.
83 \fBset_field_term()\fR assigns an application-defined function to be called
84 when the \fIform\fR is unposted and just before the current field changes.
85 \fBfield_term()\fR returns a pointer to the function, if any.
89 Routines that return pointers always return \fINULL\fR on error. Routines that
90 return an integer return one of the following:
97 The function returned successfully.
112 See \fBattributes\fR(5) for descriptions of the following attributes:
120 ATTRIBUTE TYPE ATTRIBUTE VALUE
128 \fBcurses\fR(3CURSES), \fBforms\fR(3CURSES), \fBattributes\fR(5)
132 The header \fB<form.h>\fR automatically includes the headers \fB<eti.h>\fR and