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)
+
* gtk/gtk.symbols:
* gtk/gtkbutton.h:
* gtk/gtkbutton.c: Add a GtkButton::image-position property
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)
+
* gtk/gtk.symbols:
* gtk/gtkbutton.h:
* gtk/gtkbutton.c: Add a GtkButton::image-position property
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)
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;
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 *
static void gdk_window_free_paint_stack (GdkWindow *window);
+static void gdk_window_init (GdkWindowObject *window);
+static void gdk_window_class_init (GdkWindowObjectClass *klass);
static void gdk_window_finalize (GObject *object);
static void gdk_window_clear_backing_rect (GdkWindow *window,
gint x,
gint width,
gint height);
-G_DEFINE_TYPE (GdkWindowObject, gdk_window_object, GDK_TYPE_DRAWABLE)
+static gpointer parent_class = NULL;
+
+GType
+gdk_window_object_get_type (void)
+{
+ static GType object_type = 0;
+
+ if (!object_type)
+ object_type = g_type_register_static_simple (GDK_TYPE_DRAWABLE,
+ "GdkWindow",
+ sizeof (GdkWindowObjectClass),
+ (GClassInitFunc) gdk_window_class_init,
+ sizeof (GdkWindowObject),
+ (GInstanceInitFunc) gdk_window_init,
+ 0);
+
+ return object_type;
+}
GType
_gdk_paintable_get_type (void)
}
static void
-gdk_window_object_init (GdkWindowObject *window)
+gdk_window_init (GdkWindowObject *window)
{
/* 0-initialization is good for all other fields. */
}
static void
-gdk_window_object_class_init (GdkWindowObjectClass *klass)
+gdk_window_class_init (GdkWindowObjectClass *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_window_finalize;
drawable_class->create_gc = gdk_window_create_gc;
g_object_unref (obj->impl);
obj->impl = NULL;
- G_OBJECT_CLASS (gdk_window_object_parent_class)->finalize (object);
+ G_OBJECT_CLASS (parent_class)->finalize (object);
}
static void