diff options
author | Michael Drake <tlsa@netsurf-browser.org> | 2011-09-05 15:35:34 +0000 |
---|---|---|
committer | Michael Drake <tlsa@netsurf-browser.org> | 2011-09-05 15:35:34 +0000 |
commit | 0401d52f514f992b3830af5fe246f61aa002ed2e (patch) | |
tree | da06cf8f739686c11b3a76bacd5a1c7eba879a25 | |
parent | 34fe2531f28b0871a77f629de8c3ee54fb5ad065 (diff) | |
download | netsurf-0401d52f514f992b3830af5fe246f61aa002ed2e.tar.gz netsurf-0401d52f514f992b3830af5fe246f61aa002ed2e.tar.bz2 |
Remove gui_window_frame_resize_start() functions.
svn path=/trunk/netsurf/; revision=12738
-rwxr-xr-x | amiga/gui.c | 6 | ||||
-rwxr-xr-x | atari/gui.c | 6 | ||||
-rw-r--r-- | beos/beos_window.cpp | 4 | ||||
-rw-r--r-- | cocoa/gui.m | 5 | ||||
-rw-r--r-- | desktop/frames.c | 10 | ||||
-rw-r--r-- | desktop/gui.h | 1 | ||||
-rw-r--r-- | framebuffer/gui.c | 7 | ||||
-rw-r--r-- | gtk/window.c | 4 | ||||
-rw-r--r-- | monkey/browser.c | 6 | ||||
-rw-r--r-- | riscos/window.c | 98 | ||||
-rw-r--r-- | windows/gui.c | 6 |
11 files changed, 8 insertions, 145 deletions
diff --git a/amiga/gui.c b/amiga/gui.c index 171b6bfd1..9e35b1a85 100755 --- a/amiga/gui.c +++ b/amiga/gui.c @@ -3798,12 +3798,6 @@ bool gui_window_box_scroll_start(struct gui_window *g, return true; } -bool gui_window_frame_resize_start(struct gui_window *g) -{ - DebugPrintF("resize frame\n"); - return true; -} - void ami_scroller_hook(struct Hook *hook,Object *object,struct IntuiMessage *msg) { ULONG gid,x,y; diff --git a/atari/gui.c b/atari/gui.c index c06c51481..cbcedac7d 100755 --- a/atari/gui.c +++ b/atari/gui.c @@ -623,12 +623,6 @@ bool gui_window_box_scroll_start(struct gui_window *w, return true;
}
-bool gui_window_frame_resize_start(struct gui_window *w)
-{
- TODO();
- return true;
-}
-
void gui_window_save_link(struct gui_window *g, const char *url,
const char *title)
{
diff --git a/beos/beos_window.cpp b/beos/beos_window.cpp index 7da204673..397979dfc 100644 --- a/beos/beos_window.cpp +++ b/beos/beos_window.cpp @@ -1773,7 +1773,3 @@ void gui_window_get_dimensions(struct gui_window *g, int *width, int *height, } } -bool gui_window_frame_resize_start(struct gui_window *g) -{ - return true; -} diff --git a/cocoa/gui.m b/cocoa/gui.m index e2252b9e8..d39fae72d 100644 --- a/cocoa/gui.m +++ b/cocoa/gui.m @@ -286,11 +286,6 @@ bool gui_window_box_scroll_start(struct gui_window *g, return true; } -bool gui_window_frame_resize_start(struct gui_window *g) -{ - return true; -} - void gui_window_save_link(struct gui_window *g, const char *url, const char *title) { diff --git a/desktop/frames.c b/desktop/frames.c index 5cf82f9d5..a58a9c15b 100644 --- a/desktop/frames.c +++ b/desktop/frames.c @@ -850,8 +850,14 @@ bool browser_window_resize_frames(struct browser_window *bw, browser_mouse_state bw->drag_resize_up = up; bw->drag_resize_down = down; - /* TODO: sort this out: - gui_window_frame_resize_start(bw->window); */ + /* TODO: Tell the front end the valid pointer + * movement range for the drag, so that + * they can clamp pointer. + * + * Probably need a general function for + * this, to be used by all core-managed + * drag ops. + */ *status = messages_get("FrameDrag"); *action = true; diff --git a/desktop/gui.h b/desktop/gui.h index c0118ce74..aac7f1001 100644 --- a/desktop/gui.h +++ b/desktop/gui.h @@ -103,7 +103,6 @@ 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); -bool gui_window_frame_resize_start(struct gui_window *g); void gui_window_save_link(struct gui_window *g, const char *url, const char *title); diff --git a/framebuffer/gui.c b/framebuffer/gui.c index 5dfc75bad..01ce53f51 100644 --- a/framebuffer/gui.c +++ b/framebuffer/gui.c @@ -1511,13 +1511,6 @@ gui_window_box_scroll_start(struct gui_window *g, return true; } -bool -gui_window_frame_resize_start(struct gui_window *g) -{ - LOG(("resize frame\n")); - return true; -} - void gui_window_save_link(struct gui_window *g, const char *url, const char *title) { diff --git a/gtk/window.c b/gtk/window.c index a45a516a2..29e5e7099 100644 --- a/gtk/window.c +++ b/gtk/window.c @@ -995,7 +995,3 @@ void gui_window_get_dimensions(struct gui_window *g, int *width, int *height, LOG(("\tWINDOW HEIGHT: %i\n", *height)); } -bool gui_window_frame_resize_start(struct gui_window *g) -{ - return true; -} diff --git a/monkey/browser.c b/monkey/browser.c index 295baa54b..b6463a415 100644 --- a/monkey/browser.c +++ b/monkey/browser.c @@ -299,12 +299,6 @@ gui_window_scroll_start(struct gui_window *g) return true; } -bool -gui_window_frame_resize_start(struct gui_window *g) -{ - return true; -} - void gui_window_set_search_ico(hlcache_handle *ico) { diff --git a/riscos/window.c b/riscos/window.c index 251dea155..fe3ddabc5 100644 --- a/riscos/window.c +++ b/riscos/window.c @@ -1279,104 +1279,6 @@ bool gui_window_box_scroll_start(struct gui_window *g, int x0, int y0, int x1, i /** - * Starts drag resizing of a browser frame - * - * \param gw gui window - */ - -bool gui_window_frame_resize_start(struct gui_window *g) -{ - wimp_pointer pointer; - os_error *error; - wimp_drag drag; - int x0, y0, x1, y1; - int row = -1, col = -1, i, toolbar_height = 0; - struct browser_window *top, *bw, *parent; - wimp_window_state state; - - /* get the maximum drag box (collapse all surrounding frames */ - bw = g->bw; - parent = bw->parent; - x0 = bw->x0; - y0 = bw->y0; - x1 = bw->x1; - y1 = bw->y1; - for (i = 0; i < (parent->cols * parent->rows); i++) { - if (&parent->children[i] == bw) { - col = i % parent->cols; - row = i / parent->cols; - } - } - assert((row >= 0) && (col >= 0)); - - if (bw->drag_resize_left) - x0 = parent->children[row * parent->cols + (col - 1)].x0; - if (bw->drag_resize_right) - x1 = parent->children[row * parent->cols + (col + 1)].x1; - if (bw->drag_resize_up) - y0 = parent->children[(row - 1) * parent->cols + col].y0; - if (bw->drag_resize_down) - y1 = parent->children[(row + 1) * parent->cols + col].y1; - - /* convert to screen co-ordinates */ - top = browser_window_owner(bw); - if (top->window->toolbar) - toolbar_height = ro_toolbar_full_height(top->window->toolbar); - 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 false; - } - x0 = state.visible.x0 + x0 * 2; - y0 = state.visible.y1 - y0 * 2 - toolbar_height; - x1 = state.visible.x0 + x1 * 2 - 1; - y1 = state.visible.y1 - y1 * 2 - toolbar_height - 1; - - /* get the pointer position */ - error = xwimp_get_pointer_info(&pointer); - if (error) { - LOG(("xwimp_get_pointer_info 0x%x : %s", - error->errnum, error->errmess)); - warn_user("WimpError", error->errmess); - return false; - } - - /* stop dragging in directions we can't extend */ - if (!(bw->drag_resize_left || bw->drag_resize_right)) { - x0 = pointer.pos.x; - x1 = pointer.pos.x; - } - if (!(bw->drag_resize_up || bw->drag_resize_down)) { - y0 = pointer.pos.y; - y1 = pointer.pos.y; - } - - /* start the drag */ - drag.type = wimp_DRAG_USER_POINT; - drag.bbox.x0 = x0; - drag.bbox.y0 = y1; - drag.bbox.x1 = x1; - drag.bbox.y1 = y0; - - error = xwimp_drag_box(&drag); - if (error) { - LOG(("xwimp_drag_box: 0x%x : %s", - error->errnum, error->errmess)); - warn_user("WimpError", error->errmess); - return false; - } - - /* we may not be the window the pointer is currently over */ - gui_track_gui_window = bw->window; - gui_current_drag_type = GUI_DRAG_FRAME; - return true; -} - - -/** * Save the specified content as a link. * * \param g gui_window containing the content diff --git a/windows/gui.c b/windows/gui.c index c0265b76b..0290797d4 100644 --- a/windows/gui.c +++ b/windows/gui.c @@ -1729,12 +1729,6 @@ bool gui_window_box_scroll_start(struct gui_window *w, return true; } -bool gui_window_frame_resize_start(struct gui_window *w) -{ - LOG(("resize frame\n")); - return true; -} - void gui_window_save_link(struct gui_window *g, const char *url, const char *title) { |