configulator/include/cfglr_signaler_callback.h

15 lines
602 B
C
Raw Permalink Normal View History

2024-11-30 00:15:19 -05:00
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\
}