aboutsummaryrefslogtreecommitdiffstats
path: root/include/event_callback.h
diff options
context:
space:
mode:
Diffstat (limited to 'include/event_callback.h')
-rw-r--r--include/event_callback.h24
1 files changed, 24 insertions, 0 deletions
diff --git a/include/event_callback.h b/include/event_callback.h
new file mode 100644
index 0000000..e6e60c4
--- /dev/null
+++ b/include/event_callback.h
@@ -0,0 +1,24 @@
+/* LuaEvent - Copyright (C) 2007 Thomas Harning <harningt@gmail.com>
+ * Licensed as LGPL - See doc/COPYING for details */
+#ifndef EVENT_CALLBACK
+#define EVENT_CALLBACK
+
+#include "luaevent.h"
+#include <lua.h>
+#include <sys/types.h>
+#include <sys/time.h>
+#include <event.h>
+
+#define EVENT_CALLBACK_ARG_MT "EVENT_CALLBACK_ARG_MT"
+
+typedef struct {
+ struct event ev;
+ le_base* base;
+ int callbackRef;
+} le_callback;
+
+int event_callback_register(lua_State* L);
+
+void luaevent_callback(int fd, short event, void* p);
+
+#endif