From 0b0ddda32b910686118f8d7669364bc6d172e37a Mon Sep 17 00:00:00 2001 From: Behdad Esfahbod Date: Tue, 16 Jan 2007 09:57:30 +0000 Subject: [PATCH] Use pango_layout(_iter)?_get_line_readonly() instead of 2007-01-16 Behdad Esfahbod * examples/cairotwisted.c (draw_text): * pango/pangocairo-win32font.c (max_glyph_width): * pango/pangofc-font.c (max_glyph_width): * pango/pangowin32.c (max_glyph_width), (pango_win32_render_layout): * pango/pangox.c (pango_x_render_layout): Use pango_layout(_iter)?_get_line_readonly() instead of pango_layout(_iter)?_get_line(). svn path=/trunk/; revision=2146 --- ChangeLog | 11 +++++++++++ examples/cairotwisted.c | 5 ++++- pango/pangocairo-win32font.c | 2 +- pango/pangofc-font.c | 2 +- pango/pangowin32.c | 4 ++-- pango/pangox.c | 2 +- 6 files changed, 20 insertions(+), 6 deletions(-) diff --git a/ChangeLog b/ChangeLog index 180abbb..80d4aaa 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,5 +1,16 @@ 2007-01-16 Behdad Esfahbod + * examples/cairotwisted.c (draw_text): + * pango/pangocairo-win32font.c (max_glyph_width): + * pango/pangofc-font.c (max_glyph_width): + * pango/pangowin32.c (max_glyph_width), + (pango_win32_render_layout): + * pango/pangox.c (pango_x_render_layout): + Use pango_layout(_iter)?_get_line_readonly() instead of + pango_layout(_iter)?_get_line(). + +2007-01-16 Behdad Esfahbod + * pango/pango-attributes.h: * pango/pango-attributes.c: New attribute types PANGO_ATTR_GRAVITY and PANGO_ATTR_GRAVITY_HINT. diff --git a/examples/cairotwisted.c b/examples/cairotwisted.c index e2293b5..6903cf9 100644 --- a/examples/cairotwisted.c +++ b/examples/cairotwisted.c @@ -330,7 +330,10 @@ draw_text (cairo_t *cr) pango_layout_set_text (layout, "It was a dream... Oh Just a dream...", -1); - line = pango_layout_get_line (layout, 0); + /* Use pango_layout_get_line() instead of pango_layout_get_line_readonly() + * for older versions of pango + */ + line = pango_layout_get_line_readonly (layout, 0); pango_cairo_layout_line_path (cr, line); diff --git a/pango/pangocairo-win32font.c b/pango/pangocairo-win32font.c index ddfe034..6aa114d 100644 --- a/pango/pangocairo-win32font.c +++ b/pango/pangocairo-win32font.c @@ -283,7 +283,7 @@ max_glyph_width (PangoLayout *layout) int max_width = 0; GSList *l, *r; - for (l = pango_layout_get_lines (layout); l; l = l->next) + for (l = pango_layout_get_lines_readonly (layout); l; l = l->next) { PangoLayoutLine *line = l->data; diff --git a/pango/pangofc-font.c b/pango/pangofc-font.c index 5be287e..6c6dcb0 100644 --- a/pango/pangofc-font.c +++ b/pango/pangofc-font.c @@ -414,7 +414,7 @@ max_glyph_width (PangoLayout *layout) int max_width = 0; GSList *l, *r; - for (l = pango_layout_get_lines (layout); l; l = l->next) + for (l = pango_layout_get_lines_readonly (layout); l; l = l->next) { PangoLayoutLine *line = l->data; diff --git a/pango/pangowin32.c b/pango/pangowin32.c index 2fc734b..22eabb7 100644 --- a/pango/pangowin32.c +++ b/pango/pangowin32.c @@ -533,7 +533,7 @@ max_glyph_width (PangoLayout *layout) int max_width = 0; GSList *l, *r; - for (l = pango_layout_get_lines (layout); l; l = l->next) + for (l = pango_layout_get_lines_readonly (layout); l; l = l->next) { PangoLayoutLine *line = l->data; @@ -1052,7 +1052,7 @@ pango_win32_render_layout (HDC hdc, PangoLayoutLine *line; int baseline; - line = pango_layout_iter_get_line (iter); + line = pango_layout_iter_get_line_readonly (iter); pango_layout_iter_get_line_extents (iter, NULL, &logical_rect); baseline = pango_layout_iter_get_baseline (iter); diff --git a/pango/pangox.c b/pango/pangox.c index aa8b591..cdab10b 100644 --- a/pango/pangox.c +++ b/pango/pangox.c @@ -1614,7 +1614,7 @@ pango_x_render_layout (Display *display, PangoLayoutLine *line; int baseline; - line = pango_layout_iter_get_line (iter); + line = pango_layout_iter_get_line_readonly (iter); pango_layout_iter_get_line_extents (iter, NULL, &logical_rect); baseline = pango_layout_iter_get_baseline (iter); -- 2.7.4