]> code.delx.au - pulseaudio/blob - src/pulsecore/x11wrap.h
remap: Change remapping function argument type from void to int16_t / float as approp...
[pulseaudio] / src / pulsecore / x11wrap.h
1 #ifndef foox11wraphfoo
2 #define foox11wraphfoo
3
4 /***
5 This file is part of PulseAudio.
6
7 Copyright 2004-2006 Lennart Poettering
8
9 PulseAudio is free software; you can redistribute it and/or modify
10 it under the terms of the GNU Lesser General Public License as published
11 by the Free Software Foundation; either version 2.1 of the License,
12 or (at your option) any later version.
13
14 PulseAudio 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 Lesser General Public License
20 along with PulseAudio; 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 #include <X11/Xlib-xcb.h>
27
28 #include <pulsecore/core.h>
29
30 typedef struct pa_x11_wrapper pa_x11_wrapper;
31
32 typedef struct pa_x11_client pa_x11_client;
33
34 typedef int (*pa_x11_event_cb_t)(pa_x11_wrapper *w, XEvent *e, void *userdata);
35 typedef void (*pa_x11_kill_cb_t)(pa_x11_wrapper *w, void *userdata);
36
37 /* Return the X11 wrapper for this core. In case no wrapper was
38 existent before, allocate a new one */
39 pa_x11_wrapper* pa_x11_wrapper_get(pa_core *c, const char *name);
40
41 /* Increase the wrapper's reference count by one */
42 pa_x11_wrapper* pa_x11_wrapper_ref(pa_x11_wrapper *w);
43
44 /* Decrease the reference counter of an X11 wrapper object */
45 void pa_x11_wrapper_unref(pa_x11_wrapper* w);
46
47 /* Return the X11 display object for this connection */
48 Display *pa_x11_wrapper_get_display(pa_x11_wrapper *w);
49
50 /* Return the XCB connection object for this connection */
51 xcb_connection_t *pa_x11_wrapper_get_xcb_connection(pa_x11_wrapper *w);
52
53 /* Kill the connection to the X11 display */
54 void pa_x11_wrapper_kill(pa_x11_wrapper *w);
55
56 /* Register an X11 client, that is called for each X11 event */
57 pa_x11_client* pa_x11_client_new(pa_x11_wrapper *w, pa_x11_event_cb_t event_cb, pa_x11_kill_cb_t kill_cb, void *userdata);
58
59 /* Free an X11 client object */
60 void pa_x11_client_free(pa_x11_client *c);
61
62 #endif