Correct documentation on get_slot and get_seat_slot()

We don't actually use TOUCH_CANCEL in libinput, but either way calling the
slot on a cancel should be valid. Calling it on a FRAME event is not.

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Reviewed-by: Hans de Goede <hdegoede@redhat.com>
This commit is contained in:
Peter Hutterer 2015-03-13 09:50:07 +10:00
parent 3c7b83e0e0
commit 1447f1e3ed

View file

@ -797,8 +797,13 @@ libinput_event_touch_get_time(struct libinput_event_touch *event);
* If the touch event has no assigned slot, for example if it is from a
* single touch device, this function returns -1.
*
* @note this function should not be called for @ref
* LIBINPUT_EVENT_TOUCH_CANCEL or @ref LIBINPUT_EVENT_TOUCH_FRAME.
* For events not of type @ref LIBINPUT_EVENT_TOUCH_DOWN, @ref
* LIBINPUT_EVENT_TOUCH_UP, @ref LIBINPUT_EVENT_TOUCH_MOTION or @ref
* LIBINPUT_EVENT_TOUCH_CANCEL, this function returns 0.
*
* @note It is an application bug to call this function for events of type
* other than @ref LIBINPUT_EVENT_TOUCH_DOWN, @ref LIBINPUT_EVENT_TOUCH_UP,
* @ref LIBINPUT_EVENT_TOUCH_MOTION or @ref LIBINPUT_EVENT_TOUCH_CANCEL.
*
* @return The slot of this touch event
*/
@ -814,8 +819,13 @@ libinput_event_touch_get_slot(struct libinput_event_touch *event);
* Events from single touch devices will be represented as one individual
* touch point per device.
*
* @note this function should not be called for @ref
* LIBINPUT_EVENT_TOUCH_CANCEL or @ref LIBINPUT_EVENT_TOUCH_FRAME.
* For events not of type @ref LIBINPUT_EVENT_TOUCH_DOWN, @ref
* LIBINPUT_EVENT_TOUCH_UP, @ref LIBINPUT_EVENT_TOUCH_MOTION or @ref
* LIBINPUT_EVENT_TOUCH_CANCEL, this function returns 0.
*
* @note It is an application bug to call this function for events of type
* other than @ref LIBINPUT_EVENT_TOUCH_DOWN, @ref LIBINPUT_EVENT_TOUCH_UP,
* @ref LIBINPUT_EVENT_TOUCH_MOTION or @ref LIBINPUT_EVENT_TOUCH_CANCEL.
*
* @return The seat slot of the touch event
*/