Updated doc/NEWS file
[midnight-commander.git] / lib / hook.h
blob0cd3f4669b5d9627a69a2162a8924518808a8b34
1 /** \file lib/hook.h
2 * \brief Header: hooks
3 */
5 #ifndef MC_HOOK_H
6 #define MC_HOOK_H
8 #include "lib/global.h"
10 /*** typedefs(not structures) and defined constants **********************************************/
12 /*** enums ***************************************************************************************/
14 /*** structures declarations (and typedefs of structures)*****************************************/
16 typedef struct hook_t
18 void (*hook_fn) (void *);
19 void *hook_data;
20 struct hook_t *next;
21 } hook_t;
23 /*** global variables defined in .c file *********************************************************/
25 /*** declarations of public functions ************************************************************/
27 void add_hook (hook_t ** hook_list, void (*hook_fn) (void *), void *data);
28 void execute_hooks (hook_t * hook_list);
29 void delete_hook (hook_t ** hook_list, void (*hook_fn) (void *));
30 gboolean hook_present (hook_t * hook_list, void (*hook_fn) (void *));
32 /*** inline functions **************************************************/
34 #endif /* MC_HOOK_H */