summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: 9889950)
raw | patch | inline | side by side (parent: 9889950)
author | Sebastian Harl <sh@tokkee.org> | |
Fri, 23 Dec 2011 17:51:06 +0000 (18:51 +0100) | ||
committer | Sebastian Harl <sh@tokkee.org> | |
Fri, 23 Dec 2011 17:51:06 +0000 (18:51 +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 3ebbfab7ba965c74341d7867900eeaa3b5439d5a..d1a377ce4e44bd3d1204b259982f02ded02f533b 100644 (file)
--- a/src/gtk-tpdfv.c
+++ b/src/gtk-tpdfv.c
do_redraw(widget);
} /* gtk_tpdfv_last_page */
+void
+gtk_tpdfv_goto_page(GtkWidget *widget, int page)
+{
+ gtk_tpdfv_t *pdf;
+
+ pdf = GTK_TPDFV_GET_PRIVATE(widget);
+
+ if ((page < 0) || (page >= pdf->total_pages))
+ return;
+
+ pdf->current_page_no = page;
+ do_redraw(widget);
+} /* gtk_tpdfv_goto_page */
+
void
gtk_tpdfv_zoom_in(GtkWidget *widget)
{
diff --git a/src/gtk-tpdfv.h b/src/gtk-tpdfv.h
index e354bd39cd689e8eb4d298771fbfca1ec71c3731..1313c7aaab2884c8810ce2adada27371cc433424 100644 (file)
--- a/src/gtk-tpdfv.h
+++ b/src/gtk-tpdfv.h
/*
* gtk_tpdfv_page_up, gtk_tpdfv_page_down,
- * gtk_tpdfv_first_page, gtk_tpdfv_last_page:
+ * gtk_tpdfv_first_page, gtk_tpdfv_last_page,
+ * gtk_tpdfv_goto_page:
* Navigation.
*/
void
gtk_tpdfv_first_page(GtkWidget *widget);
void
gtk_tpdfv_last_page(GtkWidget *widget);
+void
+gtk_tpdfv_goto_page(GtkWidget *widget, int page);
/*
* gtk_tpdfv_zoom_in, gtk_tpdfv_zoom_out,