diff options
author | Benjamin Otte <otte@redhat.com> | 2018-03-18 05:14:52 +0100 |
---|---|---|
committer | Benjamin Otte <otte@redhat.com> | 2018-03-18 05:57:07 +0100 |
commit | 82a99a3643f49632e9c633c294ab47044daab3c5 (patch) | |
tree | 78b92f398ac18ccfa37062d4de0b9ba05cdd1cbd /gdk/gdkgltexture.h | |
parent | d54ca3c74f360c36810ec21ecac5d7f5065bba9f (diff) | |
download | gtk+-82a99a3643f49632e9c633c294ab47044daab3c5.tar.gz |
texture: Expose subclasses as subclasses
This is necessary so that bidnings work properly and don't make
gdk_gl_texture_release() a function on GdkTexture.
It also allows code to identify what type of texture they are dealing
with.
Finally, we can now decide to add getters later without screwing
anything up, if we want to allow people to access GL textures directly.
Diffstat (limited to 'gdk/gdkgltexture.h')
-rw-r--r-- | gdk/gdkgltexture.h | 16 |
1 files changed, 14 insertions, 2 deletions
diff --git a/gdk/gdkgltexture.h b/gdk/gdkgltexture.h index e5d24bd605..82dae098e1 100644 --- a/gdk/gdkgltexture.h +++ b/gdk/gdkgltexture.h @@ -23,11 +23,23 @@ #error "Only <gdk/gdk.h> can be included directly." #endif -#include <gdk/gdktypes.h> #include <gdk/gdkglcontext.h> +#include <gdk/gdktexture.h> G_BEGIN_DECLS +#define GDK_TYPE_GL_TEXTURE (gdk_gl_texture_get_type ()) + +#define GDK_GL_TEXTURE(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), GDK_TYPE_GL_TEXTURE, GdkGLTexture)) +#define GDK_IS_GL_TEXTURE(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), GDK_TYPE_GL_TEXTURE)) + +typedef struct _GdkGLTexture GdkGLTexture; +typedef struct _GdkGLTextureClass GdkGLTextureClass; + +G_DEFINE_AUTOPTR_CLEANUP_FUNC(GdkGLTexture, g_object_unref) + +GDK_AVAILABLE_IN_ALL +GType gdk_gl_texture_get_type (void) G_GNUC_CONST; GDK_AVAILABLE_IN_ALL GdkTexture * gdk_gl_texture_new (GdkGLContext *context, @@ -38,7 +50,7 @@ GdkTexture * gdk_gl_texture_new (GdkGLContext gpointer data); GDK_AVAILABLE_IN_ALL -void gdk_gl_texture_release (GdkTexture *texture); +void gdk_gl_texture_release (GdkGLTexture *texture); G_END_DECLS |