1 /* event.h -- event headers */
9 #include <sys/select.h>
15 #define CALLBACK_ERROR -1
30 /* event specific variables */
31 typedef struct s_event {
36 struct timeval timeout;
40 /* function prototypes */
41 int event_init(t_event *event,int outfd);
42 int event_set_timeout(t_event *event,int sec,int usec);
43 int event_math(int fd,t_event *event,char rw,char ar);
44 int event_start(t_event *event,void *ptr,
45 int (*callback0)(t_event *event,void *ptr),
46 int (*callback1)(t_event *event,void *ptr));
47 int event_stop(t_event *event);