]> ncurses.scripts.mit.edu Git - ncurses.git/blob - doc/html/man/menu_hook.3x.html
ncurses 5.1
[ncurses.git] / doc / html / man / menu_hook.3x.html
1 <HTML>
2 <BODY>
3 <PRE>
4 <!-- Manpage converted by man2html 3.0.1 -->
5
6 </PRE>
7 <H2>NAME</H2><PRE>
8        <B>menu_hook</B> - set hooks for automatic invocation by applica-
9        tions
10
11
12 </PRE>
13 <H2>SYNOPSIS</H2><PRE>
14        <B>#include</B> <B>&lt;menu.h&gt;</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);
23
24
25 </PRE>
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>.
30
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).
35
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).
40
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).
45
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).
50
51
52 </PRE>
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:
56
57        <B>E_OK</B> The routine succeeded.
58
59        <B>E_SYSTEM_ERROR</B>
60             System error occurred (see <B>errno</B>).
61
62
63 </PRE>
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>.
66
67
68 </PRE>
69 <H2>NOTES</H2><PRE>
70        The header file <B>&lt;menu.h&gt;</B> automatically includes the header
71        file <B>&lt;curses.h&gt;</B>.
72
73
74 </PRE>
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.
78
79
80 </PRE>
81 <H2>AUTHORS</H2><PRE>
82        Juergen  Pfeifer.   Manual  pages  and  adaptation for new
83        curses by Eric S. Raymond.
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129 </PRE>
130 <HR>
131 <ADDRESS>
132 Man(1) output converted with
133 <a href="http://www.oac.uci.edu/indiv/ehood/man2html.html">man2html</a>
134 </ADDRESS>
135 </BODY>
136 </HTML>