]> code.delx.au - pulseaudio/blob - polyp/x11wrap.h
79c690159390e3a18d92b2ffc1b32b1d3079bf85
[pulseaudio] / polyp / x11wrap.h
1 #ifndef foox11wraphfoo
2 #define foox11wraphfoo
3
4 /* $Id$ */
5
6 /***
7 This file is part of polypaudio.
8
9 polypaudio is free software; you can redistribute it and/or modify
10 it under the terms of the GNU General Public License as published
11 by the Free Software Foundation; either version 2 of the License,
12 or (at your option) any later version.
13
14 polypaudio is distributed in the hope that it will be useful, but
15 WITHOUT ANY WARRANTY; without even the implied warranty of
16 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
17 General Public License for more details.
18
19 You should have received a copy of the GNU General Public License
20 along with polypaudio; if not, write to the Free Software
21 Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307
22 USA.
23 ***/
24
25 #include <X11/Xlib.h>
26
27 #include "core.h"
28
29 struct pa_x11_wrapper;
30
31 /* Return the X11 wrapper for this core. In case no wrapper was
32 existant before, allocate a new one */
33 struct pa_x11_wrapper* pa_x11_wrapper_get(struct pa_core *c, const char *name);
34
35 /* Increase the wrapper's reference count by one */
36 struct pa_x11_wrapper* pa_x11_wrapper_ref(struct pa_x11_wrapper *w);
37
38 /* Decrease the reference counter of an X11 wrapper object */
39 void pa_x11_wrapper_unref(struct pa_x11_wrapper* w);
40
41 /* Return the X11 display object for this connection */
42 Display *pa_x11_wrapper_get_display(struct pa_x11_wrapper *w);
43
44 struct pa_x11_client;
45
46 /* Register an X11 client, that is called for each X11 event */
47 struct pa_x11_client* pa_x11_client_new(struct pa_x11_wrapper *w, int (*cb)(struct pa_x11_wrapper *w, XEvent *e, void *userdata), void *userdata);
48
49 /* Free an X11 client object */
50 void pa_x11_client_free(struct pa_x11_client *c);
51
52 #endif