| 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 |
| 5 | |
| 6 | #include "luaevent.h" |
| 7 | |
| 8 | typedef struct { |
| 9 | struct event ev; |
| 10 | le_base* base; |
| 11 | int callbackRef; |
| 12 | struct timeval timeout; |
| 13 | } le_callback; |
| 14 | |
| 15 | int event_callback_register(lua_State* L); |
| 16 | |
| 17 | le_callback* event_callback_push(lua_State* L, int baseIdx, int callbackIdx); |
| 18 | |
| 19 | void luaevent_callback(int fd, short event, void* p); |
| 20 | |
| 21 | #endif |