[gtk+/gtk-2-22] directfb: use boilerplate macros for GdkPixmap
- From: Sven Neumann <neo src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gtk+/gtk-2-22] directfb: use boilerplate macros for GdkPixmap
- Date: Tue, 31 Aug 2010 19:10:06 +0000 (UTC)
commit 4e9be0c9e976f7a620914eee87a43626201a19f6
Author: Lionel Landwerlin <llandwerlin gmail com>
Date: Fri May 7 18:12:08 2010 +0200
directfb: use boilerplate macros for GdkPixmap
This patch reduce boilerplate for GdkPixmapImplDirectFB using G_DEFINE_TYPE macro.
Signed-off-by: Lionel Landwerlin <llandwerlin gmail com>
gdk/directfb/gdkpixmap-directfb.c | 31 +++----------------------------
1 files changed, 3 insertions(+), 28 deletions(-)
---
diff --git a/gdk/directfb/gdkpixmap-directfb.c b/gdk/directfb/gdkpixmap-directfb.c
index bb13e2f..504f5e7 100644
--- a/gdk/directfb/gdkpixmap-directfb.c
+++ b/gdk/directfb/gdkpixmap-directfb.c
@@ -53,34 +53,9 @@ static void gdk_pixmap_impl_directfb_finalize (GObject *obj
static gpointer parent_class = NULL;
-
-GType
-gdk_pixmap_impl_directfb_get_type (void)
-{
- static GType object_type = 0;
-
- if (!object_type)
- {
- const GTypeInfo object_info =
- {
- sizeof (GdkPixmapImplDirectFBClass),
- (GBaseInitFunc) NULL,
- (GBaseFinalizeFunc) NULL,
- (GClassInitFunc) gdk_pixmap_impl_directfb_class_init,
- NULL, /* class_finalize */
- NULL, /* class_data */
- sizeof (GdkPixmapImplDirectFB),
- 0, /* n_preallocs */
- (GInstanceInitFunc) gdk_pixmap_impl_directfb_init,
- };
-
- object_type = g_type_register_static (GDK_TYPE_DRAWABLE_IMPL_DIRECTFB,
- "GdkPixmapImplDirectFB",
- &object_info, 0);
- }
-
- return object_type;
-}
+G_DEFINE_TYPE (GdkPixmapImplDirectFB,
+ gdk_pixmap_impl_directfb,
+ GDK_TYPE_DRAWABLE_IMPL_DIRECTFB);
GType
_gdk_pixmap_impl_get_type (void)
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]