summaryrefslogtreecommitdiff
path: root/libdocument
diff options
context:
space:
mode:
Diffstat (limited to 'libdocument')
-rw-r--r--libdocument/ev-mapping-list.c17
-rw-r--r--libdocument/ev-mapping-list.h3
2 files changed, 20 insertions, 0 deletions
diff --git a/libdocument/ev-mapping-list.c b/libdocument/ev-mapping-list.c
index 44628b09..7bae11da 100644
--- a/libdocument/ev-mapping-list.c
+++ b/libdocument/ev-mapping-list.c
@@ -60,6 +60,15 @@ ev_mapping_list_find_custom (EvMappingList *mapping_list,
return NULL;
}
+EvMapping *
+ev_mapping_list_nth (EvMappingList *mapping_list,
+ guint n)
+{
+ g_return_val_if_fail (mapping_list != NULL, NULL);
+
+ return (EvMapping *)g_list_nth_data (mapping_list->list, n);
+}
+
gpointer
ev_mapping_list_get_data (EvMappingList *mapping_list,
gdouble x,
@@ -93,6 +102,14 @@ ev_mapping_list_get_page (EvMappingList *mapping_list)
return mapping_list->page;
}
+guint
+ev_mapping_list_length (EvMappingList *mapping_list)
+{
+ g_return_val_if_fail (mapping_list != NULL, 0);
+
+ return g_list_length (mapping_list->list);
+}
+
EvMappingList *
ev_mapping_list_new (guint page,
GList *list,
diff --git a/libdocument/ev-mapping-list.h b/libdocument/ev-mapping-list.h
index 27104136..2a713b16 100644
--- a/libdocument/ev-mapping-list.h
+++ b/libdocument/ev-mapping-list.h
@@ -47,6 +47,9 @@ EvMapping *ev_mapping_list_find_custom (EvMappingList *mapping_list,
gpointer ev_mapping_list_get_data (EvMappingList *mapping_list,
gdouble x,
gdouble y);
+EvMapping *ev_mapping_list_nth (EvMappingList *mapping_list,
+ guint n);
+guint ev_mapping_list_length (EvMappingList *mapping_list);
G_END_DECLS