libcortex
Event loop library following a "batteries included" approach
Loading...
Searching...
No Matches
common.h
1#ifndef CRTX_COMMON_H
2#define CRTX_COMMON_H
3
4#define CRTX_DECLARE_ALLOC_FUNCTION(lstnr) \
5 struct crtx_ ## lstnr ## _listener * crtx_alloc_ ## lstnr ## _listener();
6#define CRTX_DECLARE_CALLOC_FUNCTION(lstnr) \
7 struct crtx_ ## lstnr ## _listener * crtx_ ## lstnr ## _calloc_listener(void);
8
9#define CRTX_RET_GEZ(r) { if (r < 0) {CRTX_ERROR("%s:%d: %d %s\n", __FILE__, __LINE__, r, strerror(-r)); return(r); } }
10
11extern char crtx_verbosity;
12
13struct crtx_event;
14
15typedef int (*crtx_handle_task_t)(struct crtx_event *event, void *userdata, void **sessiondata);
16
17#endif
an event that is emitted by a listener crtx_listener_base
Definition core.h:59