[poppler] glib/poppler-structure-element.cc glib/poppler-structure-element.h glib/reference

Carlos Garcia Campos carlosgc at kemper.freedesktop.org
Sat Feb 22 00:28:15 PST 2014


 glib/poppler-structure-element.cc   |   20 ++++++++++++++++++++
 glib/poppler-structure-element.h    |    1 +
 glib/reference/poppler-sections.txt |    1 +
 3 files changed, 22 insertions(+)

New commits:
commit c549b5e9ce2dcc8beb2511ee315bfff2fdfdf6e8
Author: Adrian Perez de Castro <aperez at igalia.com>
Date:   Sun Feb 9 18:31:22 2014 +0200

    glib: Add poppler_structure_element_is_grouping()
    
    Implement a method to check whether a structure element is a grouping
    element, wrapping the StructElement::isGrouping() method.
    
    https://bugs.freedesktop.org/show_bug.cgi?id=74753

diff --git a/glib/poppler-structure-element.cc b/glib/poppler-structure-element.cc
index a44791a..ba81b3c 100644
--- a/glib/poppler-structure-element.cc
+++ b/glib/poppler-structure-element.cc
@@ -303,6 +303,26 @@ poppler_structure_element_is_block (PopplerStructureElement *poppler_structure_e
 }
 
 /**
+ * poppler_structure_element_is_grouping:
+ * @poppler_structure_element: A #PopplerStructureElement
+ *
+ * Checks whether an element is a grouping element.
+ *
+ * Return value: %TRUE if the element is a grouping element, %FALSE
+ *    otherwise.
+ *
+ * Since: 0.26
+ */
+gboolean
+poppler_structure_element_is_grouping (PopplerStructureElement *poppler_structure_element)
+{
+    g_return_val_if_fail (POPPLER_IS_STRUCTURE_ELEMENT (poppler_structure_element), FALSE);
+    g_return_val_if_fail (poppler_structure_element->elem != NULL, FALSE);
+
+    return poppler_structure_element->elem->isGrouping ();
+}
+
+/**
  * poppler_structure_element_get_id:
  * @poppler_structure_element: A #PopplerStructureElement
  *
diff --git a/glib/poppler-structure-element.h b/glib/poppler-structure-element.h
index e6412f5..9279167 100644
--- a/glib/poppler-structure-element.h
+++ b/glib/poppler-structure-element.h
@@ -93,6 +93,7 @@ gint                         poppler_structure_element_get_page
 gboolean                     poppler_structure_element_is_content                 (PopplerStructureElement  *poppler_structure_element);
 gboolean                     poppler_structure_element_is_inline                  (PopplerStructureElement  *poppler_structure_element);
 gboolean                     poppler_structure_element_is_block                   (PopplerStructureElement  *poppler_structure_element);
+gboolean                     poppler_structure_element_is_grouping                (PopplerStructureElement  *poppler_structure_element);
 gchar                       *poppler_structure_element_get_id                     (PopplerStructureElement  *poppler_structure_element);
 gchar                       *poppler_structure_element_get_title                  (PopplerStructureElement  *poppler_structure_element);
 gchar                       *poppler_structure_element_get_abbreviation           (PopplerStructureElement  *poppler_structure_element);
diff --git a/glib/reference/poppler-sections.txt b/glib/reference/poppler-sections.txt
index 719b708..f17633a 100644
--- a/glib/reference/poppler-sections.txt
+++ b/glib/reference/poppler-sections.txt
@@ -602,6 +602,7 @@ poppler_structure_element_get_page
 poppler_structure_element_is_content
 poppler_structure_element_is_inline
 poppler_structure_element_is_block
+poppler_structure_element_is_grouping
 poppler_structure_element_get_id
 poppler_structure_element_get_title
 poppler_structure_element_get_abbreviation


More information about the poppler mailing list