| 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: menu_hook.3x,v 1.6 1998/11/29 01:09:47 Rick.Ohnemus Exp $
|
|---|
| 31 | .TH menu_hook 3X ""
|
|---|
| 32 | .SH NAME
|
|---|
| 33 | \fBmenu_hook\fR - set hooks for automatic invocation by applications
|
|---|
| 34 | .SH SYNOPSIS
|
|---|
| 35 | \fB#include <menu.h>\fR
|
|---|
| 36 | .br
|
|---|
| 37 | int set_item_init(MENU *menu, void (*func)(MENU *));
|
|---|
| 38 | .br
|
|---|
| 39 | void (*)(MENU *) item_init(const MENU *menu);
|
|---|
| 40 | .br
|
|---|
| 41 | int set_item_term(MENU *menu, void (*func)(MENU *));
|
|---|
| 42 | .br
|
|---|
| 43 | void (*)(MENU *) item_term(const MENU *menu);
|
|---|
| 44 | .br
|
|---|
| 45 | int set_menu_init(MENU *menu, void (*func)(MENU *));
|
|---|
| 46 | .br
|
|---|
| 47 | void (*)(MENU *) menu_init(const MENU *menu);
|
|---|
| 48 | .br
|
|---|
| 49 | int set_menu_term(MENU *menu, void (*func)(MENU *));
|
|---|
| 50 | .br
|
|---|
| 51 | void (*)(MENU *) menu_term(const MENU *menu);
|
|---|
| 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 \fBmenu_driver\fR.
|
|---|
| 56 |
|
|---|
| 57 | The function \fBset_item_init\fR sets a hook to be called at menu-post time and
|
|---|
| 58 | each time the selected item changes (after the change). \fBitem_init\fR
|
|---|
| 59 | returns the current item init hook, if any (\fBNULL\fR if there is no such
|
|---|
| 60 | hook).
|
|---|
| 61 |
|
|---|
| 62 | The function \fBset_item_term\fR sets a hook to be called at menu-unpost time
|
|---|
| 63 | and each time the selected item changes (before the change). \fBitem_term\fR
|
|---|
| 64 | returns the current item term hook, if any (\fBNULL\fR if there is no such
|
|---|
| 65 | hook).
|
|---|
| 66 |
|
|---|
| 67 | The function \fBset_menu_init\fR sets a hook to be called at menu-post time and
|
|---|
| 68 | just after the top row on the menu changes once it is posted. \fBmenu_init\fR
|
|---|
| 69 | returns the current menu init hook, if any (\fBNULL\fR if there is no such
|
|---|
| 70 | hook).
|
|---|
| 71 |
|
|---|
| 72 | The function \fBset_menu_term\fR sets a hook to be called at menu-unpost time
|
|---|
| 73 | and just before the top row on the menu changes once it is posted.
|
|---|
| 74 | \fBmenu_term\fR returns the current menu term hook, if any (\fBNULL\fR if there
|
|---|
| 75 | is no such 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), \fBmenu\fR(3X).
|
|---|
| 87 | .SH NOTES
|
|---|
| 88 | The header file \fB<menu.h>\fR automatically includes the header file
|
|---|
| 89 | \fB<curses.h>\fR.
|
|---|
| 90 | .SH PORTABILITY
|
|---|
| 91 | These routines emulate the System V menu 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:
|
|---|