From 194dfad4a5ca36bf39bd1c20c874747991f9281c Mon Sep 17 00:00:00 2001 From: Michael Drake Date: Sat, 22 Feb 2020 16:31:24 +0000 Subject: Core window: Constify the core_window handle through the getters. --- frontends/amiga/corewindow.c | 5 +++-- frontends/atari/treeview.c | 4 ++-- frontends/framebuffer/corewindow.c | 5 +++-- frontends/gtk/corewindow.c | 5 +++-- frontends/riscos/corewindow.c | 5 +++-- frontends/windows/corewindow.c | 5 +++-- 6 files changed, 17 insertions(+), 12 deletions(-) (limited to 'frontends') diff --git a/frontends/amiga/corewindow.c b/frontends/amiga/corewindow.c index 44798d24b..bfb0eb202 100644 --- a/frontends/amiga/corewindow.c +++ b/frontends/amiga/corewindow.c @@ -826,7 +826,8 @@ ami_cw_invalidate_area(struct core_window *cw, const struct rect *r) static nserror -ami_cw_get_window_dimensions(struct core_window *cw, int *width, int *height) +ami_cw_get_window_dimensions(const struct core_window *cw, + int *width, int *height) { struct ami_corewindow *ami_cw = (struct ami_corewindow *)cw; @@ -867,7 +868,7 @@ ami_cw_update_size(struct core_window *cw, int width, int height) static nserror -ami_cw_get_scroll(struct core_window *cw, int *x, int *y) +ami_cw_get_scroll(const struct core_window *cw, int *x, int *y) { struct ami_corewindow *ami_cw = (struct ami_corewindow *)cw; ULONG win_x0, win_y0; diff --git a/frontends/atari/treeview.c b/frontends/atari/treeview.c index 49d26ef5b..6ab09991a 100644 --- a/frontends/atari/treeview.c +++ b/frontends/atari/treeview.c @@ -484,7 +484,7 @@ atari_treeview_set_scroll(struct core_window *cw, int x, int y) } static nserror -atari_treeview_get_scroll(struct core_window *cw, int *x, int *y) +atari_treeview_get_scroll(const struct core_window *cw, int *x, int *y) { /* TODO */ return NSERROR_NOT_IMPLEMENTED; @@ -499,7 +499,7 @@ atari_treeview_get_scroll(struct core_window *cw, int *x, int *y) * \param height to be set to viewport height in px, if non NULL */ static nserror -atari_treeview_get_window_dimensions(struct core_window *cw, +atari_treeview_get_window_dimensions(const struct core_window *cw, int *width, int *height) { diff --git a/frontends/framebuffer/corewindow.c b/frontends/framebuffer/corewindow.c index a27d666f2..dbd8d013b 100644 --- a/frontends/framebuffer/corewindow.c +++ b/frontends/framebuffer/corewindow.c @@ -160,7 +160,7 @@ fb_cw_set_scroll(struct core_window *cw, int x, int y) static nserror -fb_cw_get_scroll(struct core_window *cw, int *x, int *y) +fb_cw_get_scroll(const struct core_window *cw, int *x, int *y) { /* struct fb_corewindow *fb_cw = (struct fb_corewindow *)cw; @@ -171,7 +171,8 @@ fb_cw_get_scroll(struct core_window *cw, int *x, int *y) static nserror -fb_cw_get_window_dimensions(struct core_window *cw, int *width, int *height) +fb_cw_get_window_dimensions(const struct core_window *cw, + int *width, int *height) { struct fb_corewindow *fb_cw = (struct fb_corewindow *)cw; diff --git a/frontends/gtk/corewindow.c b/frontends/gtk/corewindow.c index cb78212dd..fc26f1394 100644 --- a/frontends/gtk/corewindow.c +++ b/frontends/gtk/corewindow.c @@ -633,7 +633,7 @@ nsgtk_cw_set_scroll(struct core_window *cw, int x, int y) * \param r rectangle that needs scrolling. */ static nserror -nsgtk_cw_get_scroll(struct core_window *cw, int *x, int *y) +nsgtk_cw_get_scroll(const struct core_window *cw, int *x, int *y) { struct nsgtk_corewindow *nsgtk_cw = (struct nsgtk_corewindow *)cw; GtkAdjustment *vadj; @@ -660,7 +660,8 @@ nsgtk_cw_get_scroll(struct core_window *cw, int *x, int *y) * \param[out] height to be set to viewport height in px */ static nserror -nsgtk_cw_get_window_dimensions(struct core_window *cw, int *width, int *height) +nsgtk_cw_get_window_dimensions(const struct core_window *cw, + int *width, int *height) { struct nsgtk_corewindow *nsgtk_cw = (struct nsgtk_corewindow *)cw; GtkAdjustment *vadj; diff --git a/frontends/riscos/corewindow.c b/frontends/riscos/corewindow.c index 8004dcc95..4398fca28 100644 --- a/frontends/riscos/corewindow.c +++ b/frontends/riscos/corewindow.c @@ -832,7 +832,7 @@ ro_cw_update_size(struct core_window *cw, int width, int height) * Callback from the core to scroll the visible content. */ static nserror -ro_cw_get_scroll(struct core_window *cw, int *x, int *y) +ro_cw_get_scroll(const struct core_window *cw, int *x, int *y) { struct ro_corewindow *ro_cw = (struct ro_corewindow *)cw; wimp_window_state state = { @@ -888,7 +888,8 @@ ro_cw_set_scroll(struct core_window *cw, int x, int y) * \param[out] height to be set to viewport height in px */ static nserror -ro_cw_get_window_dimensions(struct core_window *cw, int *width, int *height) +ro_cw_get_window_dimensions(const struct core_window *cw, + int *width, int *height) { struct ro_corewindow *ro_cw = (struct ro_corewindow *)cw; os_error *error; diff --git a/frontends/windows/corewindow.c b/frontends/windows/corewindow.c index be2891fcd..7d6dc69b0 100644 --- a/frontends/windows/corewindow.c +++ b/frontends/windows/corewindow.c @@ -466,7 +466,7 @@ nsw32_cw_set_scroll(struct core_window *cw, int x, int y) static nserror -nsw32_cw_get_scroll(struct core_window *cw, int *x, int *y) +nsw32_cw_get_scroll(const struct core_window *cw, int *x, int *y) { /** /todo call getscroll apropriately */ return NSERROR_NOT_IMPLEMENTED; @@ -481,7 +481,8 @@ nsw32_cw_get_scroll(struct core_window *cw, int *x, int *y) * \param[out] height to be set to viewport height in px */ static nserror -nsw32_cw_get_window_dimensions(struct core_window *cw, int *width, int *height) +nsw32_cw_get_window_dimensions(const struct core_window *cw, + int *width, int *height) { struct nsw32_corewindow *nsw32_cw = (struct nsw32_corewindow *)cw; -- cgit v1.2.3