blob: 204e1ec41500eef0f9c3c0a3a86273512f045db3 [file] [log] [blame]
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +05301'\" t
2.\"***************************************************************************
3.\" Copyright (c) 1998-2006,2007 Free Software Foundation, Inc. *
4.\" *
5.\" Permission is hereby granted, free of charge, to any person obtaining a *
6.\" copy of this software and associated documentation files (the *
7.\" "Software"), to deal in the Software without restriction, including *
8.\" without limitation the rights to use, copy, modify, merge, publish, *
9.\" distribute, distribute with modifications, sublicense, and/or sell *
10.\" copies of the Software, and to permit persons to whom the Software is *
11.\" furnished to do so, subject to the following conditions: *
12.\" *
13.\" The above copyright notice and this permission notice shall be included *
14.\" in all copies or substantial portions of the Software. *
15.\" *
16.\" THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS *
17.\" OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF *
18.\" MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. *
19.\" IN NO EVENT SHALL THE ABOVE COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, *
20.\" DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR *
21.\" OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR *
22.\" THE USE OR OTHER DEALINGS IN THE SOFTWARE. *
23.\" *
24.\" Except as contained in this notice, the name(s) of the above copyright *
25.\" holders shall not be used in advertising or otherwise to promote the *
26.\" sale, use or other dealings in this Software without prior written *
27.\" authorization. *
28.\"***************************************************************************
29.\"
30.\" $Id: menu_hook.3x,v 1.9 2007/02/24 17:34:08 tom Exp $
31.TH menu_hook 3X ""
32.SH NAME
33\fBmenu_hook\fR - set hooks for automatic invocation by applications
34.SH SYNOPSIS
35\fB#include <menu.h>\fR
36.br
37int set_item_init(MENU *menu, Menu_Hook func);
38.br
39Menu_Hook item_init(const MENU *menu);
40.br
41int set_item_term(MENU *menu, Menu_Hook func);
42.br
43Menu_Hook item_term(const MENU *menu);
44.br
45int set_menu_init(MENU *menu, Menu_Hook func);
46.br
47Menu_Hook menu_init(const MENU *menu);
48.br
49int set_menu_term(MENU *menu, Menu_Hook func);
50.br
51Menu_Hook menu_term(const MENU *menu);
52.br
53.SH DESCRIPTION
54These functions make it possible to set hook functions to be called at various
55points in the automatic processing of input event codes by \fBmenu_driver\fR.
56.PP
57The function \fBset_item_init\fR sets a hook to be called at menu-post time and
58each time the selected item changes (after the change). \fBitem_init\fR
59returns the current item init hook, if any (\fBNULL\fR if there is no such
60hook).
61.PP
62The function \fBset_item_term\fR sets a hook to be called at menu-unpost time
63and each time the selected item changes (before the change). \fBitem_term\fR
64returns the current item term hook, if any (\fBNULL\fR if there is no such
65hook).
66.PP
67The function \fBset_menu_init\fR sets a hook to be called at menu-post time and
68just after the top row on the menu changes once it is posted. \fBmenu_init\fR
69returns the current menu init hook, if any (\fBNULL\fR if there is no such
70hook).
71.PP
72The function \fBset_menu_term\fR sets a hook to be called at menu-unpost time
73and just before the top row on the menu changes once it is posted.
74\fBmenu_term\fR returns the current menu term hook, if any (\fBNULL\fR if there
75is no such hook).
76.SH RETURN VALUE
77Routines that return pointers return \fBNULL\fR on error. Other routines
78return one of the following:
79.TP 5
80.B E_OK
81The routine succeeded.
82.TP 5
83.B E_SYSTEM_ERROR
84System error occurred (see \fBerrno\fR).
85.SH SEE ALSO
86\fBcurses\fR(3X), \fBmenu\fR(3X).
87.SH NOTES
88The header file \fB<menu.h>\fR automatically includes the header file
89\fB<curses.h>\fR.
90.SH PORTABILITY
91These routines emulate the System V menu library. They were not supported on
92Version 7 or BSD versions.
93.SH AUTHORS
94Juergen Pfeifer. Manual pages and adaptation for new curses by Eric
95S. Raymond.
96.\"#
97.\"# The following sets edit modes for GNU EMACS
98.\"# Local Variables:
99.\"# mode:nroff
100.\"# fill-column:79
101.\"# End: