From 7227c29bbacbc796e9f549cf21e8bd978fde5114 Mon Sep 17 00:00:00 2001 From: Vincent Sanders Date: Mon, 13 Jan 2014 01:08:15 +0000 Subject: move window scroll getter and setter into operations table --- desktop/gui.h | 21 +++++++++++++++++++-- 1 file changed, 19 insertions(+), 2 deletions(-) (limited to 'desktop/gui.h') diff --git a/desktop/gui.h b/desktop/gui.h index 0b7bdcca6..bf922737b 100644 --- a/desktop/gui.h +++ b/desktop/gui.h @@ -94,6 +94,25 @@ struct gui_window_table { */ void (*update)(struct gui_window *g, const struct rect *rect); + /** + * Get the scroll position of a browser window. + * + * \param g gui_window + * \param sx receives x ordinate of point at top-left of window + * \param sy receives y ordinate of point at top-left of window + * \return true iff successful + */ + bool (*get_scroll)(struct gui_window *g, int *sx, int *sy); + + /** + * Set the scroll position of a browser window. + * + * \param g gui_window to scroll + * \param sx point to place at top-left of window + * \param sy point to place at top-left of window + */ + void (*set_scroll)(struct gui_window *g, int sx, int sy); + /* Optional entries */ @@ -179,8 +198,6 @@ struct gui_table { extern struct gui_table *guit; /* the gui vtable */ -bool gui_window_get_scroll(struct gui_window *g, int *sx, int *sy); -void gui_window_set_scroll(struct gui_window *g, int sx, int sy); void gui_window_get_dimensions(struct gui_window *g, int *width, int *height, bool scaled); void gui_window_update_extent(struct gui_window *g); -- cgit v1.2.3