From d0f90842d2a7c0a35eae34c54d174d68fc0f3dc0 Mon Sep 17 00:00:00 2001 From: Behdad Esfahbod Date: Wed, 6 Aug 2008 08:39:43 +0000 Subject: =?UTF-8?q?Bug=20377948=20=E2=80=93=20Make=20pango=5Fglyph=5Fitem?= =?UTF-8?q?=5Fiter=20public?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 2008-08-06 Behdad Esfahbod Bug 377948 – Make pango_glyph_item_iter public * pango/pango-glyph-item.c (pango_glyph_item_iter_copy), (pango_glyph_item_iter_free), (pango_glyph_item_iter_get_type), (pango_glyph_item_iter_next_cluster), (pango_glyph_item_iter_prev_cluster), (pango_glyph_item_iter_init_start), (pango_glyph_item_iter_init_end), (pango_glyph_item_apply_attrs), (pango_glyph_item_letter_space): * pango/pango-glyph-item.h: New public API, for iterating a PangoGlyphItem: PangoGlyphItemIter PANGO_TYPE_GLYPH_ITEM_ITER pango_glyph_item_iter_copy() pango_glyph_item_iter_free() pango_glyph_item_iter_init_start() pango_glyph_item_iter_init_end() pango_glyph_item_iter_next_cluster() pango_glyph_item_iter_prev_cluster() * pango/pango.def: * docs/tmpl/glyphs.sgml: * docs/pango-sections.txt: * pango/Makefile.am: * pango/ellipsize.c (line_iter_next_cluster), (line_iter_prev_cluster), (find_initial_span): * pango/pango-layout.c (justify_words): Update. * pango/pango-glyph-item-private.h: Remove. svn path=/trunk/; revision=2679 --- pango/pango-glyph-item.h | 32 ++++++++++++++++++++++++++++++++ 1 file changed, 32 insertions(+) (limited to 'pango/pango-glyph-item.h') diff --git a/pango/pango-glyph-item.h b/pango/pango-glyph-item.h index 4bad2651..48142523 100644 --- a/pango/pango-glyph-item.h +++ b/pango/pango-glyph-item.h @@ -54,6 +54,38 @@ void pango_glyph_item_letter_space (PangoGlyphItem *glyph_item, PangoLogAttr *log_attrs, int letter_spacing); + +typedef struct _PangoGlyphItemIter PangoGlyphItemIter; + +struct _PangoGlyphItemIter +{ + PangoGlyphItem *glyph_item; + const gchar *text; + + int start_glyph; + int start_index; + int start_char; + + int end_glyph; + int end_index; + int end_char; +}; + +#define PANGO_TYPE_GLYPH_ITEM_ITER (pango_glyph_item_iter_get_type ()) + +GType pango_glyph_item_iter_get_type (void) G_GNUC_CONST; +PangoGlyphItemIter *pango_glyph_item_iter_copy (PangoGlyphItemIter *orig); +void pango_glyph_item_iter_free (PangoGlyphItemIter *iter); + +gboolean pango_glyph_item_iter_init_start (PangoGlyphItemIter *iter, + PangoGlyphItem *glyph_item, + const char *text); +gboolean pango_glyph_item_iter_init_end (PangoGlyphItemIter *iter, + PangoGlyphItem *glyph_item, + const char *text); +gboolean pango_glyph_item_iter_next_cluster (PangoGlyphItemIter *iter); +gboolean pango_glyph_item_iter_prev_cluster (PangoGlyphItemIter *iter); + G_END_DECLS #endif /* __PANGO_GLYPH_ITEM_H__ */ -- cgit v1.2.1