4 <!-- Manpage converted by man2html 3.0.1 -->
8 <B>menu_hook</B> - set hooks for automatic invocation by applica-
13 <H2>SYNOPSIS</H2><PRE>
14 <B>#include</B> <B><menu.h></B>
15 int set_item_init(MENU *menu, void (*func)(MENU *));
16 void (*)(MENU *) item_init(const MENU *menu);
17 int set_item_term(MENU *menu, void (*func)(MENU *));
18 void (*)(MENU *) item_term(const MENU *menu);
19 int set_menu_init(MENU *menu, void (*func)(MENU *));
20 void (*)(MENU *) menu_init(const MENU *menu);
21 int set_menu_term(MENU *menu, void (*func)(MENU *));
22 void (*)(MENU *) menu_term(const MENU *menu);
26 <H2>DESCRIPTION</H2><PRE>
27 These functions make it possible to set hook functions to
28 be called at various points in the automatic processing of
29 input event codes by <B>menu_driver</B>.
31 The function <B>set_item_init</B> sets a hook to be called at
32 menu-post time and each time the selected item changes
33 (after the change). <B>item_init</B> returns the current item
34 init hook, if any (<B>NULL</B> if there is no such hook).
36 The function <B>set_item_term</B> sets a hook to be called at
37 menu-unpost time and each time the selected item changes
38 (before the change). <B>item_term</B> returns the current item
39 term hook, if any (<B>NULL</B> if there is no such hook).
41 The function <B>set_menu_init</B> sets a hook to be called at
42 menu-post time and just after the top row on the menu
43 changes once it is posted. <B>menu_init</B> returns the current
44 menu init hook, if any (<B>NULL</B> if there is no such hook).
46 The function <B>set_menu_term</B> sets a hook to be called at
47 menu-unpost time and just before the top row on the menu
48 changes once it is posted. <B>menu_term</B> returns the current
49 menu term hook, if any (<B>NULL</B> if there is no such hook).
53 <H2>RETURN VALUE</H2><PRE>
54 Routines that return pointers return <B>NULL</B> on error. Other
55 routines return one of the following:
57 <B>E_OK</B> The routine succeeded.
60 System error occurred (see <B>errno</B>).
64 <H2>SEE ALSO</H2><PRE>
65 <B><A HREF="ncurses.3x.html">curses(3x)</A></B>, <B><A HREF="menu.3x.html">menu(3x)</A></B>.
70 The header file <B><menu.h></B> automatically includes the header
71 file <B><curses.h></B>.
75 <H2>PORTABILITY</H2><PRE>
76 These routines emulate the System V menu library. They
77 were not supported on Version 7 or BSD versions.
82 Juergen Pfeifer. Manual pages and adaptation for new
83 curses by Eric S. Raymond.
132 Man(1) output converted with
133 <a href="http://www.oac.uci.edu/indiv/ehood/man2html.html">man2html</a>