summaryrefslogtreecommitdiff
path: root/riscos/window.c
diff options
context:
space:
mode:
authorMichael Drake <tlsa@netsurf-browser.org>2011-09-04 18:20:24 +0000
committerMichael Drake <tlsa@netsurf-browser.org>2011-09-04 18:20:24 +0000
commit5be6bd452d95405e6599f330fa30b0b771b81344 (patch)
treee09e37d431f16e027f52f64d2d1c7dced5433c34 /riscos/window.c
parentbd94e21aed23d7fe264d700ef748942c09be3570 (diff)
downloadnetsurf-5be6bd452d95405e6599f330fa30b0b771b81344.tar.gz
netsurf-5be6bd452d95405e6599f330fa30b0b771b81344.tar.bz2
Remove gui_window_position_frame() definition from core and remove all implementations from front ends.
svn path=/trunk/netsurf/; revision=12711
Diffstat (limited to 'riscos/window.c')
-rw-r--r--riscos/window.c92
1 files changed, 0 insertions, 92 deletions
diff --git a/riscos/window.c b/riscos/window.c
index 30ec757d0..6f0bdf08b 100644
--- a/riscos/window.c
+++ b/riscos/window.c
@@ -896,98 +896,6 @@ void gui_window_scroll_visible(struct gui_window *g, int x0, int y0, int x1, int
/**
- * Opens a frame at a specified position.
- *
- * \param g child gui_window to open
- * \param x0 left point to open at
- * \param y0 bottom point to open at
- * \param x1 right point to open at
- * \param y1 top point to open at
- */
-void gui_window_position_frame(struct gui_window *g, int x0, int y0, int x1, int y1)
-{
- wimp_window_state state;
- os_error *error;
- int px0, py1;
- struct browser_window *bw;
- struct browser_window *parent;
- struct browser_window *top;
- float scale = 1.0;
-
- assert(g);
- bw = g->bw;
- assert(bw);
- parent = bw->parent;
- assert(parent);
- top = browser_window_owner(bw);
-
- /* store position for children */
- if (parent->browser_window_type == BROWSER_WINDOW_IFRAME) {
- assert(0);
- } else {
- bw->x0 = x0 = parent->x0 + x0;
- bw->y0 = y0 = parent->y0 + y0;
- bw->x1 = x1 = parent->x0 + x1;
- bw->y1 = y1 = parent->y0 + y1;
- }
-
- /* only scale iframe locations */
- if (bw->browser_window_type == BROWSER_WINDOW_IFRAME) {
- assert(0);
- }
-
- /* get the position of the top level window */
- state.w = top->window->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;
- }
- px0 = state.visible.x0 - state.xscroll;
- py1 = state.visible.y1 - state.yscroll;
-
- /* get our current window state */
- 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;
- }
- if (!g->bw->border) {
- x0 -= 1;
- y0 -= 1;
- x1 += 1;
- y1 += 1;
- }
-
- x1 = x1 * 2 * scale;
- y1 = y1 * 2 * scale;
-
- /* scrollbars must go inside */
- if (state.flags & wimp_WINDOW_HSCROLL) {
- y1 -= ro_get_hscroll_height(NULL);
- if (g->bw->border)
- y1 += 2;
- }
- if (state.flags & wimp_WINDOW_VSCROLL) {
- x1 -= ro_get_vscroll_width(NULL);
- if (g->bw->border)
- x1 += 2;
- }
- state.visible.x0 = px0 + x0 * 2 * scale;
- state.visible.y0 = py1 - y1;
- state.visible.x1 = px0 + x1;
- state.visible.y1 = py1 - y0 * 2 * scale;
- g->update_extent = true;
- ro_gui_window_open(PTR_WIMP_OPEN(&state));
-}
-
-
-/**
* Find the current dimensions of a browser window's content area.
*
* \param g gui_window to measure