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)
This commit is contained in:
Matthias Clasen 2006-05-31 03:34:04 +00:00 committed by Matthias Clasen
parent 1d84567c1c
commit 7b12fdbc2a
4 changed files with 56 additions and 6 deletions

View File

@ -1,5 +1,9 @@
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

View File

@ -1,5 +1,9 @@
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

View File

@ -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 *

View File

@ -183,6 +183,8 @@ static GdkRegion* gdk_window_get_visible_region (GdkDrawable *drawable);
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,
@ -190,7 +192,24 @@ static void gdk_window_clear_backing_rect (GdkWindow *window,
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)
@ -217,7 +236,7 @@ _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. */
@ -229,11 +248,13 @@ gdk_window_object_init (GdkWindowObject *window)
}
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;
@ -287,7 +308,7 @@ gdk_window_finalize (GObject *object)
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