summaryrefslogtreecommitdiff
path: root/frontends
diff options
context:
space:
mode:
authorVincent Sanders <vince@kyllikki.org>2019-08-02 12:25:35 +0100
committerVincent Sanders <vince@kyllikki.org>2019-08-02 12:26:20 +0100
commit552aab42e16689c24ac566913b02c7613bfc090b (patch)
tree76af19cc73daaa1a5b85bab002ce730b315c0fbc /frontends
parent4ae27a65929a5fe333dc9f9f0d43ac91a72a0116 (diff)
downloadnetsurf-552aab42e16689c24ac566913b02c7613bfc090b.tar.gz
netsurf-552aab42e16689c24ac566913b02c7613bfc090b.tar.bz2
remove scaled parameter from get_dimensions
Diffstat (limited to 'frontends')
-rw-r--r--frontends/amiga/gui.c16
-rw-r--r--frontends/atari/gui.c6
-rw-r--r--frontends/beos/window.cpp9
-rw-r--r--frontends/framebuffer/gui.c11
-rw-r--r--frontends/gtk/window.c11
-rw-r--r--frontends/monkey/browser.c10
-rw-r--r--frontends/riscos/window.c10
-rw-r--r--frontends/windows/window.c6
8 files changed, 20 insertions, 59 deletions
diff --git a/frontends/amiga/gui.c b/frontends/amiga/gui.c
index f5a7cadea..0b4ae7a7b 100644
--- a/frontends/amiga/gui.c
+++ b/frontends/amiga/gui.c
@@ -2076,14 +2076,17 @@ static void ami_gui_menu_update_all(void)
* \return NSERROR_OK on sucess and width and height updated
* else error code.
*/
-static nserror gui_window_get_dimensions(struct gui_window *gw,
- int *restrict width, int *restrict height, bool scaled)
+static nserror
+gui_window_get_dimensions(struct gui_window *gw,
+ int *restrict width,
+ int *restrict height)
{
struct IBox *bbox;
nserror res;
- res = ami_gui_get_space_box((Object *)gw->shared->objects[GID_BROWSER], &bbox);
- if(res != NSERROR_OK) {
+ res = ami_gui_get_space_box((Object *)gw->shared->objects[GID_BROWSER],
+ &bbox);
+ if (res != NSERROR_OK) {
amiga_warn_user("NoMemory", "");
return res;
}
@@ -2093,11 +2096,6 @@ static nserror gui_window_get_dimensions(struct gui_window *gw,
ami_gui_free_space_box(bbox);
- if(scaled) {
- *width /= gw->scale;
- *height /= gw->scale;
- }
-
return NSERROR_OK;
}
diff --git a/frontends/atari/gui.c b/frontends/atari/gui.c
index 374220b5d..5e2fd6102 100644
--- a/frontends/atari/gui.c
+++ b/frontends/atari/gui.c
@@ -299,15 +299,11 @@ void gui_window_destroy(struct gui_window *gw)
* \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 nserror
-gui_window_get_dimensions(struct gui_window *gw,
- int *width,
- int *height,
- bool scaled)
+gui_window_get_dimensions(struct gui_window *gw, int *width, int *height)
{
GRECT rect;
window_get_grect(gw->root, BROWSER_AREA_CONTENT, &rect);
diff --git a/frontends/beos/window.cpp b/frontends/beos/window.cpp
index 49d049c28..6c12e4e8e 100644
--- a/frontends/beos/window.cpp
+++ b/frontends/beos/window.cpp
@@ -1341,24 +1341,17 @@ struct gui_clipboard_table *beos_clipboard_table = &clipboard_table;
* \param g 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 nserror
-gui_window_get_dimensions(struct gui_window *g, int *width, int *height,
- bool scaled)
+gui_window_get_dimensions(struct gui_window *g, int *width, int *height)
{
if (g->view &&
g->view->LockLooper()) {
*width = g->view->Bounds().Width() + 1;
*height = g->view->Bounds().Height() + 1;
g->view->UnlockLooper();
-
- if (scaled) {
- *width /= g->scale;
- *height /= g->scale;
- }
}
return NSERROR_OK;
}
diff --git a/frontends/framebuffer/gui.c b/frontends/framebuffer/gui.c
index 95e35fb30..74f6100a5 100644
--- a/frontends/framebuffer/gui.c
+++ b/frontends/framebuffer/gui.c
@@ -1881,23 +1881,14 @@ gui_window_set_scroll(struct gui_window *gw, const struct rect *rect)
* \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 *gw,
- int *width,
- int *height,
- bool scaled)
+gui_window_get_dimensions(struct gui_window *gw, int *width, int *height)
{
*width = fbtk_get_width(gw->browser);
*height = fbtk_get_height(gw->browser);
- if (scaled) {
- float scale = browser_window_get_scale(gw->bw);
- *width /= scale;
- *height /= scale;
- }
return NSERROR_OK;
}
diff --git a/frontends/gtk/window.c b/frontends/gtk/window.c
index 0a2dac107..aab4597dc 100644
--- a/frontends/gtk/window.c
+++ b/frontends/gtk/window.c
@@ -1213,14 +1213,11 @@ static void gui_window_place_caret(struct gui_window *g, int x, int y, int heigh
* \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 nserror
-gui_window_get_dimensions(struct gui_window *gw,
- int *width, int *height,
- bool scaled)
+gui_window_get_dimensions(struct gui_window *gw, int *width, int *height)
{
GtkAllocation alloc;
@@ -1230,12 +1227,6 @@ gui_window_get_dimensions(struct gui_window *gw,
*width = alloc.width;
*height = alloc.height;
- if (scaled) {
- float scale = browser_window_get_scale(gw->bw);
- *width /= scale;
- *height /= scale;
- }
-
return NSERROR_OK;
}
diff --git a/frontends/monkey/browser.c b/frontends/monkey/browser.c
index a00dcb48b..d6dd95189 100644
--- a/frontends/monkey/browser.c
+++ b/frontends/monkey/browser.c
@@ -119,18 +119,18 @@ gui_window_set_title(struct gui_window *g, const char *title)
* \param g 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)
+gui_window_get_dimensions(struct gui_window *g, int *width, int *height)
{
- moutf(MOUT_WINDOW, "GET_DIMENSIONS WIN %u WIDTH %d HEIGHT %d",
- g->win_num, g->width, g->height);
*width = g->width;
*height = g->height;
+ moutf(MOUT_WINDOW,
+ "GET_DIMENSIONS WIN %u WIDTH %d HEIGHT %d",
+ g->win_num, *width, *height);
+
return NSERROR_OK;
}
diff --git a/frontends/riscos/window.c b/frontends/riscos/window.c
index 53a7b586a..b949c02ef 100644
--- a/frontends/riscos/window.c
+++ b/frontends/riscos/window.c
@@ -3679,21 +3679,15 @@ gui_window_set_scroll(struct gui_window *g, const struct rect *rect)
* \param gw gui window to measure
* \param width receives width of window
* \param height receives height of window
- * \param scaled whether to return scaled values
+ * \return NSERROR_OK and width and height updated
*/
static nserror
-gui_window_get_dimensions(struct gui_window *gw,
- int *width, int *height,
- bool scaled)
+gui_window_get_dimensions(struct gui_window *gw, int *width, int *height)
{
/* use the cached window sizes */
*width = gw->old_width / 2;
*height = gw->old_height / 2;
- if (scaled) {
- *width /= gw->scale;
- *height /= gw->scale;
- }
return NSERROR_OK;
}
diff --git a/frontends/windows/window.c b/frontends/windows/window.c
index 689e78d8c..06e734628 100644
--- a/frontends/windows/window.c
+++ b/frontends/windows/window.c
@@ -1522,12 +1522,10 @@ static void win32_window_destroy(struct gui_window *w)
* \param gw gui_window to measure
* \param width receives width of window
* \param height receives height of window
- * \param scaled whether to return scaled values
+ * \return NSERROR_OK and width and height updated
*/
static nserror
-win32_window_get_dimensions(struct gui_window *gw,
- int *width, int *height,
- bool scaled)
+win32_window_get_dimensions(struct gui_window *gw, int *width, int *height)
{
*width = gw->width;
*height = gw->height;