]> code.delx.au - pulseaudio/blob - src/pulsecore/x11wrap.h
export card information for sinks/sources and number of sinks/sources a profile would...
[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 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
27 #include <pulsecore/core.h>
28
29 typedef struct pa_x11_wrapper pa_x11_wrapper;
30
31 typedef struct pa_x11_client pa_x11_client;
32
33 typedef int (*pa_x11_event_cb_t)(pa_x11_wrapper *w, XEvent *e, void *userdata);
34 typedef void (*pa_x11_kill_cb_t)(pa_x11_wrapper *w, void *userdata);
35
36 /* Return the X11 wrapper for this core. In case no wrapper was
37 existant before, allocate a new one */
38 pa_x11_wrapper* pa_x11_wrapper_get(pa_core *c, const char *name);
39
40 /* Increase the wrapper's reference count by one */
41 pa_x11_wrapper* pa_x11_wrapper_ref(pa_x11_wrapper *w);
42
43 /* Decrease the reference counter of an X11 wrapper object */
44 void pa_x11_wrapper_unref(pa_x11_wrapper* w);
45
46 /* Return the X11 display object for this connection */
47 Display *pa_x11_wrapper_get_display(pa_x11_wrapper *w);
48
49 /* Kill the connection to the X11 display */
50 void pa_x11_wrapper_kill(pa_x11_wrapper *w);
51
52 /* Register an X11 client, that is called for each X11 event */
53 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);
54
55 /* Free an X11 client object */
56 void pa_x11_client_free(pa_x11_client *c);
57
58 #endif