summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--ChangeLog11
-rw-r--r--docs/pango-sections.txt1
-rw-r--r--docs/tmpl/layout.sgml9
-rw-r--r--pango/pango-layout.c21
-rw-r--r--pango/pango-layout.h7
-rw-r--r--pango/pango.def1
6 files changed, 47 insertions, 3 deletions
diff --git a/ChangeLog b/ChangeLog
index 861c795e..567ca5b3 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,16 @@
2007-10-22 Behdad Esfahbod <behdad@gnome.org>
+ Bug 471571 – Add pango_layout_iter_get_layout()
+
+ * docs/pango-sections.txt:
+ * docs/tmpl/layout.sgml:
+ * pango/pango-layout.c (pango_layout_iter_get_layout):
+ * pango/pango-layout.h:
+ * pango/pango.def:
+ Add trivial yet missing pango_layout_iter_get_layout().
+
+2007-10-22 Behdad Esfahbod <behdad@gnome.org>
+
* docs/tmpl/layout.sgml: Remove obsolete comment. PangoLayoutRun
is not deprecated. It's just same type as PangoGlyphItem.
diff --git a/docs/pango-sections.txt b/docs/pango-sections.txt
index 6b969db4..13395ff5 100644
--- a/docs/pango-sections.txt
+++ b/docs/pango-sections.txt
@@ -503,6 +503,7 @@ pango_layout_iter_get_run
pango_layout_iter_get_run_readonly
pango_layout_iter_get_line
pango_layout_iter_get_line_readonly
+pango_layout_iter_get_layout
pango_layout_iter_get_char_extents
pango_layout_iter_get_cluster_extents
pango_layout_iter_get_run_extents
diff --git a/docs/tmpl/layout.sgml b/docs/tmpl/layout.sgml
index 4ff2f2de..6bb944fd 100644
--- a/docs/tmpl/layout.sgml
+++ b/docs/tmpl/layout.sgml
@@ -706,6 +706,15 @@ The #GObject type for #PangoAlignment.
@Returns:
+<!-- ##### FUNCTION pango_layout_iter_get_layout ##### -->
+<para>
+
+</para>
+
+@iter:
+@Returns:
+
+
<!-- ##### FUNCTION pango_layout_iter_get_char_extents ##### -->
<para>
diff --git a/pango/pango-layout.c b/pango/pango-layout.c
index a002b028..0c6c7717 100644
--- a/pango/pango-layout.c
+++ b/pango/pango-layout.c
@@ -5427,6 +5427,27 @@ pango_layout_iter_at_last_line (PangoLayoutIter *iter)
return iter->line_extents_link->next == NULL;
}
+/**
+ * pango_layout_iter_get_layout:
+ * @iter: a #PangoLayoutIter
+ *
+ * Gets the layout associated with a #PangoLayoutIter.
+ *
+ * Return value: the layout associated with @iter.
+ *
+ * Since: 1.20
+ **/
+PangoLayout*
+pango_layout_iter_get_layout (PangoLayoutIter *iter)
+{
+ /* check is redundant as it simply checks that iter->layout is not NULL */
+ if (ITER_IS_INVALID (iter))
+ return NULL;
+
+ return iter->layout;
+}
+
+
static gboolean
line_is_terminated (PangoLayoutIter *iter)
{
diff --git a/pango/pango-layout.h b/pango/pango-layout.h
index 6ff9a53c..4e582b45 100644
--- a/pango/pango-layout.h
+++ b/pango/pango-layout.h
@@ -245,12 +245,13 @@ GType pango_layout_iter_get_type (void) G_GNUC_CONST;
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);
+int pango_layout_iter_get_index (PangoLayoutIter *iter);
+PangoLayoutRun *pango_layout_iter_get_run (PangoLayoutIter *iter);
PangoLayoutRun *pango_layout_iter_get_run_readonly (PangoLayoutIter *iter);
-PangoLayoutLine *pango_layout_iter_get_line (PangoLayoutIter *iter);
+PangoLayoutLine *pango_layout_iter_get_line (PangoLayoutIter *iter);
PangoLayoutLine *pango_layout_iter_get_line_readonly (PangoLayoutIter *iter);
gboolean pango_layout_iter_at_last_line (PangoLayoutIter *iter);
+PangoLayout *pango_layout_iter_get_layout (PangoLayoutIter *iter);
gboolean pango_layout_iter_next_char (PangoLayoutIter *iter);
gboolean pango_layout_iter_next_cluster (PangoLayoutIter *iter);
diff --git a/pango/pango.def b/pango/pango.def
index 1d74ac84..5dc464dc 100644
--- a/pango/pango.def
+++ b/pango/pango.def
@@ -249,6 +249,7 @@ EXPORTS
pango_layout_iter_get_cluster_extents
pango_layout_iter_get_index
pango_layout_iter_get_layout_extents
+ pango_layout_iter_get_layout
pango_layout_iter_get_line
pango_layout_iter_get_line_extents
pango_layout_iter_get_line_readonly