configulator/include/cfglr_signaler_callback.h
2024-11-29 21:15:19 -08:00

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\
}