From: Kristian Høgsberg Date: Thu, 12 Jan 2012 15:48:51 +0000 (-0500) Subject: view: Make view compile again X-Git-Tag: 0.85.0~73 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=ab5dacdac887e68fc6d3d691b58de040b9f0d39f;p=profile%2Fivi%2Fweston.git view: Make view compile again --- diff --git a/clients/view.c b/clients/view.c index c4c9efc..6736826 100644 --- a/clients/view.c +++ b/clients/view.c @@ -43,6 +43,7 @@ struct view { struct window *window; + struct widget *widget; struct display *display; PopplerDocument *document; @@ -51,8 +52,10 @@ struct view { }; static void -view_draw(struct view *view) +redraw_handler(struct widget *widget, void *data) { + struct view *view = data; + struct rectangle allocation; cairo_surface_t *surface; cairo_t *cr; @@ -64,8 +67,6 @@ view_draw(struct view *view) else window_set_transparent(view->window, 1); - window_draw(view->window); - widget_get_allocation(view->widget, &allocation); surface = window_get_surface(view->window); @@ -107,15 +108,6 @@ view_draw(struct view *view) cairo_destroy(cr); cairo_surface_destroy(surface); g_object_unref(G_OBJECT(page)); - window_flush(view->window); -} - -static void -redraw_handler(struct widget *widget, void *data) -{ - struct view *view = data; - - view_draw(view); } static void @@ -150,11 +142,10 @@ view_page_down(struct view *view) } static void -button_handler(struct window *window, struct input *input, uint32_t time, +button_handler(struct widget *widget, struct input *input, uint32_t time, int button, int state, void *data) { - struct window *window = data; -a struct view *view = window_get_user_data(window); + struct view *view = data; if(!state) return; @@ -260,7 +251,7 @@ view_create(struct display *display, view->fullscreen = fullscreen; window_set_fullscreen(view->window, view->fullscreen); - view_draw(view); + window_schedule_resize(view->window, 500, 400); return view; } diff --git a/configure.ac b/configure.ac index 6cebf9b..9af8590 100644 --- a/configure.ac +++ b/configure.ac @@ -106,7 +106,7 @@ if test x$enable_clients == xyes; then PKG_CHECK_MODULES(CLIENT, [wayland-client wayland-egl egl >= 7.10 gl cairo >= 1.10.0 gdk-pixbuf-2.0 glib-2.0 gobject-2.0 xkbcommon]) - PKG_CHECK_MODULES(POPPLER, [poppler-glib gdk-2.0 gio-2.0], + PKG_CHECK_MODULES(POPPLER, [poppler-glib], [have_poppler=yes], [have_poppler=no]) PKG_CHECK_MODULES(CAIRO_EGL, [cairo-egl >= 1.11.3], [have_cairo_egl=yes], [have_cairo_egl=no])