Copyright | Will Thompson Iñaki García Etxebarria and Jonas Platte |
---|---|
License | LGPL-2.1 |
Maintainer | Iñaki García Etxebarria (inaki@blueleaf.cc) |
Safe Haskell | None |
Language | Haskell2010 |
No description available in the introspection data.
Synopsis
- newtype IndexIter = IndexIter (ManagedPtr IndexIter)
- noIndexIter :: Maybe IndexIter
- indexIterCopy :: (HasCallStack, MonadIO m) => IndexIter -> m IndexIter
- indexIterFree :: (HasCallStack, MonadIO m) => IndexIter -> m ()
- indexIterGetAction :: (HasCallStack, MonadIO m) => IndexIter -> m Action
- indexIterGetChild :: (HasCallStack, MonadIO m) => IndexIter -> m IndexIter
- indexIterIsOpen :: (HasCallStack, MonadIO m) => IndexIter -> m Bool
- indexIterNew :: (HasCallStack, MonadIO m, IsDocument a) => a -> m IndexIter
- indexIterNext :: (HasCallStack, MonadIO m) => IndexIter -> m Bool
Exported types
Memory-managed wrapper type.
Methods
copy
Creates a new IndexIter
as a copy of iter
. This must be freed with
indexIterFree
.
free
:: (HasCallStack, MonadIO m) | |
=> IndexIter |
|
-> m () |
Frees iter
.
getAction
Returns the Action
associated with iter
. It must be freed with
actionFree
.
getChild
Returns a newly created child of parent
, or Nothing
if the iter has no child.
See indexIterNew
for more information on this function.
isOpen
:: (HasCallStack, MonadIO m) | |
=> IndexIter |
|
-> m Bool | Returns: |
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
:: (HasCallStack, MonadIO m, IsDocument a) | |
=> a |
|
-> m IndexIter | Returns: a new |
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
:: (HasCallStack, MonadIO m) | |
=> IndexIter |
|
-> m Bool | Returns: |
Sets iter
to point to the next action at the current level, if valid. See
indexIterNew
for more information.