diff options
author | Matthias Clasen <mclasen@redhat.com> | 2022-01-10 09:47:25 -0500 |
---|---|---|
committer | Matthias Clasen <mclasen@redhat.com> | 2022-02-17 14:01:09 -0600 |
commit | f12eb6c0f1137cc90f3b5f03af13e70ca8101640 (patch) | |
tree | f5a8d68263b0972e2d89e016eb268c632131c88f | |
parent | c847530b104516c07c497d5f8285b1863a6f65c2 (diff) | |
download | pango-f12eb6c0f1137cc90f3b5f03af13e70ca8101640.tar.gz |
Drop deprecated coverage api
-rw-r--r-- | pango/pango-coverage.c | 103 | ||||
-rw-r--r-- | pango/pango-coverage.h | 23 |
2 files changed, 11 insertions, 115 deletions
diff --git a/pango/pango-coverage.c b/pango/pango-coverage.c index f616305d..1dd9627e 100644 --- a/pango/pango-coverage.c +++ b/pango/pango-coverage.c @@ -10,7 +10,7 @@ * * This library is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * Library General Public License for more details. * * You should have received a copy of the GNU Library General Public @@ -44,7 +44,7 @@ pango_coverage_finalize (GObject *object) static PangoCoverageLevel pango_coverage_real_get (PangoCoverage *coverage, - int index) + int index) { if (coverage->chars == NULL) return PANGO_COVERAGE_NONE; @@ -57,8 +57,8 @@ pango_coverage_real_get (PangoCoverage *coverage, static void pango_coverage_real_set (PangoCoverage *coverage, - int index, - PangoCoverageLevel level) + int index, + PangoCoverageLevel level) { if (coverage->chars == NULL) coverage->chars = hb_set_create (); @@ -136,38 +136,6 @@ pango_coverage_copy (PangoCoverage *coverage) } /** - * pango_coverage_ref: - * @coverage: (not nullable): a `PangoCoverage` - * - * 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) -{ - return g_object_ref (coverage); -} - -/** - * pango_coverage_unref: - * @coverage: (transfer full) (not nullable): a `PangoCoverage` - * - * 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) -{ - g_object_unref (coverage); -} - -/** * pango_coverage_get: * @coverage: a `PangoCoverage` * @index_: the index to check @@ -178,7 +146,7 @@ pango_coverage_unref (PangoCoverage *coverage) */ PangoCoverageLevel pango_coverage_get (PangoCoverage *coverage, - int index) + int index) { return PANGO_COVERAGE_GET_CLASS (coverage)->get (coverage, index); } @@ -193,65 +161,8 @@ pango_coverage_get (PangoCoverage *coverage, */ void pango_coverage_set (PangoCoverage *coverage, - int index, - PangoCoverageLevel level) + int index, + PangoCoverageLevel level) { PANGO_COVERAGE_GET_CLASS (coverage)->set (coverage, index, level); } - -/** - * pango_coverage_max: - * @coverage: a `PangoCoverage` - * @other: another `PangoCoverage` - * - * Set the coverage for each index in @coverage to be the max (better) - * value of the current coverage for the index and the coverage for - * the corresponding index in @other. - * - * Deprecated: 1.44: This function does nothing - */ -void -pango_coverage_max (PangoCoverage *coverage, - PangoCoverage *other) -{ -} - -/** - * pango_coverage_to_bytes: - * @coverage: a `PangoCoverage` - * @bytes: (out) (array length=n_bytes) (element-type guint8): - * location to store result (must be freed with g_free()) - * @n_bytes: (out): location to store size of result - * - * Convert a `PangoCoverage` structure into a flat binary format. - * - * Deprecated: 1.44: This returns %NULL - */ -void -pango_coverage_to_bytes (PangoCoverage *coverage, - guchar **bytes, - int *n_bytes) -{ - *bytes = NULL; - *n_bytes = 0; -} - -/** - * pango_coverage_from_bytes: - * @bytes: (array length=n_bytes) (element-type guint8): binary data - * representing a `PangoCoverage` - * @n_bytes: the size of @bytes in bytes - * - * Convert data generated from [method@Pango.Coverage.to_bytes] - * back to a `PangoCoverage`. - * - * Return value: (transfer full) (nullable): a newly allocated `PangoCoverage` - * - * Deprecated: 1.44: This returns %NULL - */ -PangoCoverage * -pango_coverage_from_bytes (guchar *bytes, - int n_bytes) -{ - return NULL; -} diff --git a/pango/pango-coverage.h b/pango/pango-coverage.h index c4013758..ecbc217a 100644 --- a/pango/pango-coverage.h +++ b/pango/pango-coverage.h @@ -10,7 +10,7 @@ * * This library is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * Library General Public License for more details. * * You should have received a copy of the GNU Library General Public @@ -76,30 +76,15 @@ GType pango_coverage_get_type (void) G_GNUC_CONST; PANGO_AVAILABLE_IN_ALL PangoCoverage * pango_coverage_new (void); -PANGO_DEPRECATED_IN_1_52_FOR(g_object_ref) -PangoCoverage * pango_coverage_ref (PangoCoverage *coverage); -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); PANGO_AVAILABLE_IN_ALL PangoCoverageLevel pango_coverage_get (PangoCoverage *coverage, - int index_); + int index_); PANGO_AVAILABLE_IN_ALL void pango_coverage_set (PangoCoverage *coverage, - int index_, - PangoCoverageLevel level); -PANGO_DEPRECATED_IN_1_44 -void pango_coverage_max (PangoCoverage *coverage, - PangoCoverage *other); - -PANGO_DEPRECATED_IN_1_44 -void pango_coverage_to_bytes (PangoCoverage *coverage, - guchar **bytes, - int *n_bytes); -PANGO_DEPRECATED_IN_1_44 -PangoCoverage *pango_coverage_from_bytes (guchar *bytes, - int n_bytes); + int index_, + PangoCoverageLevel level); G_DEFINE_AUTOPTR_CLEANUP_FUNC(PangoCoverage, g_object_unref) |