]> ncurses.scripts.mit.edu Git - ncurses.git/blob - Ada95/html/menu_hook.3x.html
ncurses 4.1
[ncurses.git] / Ada95 / html / menu_hook.3x.html
1 <HTML>
2 <BODY BGCOLOR="#99ccbb" TEXT="#000000" LINK="#4060b0" VLINK="#000080" ALINK="#ff4040">
3 <PRE>
4        <STRONG>menu_hook</STRONG> - set hooks for automatic invocation by applica-
5        tions
6
7
8 </PRE>
9 <H2>SYNOPSIS</H2><PRE>
10        <STRONG>#include</STRONG> <STRONG>&lt;menu.h&gt;</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);
19
20
21 </PRE>
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>.
26
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).
31
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).
36
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).
41
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).
46
47
48 </PRE>
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:
52
53        <STRONG>E_OK</STRONG> The routine succeeded.
54
55        <STRONG>E_SYSTEM_ERROR</STRONG>
56             System error occurred (see <STRONG>errno</STRONG>).
57
58
59 </PRE>
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>.
62
63
64 </PRE>
65 <H2>NOTES</H2><PRE>
66
67
68 </PRE>
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.
72
73
74 </PRE>
75 <H2>AUTHORS</H2><PRE>
76        Juergen  Pfeifer.   Manual  pages  and  adaptation for new
77        curses by Eric S. Raymond.
78
79
80
81
82
83
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 </PRE>
123 </BODY>
124 </HTML>