Debian Codegraph @

gdk/wayland/gdkglcontext-wayland.h

raw
1 /* GDK - The GIMP Drawing Kit
2 *
3 * gdkglcontext-wayland.h: Private Wayland specific OpenGL wrappers
4 *
5 * Copyright © 2014 Emmanuele Bassi
6 * Copyright © 2014 Red Hat, Int
7 *
8 * This library is free software; you can redistribute it and/or
9 * modify it under the terms of the GNU Library 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 * Library General Public License for more details.
17 *
18 * You should have received a copy of the GNU Library General Public
19 * License along with this library. If not, see <http://www.gnu.org/licenses/>.
20 */
21
22 #ifndef __GDK_WAYLAND_GL_CONTEXT__
23 #define __GDK_WAYLAND_GL_CONTEXT__
24
25 #include "gdkglcontextprivate.h"
26 #include "gdkdisplayprivate.h"
27 #include "gdkvisual.h"
28 #include "gdkwindow.h"
29 #include "gdkinternals.h"
30 #include "gdkmain.h"
31
32 #include <epoxy/egl.h>
33
34 G_BEGIN_DECLS
35
36 struct _GdkWaylandGLContext
37 {
38 GdkGLContext parent_instance;
39
40 EGLContext egl_context;
41 EGLConfig egl_config;
42 gboolean is_attached;
43 };
44
45 struct _GdkWaylandGLContextClass
46 {
47 GdkGLContextClass parent_class;
48 };
49
50 gboolean gdk_wayland_display_init_gl (GdkDisplay *display,
51 GdkGLContext *share);
52 GdkGLContext * gdk_wayland_window_create_gl_context (GdkWindow *window,
53 gboolean attach,
54 GdkGLContext *share,
55 GError **error);
56 void gdk_wayland_window_invalidate_for_new_frame (GdkWindow *window,
57 cairo_region_t *update_area);
58 gboolean gdk_wayland_display_is_gl_context_current (GdkDisplay *display,
59 GdkGLContext *context);
60 gboolean gdk_wayland_display_make_gl_context_current (GdkDisplay *display,
61 GdkGLContext *context);
62
63 G_END_DECLS
64
65 #endif /* __GDK_WAYLAND_GL_CONTEXT__ */