4 <STRONG>menu_hook</STRONG> - set hooks for automatic invocation by applica-
10 <STRONG>#include</STRONG> <STRONG><menu.h></STRONG>
11 int set_item_init(MENU *menu, void (*func)(MENU *));
12 void (*)(MENU *) item_init(const MENU *menu);
13 int set_item_term(MENU *menu, void (*func)(MENU *));
14 void (*)(MENU *) item_term(const MENU *menu);
15 int set_menu_init(MENU *menu, void (*func)(MENU *));
16 void (*)(MENU *) menu_init(const MENU *menu);
17 int set_menu_term(MENU *menu, void (*func)(MENU *));
18 void (*)(MENU *) menu_term(const MENU *menu);
22 <H2>DESCRIPTION</H2><PRE>
23 These functions make it possible to set hook functions to
24 be called at various points in the automatic processing of
25 input event codes by <STRONG>menu_driver</STRONG>.
27 The function <STRONG>set_item_init</STRONG> sets a hook to be called at
28 menu-post time and each time the selected item changes
29 (after the change). <STRONG>item_init</STRONG> returns the current item
30 init hook, if any (<STRONG>NULL</STRONG> if there is no such hook).
32 The function <STRONG>set_item_term</STRONG> sets a hook to be called at
33 menu-unpost time and each time the selected item changes
34 (before the change). <STRONG>item_term</STRONG> returns the current item
35 term hook, if any (<STRONG>NULL</STRONG> if there is no such hook).
37 The function <STRONG>set_menu_init</STRONG> sets a hook to be called at
38 menu-post time and just after the top row on the menu
39 changes once it is posted. <STRONG>menu_init</STRONG> returns the current
40 menu init hook, if any (<STRONG>NULL</STRONG> if there is no such hook).
42 The function <STRONG>set_menu_term</STRONG> sets a hook to be called at
43 menu-unpost time and just before the top row on the menu
44 changes once it is posted. <STRONG>menu_term</STRONG> returns the current
45 menu term hook, if any (<STRONG>NULL</STRONG> if there is no such hook).
49 <H2>RETURN VALUE</H2><PRE>
50 Routines that return pointers return <STRONG>NULL</STRONG> on error. Other
51 routines return one of the following:
53 <STRONG>E_OK</STRONG> The routine succeeded.
55 <STRONG>E_SYSTEM_ERROR</STRONG>
56 System error occurred (see <STRONG>errno</STRONG>).
60 <H2>SEE ALSO</H2><PRE>
61 <STRONG><A HREF="ncurses.3x.html">curses(3X)</A></STRONG>, <STRONG><A HREF="menu.3x.html">menu(3X)</A></STRONG>.
69 <H2>PORTABILITY</H2><PRE>
70 These routines emulate the System V menu library. They
71 were not supported on Version 7 or BSD versions.
76 Juergen Pfeifer. Manual pages and adaptation for new
77 curses by Eric S. Raymond.