]> Dogcows Code - chaz/openbox/blob - openbox/mainloop.h
only update the screen areas when a window actually has a strut (or when the strut...
[chaz/openbox] / openbox / mainloop.h
1 /* -*- indent-tabs-mode: nil; tab-width: 4; c-basic-offset: 4; -*-
2
3 mainloop.h for the Openbox window manager
4 Copyright (c) 2006 Mikael Magnusson
5 Copyright (c) 2003 Ben Jansens
6
7 This program is free software; you can redistribute it and/or modify
8 it under the terms of the GNU General Public License as published by
9 the Free Software Foundation; either version 2 of the License, or
10 (at your option) any later version.
11
12 This program is distributed in the hope that it will be useful,
13 but WITHOUT ANY WARRANTY; without even the implied warranty of
14 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15 GNU General Public License for more details.
16
17 See the COPYING file for a copy of the GNU General Public License.
18 */
19
20 #ifndef __ob__mainloop_h
21 #define __ob__mainloop_h
22
23 #include <X11/Xlib.h>
24 #include <glib.h>
25
26 typedef struct _ObMainLoop ObMainLoop;
27
28 ObMainLoop *ob_main_loop_new(Display *display);
29 void ob_main_loop_destroy(ObMainLoop *loop);
30
31 typedef void (*ObMainLoopXHandler) (const XEvent *e, gpointer data);
32
33 void ob_main_loop_x_add(ObMainLoop *loop,
34 ObMainLoopXHandler handler,
35 gpointer data,
36 GDestroyNotify notify);
37 void ob_main_loop_x_remove(ObMainLoop *loop,
38 ObMainLoopXHandler handler);
39
40 typedef void (*ObMainLoopFdHandler) (gint fd, gpointer data);
41
42 void ob_main_loop_fd_add(ObMainLoop *loop,
43 gint fd,
44 ObMainLoopFdHandler handler,
45 gpointer data,
46 GDestroyNotify notify);
47 void ob_main_loop_fd_remove(ObMainLoop *loop,
48 gint fd);
49
50 typedef void (*ObMainLoopSignalHandler) (gint signal, gpointer data);
51
52 void ob_main_loop_signal_add(ObMainLoop *loop,
53 gint signal,
54 ObMainLoopSignalHandler handler,
55 gpointer data,
56 GDestroyNotify notify);
57 void ob_main_loop_signal_remove(ObMainLoop *loop,
58 ObMainLoopSignalHandler handler);
59
60 void ob_main_loop_timeout_add(ObMainLoop *loop,
61 gulong microseconds,
62 GSourceFunc handler,
63 gpointer data,
64 GDestroyNotify notify);
65 void ob_main_loop_timeout_remove(ObMainLoop *loop,
66 GSourceFunc handler);
67 void ob_main_loop_timeout_remove_data(ObMainLoop *loop,
68 GSourceFunc handler,
69 gpointer data,
70 gboolean cancel_dest);
71
72 struct _ObAction;
73
74 /*! Queues an action, which will be run when there are no more X events
75 to process */
76 void ob_main_loop_queue_action(ObMainLoop *loop, struct _ObAction *act);
77
78 void ob_main_loop_run(ObMainLoop *loop);
79 void ob_main_loop_exit(ObMainLoop *loop);
80
81 #endif
This page took 0.041936 seconds and 4 git commands to generate.