summaryrefslogtreecommitdiff
path: root/src/book-view.h
diff options
context:
space:
mode:
authorAlessio Treglia <quadrispro@ubuntu.com>2010-04-09 13:10:42 +0200
committerAlessio Treglia <quadrispro@ubuntu.com>2010-04-09 13:10:42 +0200
commitcf7d885d901b0abdccaad5cc3305a080744eaf5b (patch)
treebf56ba367a8a872dc562fcf8cce9af6aebae67af /src/book-view.h
Imported Upstream version 0.9.10upstream/0.9.10
Diffstat (limited to 'src/book-view.h')
-rw-r--r--src/book-view.h65
1 files changed, 65 insertions, 0 deletions
diff --git a/src/book-view.h b/src/book-view.h
new file mode 100644
index 0000000..acc3899
--- /dev/null
+++ b/src/book-view.h
@@ -0,0 +1,65 @@
+/*
+ * Copyright (C) 2009 Canonical Ltd.
+ * Author: Robert Ancell <robert.ancell@canonical.com>
+ *
+ * This program is free software: you can redistribute it and/or modify it under
+ * the terms of the GNU General Public License as published by the Free Software
+ * Foundation, either version 3 of the License, or (at your option) any later
+ * version. See http://www.gnu.org/copyleft/gpl.html the full text of the
+ * license.
+ */
+
+#ifndef _BOOK_VIEW_H_
+#define _BOOK_VIEW_H_
+
+#include <glib-object.h>
+#include <gtk/gtk.h>
+#include <cairo.h>
+#include "book.h"
+
+G_BEGIN_DECLS
+
+#define BOOK_VIEW_TYPE (book_view_get_type ())
+#define BOOK_VIEW(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), BOOK_VIEW_TYPE, BookView))
+
+
+typedef struct BookViewPrivate BookViewPrivate;
+
+typedef struct
+{
+ GObject parent_instance;
+ BookViewPrivate *priv;
+} BookView;
+
+typedef struct
+{
+ GObjectClass parent_class;
+
+ void (*page_selected) (BookView *view, Page *page);
+ void (*show_page) (BookView *view, Page *page);
+} BookViewClass;
+
+
+GType book_view_get_type (void);
+
+BookView *book_view_new (void);
+
+// FIXME: Book view should extend GtkVBox
+void book_view_set_widgets (BookView *view, GtkWidget *box, GtkWidget *area, GtkWidget *scroll, GtkWidget *page_menu);
+
+// FIXME: Should be part of book_view_new
+void book_view_set_book (BookView *view, Book *book);
+
+void book_view_redraw (BookView *view);
+
+Book *book_view_get_book (BookView *view);
+
+void book_view_select_page (BookView *view, Page *page);
+
+void book_view_select_next_page (BookView *view);
+
+void book_view_select_prev_page (BookView *view);
+
+Page *book_view_get_selected (BookView *view);
+
+#endif /* _BOOK_VIEW_H_ */