cleanup specfile for packaging
[profile/ivi/cogl.git] / cogl / cogl-xlib.h
1 /*
2  * Cogl
3  *
4  * An object oriented GL/GLES Abstraction/Utility Layer
5  *
6  * Copyright (C) 2011 Intel Corporation.
7  *
8  * This library is free software; you can redistribute it and/or
9  * modify it under the terms of the GNU Lesser General Public
10  * License as published by the Free Software Foundation; either
11  * version 2 of the License, or (at your option) any later version.
12  *
13  * This library is distributed in the hope that it will be useful,
14  * but WITHOUT ANY WARRANTY; without even the implied warranty of
15  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
16  * Lesser General Public License for more details.
17  *
18  * You should have received a copy of the GNU Lesser General Public
19  * License along with this library; if not, write to the
20  * Free Software Foundation, Inc., 59 Temple Place - Suite 330,
21  * Boston, MA 02111-1307, USA.
22  */
23
24 #ifndef __COGL_XLIB_H__
25 #define __COGL_XLIB_H__
26
27 #include <glib.h>
28
29 #include <X11/Xlib.h>
30
31 #define __COGL_XLIB_H_INSIDE__
32
33 #include <cogl/cogl-clutter-xlib.h>
34 #include <cogl/cogl-xlib-renderer.h>
35
36 G_BEGIN_DECLS
37
38 /*
39  * cogl_xlib_get_display:
40  *
41  * Return value: the Xlib display that will be used by the Xlib winsys
42  * backend. The display needs to be set with _cogl_xlib_set_display()
43  * before this function is called.
44  *
45  * Stability: Unstable
46  */
47 #define cogl_xlib_get_display cogl_xlib_get_display_EXP
48 Display *
49 cogl_xlib_get_display (void);
50
51 /*
52  * cogl_xlib_set_display:
53  *
54  * Sets the Xlib display that Cogl will use for the Xlib winsys
55  * backend. This function should eventually go away when Cogl gains a
56  * more complete winsys abstraction.
57  *
58  * Stability: Unstable
59  */
60 #define cogl_xlib_set_display cogl_xlib_set_display_EXP
61 void
62 cogl_xlib_set_display (Display *display);
63
64 /*
65  * cogl_xlib_handle_event:
66  * @xevent: pointer to XEvent structure
67  *
68  * This function processes a single X event; it can be used to hook
69  * into external X event retrieval (for example that done by Clutter
70  * or GDK).
71  *
72  * Return value: #CoglXlibFilterReturn. %COGL_XLIB_FILTER_REMOVE
73  * indicates that Cogl has internally handled the event and the
74  * caller should do no further processing. %COGL_XLIB_FILTER_CONTINUE
75  * indicates that Cogl is either not interested in the event,
76  * or has used the event to update internal state without taking
77  * any exclusive action.
78  *
79  * Stability: Unstable
80  */
81 #define cogl_xlib_handle_event cogl_xlib_handle_event_EXP
82 CoglFilterReturn
83 cogl_xlib_handle_event (XEvent *xevent);
84
85 #undef __COGL_XLIB_H_INSIDE__
86
87 #endif /* __COGL_XLIB_H__ */