[gtkglext] Replace gdk_gl_context_impl_x11_get_type() with a G_DEFINE_TYPE
- From: Mukund Sivaraman <muks src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gtkglext] Replace gdk_gl_context_impl_x11_get_type() with a G_DEFINE_TYPE
- Date: Tue, 20 Jul 2010 09:45:59 +0000 (UTC)
commit b433e66399383a294008139171f221f2e887f51d
Author: Mukund Sivaraman <muks banu com>
Date: Tue Jul 20 15:10:56 2010 +0530
Replace gdk_gl_context_impl_x11_get_type() with a G_DEFINE_TYPE
gdk/x11/gdkglcontext-x11.c | 30 ++++++------------------------
1 files changed, 6 insertions(+), 24 deletions(-)
---
diff --git a/gdk/x11/gdkglcontext-x11.c b/gdk/x11/gdkglcontext-x11.c
index 7d190fe..1bd711e 100644
--- a/gdk/x11/gdkglcontext-x11.c
+++ b/gdk/x11/gdkglcontext-x11.c
@@ -37,31 +37,13 @@ static void gdk_gl_context_impl_x11_finalize (GObject *object
static gpointer parent_class = NULL;
-GType
-gdk_gl_context_impl_x11_get_type (void)
-{
- static GType type = 0;
-
- if (!type)
- {
- static const GTypeInfo type_info = {
- sizeof (GdkGLContextImplX11Class),
- (GBaseInitFunc) NULL,
- (GBaseFinalizeFunc) NULL,
- (GClassInitFunc) gdk_gl_context_impl_x11_class_init,
- (GClassFinalizeFunc) NULL,
- NULL, /* class_data */
- sizeof (GdkGLContextImplX11),
- 0, /* n_preallocs */
- (GInstanceInitFunc) NULL
- };
-
- type = g_type_register_static (GDK_TYPE_GL_CONTEXT,
- "GdkGLContextImplX11",
- &type_info, 0);
- }
+G_DEFINE_TYPE (GdkGLContextImplX11, \
+ gdk_gl_context_impl_x11, \
+ GDK_TYPE_GL_CONTEXT)
- return type;
+static void
+gdk_gl_context_impl_x11_init (GdkGLContextImplX11 *self)
+{
}
static void
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]