1menu_hook(3X) menu_hook(3X)
2
3
4
6 menu_hook - set hooks for automatic invocation by applications
7
9 #include <menu.h>
10
11 int set_item_init(MENU *menu, Menu_Hook func);
12 Menu_Hook item_init(const MENU *menu);
13
14 int set_item_term(MENU *menu, Menu_Hook func);
15 Menu_Hook item_term(const MENU *menu);
16
17 int set_menu_init(MENU *menu, Menu_Hook func);
18 Menu_Hook menu_init(const MENU *menu);
19
20 int set_menu_term(MENU *menu, Menu_Hook func);
21 Menu_Hook menu_term(const MENU *menu);
22
24 These functions make it possible to set hook functions to be called at
25 various points in the automatic processing of input event codes by
26 menu_driver.
27
28 The function set_item_init sets a hook to be called at menu-post time
29 and each time the selected item changes (after the change). item_init
30 returns the current item init hook, if any (NULL if there is no such
31 hook).
32
33 The function set_item_term sets a hook to be called at menu-unpost time
34 and each time the selected item changes (before the change). item_term
35 returns the current item term hook, if any (NULL if there is no such
36 hook).
37
38 The function set_menu_init sets a hook to be called at menu-post time
39 and just after the top row on the menu changes once it is posted.
40 menu_init returns the current menu init hook, if any (NULL if there is
41 no such hook).
42
43 The function set_menu_term sets a hook to be called at menu-unpost time
44 and just before the top row on the menu changes once it is posted.
45 menu_term returns the current menu term hook, if any (NULL if there is
46 no such hook).
47
49 Routines that return pointers return NULL on error. Other routines re‐
50 turn one of the following:
51
52 E_OK The routine succeeded.
53
54 E_SYSTEM_ERROR
55 System error occurred (see errno(3)).
56
58 curses(3X), menu(3X).
59
61 The header file <menu.h> automatically includes the header file
62 <curses.h>.
63
65 These routines emulate the System V menu library. They were not sup‐
66 ported on Version 7 or BSD versions.
67
69 Juergen Pfeifer. Manual pages and adaptation for new curses by Eric S.
70 Raymond.
71
72
73
74 menu_hook(3X)