summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorVincent Sanders <vince@kyllikki.org>2017-04-26 10:02:24 +0100
committerVincent Sanders <vince@kyllikki.org>2017-04-26 10:02:24 +0100
commit52ee93597a168f635309e7feb6b0df1b6a11d2de (patch)
tree19f08ea25f2ed76c54a42a989467a9585682fa48
parentbe7aef9231443dba644438117106f52cf3e103f9 (diff)
downloadnetsurf-52ee93597a168f635309e7feb6b0df1b6a11d2de.tar.gz
netsurf-52ee93597a168f635309e7feb6b0df1b6a11d2de.tar.bz2
update monkey frontend to remove reformat API
-rw-r--r--frontends/monkey/browser.c23
1 files changed, 12 insertions, 11 deletions
diff --git a/frontends/monkey/browser.c b/frontends/monkey/browser.c
index 7cd3d077b..8d5154e0b 100644
--- a/frontends/monkey/browser.c
+++ b/frontends/monkey/browser.c
@@ -61,15 +61,6 @@ monkey_find_window_by_num(uint32_t win_num)
return ret;
}
-
-/**
- * callback from core to reformat a window.
- */
-static void monkey_window_reformat(struct gui_window *gw)
-{
- browser_window_reformat(gw->bw, false, gw->width, gw->height);
-}
-
void
monkey_kill_browser_windows(void)
{
@@ -118,7 +109,16 @@ gui_window_set_title(struct gui_window *g, const char *title)
fprintf(stdout, "WINDOW TITLE WIN %u STR %s\n", g->win_num, title);
}
-static void
+/**
+ * Find the current dimensions of a monkey browser window content area.
+ *
+ * \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.
+ */
+static nserror
gui_window_get_dimensions(struct gui_window *g, int *width, int *height,
bool scaled)
{
@@ -126,6 +126,8 @@ gui_window_get_dimensions(struct gui_window *g, int *width, int *height,
g->win_num, g->width, g->height);
*width = g->width;
*height = g->height;
+
+ return NSERROR_OK;
}
static void
@@ -515,7 +517,6 @@ static struct gui_window_table window_table = {
.set_scroll = gui_window_set_scroll,
.get_dimensions = gui_window_get_dimensions,
.update_extent = gui_window_update_extent,
- .reformat = monkey_window_reformat,
.set_title = gui_window_set_title,
.set_url = gui_window_set_url,