diff options
author | Michael Drake <tlsa@netsurf-browser.org> | 2011-09-06 18:07:30 +0000 |
---|---|---|
committer | Michael Drake <tlsa@netsurf-browser.org> | 2011-09-06 18:07:30 +0000 |
commit | 4075648e7a6c2c0881ecb758d61a461ea303789b (patch) | |
tree | 61e4b8951d8db2f8cb51a71d0a52ec1c0206defe /content/content.c | |
parent | 318803d382986b8c7f5f4f7b5df6e8f3d377c1cb (diff) | |
download | netsurf-4075648e7a6c2c0881ecb758d61a461ea303789b.tar.gz netsurf-4075648e7a6c2c0881ecb758d61a461ea303789b.tar.bz2 |
Content interface to get at contextual content at point.
svn path=/trunk/netsurf/; revision=12753
Diffstat (limited to 'content/content.c')
-rw-r--r-- | content/content.c | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/content/content.c b/content/content.c index 4c87f0eb5..f2d06b639 100644 --- a/content/content.c +++ b/content/content.c @@ -701,6 +701,22 @@ struct selection *content_get_selection(hlcache_handle *h) } +void content_get_contextual_content(struct hlcache_handle *h, + int x, int y, struct contextual_content *data) +{ + struct content *c = hlcache_handle_get_content(h); + assert(c != 0); + + if (c->handler->get_contextual_content != NULL) { + c->handler->get_contextual_content(c, x, y, data); + return; + } else { + data->object = h; + return; + } +} + + void content_add_error(struct content *c, const char *token, unsigned int line) { |