default: esd is obsolete, hence don't load it anymore by default
[pulseaudio-mirror.git] / src / pulsecore / x11wrap.h
blobfc2e01fecb7edeec6e7d4251deffd9ebc4bf64e5
1 #ifndef foox11wraphfoo
2 #define foox11wraphfoo
4 /***
5 This file is part of PulseAudio.
7 Copyright 2004-2006 Lennart Poettering
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.
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.
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 ***/
25 #include <X11/Xlib.h>
26 #include <X11/Xlib-xcb.h>
28 #include <pulsecore/core.h>
30 typedef struct pa_x11_wrapper pa_x11_wrapper;
32 typedef struct pa_x11_client pa_x11_client;
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);
37 /* Return the X11 wrapper for this core. In case no wrapper was
38 existant before, allocate a new one */
39 pa_x11_wrapper* pa_x11_wrapper_get(pa_core *c, const char *name);
41 /* Increase the wrapper's reference count by one */
42 pa_x11_wrapper* pa_x11_wrapper_ref(pa_x11_wrapper *w);
44 /* Decrease the reference counter of an X11 wrapper object */
45 void pa_x11_wrapper_unref(pa_x11_wrapper* w);
47 /* Return the X11 display object for this connection */
48 Display *pa_x11_wrapper_get_display(pa_x11_wrapper *w);
50 /* Return the XCB connection object for this connection */
51 xcb_connection_t *pa_x11_wrapper_get_xcb_connection(pa_x11_wrapper *w);
53 /* Kill the connection to the X11 display */
54 void pa_x11_wrapper_kill(pa_x11_wrapper *w);
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);
59 /* Free an X11 client object */
60 void pa_x11_client_free(pa_x11_client *c);
62 #endif