summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMichael Drake <tlsa@netsurf-browser.org>2012-08-17 10:01:15 +0100
committerMichael Drake <tlsa@netsurf-browser.org>2012-08-17 10:01:15 +0100
commit142a0bf859b70a2b278b007aac99a5ab0811a956 (patch)
tree7d970456f3ef525e30c9bb6f8352fd7ba14185c7
parente177fa49c29ca05f5b2498f286f78da6545f8278 (diff)
downloadnetsurf-142a0bf859b70a2b278b007aac99a5ab0811a956.tar.gz
netsurf-142a0bf859b70a2b278b007aac99a5ab0811a956.tar.bz2
Add content message for setting mouse pointer.
-rw-r--r--content/content.h5
-rw-r--r--desktop/browser.c5
-rw-r--r--render/html.c5
3 files changed, 14 insertions, 1 deletions
diff --git a/content/content.h b/content/content.h
index f3a443868..d0b525c85 100644
--- a/content/content.h
+++ b/content/content.h
@@ -76,7 +76,8 @@ typedef enum {
CONTENT_MSG_GETCTX, /**< Javascript context */
CONTENT_MSG_SCROLL, /**< Request to scroll content */
CONTENT_MSG_DRAGSAVE, /**< Allow drag saving of content */
- CONTENT_MSG_SAVELINK /**< Allow URL to be saved */
+ CONTENT_MSG_SAVELINK, /**< Allow URL to be saved */
+ CONTENT_MSG_POINTER /**< Wants a specific mouse pointer set */
} content_msg;
/** RFC5988 metadata link */
@@ -145,6 +146,8 @@ union content_msg_data {
const char *url;
const char *title;
} savelink;
+ /** CONTENT_MSG_POINTER - Mouse pointer to set */
+ browser_pointer_shape pointer;
};
/** parameters to content redraw */
diff --git a/desktop/browser.c b/desktop/browser.c
index 3c99c5fb4..f9519b011 100644
--- a/desktop/browser.c
+++ b/desktop/browser.c
@@ -1483,6 +1483,11 @@ nserror browser_window_callback(hlcache_handle *c,
}
break;
+ case CONTENT_MSG_POINTER:
+ /* Content wants to have specific mouse pointer */
+ browser_window_set_pointer(bw, event->data.pointer);
+ break;
+
default:
assert(0);
}
diff --git a/render/html.c b/render/html.c
index 7c7b797ba..ed7e7ebaa 100644
--- a/render/html.c
+++ b/render/html.c
@@ -1252,6 +1252,11 @@ html_object_callback(hlcache_handle *object,
content_broadcast(&c->base, CONTENT_MSG_SAVELINK, event->data);
break;
+ case CONTENT_MSG_POINTER:
+ /* Pass it on */
+ content_broadcast(&c->base, CONTENT_MSG_POINTER, event->data);
+ break;
+
default:
assert(0);
}