summaryrefslogtreecommitdiff
path: root/riscos/mouse.c
diff options
context:
space:
mode:
authorSteve Fryatt <stevef@netsurf-browser.org>2013-09-08 13:27:11 +0100
committerSteve Fryatt <stevef@netsurf-browser.org>2013-09-08 13:27:11 +0100
commitee8fb6f39f3014cf4e4c17a28904850a58f2f4f3 (patch)
tree768f2696348c8ed0038030b35217474fb2a29019 /riscos/mouse.c
parenta00e0f91c7ccb27108cc396ca8afa3207935de4c (diff)
downloadnetsurf-ee8fb6f39f3014cf4e4c17a28904850a58f2f4f3.tar.gz
netsurf-ee8fb6f39f3014cf4e4c17a28904850a58f2f4f3.tar.bz2
Allow ro_mouse to enable null polls; remove unused global variables.
Implement ro_mouse_poll_interval() to allow ro_mouse to influence null polling. Remove unused calls to drag type globals.
Diffstat (limited to 'riscos/mouse.c')
-rw-r--r--riscos/mouse.c41
1 files changed, 41 insertions, 0 deletions
diff --git a/riscos/mouse.c b/riscos/mouse.c
index 73535cae5..5ba1260b7 100644
--- a/riscos/mouse.c
+++ b/riscos/mouse.c
@@ -201,3 +201,44 @@ void ro_mouse_pointer_leaving_window(wimp_leaving *leaving)
ro_mouse_poll_data = NULL;
}
+
+/**
+ * Kill any tracking events if the data pointers match the supplied pointer.
+ *
+ * \param *data The data of the client to be killed.
+ */
+
+void ro_mouse_kill(void *data)
+{
+ if (data == ro_mouse_drag_data) {
+ ro_mouse_drag_end_callback = NULL;
+ ro_mouse_drag_track_callback = NULL;
+ ro_mouse_drag_cancel_callback = NULL;
+ ro_mouse_drag_data = NULL;
+ }
+
+ if (data == ro_mouse_poll_data) {
+ ro_mouse_poll_end_callback = NULL;
+ ro_mouse_poll_track_callback = NULL;
+ ro_mouse_poll_data = NULL;
+ }
+}
+
+
+/**
+ * Return the desired polling interval to allow the mouse tracking to be
+ * carried out.
+ *
+ * \return Desired poll interval (0 for none required).
+ */
+
+os_t ro_mouse_poll_interval(void)
+{
+ if (ro_mouse_drag_track_callback == NULL &&
+ ro_mouse_poll_track_callback == NULL)
+ return 0;
+
+ return 10; // \TODO Return 4 for DRAG_SELECTION && DRAG_SCROLL
+
+}
+