Beginning refactoring of the event_callback outside of the core
[luaevent.git] / include / event_callback.h
blobe6e60c409b93deabe951c28bbbd59783f2ee4053
1 /* LuaEvent - Copyright (C) 2007 Thomas Harning <harningt@gmail.com>
2 * Licensed as LGPL - See doc/COPYING for details */
3 #ifndef EVENT_CALLBACK
4 #define EVENT_CALLBACK
6 #include "luaevent.h"
7 #include <lua.h>
8 #include <sys/types.h>
9 #include <sys/time.h>
10 #include <event.h>
12 #define EVENT_CALLBACK_ARG_MT "EVENT_CALLBACK_ARG_MT"
14 typedef struct {
15 struct event ev;
16 le_base* base;
17 int callbackRef;
18 } le_callback;
20 int event_callback_register(lua_State* L);
22 void luaevent_callback(int fd, short event, void* p);
24 #endif