This is like G_DECLARE_FINAL_TYPE(), except it doesn't make the class struct public, so internally all the subclassing in the world can happen. Some subtle differences: - It marks the get_type() function as G_GNUC_CONST - It doesn't require the parent type - It uses G_DEFINE_AUTOPTR_CLEANUP_FUNC() instead of the private glib chainup method. Port a bunch of GDK and the whole event controller + gesture machinery to provew that it works. As a side effect, we gained a bunch of missing autocleanups.
50 lines
1.8 KiB
C
50 lines
1.8 KiB
C
/* gdktexture.h
|
|
*
|
|
* Copyright 2016 Benjamin Otte
|
|
*
|
|
* This library is free software; you can redistribute it and/or
|
|
* modify it under the terms of the GNU Lesser General Public
|
|
* License as published by the Free Software Foundation; either
|
|
* version 2 of the License, or (at your option) any later version.
|
|
*
|
|
* This library is distributed in the hope that it will be useful,
|
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
|
* Lesser General Public License for more details.
|
|
*
|
|
* You should have received a copy of the GNU Lesser General Public
|
|
* License along with this library. If not, see <http://www.gnu.org/licenses/>.
|
|
*/
|
|
|
|
#ifndef __GDK_GL_TEXTURE_H__
|
|
#define __GDK_GL_TEXTURE_H__
|
|
|
|
#if !defined (__GDK_H_INSIDE__) && !defined (GTK_COMPILATION)
|
|
#error "Only <gdk/gdk.h> can be included directly."
|
|
#endif
|
|
|
|
#include <gdk/gdkglcontext.h>
|
|
#include <gdk/gdktexture.h>
|
|
|
|
G_BEGIN_DECLS
|
|
|
|
#define GDK_TYPE_GL_TEXTURE (gdk_gl_texture_get_type ())
|
|
GDK_AVAILABLE_IN_ALL
|
|
GDK_DECLARE_EXPORTED_TYPE (GdkGLTexture, gdk_gl_texture, GDK, GL_TEXTURE)
|
|
|
|
GDK_AVAILABLE_IN_ALL
|
|
GdkTexture * gdk_gl_texture_new (GdkGLContext *context,
|
|
guint id,
|
|
int width,
|
|
int height,
|
|
GDestroyNotify destroy,
|
|
gpointer data);
|
|
|
|
GDK_AVAILABLE_IN_ALL
|
|
void gdk_gl_texture_release (GdkGLTexture *self);
|
|
|
|
|
|
G_END_DECLS
|
|
|
|
#endif /* __GDK_GL_TEXTURE_H__ */
|