]> git.decadent.org.uk Git - ion3.git/blob - libmainloop/select.h
Update cfg_kludge_flash for Flash 10
[ion3.git] / libmainloop / select.h
1 /*
2  * ion/mainloop/select.h
3  * 
4  * Based on a contributed readfds code.
5  * 
6  * See the included file LICENSE for details.
7  */
8
9 #ifndef ION_LIBMAINLOOP_SELECT_H
10 #define ION_LIBMAINLOOP_SELECT_H
11
12 #include <stdlib.h>
13 #include <unistd.h>
14 #include <sys/time.h>
15 #include <libtu/obj.h>
16 #include <libtu/types.h>
17
18 INTRSTRUCT(WInputFd);
19
20 DECLSTRUCT(WInputFd){
21     int fd;
22     void *data;
23     void (*process_input_fn)(int fd, void *data);
24     WInputFd *next, *prev;
25 };
26
27 extern bool mainloop_register_input_fd(int fd, void *data,
28                                        void (*callback)(int fd, void *data));
29 extern void mainloop_unregister_input_fd(int fd);
30
31 extern void mainloop_select();
32
33 #endif /* ION_LIBMAINLOOP_SELECT_H */