summaryrefslogtreecommitdiff
path: root/pango
diff options
context:
space:
mode:
authorJavier Jardón <jjardon@gnome.org>2011-04-30 11:00:31 +0100
committerJavier Jardón <jjardon@gnome.org>2011-04-30 12:59:13 +0100
commit446aeb6991c1dd4e6f688ac8fbface1dc67faa41 (patch)
treeb50e0f791d3c4ba0b05a861056a54dcc7ee57210 /pango
parentea702f4c4feac29e6366a04c02953c425bb5f288 (diff)
downloadpango-446aeb6991c1dd4e6f688ac8fbface1dc67faa41.tar.gz
pango/pango-fontset.c: Use G_DEFINE_TYPE instead custom macro
Diffstat (limited to 'pango')
-rw-r--r--pango/pango-fontset.c21
1 files changed, 10 insertions, 11 deletions
diff --git a/pango/pango-fontset.c b/pango/pango-fontset.c
index 56e11fc4..9ca26443 100644
--- a/pango/pango-fontset.c
+++ b/pango/pango-fontset.c
@@ -33,13 +33,17 @@
static PangoFontMetrics *pango_fontset_real_get_metrics (PangoFontset *fontset);
static void
+pango_fontset_init (PangoFontset *self)
+{
+}
+
+static void
pango_fontset_class_init (PangoFontsetClass *class)
{
class->get_metrics = pango_fontset_real_get_metrics;
}
-PANGO_DEFINE_TYPE_ABSTRACT (PangoFontset, pango_fontset,
- pango_fontset_class_init, NULL, G_TYPE_OBJECT)
+G_DEFINE_ABSTRACT_TYPE (PangoFontset, pango_fontset, G_TYPE_OBJECT);
/**
* pango_fontset_get_font:
@@ -225,8 +229,6 @@ struct _PangoFontsetSimpleClass
PangoFontsetClass parent_class;
};
-static PangoFontsetClass *simple_parent_class; /* Parent class structure for PangoFontsetSimple */
-
/**
* pango_fontset_simple_new:
* @language: a #PangoLanguage tag
@@ -253,9 +255,8 @@ pango_fontset_simple_class_init (PangoFontsetSimpleClass *class)
GObjectClass *object_class = G_OBJECT_CLASS (class);
PangoFontsetClass *fontset_class = PANGO_FONTSET_CLASS (class);
- simple_parent_class = g_type_class_peek_parent (class);
-
object_class->finalize = pango_fontset_simple_finalize;
+
fontset_class->get_font = pango_fontset_simple_get_font;
fontset_class->get_metrics = pango_fontset_simple_get_metrics;
fontset_class->get_language = pango_fontset_simple_get_language;
@@ -270,9 +271,7 @@ pango_fontset_simple_init (PangoFontsetSimple *fontset)
fontset->language = NULL;
}
-PANGO_DEFINE_TYPE (PangoFontsetSimple, pango_fontset_simple,
- pango_fontset_simple_class_init, pango_fontset_simple_init,
- PANGO_TYPE_FONTSET)
+G_DEFINE_TYPE (PangoFontsetSimple, pango_fontset_simple, PANGO_TYPE_FONTSET);
static void
pango_fontset_simple_finalize (GObject *object)
@@ -295,7 +294,7 @@ pango_fontset_simple_finalize (GObject *object)
g_ptr_array_free (fontset->coverages, TRUE);
- G_OBJECT_CLASS (simple_parent_class)->finalize (object);
+ G_OBJECT_CLASS (pango_fontset_simple_parent_class)->finalize (object);
}
/**
@@ -344,7 +343,7 @@ pango_fontset_simple_get_metrics (PangoFontset *fontset)
return pango_font_get_metrics (PANGO_FONT (g_ptr_array_index(simple->fonts, 0)),
simple->language);
- return PANGO_FONTSET_CLASS (simple_parent_class)->get_metrics (fontset);
+ return PANGO_FONTSET_CLASS (pango_fontset_simple_parent_class)->get_metrics (fontset);
}
static PangoFont *