diff options
author | James Bursa <james@netsurf-browser.org> | 2005-07-02 18:17:51 +0000 |
---|---|---|
committer | James Bursa <james@netsurf-browser.org> | 2005-07-02 18:17:51 +0000 |
commit | 9b78daf135d7fa555990454c219649e4d54157d2 (patch) | |
tree | d5d8c1d773d0ef51afbe055dcff60607821f7a9c /riscos/window.c | |
parent | 894ba8b6230ffa57e1a5037adbd1b246a9a877da (diff) | |
download | netsurf-9b78daf135d7fa555990454c219649e4d54157d2.tar.gz netsurf-9b78daf135d7fa555990454c219649e4d54157d2.tar.bz2 |
[project @ 2005-07-02 18:17:51 by bursa]
Rewrite calculation of box minimum and maximum widths to improve layout of many pages. Move calculation of column types and border collapsing to box tree normalising stage, since they are layout independent. Add window height parameter to layout and make <html> and <body> at least window height.
svn path=/import/netsurf/; revision=1777
Diffstat (limited to 'riscos/window.c')
-rw-r--r-- | riscos/window.c | 32 |
1 files changed, 31 insertions, 1 deletions
diff --git a/riscos/window.c b/riscos/window.c index 12729853b..3d65abfdc 100644 --- a/riscos/window.c +++ b/riscos/window.c @@ -819,6 +819,32 @@ int gui_window_get_width(struct gui_window *g) /** + * Find the current height of a browser window. + * + * \param g gui_window to measure + * \return height of window + */ + +int gui_window_get_height(struct gui_window *g) +{ + wimp_window_state state; + os_error *error; + + state.w = g->window; + error = xwimp_get_window_state(&state); + if (error) { + LOG(("xwimp_get_window_state: 0x%x: %s", + error->errnum, error->errmess)); + warn_user("WimpError", error->errmess); + return 800; + } + return (state.visible.y1 - state.visible.y0 - (g->toolbar ? + ro_gui_theme_toolbar_full_height(g->toolbar) : 0)) / + 2 / g->option.scale; +} + + +/** * Set the extent of the inside of a browser window. * * \param g gui_window to resize @@ -1878,6 +1904,10 @@ bool ro_gui_window_keypress(struct gui_window *g, int key, bool toolbar) } return true; + case wimp_KEY_CONTROL + wimp_KEY_SHIFT + wimp_KEY_F9: + talloc_report_full(0, stderr); + return true; + case wimp_KEY_CONTROL + wimp_KEY_F9: /* Dump url_store. */ url_store_dump(); return true; @@ -2259,7 +2289,7 @@ void ro_gui_window_process_reformats(void) continue; content_reformat(g->bw->current_content, g->old_width / 2 / g->option.scale, - 1000); + gui_window_get_height(g)); g->reformat_pending = false; } gui_reformat_pending = false; |