2014-07-03 14:10:53 +02:00
|
|
|
#ifndef H_CALLBACK_H
|
|
|
|
#define H_CALLBACK_H
|
|
|
|
|
|
|
|
#include <stdarg.h>
|
|
|
|
|
|
|
|
typedef struct {
|
2015-01-30 20:37:14 +01:00
|
|
|
void(*cbv)(va_list va);
|
2014-07-03 21:20:50 +02:00
|
|
|
} HCALLBACK;
|
2014-07-03 14:10:53 +02:00
|
|
|
|
2014-07-03 21:20:50 +02:00
|
|
|
HCALLBACK register_callback(const char *name, void(*cbv)(va_list va));
|
|
|
|
HCALLBACK create_callback(void(*cbv)(va_list va));
|
|
|
|
int find_callback(const char *name, HCALLBACK *result);
|
|
|
|
int call_callback(HCALLBACK cb, const char *name, ...);
|
2014-07-03 14:10:53 +02:00
|
|
|
void reset_callbacks(void);
|
|
|
|
|
|
|
|
#endif
|