summaryrefslogtreecommitdiff
path: root/pango/fonts.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/fonts.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/fonts.c')
-rw-r--r--pango/fonts.c98
1 files changed, 25 insertions, 73 deletions
diff --git a/pango/fonts.c b/pango/fonts.c
index 5afe8bfd..f2efbd7d 100644
--- a/pango/fonts.c
+++ b/pango/fonts.c
@@ -999,33 +999,17 @@ pango_font_description_to_filename (const PangoFontDescription *desc)
return result;
}
-
-GType
-pango_font_get_type (void)
+
+G_DEFINE_TYPE (PangoFont, pango_font, G_TYPE_OBJECT)
+
+static void
+pango_font_class_init (PangoFontClass *class)
{
- static GType object_type = 0;
+}
- if (!object_type)
- {
- static const GTypeInfo object_info =
- {
- sizeof (PangoFontClass),
- (GBaseInitFunc) NULL,
- (GBaseFinalizeFunc) NULL,
- NULL, /* class_init */
- NULL, /* class_finalize */
- NULL, /* class_data */
- sizeof (PangoFont),
- 0, /* n_preallocs */
- NULL /* init */
- };
-
- object_type = g_type_register_static (G_TYPE_OBJECT,
- "PangoFont",
- &object_info, 0);
- }
-
- return object_type;
+static void
+pango_font_init (PangoFont *font)
+{
}
/**
@@ -1362,32 +1346,16 @@ pango_font_metrics_get_strikethrough_thickness (PangoFontMetrics *metrics)
* PangoFontFamily
*/
-GType
-pango_font_family_get_type (void)
+G_DEFINE_TYPE (PangoFontFamily, pango_font_family, G_TYPE_OBJECT)
+
+static void
+pango_font_family_class_init (PangoFontFamilyClass *class)
{
- static GType object_type = 0;
+}
- if (!object_type)
- {
- static const GTypeInfo object_info =
- {
- sizeof (PangoFontFamilyClass),
- (GBaseInitFunc) NULL,
- (GBaseFinalizeFunc) NULL,
- NULL, /* class_init */
- NULL, /* class_finalize */
- NULL, /* class_data */
- sizeof (PangoFontFamily),
- 0, /* n_preallocs */
- NULL /* init */
- };
-
- object_type = g_type_register_static (G_TYPE_OBJECT,
- "PangoFontFamily",
- &object_info, 0);
- }
-
- return object_type;
+static void
+pango_font_family_init (PangoFontFamily *family)
+{
}
/**
@@ -1465,32 +1433,16 @@ pango_font_family_is_monospace (PangoFontFamily *family)
* PangoFontFace
*/
-GType
-pango_font_face_get_type (void)
+G_DEFINE_TYPE (PangoFontFace, pango_font_face, G_TYPE_OBJECT)
+
+static void
+pango_font_face_class_init (PangoFontFaceClass *class)
{
- static GType object_type = 0;
+}
- if (!object_type)
- {
- static const GTypeInfo object_info =
- {
- sizeof (PangoFontFaceClass),
- (GBaseInitFunc) NULL,
- (GBaseFinalizeFunc) NULL,
- NULL, /* class_init */
- NULL, /* class_finalize */
- NULL, /* class_data */
- sizeof (PangoFont),
- 0, /* n_preallocs */
- NULL /* init */
- };
-
- object_type = g_type_register_static (G_TYPE_OBJECT,
- "PangoFontFace",
- &object_info, 0);
- }
-
- return object_type;
+static void
+pango_font_face_init (PangoFontFace *face)
+{
}
/**