]> Dogcows Code - chaz/openbox/blob - openbox/mainloop.h
break focus. or maybe make it better.
[chaz/openbox] / openbox / mainloop.h
1 #ifndef __ob__mainloop_h
2 #define __ob__mainloop_h
3
4 #include <X11/Xlib.h>
5 #include <glib.h>
6
7 typedef struct _ObMainLoop ObMainLoop;
8
9 ObMainLoop *ob_main_loop_new(Display *display);
10 void ob_main_loop_destroy(ObMainLoop *loop);
11
12 typedef void (*ObMainLoopXHandler) (const XEvent *e, gpointer data);
13 typedef void (*ObMainLoopXDoneHandler) (gpointer data);
14
15 void ob_main_loop_x_add(ObMainLoop *loop,
16 ObMainLoopXHandler handler,
17 ObMainLoopXDoneHandler done_handler,
18 gpointer data,
19 GDestroyNotify notify);
20 void ob_main_loop_x_remove(ObMainLoop *loop,
21 ObMainLoopXHandler handler);
22
23 typedef void (*ObMainLoopFdHandler) (gint fd, gpointer data);
24
25 void ob_main_loop_fd_add(ObMainLoop *loop,
26 gint fd,
27 ObMainLoopFdHandler handler,
28 gpointer data,
29 GDestroyNotify notify);
30 void ob_main_loop_fd_remove(ObMainLoop *loop,
31 gint fd);
32
33 typedef void (*ObMainLoopSignalHandler) (gint signal, gpointer data);
34
35 void ob_main_loop_signal_add(ObMainLoop *loop,
36 gint signal,
37 ObMainLoopSignalHandler handler,
38 gpointer data,
39 GDestroyNotify notify);
40 void ob_main_loop_signal_remove(ObMainLoop *loop,
41 ObMainLoopSignalHandler handler);
42
43 void ob_main_loop_timeout_add(ObMainLoop *loop,
44 gulong microseconds,
45 GSourceFunc handler,
46 gpointer data,
47 GDestroyNotify notify);
48 void ob_main_loop_timeout_remove(ObMainLoop *loop,
49 GSourceFunc handler);
50 void ob_main_loop_timeout_remove_data(ObMainLoop *loop,
51 GSourceFunc handler,
52 gpointer data);
53
54 void ob_main_loop_run(ObMainLoop *loop);
55 void ob_main_loop_exit(ObMainLoop *loop);
56
57 #endif
This page took 0.040883 seconds and 5 git commands to generate.