diff options
Diffstat (limited to 'riscos')
-rw-r--r-- | riscos/window.c | 92 |
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 |