From 3c264d63e60675cec987edea293316e8a40c9f08 Mon Sep 17 00:00:00 2001 From: Vincent Sanders Date: Wed, 26 Apr 2017 10:03:29 +0100 Subject: update atari frontend to remove reformat API --- frontends/atari/gui.c | 29 ++++++++++------------------- 1 file changed, 10 insertions(+), 19 deletions(-) (limited to 'frontends/atari') diff --git a/frontends/atari/gui.c b/frontends/atari/gui.c index ad568b761..cdea953b2 100644 --- a/frontends/atari/gui.c +++ b/frontends/atari/gui.c @@ -293,25 +293,27 @@ void gui_window_destroy(struct gui_window *gw) } /** - * Find the current dimensions of a browser window's content area. + * Find the current dimensions of a atari browser window content area. * - * \param w gui_window to measure - * \param width receives width of window + * \param gw The gui window to measure content area of. + * \param width receives width of window * \param height receives height of window * \param scaled whether to return scaled values + * \return NSERROR_OK on sucess and width and height updated + * else error code. */ -static void -gui_window_get_dimensions(struct gui_window *w, +static nserror +gui_window_get_dimensions(struct gui_window *gw, int *width, int *height, bool scaled) { - if (w == NULL) - return; GRECT rect; - window_get_grect(w->root, BROWSER_AREA_CONTENT, &rect); + window_get_grect(gw->root, BROWSER_AREA_CONTENT, &rect); *width = rect.g_w; *height = rect.g_h; + + return NSERROR_OK; } /** @@ -375,16 +377,6 @@ void atari_window_set_status(struct gui_window *w, const char *text) window_set_stauts(w->root, (char*)text); } -static void atari_window_reformat(struct gui_window *gw) -{ - int width = 0, height = 0; - - if (gw != NULL) { - gui_window_get_dimensions(gw, &width, &height, true); - browser_window_reformat(gw->browser->bw, false, width, height); - } -} - /** * Invalidates an area of an atari browser window @@ -1063,7 +1055,6 @@ static struct gui_window_table atari_window_table = { .set_scroll = gui_window_set_scroll, .get_dimensions = gui_window_get_dimensions, .update_extent = gui_window_update_extent, - .reformat = atari_window_reformat, .set_title = gui_window_set_title, .set_url = gui_window_set_url, -- cgit v1.2.3