diff options
author | Michael Drake <tlsa@netsurf-browser.org> | 2014-02-15 18:43:59 +0000 |
---|---|---|
committer | Michael Drake <tlsa@netsurf-browser.org> | 2014-02-15 18:44:50 +0000 |
commit | a38a63a37ef8bdc62661d398fb485296c0bed470 (patch) | |
tree | 11a1279537f28f51de2fca4c410ecc9b96629a3d /amiga/history_local.c | |
parent | a55957b1c975e96a60d96d9a70c3b64bf02f96fd (diff) | |
download | netsurf-a38a63a37ef8bdc62661d398fb485296c0bed470.tar.gz netsurf-a38a63a37ef8bdc62661d398fb485296c0bed470.tar.bz2 |
Make history internal to browser_window module.
Diffstat (limited to 'amiga/history_local.c')
-rwxr-xr-x | amiga/history_local.c | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/amiga/history_local.c b/amiga/history_local.c index 3eda8874b..56d701d78 100755 --- a/amiga/history_local.c +++ b/amiga/history_local.c @@ -25,8 +25,8 @@ #include <stdbool.h> #include <stdlib.h> #include <string.h> +#include "desktop/browser_history.h" #include "desktop/browser_private.h" -#include "desktop/local_history.h" #include "desktop/plotters.h" #include "amiga/os3support.h" #include "amiga/object.h" @@ -52,7 +52,7 @@ #include <reaction/reaction.h> #include <reaction/reaction_macros.h> -static struct history *history_current = 0; +static struct browser_window *history_bw; /* Last position of mouse in window. */ static int mouse_x = 0; /* Last position of mouse in window. */ @@ -78,7 +78,7 @@ void ami_history_open(struct browser_window *bw, struct history *history) assert(history); - history_current = history; + history_bw = bw; if(!hwindow) { @@ -87,7 +87,7 @@ void ami_history_open(struct browser_window *bw, struct history *history) ami_init_layers(&hwindow->gg, scrn->Width, scrn->Height); hwindow->bw = bw; - history_size(history, &width, &height); + browser_window_history_size(bw, &width, &height); hwindow->scrollerhook.h_Entry = (void *)ami_history_scroller_hook; hwindow->scrollerhook.h_Data = hwindow; @@ -173,7 +173,7 @@ void ami_history_redraw(struct history_window *hw) SetRPAttrs(glob->rp, RPTAG_APenColor, 0xffffffff, TAG_DONE); RectFill(glob->rp, 0, 0, bbox->Width - 1, bbox->Height - 1); - history_redraw_rectangle(history_current, xs, ys, + browser_window_history_redraw_rectangle(history_bw, xs, ys, bbox->Width + xs, bbox->Height + ys, 0, 0, &ctx); glob = &browserglob; @@ -210,13 +210,13 @@ bool ami_history_click(struct history_window *hw,uint16 code) switch(code) { case SELECTUP: - history_click(history_current,x,y,false); + browser_window_history_click(history_bw,x,y,false); ami_history_redraw(hw); ami_schedule_redraw(hw->bw->window->shared, true); break; case MIDDLEUP: - history_click(history_current,x,y,true); + browser_window_history_click(history_bw,x,y,true); ami_history_redraw(hw); break; @@ -265,7 +265,7 @@ BOOL ami_history_event(struct history_window *hw) GetAttr(SCROLLER_Top, hw->objects[OID_HSCROLL], (ULONG *)&xs); GetAttr(SCROLLER_Top, hw->objects[OID_VSCROLL], (ULONG *)&ys); - url = history_position_url(history_current, + url = browser_window_history_position_url(history_bw, hw->win->MouseX - bbox->Left + xs, hw->win->MouseY - bbox->Top + ys); |