14 lines
602 B
C
14 lines
602 B
C
typedef void (*cfglr_callback_t)(cfglr_signaler_t *signaler, cfglr_element_t *element, cfglr_signal_e sig);
|
|
|
|
typedef struct {
|
|
cfglr_callback_t callback;
|
|
} cfglr_callback_handle_t;
|
|
|
|
void cfglr_signaler_callback_init(cfglr_signaler_t *signaler, cfglr_element_t *element, cfglr_handle_t *handle);
|
|
void cfglr_signaler_callback_dispatch(cfglr_signaler_t *signaler, cfglr_element_t *element, cfglr_signal_e sig);
|
|
|
|
#define CFGLR_SIGNALER_CALLBACK(FN_CALLBACK) (cfglr_signaler_t){\
|
|
.init = &cfglr_signaler_callback_init,\
|
|
.dispatch = &cfglr_signaler_callback_dispatch,\
|
|
.handle = (void*)FN_CALLBACK\
|
|
}
|