summaryrefslogtreecommitdiff
path: root/content
diff options
context:
space:
mode:
Diffstat (limited to 'content')
-rw-r--r--content/content.c15
-rw-r--r--content/content.h17
-rw-r--r--content/content_protected.h4
3 files changed, 22 insertions, 14 deletions
diff --git a/content/content.c b/content/content.c
index 4641571bd..ee6ff818f 100644
--- a/content/content.c
+++ b/content/content.c
@@ -795,20 +795,19 @@ char * content_get_selection(hlcache_handle *h)
return NULL;
}
-
-void content_get_contextual_content(struct hlcache_handle *h,
- int x, int y, struct contextual_content *data)
+/* exported interface documented in content/content.h */
+nserror content_get_contextual_content(struct hlcache_handle *h,
+ int x, int y, struct browser_window_features *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;
+ return c->handler->get_contextual_content(c, x, y, data);
}
+
+ data->object = h;
+ return NSERROR_OK;
}
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,
diff --git a/content/content_protected.h b/content/content_protected.h
index 7d51e1b8c..84b401f00 100644
--- a/content/content_protected.h
+++ b/content/content_protected.h
@@ -67,8 +67,8 @@ struct content_handler {
void (*close)(struct content *c);
void (*clear_selection)(struct content *c);
char * (*get_selection)(struct content *c);
- void (*get_contextual_content)(struct content *c, int x, int y,
- struct contextual_content *data);
+ nserror (*get_contextual_content)(struct content *c, int x, int y,
+ struct browser_window_features *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,