]> ncurses.scripts.mit.edu Git - ncurses.git/blob - man/menu_hook.3x
36adef9f7aa7d20952139e41b09603130403559f
[ncurses.git] / man / menu_hook.3x
1 '\" t
2 .TH menu_hook 3X ""
3 .SH NAME
4 \fBmenu_hook\fR - set hooks for automatic invocation by applications
5 .SH SYNOPSIS
6 \fB#include <menu.h>\fR
7 .br
8 int set_item_init(MENU *menu, void (*func)(MENU *));
9 .br
10 void (*)(MENU *) item_init(const MENU *menu);
11 .br
12 int set_item_term(MENU *menu, void (*func)(MENU *));
13 .br
14 void (*)(MENU *) item_term(const MENU *menu);
15 .br
16 int set_menu_init(MENU *menu, void (*func)(MENU *));
17 .br
18 void (*)(MENU *) menu_init(const MENU *menu);
19 .br
20 int set_menu_term(MENU *menu, void (*func)(MENU *));
21 .br
22 void (*)(MENU *) menu_term(const MENU *menu);
23 .br
24 .SH DESCRIPTION
25 These functions make it possible to set hook functions to be called at various
26 points in the automatic processing of input event codes by \fBmenu_driver\fR.  
27
28 The function \fBset_item_init\fR sets a hook to be called at menu-post time and
29 each time the selected item changes (after the change).  \fBitem_init\fR
30 returns the current item init hook, if any (\fBNULL\fR if there is no such
31 hook).
32
33 The function \fBset_item_term\fR sets a hook to be called at menu-unpost time
34 and each time the selected item changes (before the change).  \fBitem_term\fR
35 returns the current item term hook, if any (\fBNULL\fR if there is no such
36 hook).
37
38 The function \fBset_menu_init\fR sets a hook to be called at menu-post time and
39 just after the top row on the menu changes once it is posted.  \fBmenu_init\fR
40 returns the current menu init hook, if any (\fBNULL\fR if there is no such
41 hook).
42
43 The function \fBset_menu_term\fR 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 \fBmenu_term\fR returns the current menu term hook, if any (\fBNULL\fR if there
46 is no such hook).
47 .SH RETURN VALUE
48 Routines that return pointers return \fBNULL\fR on error.  Other routines
49 return one of the following:
50 .TP 5
51 \fBE_OK\fR
52 The routine succeeded.
53 .TP 5
54 \fBE_SYSTEM_ERROR\fR
55 System error occurred (see \fBerrno\fR).
56 .SH SEE ALSO
57 \fBcurses\fR(3X), \fBmenu\fR(3X).
58 .SH NOTES
59 The header file \fB<menu.h>\fR automatically includes the header file
60 \fB<curses.h>\fR.
61 .SH PORTABILITY
62 These routines emulate the System V menu library.  They were not supported on
63 Version 7 or BSD versions.
64 .SH AUTHORS
65 Juergen Pfeifer.  Manual pages and adaptation for new curses by Eric
66 S. Raymond.
67 .\"#
68 .\"# The following sets edit modes for GNU EMACS
69 .\"# Local Variables:
70 .\"# mode:nroff
71 .\"# fill-column:79
72 .\"# End: