2004-10-30 01:55:16 +00:00
|
|
|
#ifndef foox11wraphfoo
|
|
|
|
|
#define foox11wraphfoo
|
|
|
|
|
|
|
|
|
|
/***
|
2006-06-19 21:53:48 +00:00
|
|
|
This file is part of PulseAudio.
|
2007-01-04 13:43:45 +00:00
|
|
|
|
2007-02-13 15:35:19 +00:00
|
|
|
Copyright 2004-2006 Lennart Poettering
|
|
|
|
|
|
2006-06-19 21:53:48 +00:00
|
|
|
PulseAudio is free software; you can redistribute it and/or modify
|
2004-11-14 14:58:54 +00:00
|
|
|
it under the terms of the GNU Lesser General Public License as published
|
2009-03-03 20:23:02 +00:00
|
|
|
by the Free Software Foundation; either version 2.1 of the License,
|
2004-10-30 01:55:16 +00:00
|
|
|
or (at your option) any later version.
|
2007-01-04 13:43:45 +00:00
|
|
|
|
2006-06-19 21:53:48 +00:00
|
|
|
PulseAudio is distributed in the hope that it will be useful, but
|
2004-10-30 01:55:16 +00:00
|
|
|
WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
|
|
|
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
|
|
|
|
General Public License for more details.
|
2007-01-04 13:43:45 +00:00
|
|
|
|
2004-11-14 14:58:54 +00:00
|
|
|
You should have received a copy of the GNU Lesser General Public License
|
2006-06-19 21:53:48 +00:00
|
|
|
along with PulseAudio; if not, write to the Free Software
|
2004-10-30 01:55:16 +00:00
|
|
|
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307
|
|
|
|
|
USA.
|
|
|
|
|
***/
|
|
|
|
|
|
|
|
|
|
#include <X11/Xlib.h>
|
2010-05-29 19:33:54 +01:00
|
|
|
#include <X11/Xlib-xcb.h>
|
2004-10-30 01:55:16 +00:00
|
|
|
|
2006-06-19 21:53:48 +00:00
|
|
|
#include <pulsecore/core.h>
|
2004-10-30 01:55:16 +00:00
|
|
|
|
2006-01-11 01:17:39 +00:00
|
|
|
typedef struct pa_x11_wrapper pa_x11_wrapper;
|
2004-10-30 01:55:16 +00:00
|
|
|
|
2008-06-11 16:58:00 +00:00
|
|
|
typedef struct pa_x11_client pa_x11_client;
|
|
|
|
|
|
|
|
|
|
typedef int (*pa_x11_event_cb_t)(pa_x11_wrapper *w, XEvent *e, void *userdata);
|
|
|
|
|
typedef void (*pa_x11_kill_cb_t)(pa_x11_wrapper *w, void *userdata);
|
|
|
|
|
|
2004-10-30 01:55:16 +00:00
|
|
|
/* Return the X11 wrapper for this core. In case no wrapper was
|
|
|
|
|
existant before, allocate a new one */
|
2006-01-11 01:17:39 +00:00
|
|
|
pa_x11_wrapper* pa_x11_wrapper_get(pa_core *c, const char *name);
|
2004-10-30 01:55:16 +00:00
|
|
|
|
|
|
|
|
/* Increase the wrapper's reference count by one */
|
2006-01-11 01:17:39 +00:00
|
|
|
pa_x11_wrapper* pa_x11_wrapper_ref(pa_x11_wrapper *w);
|
2004-10-30 01:55:16 +00:00
|
|
|
|
|
|
|
|
/* Decrease the reference counter of an X11 wrapper object */
|
2006-01-11 01:17:39 +00:00
|
|
|
void pa_x11_wrapper_unref(pa_x11_wrapper* w);
|
2004-10-30 01:55:16 +00:00
|
|
|
|
|
|
|
|
/* Return the X11 display object for this connection */
|
2006-01-11 01:17:39 +00:00
|
|
|
Display *pa_x11_wrapper_get_display(pa_x11_wrapper *w);
|
2004-10-30 01:55:16 +00:00
|
|
|
|
2010-05-29 19:33:54 +01:00
|
|
|
/* Return the XCB connection object for this connection */
|
|
|
|
|
xcb_connection_t *pa_x11_wrapper_get_xcb_connection(pa_x11_wrapper *w);
|
|
|
|
|
|
2008-06-11 16:58:00 +00:00
|
|
|
/* Kill the connection to the X11 display */
|
|
|
|
|
void pa_x11_wrapper_kill(pa_x11_wrapper *w);
|
2004-10-30 01:55:16 +00:00
|
|
|
|
|
|
|
|
/* Register an X11 client, that is called for each X11 event */
|
2008-06-11 16:58:00 +00:00
|
|
|
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);
|
2004-10-30 01:55:16 +00:00
|
|
|
|
|
|
|
|
/* Free an X11 client object */
|
2006-01-11 01:17:39 +00:00
|
|
|
void pa_x11_client_free(pa_x11_client *c);
|
2004-10-30 01:55:16 +00:00
|
|
|
|
|
|
|
|
#endif
|