diff options
author | Behdad Esfahbod <behdad@gnome.org> | 2008-06-09 05:51:27 +0000 |
---|---|---|
committer | Behdad Esfahbod <behdad@src.gnome.org> | 2008-06-09 05:51:27 +0000 |
commit | e1f707633a02d741a2f12664c2085d30200c1314 (patch) | |
tree | e7a1e5cd145ef8cd728bf78df076bf8a3a9e1e6d /pango/pangofc-font.c | |
parent | d45136a0275b46a589e1c20d22b8662a57749a1a (diff) | |
download | pango-e1f707633a02d741a2f12664c2085d30200c1314.tar.gz |
Bug 537186 – Make PangoFcFont pattern property readable
2008-06-09 Behdad Esfahbod <behdad@gnome.org>
Bug 537186 – Make PangoFcFont pattern property readable
* pango/pangofc-font.c (pango_fc_font_class_init),
(pango_fc_font_get_property): Make it readable.
svn path=/trunk/; revision=2649
Diffstat (limited to 'pango/pangofc-font.c')
-rw-r--r-- | pango/pangofc-font.c | 28 |
1 files changed, 27 insertions, 1 deletions
diff --git a/pango/pangofc-font.c b/pango/pangofc-font.c index bd185bd8..e02ac184 100644 --- a/pango/pangofc-font.c +++ b/pango/pangofc-font.c @@ -74,6 +74,10 @@ static void pango_fc_font_set_property (GObject *objec guint prop_id, const GValue *value, GParamSpec *pspec); +static void pango_fc_font_get_property (GObject *object, + guint prop_id, + GValue *value, + GParamSpec *pspec); static PangoEngineShape * pango_fc_font_find_shaper (PangoFont *font, PangoLanguage *language, guint32 ch); @@ -103,6 +107,7 @@ pango_fc_font_class_init (PangoFcFontClass *class) object_class->finalize = pango_fc_font_finalize; object_class->set_property = pango_fc_font_set_property; + object_class->get_property = pango_fc_font_get_property; font_class->describe = pango_fc_font_describe; font_class->describe_absolute = pango_fc_font_describe_absolute; font_class->find_shaper = pango_fc_font_find_shaper; @@ -114,7 +119,8 @@ pango_fc_font_class_init (PangoFcFontClass *class) g_param_spec_pointer ("pattern", "Pattern", "The fontconfig pattern for this font", - G_PARAM_WRITABLE | G_PARAM_CONSTRUCT_ONLY)); + G_PARAM_READWRITE | G_PARAM_CONSTRUCT_ONLY | + G_PARAM_STATIC_STRINGS)); g_type_class_add_private (object_class, sizeof (PangoFcFontPrivate)); } @@ -220,6 +226,26 @@ pango_fc_font_set_property (GObject *object, } } +static void +pango_fc_font_get_property (GObject *object, + guint prop_id, + GValue *value, + GParamSpec *pspec) +{ + switch (prop_id) + { + case PROP_PATTERN: + { + PangoFcFont *fcfont = PANGO_FC_FONT (object); + g_value_set_pointer (value, fcfont->font_pattern); + } + break; + default: + G_OBJECT_WARN_INVALID_PROPERTY_ID (object, prop_id, pspec); + break; + } +} + static PangoFontDescription * pango_fc_font_describe (PangoFont *font) { |