1 #ifndef __ob__mainloop_h
2 #define __ob__mainloop_h
7 typedef struct _ObMainLoop ObMainLoop;
9 ObMainLoop *ob_main_loop_new(Display *display);
10 void ob_main_loop_destroy(ObMainLoop *loop);
12 typedef void (*ObMainLoopXHandler) (const XEvent *e, gpointer data);
14 void ob_main_loop_x_add(ObMainLoop *loop,
15 ObMainLoopXHandler handler,
17 GDestroyNotify notify);
18 void ob_main_loop_x_remove(ObMainLoop *loop,
19 ObMainLoopXHandler handler);
21 typedef void (*ObMainLoopFdHandler) (gint fd, gpointer data);
23 void ob_main_loop_fd_add(ObMainLoop *loop,
25 ObMainLoopFdHandler handler,
27 GDestroyNotify notify);
28 void ob_main_loop_fd_remove(ObMainLoop *loop,
31 typedef void (*ObMainLoopSignalHandler) (gint signal, gpointer data);
33 void ob_main_loop_signal_add(ObMainLoop *loop,
35 ObMainLoopSignalHandler handler,
37 GDestroyNotify notify);
38 void ob_main_loop_signal_remove(ObMainLoop *loop,
39 ObMainLoopSignalHandler handler);
41 void ob_main_loop_timeout_add(ObMainLoop *loop,
45 GDestroyNotify notify);
46 void ob_main_loop_timeout_remove(ObMainLoop *loop,
48 void ob_main_loop_timeout_remove_data(ObMainLoop *loop,
52 void ob_main_loop_run(ObMainLoop *loop);
53 void ob_main_loop_exit(ObMainLoop *loop);