Add copyright notices to all relevant files. (based on svn log)
[profile/ivi/pulseaudio.git] / src / pulsecore / x11wrap.h
1 #ifndef foox11wraphfoo
2 #define foox11wraphfoo
3
4 /* $Id$ */
5
6 /***
7   This file is part of PulseAudio.
8
9   Copyright 2004-2006 Lennart Poettering
10
11   PulseAudio is free software; you can redistribute it and/or modify
12   it under the terms of the GNU Lesser General Public License as published
13   by the Free Software Foundation; either version 2 of the License,
14   or (at your option) any later version.
15
16   PulseAudio is distributed in the hope that it will be useful, but
17   WITHOUT ANY WARRANTY; without even the implied warranty of
18   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
19   General Public License for more details.
20
21   You should have received a copy of the GNU Lesser General Public License
22   along with PulseAudio; if not, write to the Free Software
23   Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307
24   USA.
25 ***/
26
27 #include <X11/Xlib.h>
28
29 #include <pulsecore/core.h>
30
31 typedef struct pa_x11_wrapper pa_x11_wrapper;
32
33 /* Return the X11 wrapper for this core. In case no wrapper was
34     existant before, allocate a new one */
35 pa_x11_wrapper* pa_x11_wrapper_get(pa_core *c, const char *name);
36
37 /* Increase the wrapper's reference count by one */
38 pa_x11_wrapper* pa_x11_wrapper_ref(pa_x11_wrapper *w);
39
40 /* Decrease the reference counter of an X11 wrapper object */
41 void pa_x11_wrapper_unref(pa_x11_wrapper* w);
42
43 /* Return the X11 display object for this connection */
44 Display *pa_x11_wrapper_get_display(pa_x11_wrapper *w);
45
46 typedef struct pa_x11_client pa_x11_client;
47
48 /* Register an X11 client, that is called for each X11 event */
49 pa_x11_client* pa_x11_client_new(pa_x11_wrapper *w, int (*cb)(pa_x11_wrapper *w, XEvent *e, void *userdata), void *userdata);
50
51 /* Free an X11 client object */
52 void pa_x11_client_free(pa_x11_client *c);
53
54 #endif