[gtkglext] Replace gdk_gl_context_impl_win32_get_type() with a G_DEFINE_TYPE



commit 846b50027789138cdb7ee5bead0eb05cb28a3fa2
Author: Mukund Sivaraman <muks banu com>
Date:   Tue Jul 20 19:03:59 2010 +0530

    Replace gdk_gl_context_impl_win32_get_type() with a G_DEFINE_TYPE

 gdk/win32/gdkglcontext-win32.c |   30 ++++++------------------------
 1 files changed, 6 insertions(+), 24 deletions(-)
---
diff --git a/gdk/win32/gdkglcontext-win32.c b/gdk/win32/gdkglcontext-win32.c
index d029ff9..5e81ab2 100644
--- a/gdk/win32/gdkglcontext-win32.c
+++ b/gdk/win32/gdkglcontext-win32.c
@@ -34,31 +34,13 @@ static void gdk_gl_context_impl_win32_finalize   (GObject                    *ob
 
 static gpointer parent_class = NULL;
 
-GType
-gdk_gl_context_impl_win32_get_type (void)
-{
-  static GType type = 0;
-
-  if (!type)
-    {
-      static const GTypeInfo type_info = {
-        sizeof (GdkGLContextImplWin32Class),
-        (GBaseInitFunc) NULL,
-        (GBaseFinalizeFunc) NULL,
-        (GClassInitFunc) gdk_gl_context_impl_win32_class_init,
-        (GClassFinalizeFunc) NULL,
-        NULL,                   /* class_data */
-        sizeof (GdkGLContextImplWin32),
-        0,                      /* n_preallocs */
-        (GInstanceInitFunc) NULL
-      };
-
-      type = g_type_register_static (GDK_TYPE_GL_CONTEXT,
-                                     "GdkGLContextImplWin32",
-                                     &type_info, 0);
-    }
+G_DEFINE_TYPE (GdkGLContextImplWin32,              \
+               gdk_gl_context_impl_win32,          \
+               GDK_TYPE_GL_CONTEXT)
 
-  return type;
+static void
+gdk_gl_context_impl_win32_init (GdkGLContextImplWin32 *self)
+{
 }
 
 static void



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]