Commit 21a65cbe authored by Moritz Lipp's avatar Moritz Lipp
Browse files

Rename PageViewWidget to PageWidget

parent 76323a4c
...@@ -14,7 +14,7 @@ ...@@ -14,7 +14,7 @@
#include "document.h" #include "document.h"
#include "utils.h" #include "utils.h"
#include "shortcuts.h" #include "shortcuts.h"
#include "page_view_widget.h" #include "page_widget.h"
gboolean gboolean
cb_destroy(GtkWidget* UNUSED(widget), gpointer UNUSED(data)) cb_destroy(GtkWidget* UNUSED(widget), gpointer UNUSED(data))
...@@ -45,7 +45,7 @@ void ...@@ -45,7 +45,7 @@ void
cb_view_vadjustment_value_changed(GtkAdjustment* GIRARA_UNUSED(adjustment), gpointer data) cb_view_vadjustment_value_changed(GtkAdjustment* GIRARA_UNUSED(adjustment), gpointer data)
{ {
zathura_t* zathura = data; zathura_t* zathura = data;
if (!zathura || !zathura->document || !zathura->document->pages || !zathura->ui.page_view) { if (!zathura || !zathura->document || !zathura->document->pages || !zathura->ui.page_widget) {
return; return;
} }
...@@ -108,7 +108,7 @@ cb_pages_per_row_value_changed(girara_session_t* UNUSED(session), const char* UN ...@@ -108,7 +108,7 @@ cb_pages_per_row_value_changed(girara_session_t* UNUSED(session), const char* UN
pages_per_row = 1; pages_per_row = 1;
} }
page_view_set_mode(zathura, pages_per_row); page_widget_set_mode(zathura, pages_per_row);
} }
void void
...@@ -179,7 +179,7 @@ cb_sc_follow(GtkEntry* entry, girara_session_t* session) ...@@ -179,7 +179,7 @@ cb_sc_follow(GtkEntry* entry, girara_session_t* session)
g_object_set(page->drawing_area, "draw-links", FALSE, NULL); g_object_set(page->drawing_area, "draw-links", FALSE, NULL);
zathura_link_t* link = zathura_page_view_link_get(ZATHURA_PAGE_VIEW(page->drawing_area), index); zathura_link_t* link = zathura_page_widget_link_get(ZATHURA_PAGE(page->drawing_area), index);
if (link != NULL) { if (link != NULL) {
switch (link->type) { switch (link->type) {
case ZATHURA_LINK_TO_PAGE: case ZATHURA_LINK_TO_PAGE:
......
...@@ -10,7 +10,7 @@ ...@@ -10,7 +10,7 @@
#include "print.h" #include "print.h"
#include "document.h" #include "document.h"
#include "utils.h" #include "utils.h"
#include "page_view_widget.h" #include "page_widget.h"
#include <girara/session.h> #include <girara/session.h>
......
...@@ -23,7 +23,7 @@ ...@@ -23,7 +23,7 @@
#include "zathura.h" #include "zathura.h"
#include "render.h" #include "render.h"
#include "database.h" #include "database.h"
#include "page_view_widget.h" #include "page_widget.h"
#include <girara/datastructures.h> #include <girara/datastructures.h>
#include <girara/utils.h> #include <girara/utils.h>
...@@ -433,7 +433,7 @@ zathura_page_get(zathura_document_t* document, unsigned int page_id) ...@@ -433,7 +433,7 @@ zathura_page_get(zathura_document_t* document, unsigned int page_id)
if (page != NULL) { if (page != NULL) {
page->number = page_id; page->number = page_id;
page->visible = false; page->visible = false;
page->drawing_area = zathura_page_view_new(page); page->drawing_area = zathura_page_widget_new(page);
page->document = document; page->document = document;
gtk_widget_set_size_request(page->drawing_area, page->width * document->scale, page->height * document->scale); gtk_widget_set_size_request(page->drawing_area, page->width * document->scale, page->height * document->scale);
......
/* See LICENSE file for license and copyright information */ /* See LICENSE file for license and copyright information */
#include "page_view_widget.h" #include "page_widget.h"
#include "render.h" #include "render.h"
#include "utils.h" #include "utils.h"
#include <girara/utils.h> #include <girara/utils.h>
#include <girara/settings.h> #include <girara/settings.h>
#include <girara/datastructures.h> #include <girara/datastructures.h>
G_DEFINE_TYPE(ZathuraPageView, zathura_page_view, GTK_TYPE_DRAWING_AREA) G_DEFINE_TYPE(ZathuraPage, zathura_page_widget, GTK_TYPE_DRAWING_AREA)
typedef struct zathura_page_view_private_s { typedef struct zathura_page_widget_private_s {
zathura_page_t* page; zathura_page_t* page;
zathura_t* zathura; zathura_t* zathura;
cairo_surface_t* surface; /** Cairo surface */ cairo_surface_t* surface; /** Cairo surface */
...@@ -20,18 +20,18 @@ typedef struct zathura_page_view_private_s { ...@@ -20,18 +20,18 @@ typedef struct zathura_page_view_private_s {
girara_list_t* search_results; /** True if search results should be drawn */ girara_list_t* search_results; /** True if search results should be drawn */
unsigned int link_offset; /**< Offset to the links */ unsigned int link_offset; /**< Offset to the links */
unsigned int number_of_links; /**< Offset to the links */ unsigned int number_of_links; /**< Offset to the links */
} zathura_page_view_private_t; } zathura_page_widget_private_t;
#define ZATHURA_PAGE_VIEW_GET_PRIVATE(obj) \ #define ZATHURA_PAGE_GET_PRIVATE(obj) \
(G_TYPE_INSTANCE_GET_PRIVATE ((obj), ZATHURA_TYPE_PAGE_VIEW, zathura_page_view_private_t)) (G_TYPE_INSTANCE_GET_PRIVATE ((obj), ZATHURA_TYPE_PAGE, zathura_page_widget_private_t))
static gboolean zathura_page_view_expose(GtkWidget* widget, GdkEventExpose* event); static gboolean zathura_page_widget_expose(GtkWidget* widget, GdkEventExpose* event);
static void zathura_page_view_finalize(GObject* object); static void zathura_page_widget_finalize(GObject* object);
static void zathura_page_view_set_property(GObject* object, guint prop_id, const GValue* value, GParamSpec* pspec); static void zathura_page_widget_set_property(GObject* object, guint prop_id, const GValue* value, GParamSpec* pspec);
static void zathura_page_view_get_property(GObject* object, guint prop_id, GValue* value, GParamSpec* pspec); static void zathura_page_widget_get_property(GObject* object, guint prop_id, GValue* value, GParamSpec* pspec);
static void zathura_page_view_size_allocate(GtkWidget* widget, GdkRectangle* allocation); static void zathura_page_widget_size_allocate(GtkWidget* widget, GdkRectangle* allocation);
static void redraw_rect(ZathuraPageView* widget, zathura_rectangle_t* rectangle); static void redraw_rect(ZathuraPage* widget, zathura_rectangle_t* rectangle);
static void redraw_all_rects(ZathuraPageView* widget, girara_list_t* rectangles); static void redraw_all_rects(ZathuraPage* widget, girara_list_t* rectangles);
enum properties_e enum properties_e
{ {
...@@ -44,20 +44,20 @@ enum properties_e ...@@ -44,20 +44,20 @@ enum properties_e
}; };
static void static void
zathura_page_view_class_init(ZathuraPageViewClass* class) zathura_page_widget_class_init(ZathuraPageClass* class)
{ {
/* add private members */ /* add private members */
g_type_class_add_private(class, sizeof(zathura_page_view_private_t)); g_type_class_add_private(class, sizeof(zathura_page_widget_private_t));
/* overwrite methods */ /* overwrite methods */
GtkWidgetClass* widget_class = GTK_WIDGET_CLASS(class); GtkWidgetClass* widget_class = GTK_WIDGET_CLASS(class);
widget_class->expose_event = zathura_page_view_expose; widget_class->expose_event = zathura_page_widget_expose;
widget_class->size_allocate = zathura_page_view_size_allocate; widget_class->size_allocate = zathura_page_widget_size_allocate;
GObjectClass* object_class = G_OBJECT_CLASS(class); GObjectClass* object_class = G_OBJECT_CLASS(class);
object_class->finalize = zathura_page_view_finalize; object_class->finalize = zathura_page_widget_finalize;
object_class->set_property = zathura_page_view_set_property; object_class->set_property = zathura_page_widget_set_property;
object_class->get_property = zathura_page_view_get_property; object_class->get_property = zathura_page_widget_get_property;
/* add properties */ /* add properties */
g_object_class_install_property(object_class, PROP_PAGE, g_object_class_install_property(object_class, PROP_PAGE,
...@@ -73,9 +73,9 @@ zathura_page_view_class_init(ZathuraPageViewClass* class) ...@@ -73,9 +73,9 @@ zathura_page_view_class_init(ZathuraPageViewClass* class)
} }
static void static void
zathura_page_view_init(ZathuraPageView* widget) zathura_page_widget_init(ZathuraPage* widget)
{ {
zathura_page_view_private_t* priv = ZATHURA_PAGE_VIEW_GET_PRIVATE(widget); zathura_page_widget_private_t* priv = ZATHURA_PAGE_GET_PRIVATE(widget);
priv->page = NULL; priv->page = NULL;
priv->surface = NULL; priv->surface = NULL;
priv->links = NULL; priv->links = NULL;
...@@ -91,32 +91,32 @@ zathura_page_view_init(ZathuraPageView* widget) ...@@ -91,32 +91,32 @@ zathura_page_view_init(ZathuraPageView* widget)
} }
GtkWidget* GtkWidget*
zathura_page_view_new(zathura_page_t* page) zathura_page_widget_new(zathura_page_t* page)
{ {
g_return_val_if_fail(page != NULL, NULL); g_return_val_if_fail(page != NULL, NULL);
return g_object_new(ZATHURA_TYPE_PAGE_VIEW, "page", page, NULL); return g_object_new(ZATHURA_TYPE_PAGE, "page", page, NULL);
} }
static void static void
zathura_page_view_finalize(GObject* object) zathura_page_widget_finalize(GObject* object)
{ {
ZathuraPageView* widget = ZATHURA_PAGE_VIEW(object); ZathuraPage* widget = ZATHURA_PAGE(object);
zathura_page_view_private_t* priv = ZATHURA_PAGE_VIEW_GET_PRIVATE(widget); zathura_page_widget_private_t* priv = ZATHURA_PAGE_GET_PRIVATE(widget);
if (priv->surface) { if (priv->surface) {
cairo_surface_destroy(priv->surface); cairo_surface_destroy(priv->surface);
} }
g_static_mutex_free(&(priv->lock)); g_static_mutex_free(&(priv->lock));
girara_list_free(priv->links); girara_list_free(priv->links);
G_OBJECT_CLASS(zathura_page_view_parent_class)->finalize(object); G_OBJECT_CLASS(zathura_page_widget_parent_class)->finalize(object);
} }
static void static void
zathura_page_view_set_property(GObject* object, guint prop_id, const GValue* value, GParamSpec* pspec) zathura_page_widget_set_property(GObject* object, guint prop_id, const GValue* value, GParamSpec* pspec)
{ {
ZathuraPageView* pageview = ZATHURA_PAGE_VIEW(object); ZathuraPage* pageview = ZATHURA_PAGE(object);
zathura_page_view_private_t* priv = ZATHURA_PAGE_VIEW_GET_PRIVATE(pageview); zathura_page_widget_private_t* priv = ZATHURA_PAGE_GET_PRIVATE(pageview);
switch (prop_id) { switch (prop_id) {
case PROP_PAGE: case PROP_PAGE:
...@@ -159,10 +159,10 @@ zathura_page_view_set_property(GObject* object, guint prop_id, const GValue* val ...@@ -159,10 +159,10 @@ zathura_page_view_set_property(GObject* object, guint prop_id, const GValue* val
} }
static void static void
zathura_page_view_get_property(GObject* object, guint prop_id, GValue* value, GParamSpec* pspec) zathura_page_widget_get_property(GObject* object, guint prop_id, GValue* value, GParamSpec* pspec)
{ {
ZathuraPageView* pageview = ZATHURA_PAGE_VIEW(object); ZathuraPage* pageview = ZATHURA_PAGE(object);
zathura_page_view_private_t* priv = ZATHURA_PAGE_VIEW_GET_PRIVATE(pageview); zathura_page_widget_private_t* priv = ZATHURA_PAGE_GET_PRIVATE(pageview);
switch (prop_id) { switch (prop_id) {
case PROP_LINKS_NUMBER: case PROP_LINKS_NUMBER:
...@@ -174,7 +174,7 @@ zathura_page_view_get_property(GObject* object, guint prop_id, GValue* value, GP ...@@ -174,7 +174,7 @@ zathura_page_view_get_property(GObject* object, guint prop_id, GValue* value, GP
} }
static gboolean static gboolean
zathura_page_view_expose(GtkWidget* widget, GdkEventExpose* event) zathura_page_widget_expose(GtkWidget* widget, GdkEventExpose* event)
{ {
cairo_t* cairo = gdk_cairo_create(widget->window); cairo_t* cairo = gdk_cairo_create(widget->window);
if (cairo == NULL) { if (cairo == NULL) {
...@@ -186,7 +186,7 @@ zathura_page_view_expose(GtkWidget* widget, GdkEventExpose* event) ...@@ -186,7 +186,7 @@ zathura_page_view_expose(GtkWidget* widget, GdkEventExpose* event)
cairo_rectangle(cairo, event->area.x, event->area.y, event->area.width, event->area.height); cairo_rectangle(cairo, event->area.x, event->area.y, event->area.width, event->area.height);
cairo_clip(cairo); cairo_clip(cairo);
zathura_page_view_private_t* priv = ZATHURA_PAGE_VIEW_GET_PRIVATE(widget); zathura_page_widget_private_t* priv = ZATHURA_PAGE_GET_PRIVATE(widget);
g_static_mutex_lock(&(priv->lock)); g_static_mutex_lock(&(priv->lock));
if (priv->surface != NULL) { if (priv->surface != NULL) {
cairo_save(cairo); cairo_save(cairo);
...@@ -299,16 +299,16 @@ zathura_page_view_expose(GtkWidget* widget, GdkEventExpose* event) ...@@ -299,16 +299,16 @@ zathura_page_view_expose(GtkWidget* widget, GdkEventExpose* event)
} }
static void static void
zathura_page_view_redraw_canvas(ZathuraPageView* pageview) zathura_page_widget_redraw_canvas(ZathuraPage* pageview)
{ {
GtkWidget* widget = GTK_WIDGET(pageview); GtkWidget* widget = GTK_WIDGET(pageview);
gtk_widget_queue_draw(widget); gtk_widget_queue_draw(widget);
} }
void void
zathura_page_view_update_surface(ZathuraPageView* widget, cairo_surface_t* surface) zathura_page_widget_update_surface(ZathuraPage* widget, cairo_surface_t* surface)
{ {
zathura_page_view_private_t* priv = ZATHURA_PAGE_VIEW_GET_PRIVATE(widget); zathura_page_widget_private_t* priv = ZATHURA_PAGE_GET_PRIVATE(widget);
g_static_mutex_lock(&(priv->lock)); g_static_mutex_lock(&(priv->lock));
if (priv->surface != NULL) { if (priv->surface != NULL) {
cairo_surface_destroy(priv->surface); cairo_surface_destroy(priv->surface);
...@@ -316,18 +316,18 @@ zathura_page_view_update_surface(ZathuraPageView* widget, cairo_surface_t* surfa ...@@ -316,18 +316,18 @@ zathura_page_view_update_surface(ZathuraPageView* widget, cairo_surface_t* surfa
priv->surface = surface; priv->surface = surface;
g_static_mutex_unlock(&(priv->lock)); g_static_mutex_unlock(&(priv->lock));
/* force a redraw here */ /* force a redraw here */
zathura_page_view_redraw_canvas(widget); zathura_page_widget_redraw_canvas(widget);
} }
static void static void
zathura_page_view_size_allocate(GtkWidget* widget, GdkRectangle* allocation) zathura_page_widget_size_allocate(GtkWidget* widget, GdkRectangle* allocation)
{ {
GTK_WIDGET_CLASS(zathura_page_view_parent_class)->size_allocate(widget, allocation); GTK_WIDGET_CLASS(zathura_page_widget_parent_class)->size_allocate(widget, allocation);
zathura_page_view_update_surface(ZATHURA_PAGE_VIEW(widget), NULL); zathura_page_widget_update_surface(ZATHURA_PAGE(widget), NULL);
} }
static void static void
redraw_rect(ZathuraPageView* widget, zathura_rectangle_t* rectangle) redraw_rect(ZathuraPage* widget, zathura_rectangle_t* rectangle)
{ {
/* cause the rect to be drawn */ /* cause the rect to be drawn */
GdkRectangle grect; GdkRectangle grect;
...@@ -339,9 +339,9 @@ redraw_rect(ZathuraPageView* widget, zathura_rectangle_t* rectangle) ...@@ -339,9 +339,9 @@ redraw_rect(ZathuraPageView* widget, zathura_rectangle_t* rectangle)
} }
static void static void
redraw_all_rects(ZathuraPageView* widget, girara_list_t* rectangles) redraw_all_rects(ZathuraPage* widget, girara_list_t* rectangles)
{ {
zathura_page_view_private_t* priv = ZATHURA_PAGE_VIEW_GET_PRIVATE(widget); zathura_page_widget_private_t* priv = ZATHURA_PAGE_GET_PRIVATE(widget);
GIRARA_LIST_FOREACH(rectangles, zathura_rectangle_t*, iter, rect) GIRARA_LIST_FOREACH(rectangles, zathura_rectangle_t*, iter, rect)
zathura_rectangle_t rectangle = recalc_rectangle(priv->page, *rect); zathura_rectangle_t rectangle = recalc_rectangle(priv->page, *rect);
...@@ -350,10 +350,10 @@ redraw_all_rects(ZathuraPageView* widget, girara_list_t* rectangles) ...@@ -350,10 +350,10 @@ redraw_all_rects(ZathuraPageView* widget, girara_list_t* rectangles)
} }
zathura_link_t* zathura_link_t*
zathura_page_view_link_get(ZathuraPageView* widget, unsigned int index) zathura_page_widget_link_get(ZathuraPage* widget, unsigned int index)
{ {
g_return_val_if_fail(widget != NULL, NULL); g_return_val_if_fail(widget != NULL, NULL);
zathura_page_view_private_t* priv = ZATHURA_PAGE_VIEW_GET_PRIVATE(widget); zathura_page_widget_private_t* priv = ZATHURA_PAGE_GET_PRIVATE(widget);
g_return_val_if_fail(priv != NULL, NULL); g_return_val_if_fail(priv != NULL, NULL);
if (priv->links != NULL && index >= priv->link_offset && if (priv->links != NULL && index >= priv->link_offset &&
......
/* See LICENSE file for license and copyright information */ /* See LICENSE file for license and copyright information */
#ifndef PAGE_VIEW_WIDGET_H #ifndef PAGE_WIDGET_H
#define PAGE_VIEW_WIDGET_H #define PAGE_WIDGET_H
#include <gtk/gtk.h> #include <gtk/gtk.h>
#include "document.h" #include "document.h"
...@@ -14,60 +14,60 @@ ...@@ -14,60 +14,60 @@
* Before the properties contain the correct values, 'draw-links' has to be set * Before the properties contain the correct values, 'draw-links' has to be set
* to TRUE at least one time. * to TRUE at least one time.
* */ * */
typedef struct zathura_page_view_s ZathuraPageView; typedef struct zathura_page_widget_s ZathuraPage;
typedef struct zathura_page_view_class_s ZathuraPageViewClass; typedef struct zathura_page_widget_class_s ZathuraPageClass;
struct zathura_page_view_s { struct zathura_page_widget_s {
GtkDrawingArea parent; GtkDrawingArea parent;
}; };
struct zathura_page_view_class_s { struct zathura_page_widget_class_s {
GtkDrawingAreaClass parent_class; GtkDrawingAreaClass parent_class;
}; };
#define ZATHURA_TYPE_PAGE_VIEW \ #define ZATHURA_TYPE_PAGE \
(zathura_page_view_get_type ()) (zathura_page_widget_get_type ())
#define ZATHURA_PAGE_VIEW(obj) \ #define ZATHURA_PAGE(obj) \
(G_TYPE_CHECK_INSTANCE_CAST ((obj), ZATHURA_TYPE_PAGE_VIEW, ZathuraPageView)) (G_TYPE_CHECK_INSTANCE_CAST ((obj), ZATHURA_TYPE_PAGE, ZathuraPage))
#define ZATHURA_PAGE_VIEW_CLASS(obj) \ #define ZATHURA_PAGE_CLASS(obj) \
(G_TYPE_CHECK_CLASS_CAST ((obj), ZATHURA_PAGE_VIEW, ZathuraPageViewClass)) (G_TYPE_CHECK_CLASS_CAST ((obj), ZATHURA_PAGE, ZathuraPageClass))
#define ZATHURA_IS_PAGE_VIEW(obj) \ #define ZATHURA_IS_PAGE(obj) \
(G_TYPE_CHECK_INSTANCE_TYPE ((obj), ZATHURA_PAGE_VIEW)) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), ZATHURA_PAGE))
#define ZATHURA_IS_PAGE_VIEW_WDIGET_CLASS(obj) \ #define ZATHURA_IS_PAGE_WDIGET_CLASS(obj) \
(G_TYPE_CHECK_CLASS_TYPE ((obj), ZATHURA_TYPE_PAGE_VIEW)) (G_TYPE_CHECK_CLASS_TYPE ((obj), ZATHURA_TYPE_PAGE))
#define ZATHURA_PAGE_VIEW_GET_CLASS \ #define ZATHURA_PAGE_GET_CLASS \
(G_TYPE_INSTANCE_GET_CLASS ((obj), ZATHURA_TYPE_PAGE_VIEW, ZathuraPageViewclass)) (G_TYPE_INSTANCE_GET_CLASS ((obj), ZATHURA_TYPE_PAGE, ZathuraPageclass))
/** /**
* Returns the type of the page view widget. * Returns the type of the page view widget.
* @return the type * @return the type
*/ */
GType zathura_page_view_get_type(void); GType zathura_page_widget_get_type(void);
/** /**
* Create a page view widget. * Create a page view widget.
* @param page the page to be displayed * @param page the page to be displayed
* @return a page view widget * @return a page view widget
*/ */
GtkWidget* zathura_page_view_new(zathura_page_t* page); GtkWidget* zathura_page_widget_new(zathura_page_t* page);
/** /**
* Update the widget's surface. This should only be called from the render * Update the widget's surface. This should only be called from the render
* thread. * thread.
* @param widget the widget * @param widget the widget
* @param surface the new surface * @param surface the new surface
*/ */
void zathura_page_view_update_surface(ZathuraPageView* widget, cairo_surface_t* surface); void zathura_page_widget_update_surface(ZathuraPage* widget, cairo_surface_t* surface);
/** /**
* Draw a rectangle to mark links or search results * Draw a rectangle to mark links or search results
* @param widget the widget * @param widget the widget
* @param rectangle the rectangle * @param rectangle the rectangle
* @param linkid the link id if it's a link, -1 otherwise * @param linkid the link id if it's a link, -1 otherwise
*/ */
void zathura_page_view_draw_rectangle(ZathuraPageView* widget, zathura_rectangle_t* rectangle, int linkid); void zathura_page_widget_draw_rectangle(ZathuraPage* widget, zathura_rectangle_t* rectangle, int linkid);
/** /**
* Clear all rectangles. * Clear all rectangles.
* @param widget the widget * @param widget the widget
*/ */
void zathura_page_view_clear_rectangles(ZathuraPageView* widget); void zathura_page_widget_clear_rectangles(ZathuraPage* widget);
/** /**
* Returns the zathura link object at the given index * Returns the zathura link object at the given index
...@@ -76,6 +76,6 @@ void zathura_page_view_clear_rectangles(ZathuraPageView* widget); ...@@ -76,6 +76,6 @@ void zathura_page_view_clear_rectangles(ZathuraPageView* widget);
* @param index Index of the link * @param index Index of the link
* @return Link object or NULL if an error occured * @return Link object or NULL if an error occured
*/ */
zathura_link_t* zathura_page_view_link_get(ZathuraPageView* widget, unsigned int index); zathura_link_t* zathura_page_widget_link_get(ZathuraPage* widget, unsigned int index);
#endif #endif
...@@ -9,7 +9,7 @@ ...@@ -9,7 +9,7 @@
#include "render.h" #include "render.h"
#include "zathura.h" #include "zathura.h"
#include "document.h" #include "document.h"
#include "page_view_widget.h" #include "page_widget.h"
void* render_job(void* data); void* render_job(void* data);
bool render(zathura_t* zathura, zathura_page_t* page); bool render(zathura_t* zathura, zathura_page_t* page);
...@@ -241,7 +241,7 @@ render(zathura_t* zathura, zathura_page_t* page) ...@@ -241,7 +241,7 @@ render(zathura_t* zathura, zathura_page_t* page)
} }
/* update the widget */ /* update the widget */
zathura_page_view_update_surface(ZATHURA_PAGE_VIEW(page->drawing_area), surface); zathura_page_widget_update_surface(ZATHURA_PAGE(page->drawing_area), surface);
gdk_threads_leave(); gdk_threads_leave();
......
...@@ -13,7 +13,7 @@ ...@@ -13,7 +13,7 @@
#include "zathura.h" #include "zathura.h"
#include "render.h" #include "render.h"
#include "utils.h" #include "utils.h"
#include "page_view_widget.h" #include "page_widget.h"
bool bool
sc_abort(girara_session_t* session, girara_argument_t* UNUSED(argument), sc_abort(girara_session_t* session, girara_argument_t* UNUSED(argument),
...@@ -51,7 +51,7 @@ sc_adjust_window(girara_session_t* session, girara_argument_t* argument, ...@@ -51,7 +51,7 @@ sc_adjust_window(girara_session_t* session, girara_argument_t* argument,
unsigned int pages_per_row = 1; unsigned int pages_per_row = 1;
girara_setting_get(session, "pages-per-row", &pages_per_row); girara_setting_get(session, "pages-per-row", &pages_per_row);
if (zathura->ui.page_view == NULL || zathura->document == NULL) { if (zathura->ui.page_widget == NULL || zathura->document == NULL) {
goto error_ret; goto error_ret;
} }
...@@ -530,7 +530,7 @@ sc_toggle_index(girara_session_t* session, girara_argument_t* UNUSED(argument), ...@@ -530,7 +530,7 @@ sc_toggle_index(girara_session_t* session, girara_argument_t* UNUSED(argument),
} }
if (gtk_widget_get_visible(GTK_WIDGET(zathura->ui.index))) { if (gtk_widget_get_visible(GTK_WIDGET(zathura->ui.index))) {
girara_set_view(session, zathura->ui.page_view_alignment); girara_set_view(session, zathura->ui.page_widget_alignment);
gtk_widget_hide(GTK_WIDGET(zathura->ui.index)); gtk_widget_hide(GTK_WIDGET(zathura->ui.index));
girara_mode_set(zathura->ui.session, zathura->modes.normal); girara_mode_set(zathura->ui.session, zathura->modes.normal);
} else { } else {
......
...@@ -186,7 +186,7 @@ page_calculate_offset(zathura_page_t* page, page_offset_t* offset) ...@@ -186,7 +186,7 @@ page_calculate_offset(zathura_page_t* page, page_offset_t* offset)
zathura_t* zathura = document->zathura; zathura_t* zathura = document->zathura;
g_return_if_fail(gtk_widget_translate_coordinates(page->drawing_area, g_return_if_fail(gtk_widget_translate_coordinates(page->drawing_area,
zathura->ui.page_view, 0, 0, &(offset->x), &(offset->y)) == true); zathura->ui.page_widget, 0, 0, &(offset->x), &(offset->y)) == true);
} }