|
#ifndef SCM_CHOOKS_H |
|
#define SCM_CHOOKS_H |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
#include "libguile/scm.h" |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
typedef enum scm_t_c_hook_type { |
|
SCM_C_HOOK_NORMAL, |
|
SCM_C_HOOK_OR, |
|
SCM_C_HOOK_AND |
|
} scm_t_c_hook_type; |
|
|
|
typedef void *(*scm_t_c_hook_function) (void *hook_data, |
|
void *fn_data, |
|
void *data); |
|
|
|
typedef struct scm_t_c_hook_entry { |
|
struct scm_t_c_hook_entry *next; |
|
scm_t_c_hook_function func; |
|
void *data; |
|
} scm_t_c_hook_entry; |
|
|
|
typedef struct scm_t_c_hook { |
|
scm_t_c_hook_entry *first; |
|
scm_t_c_hook_type type; |
|
void *data; |
|
} scm_t_c_hook; |
|
|
|
SCM_API void scm_c_hook_init (scm_t_c_hook *hook, |
|
void *hook_data, |
|
scm_t_c_hook_type type); |
|
SCM_API void scm_c_hook_add (scm_t_c_hook *hook, |
|
scm_t_c_hook_function func, |
|
void *fn_data, |
|
int appendp); |
|
SCM_API void scm_c_hook_remove (scm_t_c_hook *hook, |
|
scm_t_c_hook_function func, |
|
void *fn_data); |
|
SCM_API void *scm_c_hook_run (scm_t_c_hook *hook, void *data); |
|
|
|
|
|
#endif |
|
|