1 | /* gdktexture.h |
2 | * |
3 | * Copyright 2016 Benjamin Otte |
4 | * |
5 | * This library is free software; you can redistribute it and/or |
6 | * modify it under the terms of the GNU Lesser General Public |
7 | * License as published by the Free Software Foundation; either |
8 | * version 2 of the License, or (at your option) any later version. |
9 | * |
10 | * This library is distributed in the hope that it will be useful, |
11 | * but WITHOUT ANY WARRANTY; without even the implied warranty of |
12 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU |
13 | * Lesser General Public License for more details. |
14 | * |
15 | * You should have received a copy of the GNU Lesser General Public |
16 | * License along with this library. If not, see <http://www.gnu.org/licenses/>. |
17 | */ |
18 | |
19 | #ifndef __GDK_GL_TEXTURE_H__ |
20 | #define __GDK_GL_TEXTURE_H__ |
21 | |
22 | #if !defined (__GDK_H_INSIDE__) && !defined (GTK_COMPILATION) |
23 | #error "Only <gdk/gdk.h> can be included directly." |
24 | #endif |
25 | |
26 | #include <gdk/gdkglcontext.h> |
27 | #include <gdk/gdktexture.h> |
28 | |
29 | G_BEGIN_DECLS |
30 | |
31 | #define GDK_TYPE_GL_TEXTURE (gdk_gl_texture_get_type ()) |
32 | |
33 | #define GDK_GL_TEXTURE(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), GDK_TYPE_GL_TEXTURE, GdkGLTexture)) |
34 | #define GDK_IS_GL_TEXTURE(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), GDK_TYPE_GL_TEXTURE)) |
35 | |
36 | typedef struct _GdkGLTexture GdkGLTexture; |
37 | typedef struct _GdkGLTextureClass GdkGLTextureClass; |
38 | |
39 | G_DEFINE_AUTOPTR_CLEANUP_FUNC(GdkGLTexture, g_object_unref) |
40 | |
41 | GDK_AVAILABLE_IN_ALL |
42 | GType gdk_gl_texture_get_type (void) G_GNUC_CONST; |
43 | |
44 | GDK_AVAILABLE_IN_ALL |
45 | GdkTexture * gdk_gl_texture_new (GdkGLContext *context, |
46 | guint id, |
47 | int width, |
48 | int height, |
49 | GDestroyNotify destroy, |
50 | gpointer data); |
51 | |
52 | GDK_AVAILABLE_IN_ALL |
53 | void gdk_gl_texture_release (GdkGLTexture *self); |
54 | |
55 | |
56 | G_END_DECLS |
57 | |
58 | #endif /* __GDK_GL_TEXTURE_H__ */ |
59 | |