1*b618a1eeSThomas Cort.\" $NetBSD: menu_hook.3,v 1.8 2003/04/16 13:35:10 wiz Exp $ 2*b618a1eeSThomas Cort.\" 3*b618a1eeSThomas Cort.\" Copyright (c) 1999 4*b618a1eeSThomas Cort.\" Brett Lymn - blymn@baea.com.au, brett_lymn@yahoo.com.au 5*b618a1eeSThomas Cort.\" 6*b618a1eeSThomas Cort.\" This code is donated to The NetBSD Foundation by the author. 7*b618a1eeSThomas Cort.\" 8*b618a1eeSThomas Cort.\" Redistribution and use in source and binary forms, with or without 9*b618a1eeSThomas Cort.\" modification, are permitted provided that the following conditions 10*b618a1eeSThomas Cort.\" are met: 11*b618a1eeSThomas Cort.\" 1. Redistributions of source code must retain the above copyright 12*b618a1eeSThomas Cort.\" notice, this list of conditions and the following disclaimer. 13*b618a1eeSThomas Cort.\" 2. Redistributions in binary form must reproduce the above copyright 14*b618a1eeSThomas Cort.\" notice, this list of conditions and the following disclaimer in the 15*b618a1eeSThomas Cort.\" documentation and/or other materials provided with the distribution. 16*b618a1eeSThomas Cort.\" 3. The name of the Author may not be used to endorse or promote 17*b618a1eeSThomas Cort.\" products derived from this software without specific prior written 18*b618a1eeSThomas Cort.\" permission. 19*b618a1eeSThomas Cort.\" 20*b618a1eeSThomas Cort.\" THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND 21*b618a1eeSThomas Cort.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 22*b618a1eeSThomas Cort.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 23*b618a1eeSThomas Cort.\" ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR BE LIABLE 24*b618a1eeSThomas Cort.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 25*b618a1eeSThomas Cort.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 26*b618a1eeSThomas Cort.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 27*b618a1eeSThomas Cort.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 28*b618a1eeSThomas Cort.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 29*b618a1eeSThomas Cort.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 30*b618a1eeSThomas Cort.\" SUCH DAMAGE. 31*b618a1eeSThomas Cort.\" 32*b618a1eeSThomas Cort.Dd September 10, 1999 33*b618a1eeSThomas Cort.Dt MENU_HOOK 3 34*b618a1eeSThomas Cort.Os 35*b618a1eeSThomas Cort.Sh NAME 36*b618a1eeSThomas Cort.Nm item_init , 37*b618a1eeSThomas Cort.Nm item_term , 38*b618a1eeSThomas Cort.Nm menu_init , 39*b618a1eeSThomas Cort.Nm menu_term , 40*b618a1eeSThomas Cort.Nm set_item_init , 41*b618a1eeSThomas Cort.Nm set_item_term , 42*b618a1eeSThomas Cort.Nm set_menu_init , 43*b618a1eeSThomas Cort.Nm set_menu_term 44*b618a1eeSThomas Cort.Nd get or set handler functions for menu post/unpost or item change 45*b618a1eeSThomas Cort.Sh LIBRARY 46*b618a1eeSThomas Cort.Lb libmenu 47*b618a1eeSThomas Cort.Sh SYNOPSIS 48*b618a1eeSThomas Cort.In menu.h 49*b618a1eeSThomas Cort.Ft void (*hook)() 50*b618a1eeSThomas Cort.Fn item_init "MENU *menu" 51*b618a1eeSThomas Cort.Ft void (*hook)() 52*b618a1eeSThomas Cort.Fn item_term "MENU *menu" 53*b618a1eeSThomas Cort.Ft void (*hook)() 54*b618a1eeSThomas Cort.Fn menu_init "MENU *menu" 55*b618a1eeSThomas Cort.Ft void (*hook)() 56*b618a1eeSThomas Cort.Fn menu_term "MENU *menu" 57*b618a1eeSThomas Cort.Ft int 58*b618a1eeSThomas Cort.Fn set_item_init "MENU *menu" "void (*hook)())" 59*b618a1eeSThomas Cort.Ft int 60*b618a1eeSThomas Cort.Fn set_item_term "MENU *menu" "void (*hook)())" 61*b618a1eeSThomas Cort.Ft int 62*b618a1eeSThomas Cort.Fn set_menu_init "MENU *menu" "void (*hook)())" 63*b618a1eeSThomas Cort.Ft int 64*b618a1eeSThomas Cort.Fn set_menu_term "MENU *menu" "void (*hook)())" 65*b618a1eeSThomas Cort.Sh DESCRIPTION 66*b618a1eeSThomas CortThe 67*b618a1eeSThomas Cort.Fn item_init 68*b618a1eeSThomas Cortfunction returns a pointer to the function that will be called 69*b618a1eeSThomas Cortwhenever the menu is posted and also just after the current item 70*b618a1eeSThomas Cortchanges. 71*b618a1eeSThomas CortThis is set by the 72*b618a1eeSThomas Cort.Fn set_item_init 73*b618a1eeSThomas Cortcall. 74*b618a1eeSThomas CortThe 75*b618a1eeSThomas Cort.Fn item_term 76*b618a1eeSThomas Cortfunction returns a pointer to the function that will be called before 77*b618a1eeSThomas Cortthe menu is unposted and just before the current item changes, this 78*b618a1eeSThomas Cortpointer is set by the 79*b618a1eeSThomas Cort.Fn set_item_term 80*b618a1eeSThomas Cortcall. 81*b618a1eeSThomas CortThe 82*b618a1eeSThomas Cort.Fn menu_init 83*b618a1eeSThomas Cortfunctions returns a pointer to the function that will be called just 84*b618a1eeSThomas Cortbefore the menu is posted to the screen. 85*b618a1eeSThomas CortThis pointer is set by the 86*b618a1eeSThomas Cort.Fn set_menu_init 87*b618a1eeSThomas Cortfunction call. 88*b618a1eeSThomas CortThe 89*b618a1eeSThomas Cort.Fn menu_term 90*b618a1eeSThomas Cortfunction returns a pointer to the function that will be called just 91*b618a1eeSThomas Cortafter the menu has been unposted, this pointer is set by the 92*b618a1eeSThomas Cort.Fn set_menu_term 93*b618a1eeSThomas Cortfunction. 94*b618a1eeSThomas Cort.Sh SEE ALSO 95*b618a1eeSThomas Cort.Xr curses 3 , 96*b618a1eeSThomas Cort.Xr menus 3 97*b618a1eeSThomas Cort.Sh NOTES 98*b618a1eeSThomas CortThe header 99*b618a1eeSThomas Cort.Pa \*[Lt]menu.h\*[Gt] 100*b618a1eeSThomas Cortautomatically includes both 101*b618a1eeSThomas Cort.Pa \*[Lt]curses.h\*[Gt] 102*b618a1eeSThomas Cortand 103*b618a1eeSThomas Cort.Pa \*[Lt]eti.h\*[Gt] . 104