[pango] Use G_DEFINE_INTERFACE in PangoCairoFontMap



commit cf183c9ed22d0f906deb584a9ea4959881d9795f
Author: Javier Jardón <jjardon gnome org>
Date:   Sat Apr 30 03:19:24 2011 +0100

    Use G_DEFINE_INTERFACE in PangoCairoFontMap

 pango/pangocairo-fontmap.c |   32 +++++---------------------------
 1 files changed, 5 insertions(+), 27 deletions(-)
---
diff --git a/pango/pangocairo-fontmap.c b/pango/pangocairo-fontmap.c
index efb8a90..fb4377f 100644
--- a/pango/pangocairo-fontmap.c
+++ b/pango/pangocairo-fontmap.c
@@ -39,35 +39,13 @@
 #  include "pangocairo-fc.h"
 #endif
 
-GType
-pango_cairo_font_map_get_type (void)
-{
-  static GType cairo_font_map_type = 0;
-
-  if (! cairo_font_map_type)
-    {
-      const GTypeInfo cairo_font_map_info =
-      {
-	sizeof (PangoCairoFontMapIface), /* class_size */
-	NULL,           /* base_init */
-	NULL,		/* base_finalize */
-	NULL,
-	NULL,		/* class_finalize */
-	NULL,		/* class_data */
-	0,
-	0,
-	NULL,
-	NULL
-      };
 
-      cairo_font_map_type =
-	g_type_register_static (G_TYPE_INTERFACE, I_("PangoCairoFontMap"),
-				&cairo_font_map_info, 0);
+typedef PangoCairoFontMapIface PangoCairoFontMapInterface;
+G_DEFINE_INTERFACE (PangoCairoFontMap, pango_cairo_font_map, PANGO_TYPE_FONT_MAP)
 
-      g_type_interface_add_prerequisite (cairo_font_map_type, PANGO_TYPE_FONT_MAP);
-    }
-
-  return cairo_font_map_type;
+static void
+pango_cairo_font_map_default_init (PangoCairoFontMapIface *iface)
+{
 }
 
 /**



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]