summaryrefslogtreecommitdiff
path: root/amiga/gui.c
diff options
context:
space:
mode:
authorChris Young <chris@unsatisfactorysoftware.co.uk>2008-10-25 23:22:34 +0000
committerChris Young <chris@unsatisfactorysoftware.co.uk>2008-10-25 23:22:34 +0000
commit30b09368e7980def81ccfd7b4038225e7ec13ed9 (patch)
tree1f3859d4a17845ad03fd96789b8e74c421527d03 /amiga/gui.c
parent2f4beda48c9780739ecdab639b47299108265d66 (diff)
downloadnetsurf-30b09368e7980def81ccfd7b4038225e7ec13ed9.tar.gz
netsurf-30b09368e7980def81ccfd7b4038225e7ec13ed9.tar.bz2
Track the current/last used browser window (at the moment, just for ARexx).
Extended ARexx port. First two are primarily for openurl.library: * OPEN now takes a parameter NEW=NEWWINDOW/S to open the URL in a new window (default is to open in the current browser window) * TOFRONT will bring NetSurf's screen to the front (this may be extended in the future to bring the current browser window to the front - which might be better for when it is running on the WB screen) Next is to make it easy to support getvideo.rexx: * GETURL returns the URL of the current browser window in RESULT GetVideo.nsrx script will get the current URL and pass it to rexx:getvideo.rexx Currently there is no way to call ARexx scripts directly from NetSurf, or any way to specify whether to save, play or saveplay the video without editing the script. [clipboard.c/clipboard.h were missing from previous commit] svn path=/trunk/netsurf/; revision=5631
Diffstat (limited to 'amiga/gui.c')
-rwxr-xr-xamiga/gui.c13
1 files changed, 10 insertions, 3 deletions
diff --git a/amiga/gui.c b/amiga/gui.c
index 17382d9ef..f7e107360 100755
--- a/amiga/gui.c
+++ b/amiga/gui.c
@@ -91,8 +91,6 @@
#include <classes/popupmenu.h>
#include <reaction/reaction_macros.h>
-struct browser_window *curbw;
-
char *default_stylesheet_url;
char *adblock_stylesheet_url;
struct gui_window *search_current_window = NULL;
@@ -739,6 +737,10 @@ void ami_handle_msg(void)
ami_close_all_tabs(gwin);
break;
+ case WMHI_ACTIVE:
+ curbw = gwin->bw;
+ break;
+
case WMHI_INTUITICK:
break;
@@ -981,6 +983,7 @@ void ami_switch_tab(struct gui_window_2 *gwin,bool redraw)
GetClickTabNodeAttrs(tabnode,
TNA_UserData,&gwin->bw,
TAG_DONE);
+ curbw = gwin->bw;
ami_update_buttons(gwin);
@@ -1339,7 +1342,7 @@ struct gui_window *gui_create_browser_window(struct browser_window *bw,
IDCMP_MOUSEBUTTONS | IDCMP_NEWSIZE |
IDCMP_VANILLAKEY | IDCMP_RAWKEY |
IDCMP_GADGETUP | IDCMP_IDCMPUPDATE |
- IDCMP_INTUITICKS,
+ IDCMP_INTUITICKS | IDCMP_ACTIVEWINDOW,
// WINDOW_IconifyGadget, TRUE,
WINDOW_NewMenu,menu,
WINDOW_HorizProp,1,
@@ -1593,6 +1596,8 @@ struct gui_window *gui_create_browser_window(struct browser_window *bw,
ICA_TARGET,ICTARGET_IDCMP,
TAG_DONE);
+ curbw = bw;
+
gwin->shared->node = AddObject(window_list,AMINS_WINDOW);
gwin->shared->node->objstruct = gwin->shared;
@@ -1656,6 +1661,8 @@ void gui_window_destroy(struct gui_window *g)
return;
}
+ curbw = NULL;
+
DisposeObject(g->shared->objects[OID_MAIN]);
DeleteLayer(0,g->shared->rp.Layer);
DisposeLayerInfo(g->shared->layerinfo);