Amit Daniel Kachhap | e6a01f5 | 2011-07-20 11:45:59 +0530 | [diff] [blame] | 1 | '\" t |
| 2 | .\"*************************************************************************** |
Steve Kondik | ae271bc | 2015-11-15 02:50:53 +0100 | [diff] [blame] | 3 | .\" Copyright (c) 1998-2007,2010 Free Software Foundation, Inc. * |
Amit Daniel Kachhap | e6a01f5 | 2011-07-20 11:45:59 +0530 | [diff] [blame] | 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 | .\" |
Steve Kondik | ae271bc | 2015-11-15 02:50:53 +0100 | [diff] [blame] | 30 | .\" $Id: form_hook.3x,v 1.11 2010/12/04 18:40:45 tom Exp $ |
Amit Daniel Kachhap | e6a01f5 | 2011-07-20 11:45:59 +0530 | [diff] [blame] | 31 | .TH form_hook 3X "" |
| 32 | .SH NAME |
Steve Kondik | ae271bc | 2015-11-15 02:50:53 +0100 | [diff] [blame] | 33 | \fBform_hook\fR \- set hooks for automatic invocation by applications |
Amit Daniel Kachhap | e6a01f5 | 2011-07-20 11:45:59 +0530 | [diff] [blame] | 34 | .SH SYNOPSIS |
| 35 | \fB#include <form.h>\fR |
| 36 | .br |
| 37 | int set_field_init(FORM *form, Form_Hook func); |
| 38 | .br |
| 39 | Form_Hook field_init(const FORM *form); |
| 40 | .br |
| 41 | int set_field_term(FORM *form, Form_Hook func); |
| 42 | .br |
| 43 | Form_Hook field_term(const FORM *form); |
| 44 | .br |
| 45 | int set_form_init(FORM *form, Form_Hook func); |
| 46 | .br |
| 47 | Form_Hook form_init(const FORM *form); |
| 48 | .br |
| 49 | int set_form_term(FORM *form, Form_Hook func); |
| 50 | .br |
| 51 | Form_Hook form_term(const FORM *form); |
| 52 | .br |
| 53 | .SH DESCRIPTION |
| 54 | These functions make it possible to set hook functions to be called at various |
| 55 | points in the automatic processing of input event codes by \fBform_driver\fR. |
| 56 | .PP |
| 57 | The function \fBset_field_init\fR sets a hook to be called at form-post time |
| 58 | and each time the selected field changes (after the change). \fBfield_init\fR |
| 59 | returns the current field init hook, if any (\fBNULL\fR if there is no such |
| 60 | hook). |
| 61 | .PP |
| 62 | The function \fBset_field_term\fR sets a hook to be called at form-unpost time |
| 63 | and each time the selected field changes (before the change). \fBfield_term\fR |
| 64 | returns the current field term hook, if any (\fBNULL\fR if there is no such |
| 65 | hook). |
| 66 | .PP |
| 67 | The function \fBset_form_init\fR sets a hook to be called at form-post time and |
| 68 | just after a page change once it is posted. \fBform_init\fR returns the |
| 69 | current form init hook, if any (\fBNULL\fR if there is no such hook). |
| 70 | .PP |
| 71 | The function \fBset_form_term\fR sets a hook to be called at form-unpost time |
| 72 | and just before a page change once it is posted. \fBform_init\fR |
| 73 | returns the current form term hook, if any (\fBNULL\fR if there is no such |
| 74 | hook). |
| 75 | .SH RETURN VALUE |
| 76 | Routines that return pointers return \fBNULL\fR on error. Other routines |
| 77 | return one of the following: |
| 78 | .TP 5 |
| 79 | .B E_OK |
| 80 | The routine succeeded. |
| 81 | .TP 5 |
| 82 | .B E_SYSTEM_ERROR |
| 83 | System error occurred (see \fBerrno\fR). |
| 84 | .SH SEE ALSO |
| 85 | \fBcurses\fR(3X), \fBform\fR(3X). |
| 86 | .SH NOTES |
| 87 | The header file \fB<form.h>\fR automatically includes the header file |
| 88 | \fB<curses.h>\fR. |
| 89 | .SH PORTABILITY |
| 90 | These routines emulate the System V forms library. They were not supported on |
| 91 | Version 7 or BSD versions. |
| 92 | .SH AUTHORS |
| 93 | Juergen Pfeifer. Manual pages and adaptation for new curses by Eric |
| 94 | S. Raymond. |