From a38a63a37ef8bdc62661d398fb485296c0bed470 Mon Sep 17 00:00:00 2001 From: Michael Drake Date: Sat, 15 Feb 2014 18:43:59 +0000 Subject: Make history internal to browser_window module. --- amiga/history_local.c | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) (limited to 'amiga/history_local.c') 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 #include #include +#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 #include -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); -- cgit v1.2.3