[gtkglext] Replace gdk_gl_context_impl_win32_get_type() with a G_DEFINE_TYPE



commit c32c83d83583497c5a5987ee525d9f2c6f321765
Author: Mukund Sivaraman <muks banu com>
Date:   Tue Jul 20 18:48:23 2010 +0530

    Replace gdk_gl_context_impl_win32_get_type() with a G_DEFINE_TYPE

 gdk/win32/gdkglconfig-win32.c |   30 ++++++------------------------
 1 files changed, 6 insertions(+), 24 deletions(-)
---
diff --git a/gdk/win32/gdkglconfig-win32.c b/gdk/win32/gdkglconfig-win32.c
index 838edfb..f53ef5d 100644
--- a/gdk/win32/gdkglconfig-win32.c
+++ b/gdk/win32/gdkglconfig-win32.c
@@ -31,31 +31,13 @@ static void gdk_gl_config_impl_win32_finalize   (GObject                   *obje
 
 static gpointer parent_class = NULL;
 
-GType
-gdk_gl_config_impl_win32_get_type (void)
-{
-  static GType type = 0;
-
-  if (!type)
-    {
-      static const GTypeInfo type_info = {
-        sizeof (GdkGLConfigImplWin32Class),
-        (GBaseInitFunc) NULL,
-        (GBaseFinalizeFunc) NULL,
-        (GClassInitFunc) gdk_gl_config_impl_win32_class_init,
-        (GClassFinalizeFunc) NULL,
-        NULL,                   /* class_data */
-        sizeof (GdkGLConfigImplWin32),
-        0,                      /* n_preallocs */
-        (GInstanceInitFunc) NULL
-      };
-
-      type = g_type_register_static (GDK_TYPE_GL_CONFIG,
-                                     "GdkGLConfigImplWin32",
-                                     &type_info, 0);
-    }
+G_DEFINE_TYPE (GdkGLConfigImplWin32,            \
+               gdk_gl_config_impl_win32,        \
+               GDK_TYPE_GL_CONFIG)
 
-  return type;
+static void
+gdk_gl_config_impl_win32_init (GdkGLConfigImplX11 *self)
+{
 }
 
 static void



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