summaryrefslogtreecommitdiff
path: root/modules
diff options
context:
space:
mode:
authorOwen Taylor <otaylor@redhat.com>2000-05-28 01:23:41 +0000
committerOwen Taylor <otaylor@src.gnome.org>2000-05-28 01:23:41 +0000
commit2c10e7197f33eb1bf6d8771de13b241263dc041b (patch)
treee3b713a250de056d23ff2410bdcccb8ee8df623a /modules
parent1a23b2c124df6830bc8a8027bd8b38ccc2c75531 (diff)
downloadpango-2c10e7197f33eb1bf6d8771de13b241263dc041b.tar.gz
s/pango_font_set_data/g_object_set_qdata/
Sat May 27 21:06:13 2000 Owen Taylor <otaylor@redhat.com> * modules/thai/thai.c modules/basic/basic: s/pango_font_set_data/g_object_set_qdata/ * pango/*.c: s/pango_font_[un]ref/g_object_un[ref] * pango/pango-font.h fonts.c: GObject'ify PangoFont.
Diffstat (limited to 'modules')
-rw-r--r--modules/basic/basic-x.c8
-rw-r--r--modules/basic/basic.c8
-rw-r--r--modules/thai/thai-x.c5
-rw-r--r--modules/thai/thai.c5
4 files changed, 16 insertions, 10 deletions
diff --git a/modules/basic/basic-x.c b/modules/basic/basic-x.c
index 0be1ea14..8f639a2b 100644
--- a/modules/basic/basic-x.c
+++ b/modules/basic/basic-x.c
@@ -345,12 +345,14 @@ swap_range (PangoGlyphString *glyphs, int start, int end)
static CharCache *
get_char_cache (PangoFont *font)
{
- CharCache *cache = pango_font_get_data (font, "basic-char-cache");
+ GQuark cache_id = g_quark_from_string ("basic-char-cache");
+
+ CharCache *cache = g_object_get_qdata (G_OBJECT (font), cache_id);
if (!cache)
{
cache = char_cache_new ();
- pango_font_set_data (font, "basic-char-cache",
- cache, (GDestroyNotify)char_cache_free);
+ g_object_set_qdata_full (G_OBJECT (font), cache_id,
+ cache, (GDestroyNotify)char_cache_free);
}
return cache;
diff --git a/modules/basic/basic.c b/modules/basic/basic.c
index 0be1ea14..8f639a2b 100644
--- a/modules/basic/basic.c
+++ b/modules/basic/basic.c
@@ -345,12 +345,14 @@ swap_range (PangoGlyphString *glyphs, int start, int end)
static CharCache *
get_char_cache (PangoFont *font)
{
- CharCache *cache = pango_font_get_data (font, "basic-char-cache");
+ GQuark cache_id = g_quark_from_string ("basic-char-cache");
+
+ CharCache *cache = g_object_get_qdata (G_OBJECT (font), cache_id);
if (!cache)
{
cache = char_cache_new ();
- pango_font_set_data (font, "basic-char-cache",
- cache, (GDestroyNotify)char_cache_free);
+ g_object_set_qdata_full (G_OBJECT (font), cache_id,
+ cache, (GDestroyNotify)char_cache_free);
}
return cache;
diff --git a/modules/thai/thai-x.c b/modules/thai/thai-x.c
index 17d1d024..5cefc3a1 100644
--- a/modules/thai/thai-x.c
+++ b/modules/thai/thai-x.c
@@ -154,8 +154,9 @@ get_font_info (PangoFont *font)
};
ThaiFontInfo *font_info;
+ GQuark info_id = g_quark_from_string ("thai-font-info");
- font_info = pango_font_get_data (font, "thai-font-info");
+ font_info = g_object_get_qdata (G_OBJECT (font), info_id);
if (!font_info)
{
/* No cached information not found, so we need to compute it
@@ -169,7 +170,7 @@ get_font_info (PangoFont *font)
font_info->font = font;
font_info->type = THAI_FONT_NONE;
- pango_font_set_data (font, "thai-font-info", font_info, (GDestroyNotify)g_free);
+ g_object_set_qdata_full (G_OBJECT (font), info_id, font_info, (GDestroyNotify)g_free);
n_subfonts = pango_x_list_subfonts (font, (char **)charsets, G_N_ELEMENTS (charsets),
&subfont_ids, &subfont_charsets);
diff --git a/modules/thai/thai.c b/modules/thai/thai.c
index 17d1d024..5cefc3a1 100644
--- a/modules/thai/thai.c
+++ b/modules/thai/thai.c
@@ -154,8 +154,9 @@ get_font_info (PangoFont *font)
};
ThaiFontInfo *font_info;
+ GQuark info_id = g_quark_from_string ("thai-font-info");
- font_info = pango_font_get_data (font, "thai-font-info");
+ font_info = g_object_get_qdata (G_OBJECT (font), info_id);
if (!font_info)
{
/* No cached information not found, so we need to compute it
@@ -169,7 +170,7 @@ get_font_info (PangoFont *font)
font_info->font = font;
font_info->type = THAI_FONT_NONE;
- pango_font_set_data (font, "thai-font-info", font_info, (GDestroyNotify)g_free);
+ g_object_set_qdata_full (G_OBJECT (font), info_id, font_info, (GDestroyNotify)g_free);
n_subfonts = pango_x_list_subfonts (font, (char **)charsets, G_N_ELEMENTS (charsets),
&subfont_ids, &subfont_charsets);