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 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
27 #include <pulsecore/core.h>
29 typedef struct pa_x11_wrapper pa_x11_wrapper
;
31 typedef struct pa_x11_client pa_x11_client
;
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
);
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
);
40 /* Increase the wrapper's reference count by one */
41 pa_x11_wrapper
* pa_x11_wrapper_ref(pa_x11_wrapper
*w
);
43 /* Decrease the reference counter of an X11 wrapper object */
44 void pa_x11_wrapper_unref(pa_x11_wrapper
* w
);
46 /* Return the X11 display object for this connection */
47 Display
*pa_x11_wrapper_get_display(pa_x11_wrapper
*w
);
49 /* Kill the connection to the X11 display */
50 void pa_x11_wrapper_kill(pa_x11_wrapper
*w
);
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
);
55 /* Free an X11 client object */
56 void pa_x11_client_free(pa_x11_client
*c
);