summaryrefslogtreecommitdiff
path: root/pango/pangoxft-fontmap.c
diff options
context:
space:
mode:
authorOwen Taylor <otaylor@redhat.com>2004-07-10 21:41:37 +0000
committerOwen Taylor <otaylor@src.gnome.org>2004-07-10 21:41:37 +0000
commit0835f598fcfbf6667a4be9cd9e7f6f16663dcb6a (patch)
treeff38ab996514339ab0ad7b2be560b525a6537655 /pango/pangoxft-fontmap.c
parent5bf0c1d04b6ed75ad2c88fbed1e1eaecf0dcbfa2 (diff)
downloadpango-0835f598fcfbf6667a4be9cd9e7f6f16663dcb6a.tar.gz
Make PangoMatrix arguments const where appropriate.
Sat Jul 10 17:33:38 2004 Owen Taylor <otaylor@redhat.com> * pango/pangoft2-private.h pango/pangoft2-render.c pango/pango-context.[ch] pango/pangoft2.[ch] pango/pango-utils. pango/pango-types.h pango/pangofc-fontmap.c: Make PangoMatrix arguments const where appropriate. * pango/pango-context.c pango/fonts.c pango/pangofc-font.c pangofc-fontmap.c pango/pangoft2.c pango/pangoft2-fontmap.c pango/pangoxft-font.c pango/pangoxft-fontmap.c pango/pangowin32-fontmap.c: Use G_DEFINE_TYPE comprehensively. * pango/pangoft2-private.h pangoft2.c: Un-staticify pango_ft2_font_get_type.
Diffstat (limited to 'pango/pangoxft-fontmap.c')
-rw-r--r--pango/pangoxft-fontmap.c40
1 files changed, 7 insertions, 33 deletions
diff --git a/pango/pangoxft-fontmap.c b/pango/pangoxft-fontmap.c
index ca362cb2..6d91ea6b 100644
--- a/pango/pangoxft-fontmap.c
+++ b/pango/pangoxft-fontmap.c
@@ -56,44 +56,15 @@ struct _PangoXftFontMapClass
PangoFcFontMapClass parent_class;
};
-static void pango_xft_font_map_class_init (PangoXftFontMapClass *class);
static void pango_xft_font_map_default_substitute (PangoFcFontMap *fcfontmap,
FcPattern *pattern);
static PangoFcFont * pango_xft_font_map_new_font (PangoFcFontMap *fcfontmap,
FcPattern *pattern);
static void pango_xft_font_map_finalize (GObject *object);
-static GObjectClass *parent_class;
-
static GSList *fontmaps = NULL;
-GType
-pango_xft_font_map_get_type (void)
-{
- static GType object_type = 0;
-
- if (!object_type)
- {
- static const GTypeInfo object_info =
- {
- sizeof (PangoXftFontMapClass),
- (GBaseInitFunc) NULL,
- (GBaseFinalizeFunc) NULL,
- (GClassInitFunc) pango_xft_font_map_class_init,
- NULL, /* class_finalize */
- NULL, /* class_data */
- sizeof (PangoXftFontMap),
- 0, /* n_preallocs */
- (GInstanceInitFunc) NULL,
- };
-
- object_type = g_type_register_static (PANGO_TYPE_FC_FONT_MAP,
- "PangoXftFontMap",
- &object_info, 0);
- }
-
- return object_type;
-}
+G_DEFINE_TYPE (PangoXftFontMap, pango_xft_font_map, PANGO_TYPE_FC_FONT_MAP)
static void
pango_xft_font_map_class_init (PangoXftFontMapClass *class)
@@ -101,14 +72,17 @@ pango_xft_font_map_class_init (PangoXftFontMapClass *class)
GObjectClass *gobject_class = G_OBJECT_CLASS (class);
PangoFcFontMapClass *fcfontmap_class = PANGO_FC_FONT_MAP_CLASS (class);
- parent_class = g_type_class_peek_parent (class);
-
gobject_class->finalize = pango_xft_font_map_finalize;
fcfontmap_class->default_substitute = pango_xft_font_map_default_substitute;
fcfontmap_class->new_font = pango_xft_font_map_new_font;
}
static void
+pango_xft_font_map_init (PangoXftFontMap *xftfontmap)
+{
+}
+
+static void
pango_xft_font_map_finalize (GObject *object)
{
PangoXftFontMap *xftfontmap = PANGO_XFT_FONT_MAP (object);
@@ -118,7 +92,7 @@ pango_xft_font_map_finalize (GObject *object)
if (xftfontmap->substitute_destroy)
xftfontmap->substitute_destroy (xftfontmap->substitute_data);
- parent_class->finalize (object);
+ G_OBJECT_CLASS (pango_xft_font_map_parent_class)->finalize (object);
}