summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: 08ed957)
raw | patch | inline | side by side (parent: 08ed957)
author | Sebastian Harl <sh@tokkee.org> | |
Fri, 23 Dec 2011 17:48:33 +0000 (18:48 +0100) | ||
committer | Sebastian Harl <sh@tokkee.org> | |
Fri, 23 Dec 2011 17:48:33 +0000 (18:48 +0100) |
src/gtk-tpdfv.c | patch | blob | history | |
src/gtk-tpdfv.h | patch | blob | history |
diff --git a/src/gtk-tpdfv.c b/src/gtk-tpdfv.c
index 082872bece43aab0cb3416094383cc0f1d765af6..3ebbfab7ba965c74341d7867900eeaa3b5439d5a 100644 (file)
--- a/src/gtk-tpdfv.c
+++ b/src/gtk-tpdfv.c
do_redraw(widget);
} /* gtk_tpdfv_reload */
+int
+gtk_tpdfv_get_n_pages(GtkWidget *widget)
+{
+ gtk_tpdfv_t *pdf;
+
+ if (! widget)
+ return -1;
+
+ pdf = GTK_TPDFV_GET_PRIVATE(widget);
+ return pdf->total_pages;
+} /* gtk_tpdfv_get_n_pages */
+
+int
+gtk_tpdfv_get_current_page(GtkWidget *widget)
+{
+ gtk_tpdfv_t *pdf;
+
+ if (! widget)
+ return -1;
+
+ pdf = GTK_TPDFV_GET_PRIVATE(widget);
+ return pdf->current_page_no;
+} /* gtk_tpdfv_get_current_page */
+
void
gtk_tpdfv_page_up(GtkWidget *widget)
{
diff --git a/src/gtk-tpdfv.h b/src/gtk-tpdfv.h
index 9dd48f8183b6bff57f43353f13f99b0d91c983f6..e354bd39cd689e8eb4d298771fbfca1ec71c3731 100644 (file)
--- a/src/gtk-tpdfv.h
+++ b/src/gtk-tpdfv.h
void
gtk_tpdfv_reload(GtkWidget *widget);
+/*
+ * gtk_tpdfv_get_n_pages, gtk_tpdfv_get_current_page:
+ * Get the total number of pages or the current page number.
+ */
+int
+gtk_tpdfv_get_n_pages(GtkWidget *widget);
+int
+gtk_tpdfv_get_current_page(GtkWidget *widget);
+
/*
* gtk_tpdfv_page_up, gtk_tpdfv_page_down,
* gtk_tpdfv_first_page, gtk_tpdfv_last_page: