summaryrefslogtreecommitdiff
path: root/pango
diff options
context:
space:
mode:
Diffstat (limited to 'pango')
-rw-r--r--pango/fonts.c2
-rw-r--r--pango/pango-coverage.c4
-rw-r--r--pango/pango-coverage.h6
-rw-r--r--pango/pango-engine.c2
-rw-r--r--pango/pango-version-macros.h24
-rw-r--r--pango/pangocoretext-fontmap.c2
-rw-r--r--pango/pangocoretext.c6
-rw-r--r--pango/pangofc-fontmap.c6
-rw-r--r--pango/pangowin32-fontmap.c2
-rw-r--r--pango/pangowin32.c6
10 files changed, 44 insertions, 16 deletions
diff --git a/pango/fonts.c b/pango/fonts.c
index 1f0ee626..004089fc 100644
--- a/pango/fonts.c
+++ b/pango/fonts.c
@@ -1742,7 +1742,7 @@ pango_font_default_has_char (PangoFont *font,
{
PangoCoverage *coverage = pango_font_get_coverage (font, pango_language_get_default ());
PangoCoverageLevel result = pango_coverage_get (coverage, wc);
- pango_coverage_unref (coverage);
+ g_object_unref (coverage);
return result != PANGO_COVERAGE_NONE;
}
diff --git a/pango/pango-coverage.c b/pango/pango-coverage.c
index 35041521..f616305d 100644
--- a/pango/pango-coverage.c
+++ b/pango/pango-coverage.c
@@ -142,6 +142,8 @@ pango_coverage_copy (PangoCoverage *coverage)
* Increase the reference count on the `PangoCoverage` by one.
*
* Return value: (transfer full): @coverage
+ *
+ * Deprecated: 1.52: Use g_object_ref instead
*/
PangoCoverage *
pango_coverage_ref (PangoCoverage *coverage)
@@ -156,6 +158,8 @@ pango_coverage_ref (PangoCoverage *coverage)
* Decrease the reference count on the `PangoCoverage` by one.
*
* If the result is zero, free the coverage and all associated memory.
+ *
+ * Deprecated: 1.52: Use g_object_unref instead
*/
void
pango_coverage_unref (PangoCoverage *coverage)
diff --git a/pango/pango-coverage.h b/pango/pango-coverage.h
index b24d73d5..c4013758 100644
--- a/pango/pango-coverage.h
+++ b/pango/pango-coverage.h
@@ -76,9 +76,9 @@ GType pango_coverage_get_type (void) G_GNUC_CONST;
PANGO_AVAILABLE_IN_ALL
PangoCoverage * pango_coverage_new (void);
-PANGO_AVAILABLE_IN_ALL
+PANGO_DEPRECATED_IN_1_52_FOR(g_object_ref)
PangoCoverage * pango_coverage_ref (PangoCoverage *coverage);
-PANGO_AVAILABLE_IN_ALL
+PANGO_DEPRECATED_IN_1_52_FOR(g_object_unref)
void pango_coverage_unref (PangoCoverage *coverage);
PANGO_AVAILABLE_IN_ALL
PangoCoverage * pango_coverage_copy (PangoCoverage *coverage);
@@ -101,7 +101,7 @@ PANGO_DEPRECATED_IN_1_44
PangoCoverage *pango_coverage_from_bytes (guchar *bytes,
int n_bytes);
-G_DEFINE_AUTOPTR_CLEANUP_FUNC(PangoCoverage, pango_coverage_unref)
+G_DEFINE_AUTOPTR_CLEANUP_FUNC(PangoCoverage, g_object_unref)
G_END_DECLS
diff --git a/pango/pango-engine.c b/pango/pango-engine.c
index e52bcd99..bda8eef1 100644
--- a/pango/pango-engine.c
+++ b/pango/pango-engine.c
@@ -61,7 +61,7 @@ pango_engine_shape_real_covers (PangoEngineShape *engine G_GNUC_UNUSED,
PangoCoverage *coverage = pango_font_get_coverage (font, language);
PangoCoverageLevel result = pango_coverage_get (coverage, wc);
- pango_coverage_unref (coverage);
+ g_object_unref (coverage);
return result;
}
diff --git a/pango/pango-version-macros.h b/pango/pango-version-macros.h
index 84130ca3..b4f78e6d 100644
--- a/pango/pango-version-macros.h
+++ b/pango/pango-version-macros.h
@@ -282,6 +282,16 @@
*/
#define PANGO_VERSION_1_50 (G_ENCODE_VERSION (1, 50))
+/**
+ * PANGO_VERSION_1_52:
+ *
+ * A macro that evaluates to the 1.52 version of Pango, in a format
+ * that can be used by the C pre-processor.
+ *
+ * Since: 1.52
+ */
+#define PANGO_VERSION_1_52 (G_ENCODE_VERSION (1, 52))
+
/* evaluates to the current stable version; for development cycles,
* this means the next stable target
*/
@@ -729,4 +739,18 @@
# define PANGO_AVAILABLE_IN_1_50 _PANGO_EXTERN
#endif
+#if PANGO_VERSION_MIN_REQUIRED >= PANGO_VERSION_1_52
+# define PANGO_DEPRECATED_IN_1_52 PANGO_DEPRECATED
+# define PANGO_DEPRECATED_IN_1_52_FOR(f) PANGO_DEPRECATED_FOR(f)
+#else
+# define PANGO_DEPRECATED_IN_1_52 _PANGO_EXTERN
+# define PANGO_DEPRECATED_IN_1_52_FOR(f) _PANGO_EXTERN
+#endif
+
+#if PANGO_VERSION_MAX_ALLOWED < PANGO_VERSION_1_52
+# define PANGO_AVAILABLE_IN_1_52 PANGO_UNAVAILABLE(1, 52)
+#else
+# define PANGO_AVAILABLE_IN_1_52 _PANGO_EXTERN
+#endif
+
#endif /* __PANGO_VERSION_H__ */
diff --git a/pango/pangocoretext-fontmap.c b/pango/pangocoretext-fontmap.c
index 3bf78e9a..40e62eed 100644
--- a/pango/pangocoretext-fontmap.c
+++ b/pango/pangocoretext-fontmap.c
@@ -1775,7 +1775,7 @@ pango_core_text_fontset_finalize (GObject *object)
{
PangoCoverage *coverage = g_ptr_array_index (ctfontset->coverages, i);
if (coverage)
- pango_coverage_unref (coverage);
+ g_object_unref (coverage);
}
g_ptr_array_free (ctfontset->coverages, TRUE);
diff --git a/pango/pangocoretext.c b/pango/pangocoretext.c
index 25358cac..2fc176e4 100644
--- a/pango/pangocoretext.c
+++ b/pango/pangocoretext.c
@@ -53,7 +53,7 @@ pango_core_text_font_finalize (GObject *object)
}
if (priv->coverage)
- pango_coverage_unref (priv->coverage);
+ g_object_unref (priv->coverage);
G_OBJECT_CLASS (pango_core_text_font_parent_class)->finalize (object);
}
@@ -152,7 +152,7 @@ pango_core_text_font_get_coverage (PangoFont *font,
priv->coverage = ct_font_descriptor_get_coverage (ctfontdesc);
}
- return pango_coverage_ref (priv->coverage);
+ return g_object_ref (priv->coverage);
}
static PangoFontMap *
@@ -253,7 +253,7 @@ _pango_core_text_font_set_font_key (PangoCoreTextFont *font,
if (priv->coverage)
{
- pango_coverage_unref (priv->coverage);
+ g_object_unref (priv->coverage);
priv->coverage = NULL;
}
}
diff --git a/pango/pangofc-fontmap.c b/pango/pangofc-fontmap.c
index 5b0c4999..4c39ea1f 100644
--- a/pango/pangofc-fontmap.c
+++ b/pango/pangofc-fontmap.c
@@ -318,7 +318,7 @@ pango_fc_font_face_data_free (PangoFcFontFaceData *data)
FcPatternDestroy (data->pattern);
if (data->coverage)
- pango_coverage_unref (data->coverage);
+ g_object_unref (data->coverage);
g_free (data->languages);
@@ -1227,7 +1227,7 @@ pango_fc_fontset_finalize (GObject *object)
{
PangoCoverage *coverage = g_ptr_array_index (fontset->coverages, i);
if (coverage)
- pango_coverage_unref (coverage);
+ g_object_unref (coverage);
}
g_ptr_array_free (fontset->coverages, TRUE);
@@ -2541,7 +2541,7 @@ _pango_fc_font_map_get_coverage (PangoFcFontMap *fcfontmap,
data->coverage = _pango_fc_font_map_fc_to_coverage (charset);
}
- return pango_coverage_ref (data->coverage);
+ return g_object_ref (data->coverage);
}
/**
diff --git a/pango/pangowin32-fontmap.c b/pango/pangowin32-fontmap.c
index 200ea9ce..43cffc37 100644
--- a/pango/pangowin32-fontmap.c
+++ b/pango/pangowin32-fontmap.c
@@ -1772,7 +1772,7 @@ pango_win32_face_finalize (GObject *object)
pango_font_description_free (win32face->description);
if (win32face->coverage != NULL)
- pango_coverage_unref (win32face->coverage);
+ g_object_unref (win32face->coverage);
g_free (win32face->face_name);
diff --git a/pango/pangowin32.c b/pango/pangowin32.c
index 2d22e1d1..eed92dde 100644
--- a/pango/pangowin32.c
+++ b/pango/pangowin32.c
@@ -596,7 +596,7 @@ pango_win32_font_get_metrics (PangoFont *font,
else
metrics->approximate_digit_width = metrics->approximate_char_width;
- pango_coverage_unref (coverage);
+ g_object_unref (coverage);
/* FIXME: Should get the real values from the TrueType font file */
metrics->underline_position = -2 * PANGO_SCALE;
@@ -885,10 +885,10 @@ pango_win32_font_get_coverage (PangoFont *font,
while (hb_set_next(chars, &ch))
pango_coverage_set (coverage, ch, PANGO_COVERAGE_EXACT);
- win32face->coverage = pango_coverage_ref (coverage);
+ win32face->coverage = g_object_ref (coverage);
}
- return pango_coverage_ref (win32face->coverage);
+ return g_object_ref (win32face->coverage);
}
/* Utility functions */