mirror of
https://gitlab.freedesktop.org/libinput/libinput.git
synced 2025-12-24 14:40:07 +01:00
This is a large commit because it's difficult to split this up and we don't care about bisecting here anyway. doxygen is going to produce the API documentation only sphinx is going to produce the prose user (and a bit of developer) documentation. The source split is doc/api and doc/user. Steps performed: - run the doxygen-to-sphinx.sh script to convert all .dox sources to .rst - manually fixed the .rst to render correctly - add a few extra .rst documents to generate the right hierarchy - hook up sphinx-build in meson - add a new @mainpage for doxygen more aimed at developers For the build directory: - sphinx produces /Documentation - doxygen now produces /api/ These need to be manually combined in the wayland-web repo, meson doesn't support subdirectories as output paths within the build dir and the documentation doesn't need to be installed anywhere. Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
44 lines
1.6 KiB
ReStructuredText
44 lines
1.6 KiB
ReStructuredText
|
|
.. _timestamps:
|
|
|
|
==============================================================================
|
|
Timestamps
|
|
==============================================================================
|
|
|
|
.. _event_timestamps:
|
|
|
|
------------------------------------------------------------------------------
|
|
Event timestamps
|
|
------------------------------------------------------------------------------
|
|
|
|
Most libinput events provide a timestamp in millisecond and/or microsecond
|
|
resolution. These timestamp usually increase monotonically, but libinput
|
|
does not guarantee that this always the case. In other words, it is possible
|
|
to receive an event with a timestamp earlier than the previous event.
|
|
|
|
For example, if a touchpad has :ref:`tapping` enabled, a button event may have a
|
|
lower timestamp than an event from a different device. Tapping requires the
|
|
use of timeouts to detect multi-finger taps and/or :ref:`tapndrag`.
|
|
|
|
Consider the following event sequences from a touchpad and a mouse:
|
|
|
|
|
|
::
|
|
|
|
Time Touchpad Mouse
|
|
---------------------------------
|
|
t1 finger down
|
|
t2 finger up
|
|
t3 movement
|
|
t4 tap timeout
|
|
|
|
|
|
For this event sequence, the first event to be sent to a caller is in
|
|
response to the mouse movement: an event of type
|
|
**LIBINPUT_EVENT_POINTER_MOTION** with the timestamp t3.
|
|
Once the timeout expires at t4, libinput generates an event of
|
|
**LIBINPUT_EVENT_POINTER_BUTTON** (press) with a timestamp t1 and an event
|
|
**LIBINPUT_EVENT_POINTER_BUTTON** (release) with a timestamp t2.
|
|
|
|
Thus, the caller gets events with timestamps in the order t3, t1, t2,
|
|
despite t3 > t2 > t1.
|