summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBastien Nocera <hadess@hadess.net>2013-10-08 11:40:23 +0200
committerBastien Nocera <hadess@hadess.net>2013-10-08 14:56:31 +0200
commit676a7cdc946887ed745606be21bc3ead14079339 (patch)
tree613eefdca65cde86fd78f9c39c1fcc8faeb93aec
parentd7814cf63eab1cf95625b06face9f914133d7eaa (diff)
downloadclutter-676a7cdc946887ed745606be21bc3ead14079339.tar.gz
ClutterEvent: Mention _get_source_device() in docs
It's too easy getting bitten by the ->device red herring, thinking that it's the original input device the event originated from. https://bugzilla.gnome.org/show_bug.cgi?id=709620
-rw-r--r--clutter/clutter-event.c2
-rw-r--r--clutter/clutter-event.h18
2 files changed, 14 insertions, 6 deletions
diff --git a/clutter/clutter-event.c b/clutter/clutter-event.c
index 569c0db29..03655f6c3 100644
--- a/clutter/clutter-event.c
+++ b/clutter/clutter-event.c
@@ -1079,6 +1079,8 @@ clutter_event_set_device (ClutterEvent *event,
* @event: a #ClutterEvent
*
* Retrieves the #ClutterInputDevice for the event.
+ * If you want the physical device the event originated from, use
+ * clutter_event_get_source_device().
*
* The #ClutterInputDevice structure is completely opaque and should
* be cast to the platform-specific implementation.
diff --git a/clutter/clutter-event.h b/clutter/clutter-event.h
index f83f4ca64..30e84d988 100644
--- a/clutter/clutter-event.h
+++ b/clutter/clutter-event.h
@@ -146,7 +146,8 @@ struct _ClutterAnyEvent
* @keyval: raw key value
* @hardware_keycode: raw hardware key value
* @unicode_value: Unicode representation
- * @device: reserved for future use
+ * @device: the device that originated the event. If you want the physical
+ * device the event originated from, use clutter_event_get_source_device()
*
* Key event
*
@@ -181,7 +182,8 @@ struct _ClutterKeyEvent
* @click_count: number of button presses within the default time
* and radius
* @axes: reserved for future use
- * @device: reserved for future use
+ * @device: the device that originated the event. If you want the physical
+ * device the event originated from, use clutter_event_get_source_device()
*
* Button event.
*
@@ -218,7 +220,8 @@ struct _ClutterButtonEvent
* @x: event X coordinate
* @y: event Y coordinate
* @related: actor related to the crossing
- * @device: reserved for future use
+ * @device: the device that originated the event. If you want the physical
+ * device the event originated from, use clutter_event_get_source_device()
*
* Event for the movement of the pointer across different actors
*
@@ -249,7 +252,8 @@ struct _ClutterCrossingEvent
* @y: event Y coordinate
* @modifier_state: button modifiers
* @axes: reserved for future use
- * @device: reserved for future use
+ * @device: the device that originated the event. If you want the physical
+ * device the event originated from, use clutter_event_get_source_device()
*
* Event for the pointer motion
*
@@ -282,7 +286,8 @@ struct _ClutterMotionEvent
* @direction: direction of the scrolling
* @modifier_state: button modifiers
* @axes: reserved for future use
- * @device: reserved for future use
+ * @device: the device that originated the event. If you want the physical
+ * device the event originated from, use clutter_event_get_source_device()
*
* Scroll wheel (or similar device) event
*
@@ -344,7 +349,8 @@ struct _ClutterStageStateEvent
* of modifier keys (e.g. Control, Shift, and Alt) and the pointer
* buttons. See #ClutterModifierType
* @axes: reserved
- * @device: the device that originated the event
+ * @device: the device that originated the event. If you want the physical
+ * device the event originated from, use clutter_event_get_source_device()
*
* Used for touch events.
*