summaryrefslogtreecommitdiff
path: root/riscos/history.c
diff options
context:
space:
mode:
authorJames Bursa <james@netsurf-browser.org>2004-02-26 17:52:10 +0000
committerJames Bursa <james@netsurf-browser.org>2004-02-26 17:52:10 +0000
commitc05d6fdc8bce910e5a2f7838c5bf906508f2a32a (patch)
tree704a4baecee045319926e48e23e265f47c49f251 /riscos/history.c
parent0a4caa5687e90b54d1c69854140efd11f5ad2ed9 (diff)
downloadnetsurf-c05d6fdc8bce910e5a2f7838c5bf906508f2a32a.tar.gz
netsurf-c05d6fdc8bce910e5a2f7838c5bf906508f2a32a.tar.bz2
[project @ 2004-02-26 17:52:10 by bursa]
Implement back and forward using history. svn path=/import/netsurf/; revision=572
Diffstat (limited to 'riscos/history.c')
-rw-r--r--riscos/history.c32
1 files changed, 32 insertions, 0 deletions
diff --git a/riscos/history.c b/riscos/history.c
index 192c7e245..a11f82877 100644
--- a/riscos/history.c
+++ b/riscos/history.c
@@ -331,6 +331,7 @@ void ro_gui_history_open(struct browser_window *bw,
state.visible.y0 = wy - height / 2;
state.visible.x1 = wx + width / 2;
state.visible.y1 = wy + height / 2;
+ state.next = wimp_TOP;
wimp_open_window((wimp_open *) &state);
}
@@ -486,3 +487,34 @@ struct history_entry * ro_gui_history_click_find(struct history_entry *he,
return 0;
}
+
+/**
+ * Go back in the history.
+ *
+ * \param bw browser window
+ * \param history history of the window
+ */
+
+void history_back(struct browser_window *bw, struct history *history)
+{
+ if (!history || !history->current->back)
+ return;
+ history->current = history->current->back;
+ browser_window_go_post(bw, history->current->url, 0, 0, false);
+}
+
+
+/**
+ * Go forward in the history.
+ *
+ * \param bw browser window
+ * \param history history of the window
+ */
+
+void history_forward(struct browser_window *bw, struct history *history)
+{
+ if (!history || !history->current->forward_pref)
+ return;
+ history->current = history->current->forward_pref;
+ browser_window_go_post(bw, history->current->url, 0, 0, false);
+}