[evince] Make ensure_rectangle_is_visible() a private function.
- From: Germán Poo-Caamaño <gpoo src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [evince] Make ensure_rectangle_is_visible() a private function.
- Date: Sat, 23 Nov 2019 19:38:51 +0000 (UTC)
commit 504647eba0315fe36348fb0f975d0d577f26f000
Author: Martin Pieuchot <mpi grenadille net>
Date: Mon Oct 7 11:03:14 2019 +0200
Make ensure_rectangle_is_visible() a private function.
It is required by new a11y scrollSubStringTo* methods.
libview/ev-view-private.h | 3 +++
libview/ev-view.c | 14 ++++++--------
2 files changed, 9 insertions(+), 8 deletions(-)
---
diff --git a/libview/ev-view-private.h b/libview/ev-view-private.h
index ba56c0cc..02562ddd 100644
--- a/libview/ev-view-private.h
+++ b/libview/ev-view-private.h
@@ -334,5 +334,8 @@ void _ev_view_set_focused_element (EvView *view,
void _ev_view_focus_form_field (EvView *view,
EvFormField *field);
+void _ev_view_ensure_rectangle_is_visible (EvView *view,
+ GdkRectangle *rect);
+
#endif /* __EV_VIEW_PRIVATE_H__ */
diff --git a/libview/ev-view.c b/libview/ev-view.c
index cf75b061..e085df0c 100644
--- a/libview/ev-view.c
+++ b/libview/ev-view.c
@@ -120,8 +120,6 @@ typedef struct {
/*** Scrolling ***/
static void view_update_range_and_current_page (EvView *view);
-static void ensure_rectangle_is_visible (EvView *view,
- GdkRectangle *rect);
/*** Geometry computations ***/
static void compute_border (EvView *view,
@@ -1130,8 +1128,8 @@ ev_view_scroll_internal (EvView *view,
#define MARGIN 5
-static void
-ensure_rectangle_is_visible (EvView *view, GdkRectangle *rect)
+void
+_ev_view_ensure_rectangle_is_visible (EvView *view, GdkRectangle *rect)
{
GtkWidget *widget = GTK_WIDGET (view);
GtkAdjustment *adjustment;
@@ -2275,7 +2273,7 @@ _ev_view_set_focused_element (EvView *view,
ev_document_model_set_page (view->model, page);
view_rect.x += view->scroll_x;
view_rect.y += view->scroll_y;
- ensure_rectangle_is_visible (view, &view_rect);
+ _ev_view_ensure_rectangle_is_visible (view, &view_rect);
}
if (region) {
@@ -6605,7 +6603,7 @@ ev_view_move_cursor (EvView *view,
rect.y += view->scroll_y;
ev_document_model_set_page (view->model, view->cursor_page);
- ensure_rectangle_is_visible (view, &rect);
+ _ev_view_ensure_rectangle_is_visible (view, &rect);
g_signal_emit (view, signals[SIGNAL_CURSOR_MOVED], 0, view->cursor_page, view->cursor_offset);
@@ -9039,7 +9037,7 @@ jump_to_find_result (EvView *view)
rect = ev_view_find_get_result (view, page, view->find_result);
_ev_view_transform_doc_rect_to_view_rect (view, page, rect, &view_rect);
- ensure_rectangle_is_visible (view, &view_rect);
+ _ev_view_ensure_rectangle_is_visible (view, &view_rect);
if (view->caret_enabled && view->rotation == 0)
position_caret_cursor_at_doc_point (view, page, rect->x1, rect->y1);
@@ -9273,7 +9271,7 @@ ev_view_highlight_forward_search (EvView *view,
ev_document_model_set_page (view->model, page);
_ev_view_transform_doc_rect_to_view_rect (view, page, &mapping->area, &view_rect);
- ensure_rectangle_is_visible (view, &view_rect);
+ _ev_view_ensure_rectangle_is_visible (view, &view_rect);
gtk_widget_queue_draw (GTK_WIDGET (view));
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]