summaryrefslogtreecommitdiff
path: root/gdk/gdkpixmap.c
diff options
context:
space:
mode:
authorMatthias Clasen <mclasen@redhat.com>2006-05-31 03:34:04 +0000
committerMatthias Clasen <matthiasc@src.gnome.org>2006-05-31 03:34:04 +0000
commit7b12fdbc2ab0267b7f3d2c82ee702fabd7ec4a55 (patch)
treeb9bc799e5f4552f033810ecc5ed1b3585a439577 /gdk/gdkpixmap.c
parent1d84567c1c0847730b9d52f26a26e7d896928c6e (diff)
downloadgtk+-7b12fdbc2ab0267b7f3d2c82ee702fabd7ec4a55.tar.gz
Don't use G_DEFINE_TYPE, since the instance struct name does not match the
2006-05-30 Matthias Clasen <mclasen@redhat.com> * gdk/gdkpixmap.c: * gdk/gdkwindow.c: Don't use G_DEFINE_TYPE, since the instance struct name does not match the type name. (#343453, Ed Catmur)
Diffstat (limited to 'gdk/gdkpixmap.c')
-rw-r--r--gdk/gdkpixmap.c25
1 files changed, 23 insertions, 2 deletions
diff --git a/gdk/gdkpixmap.c b/gdk/gdkpixmap.c
index cf5dc28872..fdd9764e19 100644
--- a/gdk/gdkpixmap.c
+++ b/gdk/gdkpixmap.c
@@ -153,9 +153,28 @@ static void gdk_pixmap_real_set_colormap (GdkDrawable *drawable,
static GdkColormap* gdk_pixmap_real_get_colormap (GdkDrawable *drawable);
static GdkScreen* gdk_pixmap_real_get_screen (GdkDrawable *drawable);
+static void gdk_pixmap_init (GdkPixmapObject *pixmap);
+static void gdk_pixmap_class_init (GdkPixmapObjectClass *klass);
static void gdk_pixmap_finalize (GObject *object);
-G_DEFINE_TYPE (GdkPixmapObject, gdk_pixmap, GDK_TYPE_DRAWABLE)
+static gpointer parent_class = NULL;
+
+GType
+gdk_pixmap_get_type (void)
+{
+ static GType object_type = 0;
+
+ if (!object_type)
+ object_type = g_type_register_static_simple (GDK_TYPE_DRAWABLE,
+ "GdkPixmap",
+ sizeof (GdkPixmapObjectClass),
+ (GClassInitFunc) gdk_pixmap_class_init,
+ sizeof (GdkPixmapObject),
+ (GInstanceInitFunc) gdk_pixmap_init,
+ 0);
+
+ return object_type;
+}
static void
gdk_pixmap_init (GdkPixmapObject *pixmap)
@@ -170,6 +189,8 @@ gdk_pixmap_class_init (GdkPixmapObjectClass *klass)
GObjectClass *object_class = G_OBJECT_CLASS (klass);
GdkDrawableClass *drawable_class = GDK_DRAWABLE_CLASS (klass);
+ parent_class = g_type_class_peek_parent (klass);
+
object_class->finalize = gdk_pixmap_finalize;
drawable_class->create_gc = gdk_pixmap_create_gc;
@@ -205,7 +226,7 @@ gdk_pixmap_finalize (GObject *object)
g_object_unref (obj->impl);
obj->impl = NULL;
- G_OBJECT_CLASS (gdk_pixmap_parent_class)->finalize (object);
+ G_OBJECT_CLASS (parent_class)->finalize (object);
}
static GdkGC *