#[repr(transparent)]pub struct IndexIter { /* private fields */ }
Implementations§
source§impl IndexIter
impl IndexIter
sourcepub fn as_ptr(&self) -> *mut PopplerIndexIter
pub fn as_ptr(&self) -> *mut PopplerIndexIter
Return the inner pointer to the underlying C value.
sourcepub unsafe fn from_glib_ptr_borrow<'a>(
ptr: *const *const PopplerIndexIter
) -> &'a Self
pub unsafe fn from_glib_ptr_borrow<'a>( ptr: *const *const PopplerIndexIter ) -> &'a Self
Borrows the underlying C value.
sourcepub unsafe fn from_glib_ptr_borrow_mut<'a>(
ptr: *mut *mut PopplerIndexIter
) -> &'a mut Self
pub unsafe fn from_glib_ptr_borrow_mut<'a>( ptr: *mut *mut PopplerIndexIter ) -> &'a mut Self
Borrows the underlying C value mutably.
source§impl IndexIter
impl IndexIter
sourcepub fn new(document: &Document) -> IndexIter
pub fn new(document: &Document) -> IndexIter
Returns the root IndexIter
for document
, or None
. This must be
freed with poppler_index_iter_free()
.
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 PopplerAction
that can be
displayed to the user — typically a ActionType::GotoDest
or a
ActionType::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>
document
a Document
Returns
a new IndexIter
Trait Implementations§
source§impl HasParamSpec for IndexIter
impl HasParamSpec for IndexIter
source§impl Ord for IndexIter
impl Ord for IndexIter
source§impl PartialEq<IndexIter> for IndexIter
impl PartialEq<IndexIter> for IndexIter
source§impl PartialOrd<IndexIter> for IndexIter
impl PartialOrd<IndexIter> for IndexIter
1.0.0 · source§fn le(&self, other: &Rhs) -> bool
fn le(&self, other: &Rhs) -> bool
self
and other
) and is used by the <=
operator. Read moresource§impl StaticType for IndexIter
impl StaticType for IndexIter
source§fn static_type() -> Type
fn static_type() -> Type
Self
.