summaryrefslogtreecommitdiff
path: root/desktop/browser.h
diff options
context:
space:
mode:
authorMichael Drake <tlsa@netsurf-browser.org>2011-11-29 14:20:25 +0000
committerMichael Drake <tlsa@netsurf-browser.org>2011-11-29 14:20:25 +0000
commit64c405c541eef1f17d848b1538a7175134d4c14c (patch)
tree30e34d3d76fc49794fb06f1f55868705208cd5eb /desktop/browser.h
parent449e41e306624bd89f84976435d16291ca0405a8 (diff)
downloadnetsurf-64c405c541eef1f17d848b1538a7175134d4c14c.tar.gz
netsurf-64c405c541eef1f17d848b1538a7175134d4c14c.tar.bz2
New function for sending a scroll request into a core browser window at a given coordinate. Currently handles frames only. TODO: iframes and css overflow scrollable boxes. Front ends should call this to pass scroll wheel actions to the core.
svn path=/trunk/netsurf/; revision=13197
Diffstat (limited to 'desktop/browser.h')
-rw-r--r--desktop/browser.h15
1 files changed, 15 insertions, 0 deletions
diff --git a/desktop/browser.h b/desktop/browser.h
index d5c7079af..f2298b59f 100644
--- a/desktop/browser.h
+++ b/desktop/browser.h
@@ -249,6 +249,21 @@ void browser_window_set_scale(struct browser_window *bw, float scale, bool all);
void browser_window_get_contextual_content(struct browser_window *bw,
int x, int y, struct contextual_content *data);
+/**
+ * Send a scroll request to a browser window at a particular point. The
+ * 'deepest' scrollable object which can be scrolled in the requested
+ * direction at the given point will consume the scroll.
+ *
+ * \param bw browser window to look inside
+ * \param x x-coordinate of point of interest
+ * \param y y-coordinate of point of interest
+ * \param scrx number of px try to scroll something in x direction
+ * \param scry number of px try to scroll something in y direction
+ * \return true iff scroll request has been consumed
+ */
+bool browser_window_scroll_at_point(struct browser_window *bw,
+ int x, int y, int scrx, int scry);
+
void browser_window_refresh_url_bar(struct browser_window *bw, nsurl *url,
lwc_string *frag);