From 1cd30fdb3c1f163beceb0bde7485c10a886de531 Mon Sep 17 00:00:00 2001 From: Chris Young Date: Wed, 8 May 2019 00:59:04 +0100 Subject: Move ami_(re)set_pointer (back?) into gui.c as they need to set/read the gui_window_2 structure --- frontends/amiga/gui.c | 19 ++++++++++++++++--- frontends/amiga/gui.h | 3 ++- frontends/amiga/theme.c | 13 ------------- frontends/amiga/theme.h | 2 -- 4 files changed, 18 insertions(+), 19 deletions(-) diff --git a/frontends/amiga/gui.c b/frontends/amiga/gui.c index 2132a2408..64e152478 100644 --- a/frontends/amiga/gui.c +++ b/frontends/amiga/gui.c @@ -452,9 +452,6 @@ struct form_control *ami_gui_get_control(struct gui_window *gw) return gw->control; } -/** - * Set control (for select menu) to gui_window - */ void ami_gui_set_control(struct gui_window *gw, struct form_control *control) { assert(gw != NULL); @@ -462,6 +459,22 @@ void ami_gui_set_control(struct gui_window *gw, struct form_control *control) } +/** undocumented, or internal, or documented elsewhere **/ + +void ami_set_pointer(struct gui_window_2 *gwin, gui_pointer_shape shape, bool update) +{ + if(gwin->mouse_pointer == shape) return; + ami_update_pointer(ami_gui2_get_window(gwin), shape); + if(update == true) gwin->mouse_pointer = shape; +} + +/* reset the mouse pointer back to what NetSurf last set it as */ +void ami_reset_pointer(struct gui_window_2 *gwin) +{ + ami_update_pointer(ami_gui2_get_window(gwin), gwin->mouse_pointer); +} + + STRPTR ami_locale_langs(int *codeset) { struct Locale *locale; diff --git a/frontends/amiga/gui.h b/frontends/amiga/gui.h index bc1dc3903..3b9298a38 100644 --- a/frontends/amiga/gui.h +++ b/frontends/amiga/gui.h @@ -186,7 +186,8 @@ void ami_gui_update_hotlist_button(struct gui_window_2 *gwin); nserror ami_gui_new_blank_tab(struct gui_window_2 *gwin); int ami_gui_count_windows(int window, int *tabs); void ami_gui_set_scale(struct gui_window *gw, float scale); - +void ami_set_pointer(struct gui_window_2 *gwin, gui_pointer_shape shape, bool update); +void ami_reset_pointer(struct gui_window_2 *gwin); /** * Close a window and all tabs attached to it. diff --git a/frontends/amiga/theme.c b/frontends/amiga/theme.c index 900f465a1..275e19fc8 100644 --- a/frontends/amiga/theme.c +++ b/frontends/amiga/theme.c @@ -218,19 +218,6 @@ void gui_window_set_pointer(struct gui_window *g, gui_pointer_shape shape) ami_set_pointer(ami_gui_get_gui_window_2(g), shape, true); } -void ami_set_pointer(struct gui_window_2 *gwin, gui_pointer_shape shape, bool update) -{ - if(gwin->mouse_pointer == shape) return; - ami_update_pointer(ami_gui2_get_window(gwin), shape); - if(update == true) gwin->mouse_pointer = shape; -} - -/* reset the mouse pointer back to what NetSurf last set it as */ -void ami_reset_pointer(struct gui_window_2 *gwin) -{ - ami_update_pointer(ami_gui2_get_window(gwin), gwin->mouse_pointer); -} - void ami_update_pointer(struct Window *win, gui_pointer_shape shape) { if(ami_drag_has_data()) return; /**\todo check this shouldn't be drag_in_progress */ diff --git a/frontends/amiga/theme.h b/frontends/amiga/theme.h index 6de7bc150..6ab3c0ea8 100644 --- a/frontends/amiga/theme.h +++ b/frontends/amiga/theme.h @@ -40,8 +40,6 @@ void ami_update_throbber(struct gui_window_2 *g,bool redraw); void ami_init_mouse_pointers(void); void ami_mouse_pointers_free(void); -void ami_set_pointer(struct gui_window_2 *gwin, gui_pointer_shape shape, bool update); -void ami_reset_pointer(struct gui_window_2 *gwin); /* Use the following ONLY if nothing other than the Intuition window pointer is available, * and ALWAYS in preference to SetWindowPointer(), as it features more pointers and uses * the correct ones specified in user preferences. */ -- cgit v1.2.3