From e7da747f5f51a71254113552087e07d67efe0851 Mon Sep 17 00:00:00 2001 From: Richard Wilson Date: Tue, 4 May 2004 22:23:44 +0000 Subject: [project @ 2004-05-04 22:21:37 by rjw] Revised GUI. svn path=/import/netsurf/; revision=823 --- desktop/browser.c | 15 ++++++++------- desktop/browser.h | 2 +- desktop/gui.h | 6 +++++- 3 files changed, 14 insertions(+), 9 deletions(-) (limited to 'desktop') diff --git a/desktop/browser.c b/desktop/browser.c index ceecc1955..b5338f543 100644 --- a/desktop/browser.c +++ b/desktop/browser.c @@ -25,6 +25,7 @@ #include "netsurf/desktop/401login.h" #endif #include "netsurf/desktop/browser.h" +#include "netsurf/desktop/gui.h" #include "netsurf/desktop/imagemap.h" #include "netsurf/render/box.h" #include "netsurf/render/font.h" @@ -88,14 +89,14 @@ static gui_pointer_shape get_pointer_shape(css_cursor cursor); * \param url URL to start fetching in the new window (copied) */ -void browser_window_create(const char *url) +void browser_window_create(const char *url, struct browser_window *clone) { struct browser_window *bw; bw = malloc(sizeof *bw); if (!bw) { warn_user("NoMemory"); - return; + return NULL; } bw->current_content = 0; @@ -103,12 +104,11 @@ void browser_window_create(const char *url) bw->history = history_create(); bw->throbbing = false; bw->caret_callback = 0; - bw->window = gui_create_browser_window(bw); + bw->window = gui_create_browser_window(bw, clone); if (!bw->window) { free(bw); - return; + return NULL; } - browser_window_go(bw, url); } @@ -1451,6 +1451,7 @@ void browser_window_follow_link(struct browser_window *bw, int done = 0; struct css_style *style; gui_pointer_shape pointer = GUI_POINTER_DEFAULT; + struct browser_window *new_bw; found = 0; click_boxes = NULL; @@ -1489,7 +1490,7 @@ void browser_window_follow_link(struct browser_window *bw, } } else if (click_type == 2) { if (fetch_can_fetch(url)) { - browser_window_create(url); + browser_window_create(url, bw); } else { gui_launch_url(url); @@ -1530,7 +1531,7 @@ void browser_window_follow_link(struct browser_window *bw, } } else if (click_type == 2) { if (fetch_can_fetch(url)) { - browser_window_create(url); + browser_window_create(url, NULL); } else { gui_launch_url(url); diff --git a/desktop/browser.h b/desktop/browser.h index be237cbe7..9ebcd11fd 100644 --- a/desktop/browser.h +++ b/desktop/browser.h @@ -89,7 +89,7 @@ struct box_selection }; -void browser_window_create(const char *url); +void browser_window_create(const char *url, struct browser_window *clone); void browser_window_go(struct browser_window *bw, const char *url); void browser_window_go_post(struct browser_window *bw, const char *url, char *post_urlenc, diff --git a/desktop/gui.h b/desktop/gui.h index 8b23e81b3..bffcc23fd 100644 --- a/desktop/gui.h +++ b/desktop/gui.h @@ -23,9 +23,11 @@ typedef enum { GUI_POINTER_DEFAULT, GUI_POINTER_POINT, GUI_POINTER_CARET, #include #include "netsurf/content/content.h" #include "netsurf/desktop/browser.h" +#include "netsurf/riscos/gui.h" +#include "netsurf/riscos/wimp.h" bool gui_window_in_list(gui_window *g); -gui_window *gui_create_browser_window(struct browser_window *bw); +gui_window *gui_create_browser_window(struct browser_window *bw, struct browser_window *clone); gui_window *gui_create_download_window(struct content *content); void gui_window_destroy(gui_window* g); void gui_window_show(gui_window* g); @@ -47,6 +49,8 @@ void gui_download_window_done(gui_window *g); void gui_download_window_error(gui_window *g, const char *error); void gui_init(int argc, char** argv); +void gui_window_clone_options(struct browser_window *new_bw, struct browser_window *old_bw); +void gui_window_default_options(struct browser_window *bw); void gui_multitask(void); void gui_poll(bool active); void gui_quit(void); -- cgit v1.2.3