summaryrefslogtreecommitdiff
path: root/amiga
diff options
context:
space:
mode:
authorMichael Drake <tlsa@netsurf-browser.org>2014-02-15 18:43:59 +0000
committerMichael Drake <tlsa@netsurf-browser.org>2014-02-15 18:44:50 +0000
commita38a63a37ef8bdc62661d398fb485296c0bed470 (patch)
tree11a1279537f28f51de2fca4c410ecc9b96629a3d /amiga
parenta55957b1c975e96a60d96d9a70c3b64bf02f96fd (diff)
downloadnetsurf-a38a63a37ef8bdc62661d398fb485296c0bed470.tar.gz
netsurf-a38a63a37ef8bdc62661d398fb485296c0bed470.tar.bz2
Make history internal to browser_window module.
Diffstat (limited to 'amiga')
-rw-r--r--amiga/context_menu.c11
-rw-r--r--amiga/gui.c6
-rwxr-xr-xamiga/history_local.c16
-rw-r--r--amiga/menu.c1
4 files changed, 17 insertions, 17 deletions
diff --git a/amiga/context_menu.c b/amiga/context_menu.c
index c7e438fd9..aec89c6e3 100644
--- a/amiga/context_menu.c
+++ b/amiga/context_menu.c
@@ -39,8 +39,8 @@
#include "amiga/theme.h"
#include "amiga/tree.h"
#include "amiga/utf8.h"
+#include "desktop/browser_history.h"
#include "desktop/browser_private.h"
-#include "desktop/local_history.h"
#include "desktop/hotlist.h"
#include "desktop/searchweb.h"
#include "desktop/textinput.h"
@@ -607,7 +607,7 @@ void ami_context_menu_show(struct gui_window_2 *gwin,int x,int y)
gwin->win->MouseX, gwin->win->MouseY))
{
gwin->temp = 0;
- history_enumerate_back(gwin->bw->history, ami_context_menu_history, gwin);
+ browser_window_history_enumerate_back(gwin->bw, ami_context_menu_history, gwin);
IDoMethod(ctxmenuobj, PM_INSERT,
NewObject(POPUPMENU_GetItemClass(), NULL,
@@ -630,7 +630,7 @@ void ami_context_menu_show(struct gui_window_2 *gwin,int x,int y)
gwin->win->MouseX, gwin->win->MouseY))
{
gwin->temp = 0;
- history_enumerate_forward(gwin->bw->history, ami_context_menu_history, gwin);
+ browser_window_history_enumerate_forward(gwin->bw, ami_context_menu_history, gwin);
IDoMethod(ctxmenuobj, PM_INSERT,
NewObject(POPUPMENU_GetItemClass(), NULL,
@@ -1247,8 +1247,9 @@ static uint32 ami_context_menu_hook_tree(struct Hook *hook, Object *item, APTR r
return itemid;
}
-static bool ami_context_menu_history(const struct history *history, int x0, int y0,
- int x1, int y1, const struct history_entry *entry, void *user_data)
+static bool ami_context_menu_history(const struct browser_window *bw,
+ int x0, int y0, int x1, int y1,
+ const struct history_entry *entry, void *user_data)
{
struct gui_window_2 *gwin = (struct gui_window_2 *)user_data;
diff --git a/amiga/gui.c b/amiga/gui.c
index a9491502e..aedb26c56 100644
--- a/amiga/gui.c
+++ b/amiga/gui.c
@@ -19,9 +19,9 @@
/* NetSurf core includes */
#include "content/urldb.h"
#include "css/utils.h"
+#include "desktop/browser_history.h"
#include "desktop/browser_private.h"
#include "desktop/hotlist.h"
-#include "desktop/local_history.h"
#include "desktop/mouse.h"
#include "desktop/netsurf.h"
#include "utils/nsoption.h"
@@ -1065,12 +1065,12 @@ void ami_gui_history(struct gui_window_2 *gwin, bool back)
if(back == true)
{
if(browser_window_back_available(gwin->bw))
- history_back(gwin->bw->history, false);
+ browser_window_history_back(gwin->bw, false);
}
else
{
if(browser_window_forward_available(gwin->bw))
- history_forward(gwin->bw->history, false);
+ browser_window_history_forward(gwin->bw, false);
}
ami_update_buttons(gwin);
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);
diff --git a/amiga/menu.c b/amiga/menu.c
index 014f21c25..2c019bd9e 100644
--- a/amiga/menu.c
+++ b/amiga/menu.c
@@ -61,7 +61,6 @@
#include "desktop/hotlist.h"
#include "desktop/browser_private.h"
#include "desktop/gui.h"
-#include "desktop/local_history.h"
#include "desktop/textinput.h"
#include "utils/messages.h"
#include "utils/schedule.h"