Add content message for setting mouse pointer.

This commit is contained in:
Michael Drake 2012-08-17 10:01:15 +01:00
parent e177fa49c2
commit 142a0bf859
3 changed files with 14 additions and 1 deletions

View File

@ -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 */

View File

@ -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);
}

View File

@ -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);
}