]> ncurses.scripts.mit.edu Git - ncurses.git/blobdiff - menu/m_hook.c
ncurses 6.2 - patch 20210905
[ncurses.git] / menu / m_hook.c
index c98aede7969dd744f59fe6f0dbf2c03d4fa59023..c7d9fe91af7fcee27830206e0b255c0a59ed4665 100644 (file)
@@ -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  *
 
 #include "menu.priv.h"
 
-MODULE_ID("$Id: m_hook.c,v 1.19 2020/02/02 23:34:34 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 ) \
-NCURSES_IMPEXP int NCURSES_API set_ ## typ ## _ ## name (MENU *menu, Menu_Hook func )\
+MENU_EXPORT(int) NCURSES_API set_ ## typ ## _ ## name (MENU *menu, Menu_Hook func )\
 {\
    TR_FUNC_BFR(1);\
    T((T_CALLED("set_" #typ "_" #name "(%p,%s)"), (void *) menu, TR_FUNC_ARG(0, func)));\
@@ -52,16 +52,16 @@ NCURSES_IMPEXP int NCURSES_API set_ ## typ ## _ ## name (MENU *menu, Menu_Hook f
 
 /* "Template" macro to generate function to get application specific hook */
 #define GEN_HOOK_GET_FUNCTION( typ, name ) \
-NCURSES_IMPEXP Menu_Hook NCURSES_API typ ## _ ## name ( const MENU *menu )\
+MENU_EXPORT(Menu_Hook) NCURSES_API typ ## _ ## name ( const MENU *menu )\
 {\
    T((T_CALLED(#typ "_" #name "(%p)"), (const void *) menu));\
    returnMenuHook(Normalize_Menu(menu) -> typ ## name);\
 }
 
 /*---------------------------------------------------------------------------
-|   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 @@ NCURSES_IMPEXP 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