1menu_hook(3CURSES)         Curses Library Functions         menu_hook(3CURSES)
2
3
4

NAME

6       menu_hook,    set_item_init,   item_init,   set_item_term,   item_term,
7       set_menu_init, menu_init, set_menu_term, menu_term  -  assign  applica‐
8       tion-specific routines for automatic invocation by menus
9

SYNOPSIS

11       cc [ flag... ] file... -lmenu  -lcurses  [ library... ]
12       #include <menu.h>
13
14       int set_item_init(MENU *menu, void (*func)(MENU *));
15
16
17       int set_item_term(MENU *menu, void (*func)(MENU *));
18
19
20       void item_term(MENU *menu);
21
22
23       int set_menu_init(MENU *menu, void (*func)(MENU *));
24
25
26       void menu_init(MENU *menu);
27
28
29       int set_menu_term(MENU *menu, void (*func)(MENU *));
30
31
32       void menu_term(MENU *menu);
33
34

DESCRIPTION

36       set_item_init()  assigns  the application-defined function to be called
37       when the menu is posted  and  just  after  the  current  item  changes.
38       item_init()  returns  a  pointer to the item initialization routine, if
39       any, called when the menu is posted and just  after  the  current  item
40       changes.
41
42
43       set_item_term()  assigns  an  application-defined function to be called
44       when the menu is unposted and just before  the  current  item  changes.
45       item_term()  returns  a  pointer  to  the termination function, if any,
46       called when the menu is unposted  and  just  before  the  current  item
47       changes.
48
49
50       set_menu_init()  assigns  an  application-defined function to be called
51       when the menu is posted and just after the top row changes on a  posted
52       menu. menu_init() returns a pointer to the menu initialization routine,
53       if any, called when the menu is posted  and  just  after  the  top  row
54       changes on a posted menu.
55
56
57       set_menu_term()  assigns  an  application-defined function to be called
58       when the menu is unposted and just before the  top  row  changes  on  a
59       posted menu. menu_term() returns a pointer to the menu termination rou‐
60       tine, if any, called when the menu is unposted and just before the  top
61       row changes on a posted menu.
62

RETURN VALUES

64       Routines  that  return  pointers  always return NULL on error. Routines
65       that return an integer return one of the following:
66
67       E_OK              The routine returned successfully.
68
69
70       E_SYSTEM_ERROR    System error.
71
72

ATTRIBUTES

74       See attributes(5) for descriptions of the following attributes:
75
76
77
78
79       ┌─────────────────────────────┬─────────────────────────────┐
80       │      ATTRIBUTE TYPE         │      ATTRIBUTE VALUE        │
81       ├─────────────────────────────┼─────────────────────────────┤
82       │MT-Level                     │Unsafe                       │
83       └─────────────────────────────┴─────────────────────────────┘
84

SEE ALSO

86       curses(3CURSES), menus(3CURSES), attributes(5)
87

NOTES

89       The header <menu.h> automatically includes  the  headers   <eti.h>  and
90       <curses.h>.
91
92
93
94SunOS 5.11                        31 Dec 1996               menu_hook(3CURSES)
Impressum