summaryrefslogtreecommitdiff
path: root/desktop
diff options
context:
space:
mode:
authorRichard Wilson <rjw@netsurf-browser.org>2006-09-06 22:15:58 +0000
committerRichard Wilson <rjw@netsurf-browser.org>2006-09-06 22:15:58 +0000
commit3e0c02e8e59fe41a250d54b760b0cd675044697f (patch)
tree3265bb4c158ee96f7cbee0420692d234f3a9ca32 /desktop
parentd5540f344d5048ce06ef86fa9072fbf38a260a48 (diff)
downloadnetsurf-3e0c02e8e59fe41a250d54b760b0cd675044697f.tar.gz
netsurf-3e0c02e8e59fe41a250d54b760b0cd675044697f.tar.bz2
Simplify and tidy up RISC OS gui_ functions. Fix toolbar height changing issues for framesets.
svn path=/trunk/netsurf/; revision=2924
Diffstat (limited to 'desktop')
-rw-r--r--desktop/browser.c15
-rw-r--r--desktop/gui.h7
2 files changed, 10 insertions, 12 deletions
diff --git a/desktop/browser.c b/desktop/browser.c
index 8ab99338e..e4a1f8d49 100644
--- a/desktop/browser.c
+++ b/desktop/browser.c
@@ -263,7 +263,7 @@ void browser_window_recalculate_iframes(struct browser_window *bw) {
assert(bw);
/* update window dimensions */
- gui_window_get_dimensions(bw->window, &bw_width, &bw_height);
+ gui_window_get_dimensions(bw->window, &bw_width, &bw_height, false);
if (!bw->parent) {
bw->x0 = 0;
bw->y0 = 0;
@@ -383,7 +383,7 @@ void browser_window_recalculate_frameset(struct browser_window *bw) {
/* window dimensions */
if (!bw->parent) {
- gui_window_get_dimensions(bw->window, &bw_width, &bw_height);
+ gui_window_get_dimensions(bw->window, &bw_width, &bw_height, false);
bw->x0 = 0;
bw->y0 = 0;
bw->x1 = bw_width;
@@ -751,6 +751,7 @@ void browser_window_go_post(struct browser_window *bw, const char *url,
char url_buf[256];
int depth = 0;
struct browser_window *cur;
+ int width, height;
LOG(("bw %p, url %s", bw, url));
assert(bw);
@@ -810,13 +811,13 @@ void browser_window_go_post(struct browser_window *bw, const char *url,
browser_window_remove_caret(bw);
browser_window_destroy_children(bw);
+ gui_window_get_dimensions(bw->window, &width, &height, true);
+
browser_window_set_status(bw, messages_get("Loading"));
bw->history_add = history_add;
bw->time0 = clock();
c = fetchcache(url2, browser_window_callback, (intptr_t) bw, 0,
- gui_window_get_width(bw->window),
- gui_window_get_height(bw->window),
- false,
+ width, height, false,
post_urlenc, post_multipart, true, download);
free(url2);
if (!c) {
@@ -835,9 +836,7 @@ void browser_window_go_post(struct browser_window *bw, const char *url,
bw->download = download;
fetchcache_go(c, option_send_referer ? referer : 0,
- browser_window_callback, (intptr_t) bw, 0,
- gui_window_get_width(bw->window),
- gui_window_get_height(bw->window),
+ browser_window_callback, (intptr_t) bw, 0, width, height,
post_urlenc, post_multipart, true);
}
diff --git a/desktop/gui.h b/desktop/gui.h
index 4d09921a8..b50fe82ed 100644
--- a/desktop/gui.h
+++ b/desktop/gui.h
@@ -67,9 +67,8 @@ void gui_window_scroll_visible(struct gui_window *g, int x0, int y0,
int x1, int y1);
void gui_window_position_frame(struct gui_window *g, int x0, int y0,
int x1, int y1);
-void gui_window_get_dimensions(struct gui_window *g, int *width, int *height);
-int gui_window_get_width(struct gui_window *g);
-int gui_window_get_height(struct gui_window *g);
+void gui_window_get_dimensions(struct gui_window *g, int *width, int *height,
+ bool scaled);
void gui_window_update_extent(struct gui_window *g);
void gui_window_set_status(struct gui_window *g, const char *text);
void gui_window_set_pointer(struct gui_window *g, gui_pointer_shape shape);
@@ -83,8 +82,8 @@ void gui_window_new_content(struct gui_window *g);
bool gui_window_scroll_start(struct gui_window *g);
bool gui_window_box_scroll_start(struct gui_window *g,
int x0, int y0, int x1, int y1);
-void gui_window_save_as_link(struct gui_window *g, struct content *c);
bool gui_window_frame_resize_start(struct gui_window *g);
+void gui_window_save_as_link(struct gui_window *g, struct content *c);
struct gui_download_window *gui_download_window_create(const char *url,
const char *mime_type, struct fetch *fetch,