From 02780e1f2d557390442abf26fd02ed0d01c3f334 Mon Sep 17 00:00:00 2001 From: Michael Drake Date: Thu, 1 Dec 2011 21:49:57 +0000 Subject: Currently untested (and unused) "drop file on content" handling, and HTML implementation. svn path=/trunk/netsurf/; revision=13214 --- content/content.c | 13 +++++++++++++ content/content.h | 2 ++ content/content_protected.h | 2 ++ 3 files changed, 17 insertions(+) (limited to 'content') diff --git a/content/content.c b/content/content.c index a4f36e2f6..3df71b83f 100644 --- a/content/content.c +++ b/content/content.c @@ -746,6 +746,19 @@ bool content_scroll_at_point(struct hlcache_handle *h, } +bool content_drop_file_at_point(struct hlcache_handle *h, + int x, int y, char *file) +{ + struct content *c = hlcache_handle_get_content(h); + assert(c != 0); + + if (c->handler->drop_file_at_point != NULL) + return c->handler->drop_file_at_point(c, x, y, file); + + return false; +} + + void content_add_error(struct content *c, const char *token, unsigned int line) { diff --git a/content/content.h b/content/content.h index 6e900922a..730988b2a 100644 --- a/content/content.h +++ b/content/content.h @@ -177,6 +177,8 @@ void content_get_contextual_content(struct hlcache_handle *h, int x, int y, struct contextual_content *data); bool content_scroll_at_point(struct hlcache_handle *h, int x, int y, int scrx, int scry); +bool content_drop_file_at_point(struct hlcache_handle *h, + int x, int y, char *file); struct content_rfc5988_link *content_find_rfc5988_link(struct hlcache_handle *c, lwc_string *rel); diff --git a/content/content_protected.h b/content/content_protected.h index 54825589e..34773016f 100644 --- a/content/content_protected.h +++ b/content/content_protected.h @@ -71,6 +71,8 @@ struct content_handler { struct contextual_content *data); bool (*scroll_at_point)(struct content *c, int x, int y, int scrx, int scry); + bool (*drop_file_at_point)(struct content *c, int x, int y, + char *file); nserror (*clone)(const struct content *old, struct content **newc); bool (*matches_quirks)(const struct content *c, bool quirks); content_type (*type)(void); -- cgit v1.2.3