Changed lock_file() and unlock_file() functions
[midnight-commander.git] / lib / hook.h
blobe0ba02e199d815dfe964f72681be14bcd9a8b540
1 /** \file util.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 */