+static gboolean
+get_doc_point_from_location (EvView *view,
+ gdouble x,
+ gdouble y,
+ gint *page,
+ gint *x_new,
+ gint *y_new)
+{
+ gint x_offset = 0, y_offset = 0;
+
+ x += view->scroll_x;
+ y += view->scroll_y;
+ find_page_at_location (view, x, y, page, &x_offset, &y_offset);
+ if (*page == -1)
+ return FALSE;
+
+ return get_doc_point_from_offset (view, *page, x_offset, y_offset, x_new, y_new);
+}
+
+static void
+ev_view_get_area_from_mapping (EvView *view,
+ guint page,
+ GList *mapping_list,
+ gconstpointer data,
+ GdkRectangle *area)
+{
+ EvMapping *mapping;
+
+ mapping = ev_mapping_list_find (mapping_list, data);
+ doc_rect_to_view_rect (view, page, &mapping->area, area);
+ area->x -= view->scroll_x;
+ area->y -= view->scroll_y;
+}
+
+