Use G_DEFINE_INTERFACE in PangoCairoFontMap
authorJavier Jardón <jjardon@gnome.org>
Sat, 30 Apr 2011 02:19:24 +0000 (03:19 +0100)
committerJavier Jardón <jjardon@gnome.org>
Sat, 30 Apr 2011 11:48:07 +0000 (12:48 +0100)
pango/pangocairo-fontmap.c

index efb8a90..fb4377f 100644 (file)
 #  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)
+{
 }
 
 /**