summaryrefslogtreecommitdiff
path: root/desktop/local_history.c
diff options
context:
space:
mode:
authorVincent Sanders <vince@kyllikki.org>2017-05-28 21:56:33 +0100
committerVincent Sanders <vince@kyllikki.org>2017-05-28 21:56:33 +0100
commitf1fdd93ffda5181f325905c8509a2bea9d78eb41 (patch)
treee11fc515501520fb9b6e8e7f394fb073e21efad8 /desktop/local_history.c
parent6736ab9b724702c82b4aebc61c3d51c48d9c958c (diff)
downloadnetsurf-f1fdd93ffda5181f325905c8509a2bea9d78eb41.tar.gz
netsurf-f1fdd93ffda5181f325905c8509a2bea9d78eb41.tar.bz2
Add local history get url API
Diffstat (limited to 'desktop/local_history.c')
-rw-r--r--desktop/local_history.c21
1 files changed, 21 insertions, 0 deletions
diff --git a/desktop/local_history.c b/desktop/local_history.c
index 06f300245..6d07c8ad7 100644
--- a/desktop/local_history.c
+++ b/desktop/local_history.c
@@ -91,7 +91,10 @@ local_history_mouse_action(struct local_history_session *session,
{
if (mouse & BROWSER_MOUSE_PRESS_1) {
browser_window_history_click(session->bw, x, y, false);
+ } else if (mouse & BROWSER_MOUSE_PRESS_2) {
+ browser_window_history_click(session->bw, x, y, true);
}
+
}
/* exported interface documented in desktop/local_history.h */
@@ -134,3 +137,21 @@ local_history_get_size(struct local_history_session *session,
return NSERROR_OK;
}
+
+
+/* exported interface documented in desktop/local_history.h */
+nserror
+local_history_get_url(struct local_history_session *session,
+ int x, int y,
+ const char **url_out)
+{
+ const char *url;
+ url = browser_window_history_position_url(session->bw, x, y);
+ if (url == NULL) {
+ return NSERROR_NOT_FOUND;
+ }
+
+ *url_out = url;
+
+ return NSERROR_OK;
+}