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