aboutsummaryrefslogtreecommitdiffstats
path: root/include/event_callback.h
blob: e6e60c409b93deabe951c28bbbd59783f2ee4053 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
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