summaryrefslogtreecommitdiff
path: root/content/content.h
diff options
context:
space:
mode:
authorVincent Sanders <vince@kyllikki.org>2014-11-02 15:46:42 +0000
committerVincent Sanders <vince@kyllikki.org>2014-11-02 15:46:42 +0000
commitc31c4babe172ab581a3196536d47fc2558a01acd (patch)
tree62d8630490f7969d0e690ba881d7b956e53d7561 /content/content.h
parent1794ac0d333acc61eda3424141d4722b7eab9a2b (diff)
downloadnetsurf-c31c4babe172ab581a3196536d47fc2558a01acd.tar.gz
netsurf-c31c4babe172ab581a3196536d47fc2558a01acd.tar.bz2
Change contextual content retrieval to browser features.
Update the API which allows frontends to acquire the page features (images, link urls or form elements) present at the given coordinates within a browser window. By making this an explicit browser_window API and using the browser.h header for the associated data structure with a more appropriate API naming the usage is much more obvious and contained. Additionally the link url is now passed around as a nsurl stopping it being converted from nsurl to text and back again several times.
Diffstat (limited to 'content/content.h')
-rw-r--r--content/content.h17
1 files changed, 13 insertions, 4 deletions
diff --git a/content/content.h b/content/content.h
index 45c9c0452..d78e3d96b 100644
--- a/content/content.h
+++ b/content/content.h
@@ -35,7 +35,6 @@
#include "utils/errors.h"
#include "utils/http.h"
#include "utils/nsurl.h"
-#include "utils/types.h"
#include "content/content_factory.h"
#include "content/content_type.h"
#include "desktop/search.h"
@@ -43,6 +42,7 @@
#include "desktop/plot_style.h"
struct browser_window;
+struct browser_window_features;
struct content;
struct llcache_handle;
struct hlcache_handle;
@@ -50,7 +50,6 @@ struct object_params;
struct rect;
struct redraw_context;
-
/** Status of a content */
typedef enum {
CONTENT_STATUS_LOADING, /**< Content is being fetched or
@@ -271,8 +270,18 @@ void content_open(struct hlcache_handle *h, struct browser_window *bw,
void content_close(struct hlcache_handle *h);
void content_clear_selection(struct hlcache_handle *h);
char * content_get_selection(struct hlcache_handle *h);
-void content_get_contextual_content(struct hlcache_handle *h,
- int x, int y, struct contextual_content *data);
+
+/**
+ * Get positional contextural information for a content.
+ *
+ * \param[in] h Handle to content to examine.
+ * \param[in] x The x coordinate to examine.
+ * \param[in] y The y coordinate to examine.
+ * \param[out] data The context structure to fill in.
+ */
+nserror content_get_contextual_content(struct hlcache_handle *h,
+ int x, int y, struct browser_window_features *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,