2 .\"***************************************************************************
3 .\" Copyright (c) 1998 Free Software Foundation, Inc. *
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: *
13 .\" The above copyright notice and this permission notice shall be included *
14 .\" in all copies or substantial portions of the Software. *
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. *
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 *
28 .\"***************************************************************************
30 .\" $Id: menu_hook.3x,v 1.6 1998/11/29 01:09:47 Rick.Ohnemus Exp $
31 .\" $DragonFly: src/lib/libncurses/man/menu_hook.3,v 1.1 2005/03/12 19:13:54 eirikn Exp $
34 \fBmenu_hook\fR - set hooks for automatic invocation by applications
36 \fB#include <menu.h>\fR
38 int set_item_init(MENU *menu, void (*func)(MENU *));
40 void (*)(MENU *) item_init(const MENU *menu);
42 int set_item_term(MENU *menu, void (*func)(MENU *));
44 void (*)(MENU *) item_term(const MENU *menu);
46 int set_menu_init(MENU *menu, void (*func)(MENU *));
48 void (*)(MENU *) menu_init(const MENU *menu);
50 int set_menu_term(MENU *menu, void (*func)(MENU *));
52 void (*)(MENU *) menu_term(const MENU *menu);
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 \fBmenu_driver\fR.
58 The function \fBset_item_init\fR sets a hook to be called at menu-post time and
59 each time the selected item changes (after the change). \fBitem_init\fR
60 returns the current item init hook, if any (\fBNULL\fR if there is no such
63 The function \fBset_item_term\fR sets a hook to be called at menu-unpost time
64 and each time the selected item changes (before the change). \fBitem_term\fR
65 returns the current item term hook, if any (\fBNULL\fR if there is no such
68 The function \fBset_menu_init\fR sets a hook to be called at menu-post time and
69 just after the top row on the menu changes once it is posted. \fBmenu_init\fR
70 returns the current menu init hook, if any (\fBNULL\fR if there is no such
73 The function \fBset_menu_term\fR sets a hook to be called at menu-unpost time
74 and just before the top row on the menu changes once it is posted.
75 \fBmenu_term\fR returns the current menu term hook, if any (\fBNULL\fR if there
78 Routines that return pointers return \fBNULL\fR on error. Other routines
79 return one of the following:
82 The routine succeeded.
85 System error occurred (see \fBerrno\fR).
87 \fBcurses\fR(3X), \fBmenu\fR(3X).
89 The header file \fB<menu.h>\fR automatically includes the header file
92 These routines emulate the System V menu library. They were not supported on
93 Version 7 or BSD versions.
95 Juergen Pfeifer. Manual pages and adaptation for new curses by Eric
98 .\"# The following sets edit modes for GNU EMACS