gi-poppler-0.18.29: Poppler bindings
CopyrightWill Thompson and Iñaki García Etxebarria
LicenseLGPL-2.1
MaintainerIñaki García Etxebarria
Safe HaskellSafe-Inferred
LanguageHaskell2010

GI.Poppler.Structs.StructureElementIter

Description

No description available in the introspection data.

Synopsis

Exported types

newtype StructureElementIter Source #

Memory-managed wrapper type.

Constructors

StructureElementIter (ManagedPtr StructureElementIter) 

Instances

Instances details
Eq StructureElementIter Source # 
Instance details

Defined in GI.Poppler.Structs.StructureElementIter

GBoxed StructureElementIter Source # 
Instance details

Defined in GI.Poppler.Structs.StructureElementIter

ManagedPtrNewtype StructureElementIter Source # 
Instance details

Defined in GI.Poppler.Structs.StructureElementIter

TypedObject StructureElementIter Source # 
Instance details

Defined in GI.Poppler.Structs.StructureElementIter

Methods

glibType :: IO GType

HasParentTypes StructureElementIter Source # 
Instance details

Defined in GI.Poppler.Structs.StructureElementIter

IsGValue (Maybe StructureElementIter) Source #

Convert StructureElementIter to and from GValue. See toGValue and fromGValue.

Instance details

Defined in GI.Poppler.Structs.StructureElementIter

type ParentTypes StructureElementIter Source # 
Instance details

Defined in GI.Poppler.Structs.StructureElementIter

type ParentTypes StructureElementIter = '[] :: [Type]

Methods

Click to display all available methods, including inherited ones

Expand

Methods

copy, free, next.

Getters

getChild, getElement.

Setters

None.

copy

structureElementIterCopy Source #

Creates a new StructureElementIter as a copy of iter. The returned value must be freed with structureElementIterFree.

Since: 0.26

free

structureElementIterFree Source #

Arguments

:: (HasCallStack, MonadIO m) 
=> StructureElementIter

iter: a StructureElementIter

-> m () 

Frees iter.

Since: 0.26

getChild

structureElementIterGetChild Source #

Returns a new iterator to the children elements of the StructureElement associated with iter. The returned value must be freed with structureElementIterFree.

Since: 0.26

getElement

new

structureElementIterNew Source #

Arguments

:: (HasCallStack, MonadIO m, IsDocument a) 
=> a

popplerDocument: a Document.

-> m StructureElementIter

Returns: a new StructureElementIter, or Nothing if document doesn't have structure tree.

Returns the root StructureElementIter for document, or Nothing. The returned value must be freed with structureElementIterFree.

Documents may have an associated structure tree —mostly, Tagged-PDF compliant documents— which can be used to obtain information about the document structure and its contents. Each node in the tree contains a StructureElement.

Here is a simple example that walks the whole tree:

<informalexample><programlisting> static void walk_structure (PopplerStructureElementIter *iter) { do { /<!-- -->* Get the element and do something with it *<!-- -->/ PopplerStructureElementIter *child = poppler_structure_element_iter_get_child (iter); if (child) walk_structure (child); poppler_structure_element_iter_free (child); } while (poppler_structure_element_iter_next (iter)); } ... { iter = poppler_structure_element_iter_new (document); walk_structure (iter); poppler_structure_element_iter_free (iter); } </programlisting></informalexample>

Since: 0.26

next

structureElementIterNext Source #

Arguments

:: (HasCallStack, MonadIO m) 
=> StructureElementIter

iter: a StructureElementIter

-> m Bool

Returns: True, if iter was set to the next structure element

Sets iter to point to the next structure element at the current level of the tree, if valid. See structureElementIterNew for more information.

Since: 0.26