DOC HOME SITE MAP MAN PAGES GNU INFO SEARCH PRINT BOOK
 

menu_hook(S-osr5)


menu_hook: set_item_init, item_init, set_item_term, item_term, set_menu_init, menu_init, set_menu_term, menu_term -- assign application-specific routines for automatic invocation by menus

Syntax

cc ... -lmenu -lcurses

#include <menu.h>

int set_item_init(MENU *menu, void (*func)(MENU *)); void (*)(MENU *) item_init(MENU *menu); int set_item_term(MENU *menu, void (*func)(MENU *)); void (*)(MENU *) item_term(MENU *menu); int set_menu_init(MENU *menu, void (*func)(MENU *)); void (*)(MENU *) menu_init(MENU *menu); int set_menu_term(MENU *menu, void (*func)(MENU *)); void (*)(MENU *) menu_term(MENU *menu);

Description

set_item_init- set menu-item initiation function

item_init- return menu-item initiation function

set_item_term- set menu-item termination function

item_term- return menu-item termination function

set_menu_init- set menu initiation function

menu_init- return menu initiation function

set_menu_term- set menu termination function

menu_term- return menu termination function

set_item_init(S-osr5) assigns the application-defined function to be called when the menu is posted and just after the current item changes. item_init(S-osr5) returns a pointer to the item initialization routine, if any, called when the menu is posted and just after the current item changes.

set_item_term(S-osr5) assigns an application-defined function to be called when the menu is unposted and just before the current item changes. item_term(S-osr5) returns a pointer to the termination function, if any, called when the menu is unposted and just before the current item changes.

set_menu_init(S-osr5) assigns an application-defined function to be called when the menu is posted and just after the top row changes on a posted menu. menu_init(S-osr5) returns a pointer to the menu initialization routine, if any, called when the menu is posted and just after the top row changes on a posted menu.

set_menu_term(S-osr5) assigns an application-defined function to be called when the menu is unposted and just before the top row changes on a posted menu. menu_term(S-osr5) returns a pointer to the menu termination routine, if any, called when the menu is unposted and just before the top row changes on a posted menu.

Return values

Routines that return pointers always return NULL on error. Routines that return an integer return one of the following:

E_OK - The routine returned successfully.
E_SYSTEM_ERROR - System error.

 E_OK            -  The routine returned successfully.
 E_SYSTEM_ERROR  -  System error.

Warning

The header file menu.h automatically includes the header files eti.h and curses.h.

Files


/usr/lib/libmenu.a
the library

See also

curses(S-osr5), menus(S-osr5)

Standards conformance

set_item_init(S-osr5), item_init(S-osr5), set_item_term(S-osr5), item_term(S-osr5), set_menu_init(S-osr5), menu_init(S-osr5), set_menu_term(S-osr5), and menu_term(S-osr5) are not part of any currently supported standard; they were developed by UNIX System Laboratories, Inc. and are maintained by The SCO Group.
© 2005 The SCO Group, Inc. All rights reserved.
SCO OpenServer Release 6.0.0 -- 02 June 2005