[gtkglext] Replace gdk_gl_pixmap_get_type() with a G_DEFINE_TYPE



commit 4819803e2c8a84241a8610702a47536f489a76ac
Author: Mukund Sivaraman <muks banu com>
Date:   Tue Jul 20 20:47:13 2010 +0530

    Replace gdk_gl_pixmap_get_type() with a G_DEFINE_TYPE

 gdk/gdkglpixmap.c |   30 ++++++------------------------
 1 files changed, 6 insertions(+), 24 deletions(-)
---
diff --git a/gdk/gdkglpixmap.c b/gdk/gdkglpixmap.c
index eed5f09..8c85f4e 100644
--- a/gdk/gdkglpixmap.c
+++ b/gdk/gdkglpixmap.c
@@ -177,31 +177,13 @@ static void             gdk_gl_pixmap_finalize                (GObject
 
 static gpointer parent_class = NULL;
 
-GType
-gdk_gl_pixmap_get_type (void)
-{
-  static GType type = 0;
-
-  if (!type)
-    {
-      static const GTypeInfo type_info = {
-        sizeof (GdkGLPixmapClass),
-        (GBaseInitFunc) NULL,
-        (GBaseFinalizeFunc) NULL,
-        (GClassInitFunc) gdk_gl_pixmap_class_init,
-        (GClassFinalizeFunc) NULL,
-        NULL,                   /* class_data */
-        sizeof (GdkGLPixmap),
-        0,                      /* n_preallocs */
-        (GInstanceInitFunc) NULL
-      };
-
-      type = g_type_register_static (GDK_TYPE_DRAWABLE,
-                                     "GdkGLPixmap",
-                                     &type_info, 0);
-    }
+G_DEFINE_TYPE (GdkGLPixmap,                     \
+               gdk_gl_pixmap,                   \
+               GDK_TYPE_DRAWABLE)
 
-  return type;
+static void
+gdk_gl_pixmap_init (GdkGLPixmap *self)
+{
 }
 
 static void



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