summaryrefslogtreecommitdiff
path: root/pango/pango-layout.h
diff options
context:
space:
mode:
authorHavoc Pennington <hp@redhat.com>2000-11-13 18:47:29 +0000
committerHavoc Pennington <hp@src.gnome.org>2000-11-13 18:47:29 +0000
commitf6511ca5a76f630f5a8802bb65d417db8ed31cfd (patch)
tree4bd9592fa7adf8a790703e429e2c8fdff59df456 /pango/pango-layout.h
parentd11951be51e06b6377ce0f1c546fde62281929a9 (diff)
downloadpango-f6511ca5a76f630f5a8802bb65d417db8ed31cfd.tar.gz
Add new PangoLayoutIter entry points
2000-11-13 Havoc Pennington <hp@redhat.com> * docs/pango-sections.txt: Add new PangoLayoutIter entry points * pango/glyphstring.c (pango_glyph_string_extents_range): New function * pango/pango-layout.c: Create PangoLayoutIter for iterating over a layout's visual elements * pango/pango-layout.c (pango_layout_check_lines): plug a memleak (attr iterator not freed) * pango/pango-tabs.c (pango_tab_array_free): plug a memleak (array->tabs not freed)
Diffstat (limited to 'pango/pango-layout.h')
-rw-r--r--pango/pango-layout.h37
1 files changed, 37 insertions, 0 deletions
diff --git a/pango/pango-layout.h b/pango/pango-layout.h
index 02475290..b19ea973 100644
--- a/pango/pango-layout.h
+++ b/pango/pango-layout.h
@@ -178,6 +178,43 @@ void pango_layout_line_get_pixel_extents (PangoLayoutLine *layout_line,
PangoRectangle *ink_rect,
PangoRectangle *logical_rect);
+typedef struct _PangoLayoutIter PangoLayoutIter;
+
+PangoLayoutIter *pango_layout_get_iter (PangoLayout *layout);
+void pango_layout_iter_free (PangoLayoutIter *iter);
+
+int pango_layout_iter_get_index (PangoLayoutIter *iter);
+PangoLayoutRun *pango_layout_iter_get_run (PangoLayoutIter *iter);
+PangoLayoutLine *pango_layout_iter_get_line (PangoLayoutIter *iter);
+gboolean pango_layout_iter_at_last_line (PangoLayoutIter *iter);
+
+gboolean pango_layout_iter_next_char (PangoLayoutIter *iter);
+gboolean pango_layout_iter_next_cluster (PangoLayoutIter *iter);
+gboolean pango_layout_iter_next_run (PangoLayoutIter *iter);
+gboolean pango_layout_iter_next_line (PangoLayoutIter *iter);
+
+void pango_layout_iter_get_char_extents (PangoLayoutIter *iter,
+ PangoRectangle *logical_rect);
+void pango_layout_iter_get_cluster_extents (PangoLayoutIter *iter,
+ PangoRectangle *ink_rect,
+ PangoRectangle *logical_rect);
+void pango_layout_iter_get_run_extents (PangoLayoutIter *iter,
+ PangoRectangle *ink_rect,
+ PangoRectangle *logical_rect);
+void pango_layout_iter_get_line_extents (PangoLayoutIter *iter,
+ PangoRectangle *ink_rect,
+ PangoRectangle *logical_rect);
+/* All the yranges meet, unlike the logical_rect's (i.e. the yranges
+ * assign between-line spacing to the nearest line)
+ */
+void pango_layout_iter_get_line_yrange (PangoLayoutIter *iter,
+ int *y0,
+ int *y1);
+void pango_layout_iter_get_layout_extents (PangoLayoutIter *iter,
+ PangoRectangle *ink_rect,
+ PangoRectangle *logical_rect);
+int pango_layout_iter_get_baseline (PangoLayoutIter *iter);
+
#ifdef __cplusplus
}
#endif /* __cplusplus */