include/event_callback.h

changeset 22
48a109847dce
parent 20
71bc2e49366c
child 23
897150985f13
equal deleted inserted replaced
21:728aafac9682 22:48a109847dce
7 #include <lua.h> 7 #include <lua.h>
8 #include <sys/types.h> 8 #include <sys/types.h>
9 #include <sys/time.h> 9 #include <sys/time.h>
10 #include <event.h> 10 #include <event.h>
11 11
12 #define EVENT_CALLBACK_ARG_MT "EVENT_CALLBACK_ARG_MT"
13
14 typedef struct { 12 typedef struct {
15 struct event ev; 13 struct event ev;
16 le_base* base; 14 le_base* base;
17 int callbackRef; 15 int callbackRef;
18 } le_callback; 16 } le_callback;
19 17
20 int event_callback_register(lua_State* L); 18 int event_callback_register(lua_State* L);
21 19
20 le_callback* event_callback_push(lua_State* L, int baseIdx, int callbackIdx);
21
22 void luaevent_callback(int fd, short event, void* p); 22 void luaevent_callback(int fd, short event, void* p);
23 23
24 #endif 24 #endif

mercurial