diff options
author | Matthias Clasen <mclasen@redhat.com> | 2022-01-25 01:07:14 -0500 |
---|---|---|
committer | Matthias Clasen <mclasen@redhat.com> | 2022-01-25 15:31:25 -0500 |
commit | ef0c99b95c6c043bc95d7c26f9689972c2fe1a6c (patch) | |
tree | d74862fd96916a6b19030be21b99cff264fdaed6 | |
parent | 70a694634561acc81d560f3ae4e2a4dfc6cc90b0 (diff) | |
download | pango-ef0c99b95c6c043bc95d7c26f9689972c2fe1a6c.tar.gz |
Rename PangoLayoutRun to PangoRun
-rw-r--r-- | pango/meson.build | 4 | ||||
-rw-r--r-- | pango/pango-layout-iter.c | 31 | ||||
-rw-r--r-- | pango/pango-layout-iter.h | 2 | ||||
-rw-r--r-- | pango/pango-layout-line-private.h | 2 | ||||
-rw-r--r-- | pango/pango-layout-line.c | 32 | ||||
-rw-r--r-- | pango/pango-layout-line.h | 2 | ||||
-rw-r--r-- | pango/pango-layout-run.h | 18 | ||||
-rw-r--r-- | pango/pango-renderer.c | 16 | ||||
-rw-r--r-- | pango/pango-renderer.h | 2 | ||||
-rw-r--r-- | pango/pango-run-private.h (renamed from pango/pango-layout-run-private.h) | 6 | ||||
-rw-r--r-- | pango/pango-run.c (renamed from pango/pango-layout-run.c) | 36 | ||||
-rw-r--r-- | pango/pango-run.h | 18 | ||||
-rw-r--r-- | pango/pango-types.h | 2 | ||||
-rw-r--r-- | pango/pango.h | 2 | ||||
-rw-r--r-- | tests/testiter.c | 6 | ||||
-rw-r--r-- | utils/viewer-pangocairo.c | 14 |
16 files changed, 96 insertions, 97 deletions
diff --git a/pango/meson.build b/pango/meson.build index 7becb191..4fa5bc19 100644 --- a/pango/meson.build +++ b/pango/meson.build @@ -32,7 +32,7 @@ pango_sources = [ 'json/gtkjsonparser.c', 'json/gtkjsonprinter.c', 'pango-layout-line.c', - 'pango-layout-run.c', + 'pango-run.c', 'pango-line-breaker.c', 'pango-lines.c', 'pango-layout-iter.c', @@ -58,7 +58,7 @@ pango_headers = [ 'pango-item.h', 'pango-language.h', 'pango-layout-line.h', - 'pango-layout-run.h', + 'pango-run.h', 'pango-line-breaker.h', 'pango-layout-iter.h', 'pango-lines.h', diff --git a/pango/pango-layout-iter.c b/pango/pango-layout-iter.c index 1903c656..7fd4054c 100644 --- a/pango/pango-layout-iter.c +++ b/pango/pango-layout-iter.c @@ -2,9 +2,8 @@ #include "pango-layout-iter-private.h" #include "pango-lines-private.h" -#include "pango-layout-run-private.h" #include "pango-layout-line-private.h" -#include "pango-layout-run-private.h" +#include "pango-run-private.h" /** * PangoLayoutIter: @@ -32,7 +31,7 @@ struct _PangoLayoutIter int line_y; PangoLayoutLine *line; GSList *run_link; - PangoLayoutRun *run; + PangoRun *run; int index; /* run handling */ @@ -120,7 +119,7 @@ update_cluster (PangoLayoutIter *iter, char *cluster_text; int cluster_length; - glyph_item = pango_layout_run_get_glyph_item (iter->run); + glyph_item = pango_run_get_glyph_item (iter->run); iter->character_position = 0; @@ -226,7 +225,7 @@ next_cluster_internal (PangoLayoutIter *iter, if (iter->run == NULL) return next_nonempty_line (iter, include_terminators); - glyph_item = pango_layout_run_get_glyph_item (iter->run); + glyph_item = pango_run_get_glyph_item (iter->run); if (iter->next_cluster_glyph == glyph_item->glyphs->num_glyphs) { @@ -249,7 +248,7 @@ update_run (PangoLayoutIter *iter, PangoGlyphItem *glyph_item; if (iter->run) - glyph_item = pango_layout_run_get_glyph_item (iter->run); + glyph_item = pango_run_get_glyph_item (iter->run); if (iter->run_link == iter->line->runs) iter->run_x = 0; @@ -343,7 +342,7 @@ pango_layout_iter_new (PangoLines *lines) if (iter->run_link) { iter->run = iter->run_link->data; - run_start_index = pango_layout_run_get_glyph_item (iter->run)->item->offset; + run_start_index = pango_run_get_glyph_item (iter->run)->item->offset; } else { @@ -457,7 +456,7 @@ pango_layout_iter_at_last_line (PangoLayoutIter *iter) * * Return value: (transfer none) (nullable): the current run */ -PangoLayoutRun * +PangoRun * pango_layout_iter_get_run (PangoLayoutIter *iter) { g_return_val_if_fail (ITER_IS_VALID (iter), NULL); @@ -543,14 +542,14 @@ pango_layout_iter_next_run (PangoLayoutIter *iter) iter->run_link = iter->run_link->next; if (iter->run_link == NULL) { - PangoItem *item = pango_layout_run_get_glyph_item (iter->run)->item; + PangoItem *item = pango_run_get_glyph_item (iter->run)->item; run_start_index = item->offset + item->length; iter->run = NULL; } else { iter->run = iter->run_link->data; - run_start_index = pango_layout_run_get_glyph_item (iter->run)->item->offset; + run_start_index = pango_run_get_glyph_item (iter->run)->item->offset; } update_run (iter, run_start_index); @@ -693,7 +692,7 @@ pango_layout_iter_get_trimmed_line_extents (PangoLayoutIter *iter, * * The logical extents returned by this function always have their leading * trimmed off. If you need extents that include leading, use - * [method@Pango.LayoutRun.get_extents]. + * [method@Pango.Run.get_extents]. */ void pango_layout_iter_get_run_extents (PangoLayoutIter *iter, @@ -704,7 +703,7 @@ pango_layout_iter_get_run_extents (PangoLayoutIter *iter, if (iter->run) { - pango_layout_run_get_extents (iter->run, PANGO_LEADING_TRIM_BOTH, ink_rect, logical_rect); + pango_run_get_extents (iter->run, PANGO_LEADING_TRIM_BOTH, ink_rect, logical_rect); } else { @@ -712,9 +711,9 @@ pango_layout_iter_get_run_extents (PangoLayoutIter *iter, if (runs) { /* Virtual run at the end of a nonempty line */ - PangoLayoutRun *run = g_slist_last (runs)->data; + PangoRun *run = g_slist_last (runs)->data; - pango_layout_run_get_extents (run, PANGO_LEADING_TRIM_BOTH, ink_rect, logical_rect); + pango_run_get_extents (run, PANGO_LEADING_TRIM_BOTH, ink_rect, logical_rect); if (ink_rect) ink_rect->width = 0; if (logical_rect) @@ -765,7 +764,7 @@ pango_layout_iter_get_cluster_extents (PangoLayoutIter *iter, return; } - glyph_item = pango_layout_run_get_glyph_item (iter->run); + glyph_item = pango_run_get_glyph_item (iter->run); pango_glyph_string_extents_range (glyph_item->glyphs, iter->cluster_start, @@ -875,7 +874,7 @@ pango_layout_iter_get_run_baseline (PangoLayoutIter *iter) g_return_val_if_fail (ITER_IS_VALID (iter), 0); if (iter->run) - return pango_layout_iter_get_line_baseline (iter) - pango_layout_run_get_glyph_item (iter->run)->y_offset; + return pango_layout_iter_get_line_baseline (iter) - pango_run_get_glyph_item (iter->run)->y_offset; else return pango_layout_iter_get_line_baseline (iter); } diff --git a/pango/pango-layout-iter.h b/pango/pango-layout-iter.h index 3f1b5964..59e59719 100644 --- a/pango/pango-layout-iter.h +++ b/pango/pango-layout-iter.h @@ -27,7 +27,7 @@ PANGO_AVAILABLE_IN_ALL gboolean pango_layout_iter_at_last_line (PangoLayoutIter *iter); PANGO_AVAILABLE_IN_ALL -PangoLayoutRun * pango_layout_iter_get_run (PangoLayoutIter *iter); +PangoRun * pango_layout_iter_get_run (PangoLayoutIter *iter); PANGO_AVAILABLE_IN_ALL int pango_layout_iter_get_index (PangoLayoutIter *iter); diff --git a/pango/pango-layout-line-private.h b/pango/pango-layout-line-private.h index 4730a9a5..50760c52 100644 --- a/pango/pango-layout-line-private.h +++ b/pango/pango-layout-line-private.h @@ -56,7 +56,7 @@ void pango_layout_line_ellipsize (PangoLayoutLine *line, void pango_layout_line_index_to_run (PangoLayoutLine *line, int idx, - PangoLayoutRun **run); + PangoRun **run); void pango_layout_line_get_empty_extents (PangoLayoutLine *line, PangoLeadingTrim trim, diff --git a/pango/pango-layout-line.c b/pango/pango-layout-line.c index fdf845c6..b581e364 100644 --- a/pango/pango-layout-line.c +++ b/pango/pango-layout-line.c @@ -6,7 +6,7 @@ #include "pango-impl-utils.h" #include "pango-attributes-private.h" #include "pango-item-private.h" -#include "pango-layout-run-private.h" +#include "pango-run-private.h" #include <math.h> #include <hb-ot.h> @@ -19,7 +19,7 @@ * * A line consists of a number of runs (i.e. ranges of text with uniform * script, font and attributes that are shaped as a unit). Runs are - * represented as [struct@Pango.LayoutRun] objects. + * represented as [struct@Pango.Run] objects. * * A `PangoLayoutLine` always has its origin at the leftmost point of its * baseline. To position lines in an entire paragraph of text (i.e. in layout @@ -346,12 +346,12 @@ compute_extents (PangoLayoutLine *line, for (GSList *l = line->runs; l; l = l->next) { - PangoLayoutRun *run = l->data; + PangoRun *run = l->data; PangoRectangle run_ink; PangoRectangle run_logical; int new_pos; - pango_layout_run_get_extents (run, trim, &run_ink, &run_logical); + pango_run_get_extents (run, trim, &run_ink, &run_logical); if (ink->width == 0 || ink->height == 0) { @@ -564,16 +564,16 @@ pango_layout_line_new (PangoContext *context, void pango_layout_line_index_to_run (PangoLayoutLine *line, int idx, - PangoLayoutRun **run) + PangoRun **run) { *run = NULL; for (GSList *l = line->runs; l; l = l->next) { - PangoLayoutRun *r = l->data; + PangoRun *r = l->data; PangoItem *item; - item = pango_layout_run_get_glyph_item (r)->item; + item = pango_run_get_glyph_item (r)->item; if (item->offset <= idx && idx < item->offset + item->length) { *run = r; @@ -1029,7 +1029,7 @@ pango_layout_line_index_to_pos (PangoLayoutLine *line, { PangoRectangle run_logical; PangoRectangle line_logical; - PangoLayoutRun *run = NULL; + PangoRun *run = NULL; int x_pos; pango_layout_line_get_extents (line, NULL, &line_logical); @@ -1045,7 +1045,7 @@ pango_layout_line_index_to_pos (PangoLayoutLine *line, else pango_layout_line_index_to_run (line, idx, &run); - pango_layout_run_get_extents (run, PANGO_LEADING_TRIM_BOTH, NULL, &run_logical); + pango_run_get_extents (run, PANGO_LEADING_TRIM_BOTH, NULL, &run_logical); pos->y = run_logical.y; pos->height = run_logical.height; @@ -1381,7 +1381,7 @@ pango_layout_line_get_cursor_pos (PangoLayoutLine *line, PangoRectangle run_rect = { 666, }; PangoDirection dir1, dir2; int level1, level2; - PangoLayoutRun *run = NULL; + PangoRun *run = NULL; int x1_trailing; int x2; @@ -1395,7 +1395,7 @@ pango_layout_line_get_cursor_pos (PangoLayoutLine *line, pango_layout_line_get_extents (line, NULL, &line_rect); if (run) - pango_layout_run_get_extents (run, PANGO_LEADING_TRIM_BOTH, NULL, &run_rect); + pango_run_get_extents (run, PANGO_LEADING_TRIM_BOTH, NULL, &run_rect); else { run_rect = line_rect; @@ -1425,10 +1425,10 @@ pango_layout_line_get_cursor_pos (PangoLayoutLine *line, } else { - PangoLayoutRun *prev_run; + PangoRun *prev_run; pango_layout_line_index_to_run (line, prev_index, &prev_run); - level1 = pango_layout_run_get_glyph_item (prev_run)->item->analysis.level; + level1 = pango_run_get_glyph_item (prev_run)->item->analysis.level; dir1 = level1 % 2 ? PANGO_DIRECTION_RTL : PANGO_DIRECTION_LTR; pango_layout_line_index_to_x (line, prev_index, TRUE, &x1_trailing); } @@ -1447,7 +1447,7 @@ pango_layout_line_get_cursor_pos (PangoLayoutLine *line, else { pango_layout_line_index_to_x (line, idx, FALSE, &x2); - level2 = pango_layout_run_get_glyph_item (run)->item->analysis.level; + level2 = pango_run_get_glyph_item (run)->item->analysis.level; dir2 = level2 % 2 ? PANGO_DIRECTION_RTL : PANGO_DIRECTION_LTR; } @@ -1510,7 +1510,7 @@ pango_layout_line_get_caret_pos (PangoLayoutLine *line, PangoRectangle *strong_pos, PangoRectangle *weak_pos) { - PangoLayoutRun *run = NULL; + PangoRun *run = NULL; PangoGlyphItem *glyph_item; hb_font_t *hb_font; hb_position_t caret_offset, caret_run, caret_rise, descender; @@ -1528,7 +1528,7 @@ pango_layout_line_get_caret_pos (PangoLayoutLine *line, if (!run) return; - glyph_item = pango_layout_run_get_glyph_item (run); + glyph_item = pango_run_get_glyph_item (run); hb_font = pango_font_get_hb_font (glyph_item->item->analysis.font); if (hb_ot_metrics_get_position (hb_font, HB_OT_METRICS_TAG_HORIZONTAL_CARET_RISE, &caret_rise) && diff --git a/pango/pango-layout-line.h b/pango/pango-layout-line.h index e45c8d10..6c080c23 100644 --- a/pango/pango-layout-line.h +++ b/pango/pango-layout-line.h @@ -3,7 +3,7 @@ #include <glib-object.h> #include <pango/pango-types.h> -#include <pango/pango-layout-run.h> +#include <pango/pango-run.h> G_BEGIN_DECLS diff --git a/pango/pango-layout-run.h b/pango/pango-layout-run.h deleted file mode 100644 index a2b76cc0..00000000 --- a/pango/pango-layout-run.h +++ /dev/null @@ -1,18 +0,0 @@ -#pragma once - -#include <glib-object.h> -#include <pango/pango-types.h> -#include <pango/pango-item.h> -#include <pango/pango-glyph.h> - -PANGO_AVAILABLE_IN_ALL -PangoItem * pango_layout_run_get_item (PangoLayoutRun *run); - -PANGO_AVAILABLE_IN_ALL -PangoGlyphString * pango_layout_run_get_glyphs (PangoLayoutRun *run); - -PANGO_AVAILABLE_IN_ALL -void pango_layout_run_get_extents (PangoLayoutRun *run, - PangoLeadingTrim trim, - PangoRectangle *ink_rect, - PangoRectangle *logical_rect); diff --git a/pango/pango-renderer.c b/pango/pango-renderer.c index c7a81c6a..fc0dc4c2 100644 --- a/pango/pango-renderer.c +++ b/pango/pango-renderer.c @@ -25,7 +25,7 @@ #include "pango-renderer.h" #include "pango-impl-utils.h" #include "pango-layout.h" -#include "pango-layout-run-private.h" +#include "pango-run-private.h" #include "pango-layout-line-private.h" #define N_RENDER_PARTS 5 @@ -93,10 +93,10 @@ static void pango_renderer_default_draw_error_underline (PangoRenderer *rende int width, int height); static void pango_renderer_default_prepare_run (PangoRenderer *renderer, - PangoLayoutRun *run); + PangoRun *run); static void pango_renderer_prepare_run (PangoRenderer *renderer, - PangoLayoutRun *run); + PangoRun *run); static void to_device (PangoMatrix *matrix, @@ -616,7 +616,7 @@ pango_renderer_draw_runs (PangoRenderer *renderer, for (l = runs; l; l = l->next) { PangoFontMetrics *metrics; - PangoLayoutRun *run = l->data; + PangoRun *run = l->data; PangoGlyphItem *glyph_item = l->data; PangoItem *item = glyph_item->item; PangoGlyphString *glyphs = glyph_item->glyphs; @@ -1443,7 +1443,7 @@ pango_renderer_part_changed (PangoRenderer *renderer, /** * pango_renderer_prepare_run: * @renderer: a `PangoRenderer` - * @run: a `PangoLayoutRun` + * @run: a `PangoRun` * * Set up the state of the `PangoRenderer` for rendering @run. * @@ -1451,7 +1451,7 @@ pango_renderer_part_changed (PangoRenderer *renderer, */ static void pango_renderer_prepare_run (PangoRenderer *renderer, - PangoLayoutRun *run) + PangoRun *run) { g_return_if_fail (PANGO_IS_RENDERER_FAST (renderer)); @@ -1460,7 +1460,7 @@ pango_renderer_prepare_run (PangoRenderer *renderer, static void pango_renderer_default_prepare_run (PangoRenderer *renderer, - PangoLayoutRun *run) + PangoRun *run) { PangoColor *fg_color = NULL; PangoColor *bg_color = NULL; @@ -1472,7 +1472,7 @@ pango_renderer_default_prepare_run (PangoRenderer *renderer, GSList *l; PangoGlyphItem *glyph_item; - glyph_item = pango_layout_run_get_glyph_item (run); + glyph_item = pango_run_get_glyph_item (run); renderer->underline = PANGO_UNDERLINE_NONE; renderer->priv->overline = PANGO_OVERLINE_NONE; diff --git a/pango/pango-renderer.h b/pango/pango-renderer.h index 08d49dfc..116f8c78 100644 --- a/pango/pango-renderer.h +++ b/pango/pango-renderer.h @@ -181,7 +181,7 @@ struct _PangoRendererClass void (*end) (PangoRenderer *renderer); void (*prepare_run) (PangoRenderer *renderer, - PangoLayoutRun *run); + PangoRun *run); void (*draw_glyph_item) (PangoRenderer *renderer, const char *text, diff --git a/pango/pango-layout-run-private.h b/pango/pango-run-private.h index ce3b2bc8..09d27edf 100644 --- a/pango/pango-layout-run-private.h +++ b/pango/pango-run-private.h @@ -2,17 +2,17 @@ #include "config.h" -#include "pango-layout-run.h" +#include "pango-run.h" #include "pango-glyph-item.h" #include "pango-item-private.h" -struct _PangoLayoutRun +struct _PangoRun { PangoGlyphItem glyph_item; }; static inline PangoGlyphItem * -pango_layout_run_get_glyph_item (PangoLayoutRun *run) +pango_run_get_glyph_item (PangoRun *run) { return &run->glyph_item; } diff --git a/pango/pango-layout-run.c b/pango/pango-run.c index ff73bbf8..a011395d 100644 --- a/pango/pango-layout-run.c +++ b/pango/pango-run.c @@ -1,62 +1,62 @@ #include "config.h" -#include "pango-layout-run-private.h" +#include "pango-run-private.h" #include "pango-item-private.h" #include "pango-impl-utils.h" #include <math.h> /** - * PangoLayoutRun: + * PangoRun: * - * A `PangoLayoutRun` represents a single run within a `PangoLayoutLine`. + * A `PangoRun` represents a single run within a `PangoLayoutLine`. * * A run is a range of text with uniform script, font and attributes that * is shaped as a unit. * * Script, font and attributes of a run can be accessed via - * [method@Pango.LayoutRun.get_item]. The glyphs that result from shaping - * the text of the run can be obtained via [method@Pango.LayoutRun.get_glyphs]. + * [method@Pango.Run.get_item]. The glyphs that result from shaping + * the text of the run can be obtained via [method@Pango.Run.get_glyphs]. */ /** - * pango_layout_run_get_item: - * @run: a `PangoLayoutRun` + * pango_run_get_item: + * @run: a `PangoRun` * * Gets the `PangoItem` for the run. * * Returns: (transfer none): the `PangoItem` of @run */ PangoItem * -pango_layout_run_get_item (PangoLayoutRun *run) +pango_run_get_item (PangoRun *run) { return run->glyph_item.item; } /** - * pango_layout_run_get_glyphs: - * @run: a `PangoLayoutRun` + * pango_run_get_glyphs: + * @run: a `PangoRun` * * Gets the `PangoGlyphString` for the run. * * Returns: (transfer none): the `PangoGlyphString` of @run */ PangoGlyphString * -pango_layout_run_get_glyphs (PangoLayoutRun *run) +pango_run_get_glyphs (PangoRun *run) { return run->glyph_item.glyphs; } /** - * pango_layout_run_get_extents: - * @run: a `PangoLayoutRun` + * pango_run_get_extents: + * @run: a `PangoRun` * @trim: `PangoLeadingTrim` flags * @ink_rect: (out caller-allocates) (optional): return location * for the ink extents * @logical_rect: (out caller-allocates) (optional): return location * for the logical extents * - * Gets the extents of a `PangoLayoutRun`. + * Gets the extents of a `PangoRun`. * * The @trim flags specify if line-height attributes are taken * into consideration for determining the logical height. See the @@ -64,10 +64,10 @@ pango_layout_run_get_glyphs (PangoLayoutRun *run) * specification for details. */ void -pango_layout_run_get_extents (PangoLayoutRun *run, - PangoLeadingTrim trim, - PangoRectangle *ink_rect, - PangoRectangle *logical_rect) +pango_run_get_extents (PangoRun *run, + PangoLeadingTrim trim, + PangoRectangle *ink_rect, + PangoRectangle *logical_rect) { PangoGlyphItem *glyph_item = &run->glyph_item; ItemProperties properties; diff --git a/pango/pango-run.h b/pango/pango-run.h new file mode 100644 index 00000000..44408e8e --- /dev/null +++ b/pango/pango-run.h @@ -0,0 +1,18 @@ +#pragma once + +#include <glib-object.h> +#include <pango/pango-types.h> +#include <pango/pango-item.h> +#include <pango/pango-glyph.h> + +PANGO_AVAILABLE_IN_ALL +PangoItem * pango_run_get_item (PangoRun *run); + +PANGO_AVAILABLE_IN_ALL +PangoGlyphString * pango_run_get_glyphs (PangoRun *run); + +PANGO_AVAILABLE_IN_ALL +void pango_run_get_extents (PangoRun *run, + PangoLeadingTrim trim, + PangoRectangle *ink_rect, + PangoRectangle *logical_rect); diff --git a/pango/pango-types.h b/pango/pango-types.h index b4114385..bca88069 100644 --- a/pango/pango-types.h +++ b/pango/pango-types.h @@ -54,7 +54,7 @@ typedef struct _PangoLanguage PangoLanguage; typedef guint32 PangoGlyph; typedef struct _PangoLines PangoLines; -typedef struct _PangoLayoutRun PangoLayoutRun; +typedef struct _PangoRun PangoRun; typedef struct _PangoLayoutLine PangoLayoutLine; typedef struct _PangoLayoutIter PangoLayoutIter; diff --git a/pango/pango.h b/pango/pango.h index f9c70eca..f7851bf7 100644 --- a/pango/pango.h +++ b/pango/pango.h @@ -43,7 +43,7 @@ #include <pango/pango-language.h> #include <pango/pango-layout.h> #include <pango/pango-layout-line.h> -#include <pango/pango-layout-run.h> +#include <pango/pango-run.h> #include <pango/pango-line-breaker.h> #include <pango/pango-layout-iter.h> #include <pango/pango-lines.h> diff --git a/tests/testiter.c b/tests/testiter.c index 5ac2f7c9..6547865c 100644 --- a/tests/testiter.c +++ b/tests/testiter.c @@ -81,7 +81,7 @@ iter_char_test (PangoLayout *layout) { PangoRectangle extents, run_extents; PangoLayoutIter *iter; - PangoLayoutRun *run; + PangoRun *run; int num_chars; int i, index, offset; int leading_x, trailing_x, x0, x1; @@ -120,8 +120,8 @@ iter_char_test (PangoLayout *layout) PangoItem *item; PangoGlyphString *glyphs; - item = pango_layout_run_get_item (run); - glyphs = pango_layout_run_get_glyphs (run); + item = pango_run_get_item (run); + glyphs = pango_run_get_glyphs (run); /* Get needed data for the GlyphString */ pango_layout_iter_get_run_extents (iter, NULL, &run_extents); diff --git a/utils/viewer-pangocairo.c b/utils/viewer-pangocairo.c index 9ac54467..9c041879 100644 --- a/utils/viewer-pangocairo.c +++ b/utils/viewer-pangocairo.c @@ -367,7 +367,7 @@ render_callback (PangoLayout *layout, iter = pango_layout_get_iter (layout); do { - PangoLayoutRun *run; + PangoRun *run; PangoRectangle rect; run = pango_layout_iter_get_run (iter); @@ -444,7 +444,7 @@ render_callback (PangoLayout *layout, iter = pango_layout_get_iter (layout); do { - PangoLayoutRun *run; + PangoRun *run; PangoItem *item; PangoGlyphString *glyphs; PangoRectangle rect; @@ -454,8 +454,8 @@ render_callback (PangoLayout *layout, if (!run) continue; - item = pango_layout_run_get_item (run); - glyphs = pango_layout_run_get_glyphs (run); + item = pango_run_get_item (run); + glyphs = pango_run_get_glyphs (run); pango_layout_iter_get_run_extents (iter, NULL, &rect); @@ -513,7 +513,7 @@ render_callback (PangoLayout *layout, do { PangoRectangle rect; - PangoLayoutRun *run; + PangoRun *run; PangoItem *item; PangoGlyphString *glyphs; const char *text, *start, *p; @@ -526,8 +526,8 @@ render_callback (PangoLayout *layout, if (!run) continue; - item = pango_layout_run_get_item (run); - glyphs = pango_layout_run_get_glyphs (run); + item = pango_run_get_item (run); + glyphs = pango_run_get_glyphs (run); text = pango_layout_get_text (layout); start = text + item->offset; |