X-Git-Url: https://ncurses.scripts.mit.edu/?p=ncurses.git;a=blobdiff_plain;f=menu%2Fm_hook.c;h=c7d9fe91af7fcee27830206e0b255c0a59ed4665;hp=916b9fc7ce7d87343fe9555099ae2c39c55faa10;hb=f259fb41d8f08b7e042eb928b839b59c8e39098c;hpb=04d942c3d98cf0a929c6afb17be8c10d4ae39af0 diff --git a/menu/m_hook.c b/menu/m_hook.c index 916b9fc7..c7d9fe91 100644 --- a/menu/m_hook.c +++ b/menu/m_hook.c @@ -1,5 +1,5 @@ /**************************************************************************** - * Copyright 2018,2020 Thomas E. Dickey * + * Copyright 2018-2020,2021 Thomas E. Dickey * * Copyright 1998-2012,2016 Free Software Foundation, Inc. * * * * Permission is hereby granted, free of charge, to any person obtaining a * @@ -38,7 +38,7 @@ #include "menu.priv.h" -MODULE_ID("$Id: m_hook.c,v 1.20 2020/07/04 19:45:16 tom Exp $") +MODULE_ID("$Id: m_hook.c,v 1.21 2021/06/17 21:26:02 tom Exp $") /* "Template" macro to generate function to set application specific hook */ #define GEN_HOOK_SET_FUNCTION( typ, name ) \ @@ -59,9 +59,9 @@ MENU_EXPORT(Menu_Hook) NCURSES_API typ ## _ ## name ( const MENU *menu )\ } /*--------------------------------------------------------------------------- -| Facility : libnmenu +| Facility : libnmenu | Function : int set_menu_init(MENU *menu, void (*f)(MENU *)) -| +| | Description : Set user-exit which is called when menu is posted | or just after the top row changes. | @@ -70,11 +70,11 @@ MENU_EXPORT(Menu_Hook) NCURSES_API typ ## _ ## name ( const MENU *menu )\ GEN_HOOK_SET_FUNCTION(menu, init) /*--------------------------------------------------------------------------- -| Facility : libnmenu +| Facility : libnmenu | Function : void (*)(MENU *) menu_init(const MENU *menu) -| +| | Description : Return address of user-exit function which is called -| when a menu is posted or just after the top row +| when a menu is posted or just after the top row | changes. | | Return Values : Menu init function address or NULL @@ -82,9 +82,9 @@ GEN_HOOK_SET_FUNCTION(menu, init) GEN_HOOK_GET_FUNCTION(menu, init) /*--------------------------------------------------------------------------- -| Facility : libnmenu +| Facility : libnmenu | Function : int set_menu_term (MENU *menu, void (*f)(MENU *)) -| +| | Description : Set user-exit which is called when menu is unposted | or just before the top row changes. | @@ -93,11 +93,11 @@ GEN_HOOK_GET_FUNCTION(menu, init) GEN_HOOK_SET_FUNCTION(menu, term) /*--------------------------------------------------------------------------- -| Facility : libnmenu +| Facility : libnmenu | Function : void (*)(MENU *) menu_term(const MENU *menu) -| +| | Description : Return address of user-exit function which is called -| when a menu is unposted or just before the top row +| when a menu is unposted or just before the top row | changes. | | Return Values : Menu finalization function address or NULL @@ -105,9 +105,9 @@ GEN_HOOK_SET_FUNCTION(menu, term) GEN_HOOK_GET_FUNCTION(menu, term) /*--------------------------------------------------------------------------- -| Facility : libnmenu +| Facility : libnmenu | Function : int set_item_init (MENU *menu, void (*f)(MENU *)) -| +| | Description : Set user-exit which is called when menu is posted | or just after the current item changes. | @@ -116,11 +116,11 @@ GEN_HOOK_GET_FUNCTION(menu, term) GEN_HOOK_SET_FUNCTION(item, init) /*--------------------------------------------------------------------------- -| Facility : libnmenu +| Facility : libnmenu | Function : void (*)(MENU *) item_init (const MENU *menu) -| +| | Description : Return address of user-exit function which is called -| when a menu is posted or just after the current item +| when a menu is posted or just after the current item | changes. | | Return Values : Item init function address or NULL @@ -128,9 +128,9 @@ GEN_HOOK_SET_FUNCTION(item, init) GEN_HOOK_GET_FUNCTION(item, init) /*--------------------------------------------------------------------------- -| Facility : libnmenu +| Facility : libnmenu | Function : int set_item_term (MENU *menu, void (*f)(MENU *)) -| +| | Description : Set user-exit which is called when menu is unposted | or just before the current item changes. | @@ -139,11 +139,11 @@ GEN_HOOK_GET_FUNCTION(item, init) GEN_HOOK_SET_FUNCTION(item, term) /*--------------------------------------------------------------------------- -| Facility : libnmenu +| Facility : libnmenu | Function : void (*)(MENU *) item_init (const MENU *menu) -| +| | Description : Return address of user-exit function which is called -| when a menu is unposted or just before the current item +| when a menu is unposted or just before the current item | changes. | | Return Values : Item finalization function address or NULL