summaryrefslogtreecommitdiff
path: root/gdk/gdkdraw.c
diff options
context:
space:
mode:
authorMatthias Clasen <mclasen@redhat.com>2006-04-04 14:02:03 +0000
committerMatthias Clasen <matthiasc@src.gnome.org>2006-04-04 14:02:03 +0000
commit10f0736ac7ae3cc388540083133170d48567c092 (patch)
tree0bb96ae1608227fad63c4749137e511bc88bfb32 /gdk/gdkdraw.c
parent7d49b31a7919f04877f8bc7758f07efadc5e626c (diff)
downloadgtk+-10f0736ac7ae3cc388540083133170d48567c092.tar.gz
Use G_DEFINE_TYPE.
2006-04-04 Matthias Clasen <mclasen@redhat.com> * gdk/gdkdisplay.c: * gdk/gdkdisplaymanager.c: * gdk/gdkdraw.c: * gdk/gdkkeys.c: * gdk/gdkpixmap.c: * gdk/gdkscreen.c: * gdk/gdkwindow.c: * gdk/x11/gdkcolor-x11.c: * gdk/x11/gdkdisplay-x11.c: * gdk/x11/gdkdnd-x11.c: * gdk/x11/gdkdrawable-x11.c: * gdk/x11/gdkgc-x11.c: * gdk/x11/gdkimage-x11.c: * gdk/x11/gdkinput.c: * gdk/x11/gdkpixmap-x11.c: * gdk/x11/gdkscreen-x11.c: * gdk/x11/gdkwindow-x11.c: Use G_DEFINE_TYPE. * gdk/x11/gdkcolor-x11.c: * gdk/x11/gdkdnd-x11.c: * gdk/x11/gdkimage-x11.c: Use instance private data.
Diffstat (limited to 'gdk/gdkdraw.c')
-rw-r--r--gdk/gdkdraw.c35
1 files changed, 6 insertions, 29 deletions
diff --git a/gdk/gdkdraw.c b/gdk/gdkdraw.c
index cd05d2b59a..250aea8d48 100644
--- a/gdk/gdkdraw.c
+++ b/gdk/gdkdraw.c
@@ -62,36 +62,8 @@ static void gdk_drawable_real_draw_pixbuf (GdkDrawable *draw
gint x_dither,
gint y_dither);
-static void gdk_drawable_class_init (GdkDrawableClass *klass);
-GType
-gdk_drawable_get_type (void)
-{
- static GType object_type = 0;
-
- if (!object_type)
- {
- static const GTypeInfo object_info =
- {
- sizeof (GdkDrawableClass),
- (GBaseInitFunc) NULL,
- (GBaseFinalizeFunc) NULL,
- (GClassInitFunc) gdk_drawable_class_init,
- NULL, /* class_finalize */
- NULL, /* class_data */
- sizeof (GdkDrawable),
- 0, /* n_preallocs */
- (GInstanceInitFunc) NULL,
- };
-
- object_type = g_type_register_static (G_TYPE_OBJECT,
- g_intern_static_string ("GdkDrawable"),
- &object_info,
- G_TYPE_FLAG_ABSTRACT);
- }
-
- return object_type;
-}
+G_DEFINE_ABSTRACT_TYPE (GdkDrawable, gdk_drawable, G_TYPE_OBJECT);
static void
gdk_drawable_class_init (GdkDrawableClass *klass)
@@ -104,6 +76,11 @@ gdk_drawable_class_init (GdkDrawableClass *klass)
klass->draw_pixbuf = gdk_drawable_real_draw_pixbuf;
}
+static void
+gdk_drawable_init (GdkDrawable *drawable)
+{
+}
+
/* Manipulation of drawables
*/