gi-poppler-0.18.26: 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.IndexIter

Description

No description available in the introspection data.

Synopsis

Exported types

newtype IndexIter Source #

Memory-managed wrapper type.

Methods

Click to display all available methods, including inherited ones

Expand

Methods

copy, free, isOpen, next.

Getters

getAction, getChild.

Setters

None.

copy

indexIterCopy Source #

Arguments

:: (HasCallStack, MonadIO m) 
=> IndexIter

iter: a IndexIter

-> m IndexIter

Returns: a new IndexIter

Creates a new IndexIter as a copy of iter. This must be freed with indexIterFree.

free

indexIterFree Source #

Arguments

:: (HasCallStack, MonadIO m) 
=> IndexIter

iter: a IndexIter

-> m () 

Frees iter.

getAction

indexIterGetAction Source #

Arguments

:: (HasCallStack, MonadIO m) 
=> IndexIter

iter: a IndexIter

-> m Action

Returns: a new Action

Returns the Action associated with iter. It must be freed with actionFree.

getChild

indexIterGetChild Source #

Arguments

:: (HasCallStack, MonadIO m) 
=> IndexIter

parent: a IndexIter

-> m IndexIter

Returns: a new IndexIter

Returns a newly created child of parent, or Nothing if the iter has no child. See indexIterNew for more information on this function.

isOpen

indexIterIsOpen Source #

Arguments

:: (HasCallStack, MonadIO m) 
=> IndexIter

iter: a IndexIter

-> m Bool

Returns: True, if the document wants iter to be expanded

Returns whether this node should be expanded by default to the user. The document can provide a hint as to how the document's index should be expanded initially.

new

indexIterNew Source #

Arguments

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

document: a Document

-> m IndexIter

Returns: a new IndexIter

Returns the root IndexIter for document, or Nothing. This must be freed with indexIterFree.

Certain documents have an index associated with them. This index can be used to help the user navigate the document, and is similar to a table of contents. Each node in the index will contain a Action that can be displayed to the user — typically a POPPLER_ACTION_GOTO_DEST or a POPPLER_ACTION_URI.

Here is a simple example of some code that walks the full index:

<informalexample><programlisting> static void walk_index (PopplerIndexIter *iter) { do { /<!-- -->* Get the action and do something with it *<!-- -->/ PopplerIndexIter *child = poppler_index_iter_get_child (iter); if (child) walk_index (child); poppler_index_iter_free (child); } while (poppler_index_iter_next (iter)); } ... { iter = poppler_index_iter_new (document); walk_index (iter); poppler_index_iter_free (iter); } </programlisting></informalexample>

next

indexIterNext Source #

Arguments

:: (HasCallStack, MonadIO m) 
=> IndexIter

iter: a IndexIter

-> m Bool

Returns: True, if iter was set to the next action

Sets iter to point to the next action at the current level, if valid. See indexIterNew for more information.