| 1 |
<?xml version="1.0" encoding="UTF-8"?> |
| 2 |
<protocol name="input_timestamps_unstable_v1"> |
| 3 |
|
| 4 |
<copyright> |
| 5 |
Copyright © 2017 Collabora, Ltd. |
| 6 |
|
| 7 |
Permission is hereby granted, free of charge, to any person obtaining a |
| 8 |
copy of this software and associated documentation files (the "Software"), |
| 9 |
to deal in the Software without restriction, including without limitation |
| 10 |
the rights to use, copy, modify, merge, publish, distribute, sublicense, |
| 11 |
and/or sell copies of the Software, and to permit persons to whom the |
| 12 |
Software is furnished to do so, subject to the following conditions: |
| 13 |
|
| 14 |
The above copyright notice and this permission notice (including the next |
| 15 |
paragraph) shall be included in all copies or substantial portions of the |
| 16 |
Software. |
| 17 |
|
| 18 |
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR |
| 19 |
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, |
| 20 |
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL |
| 21 |
THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER |
| 22 |
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING |
| 23 |
FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER |
| 24 |
DEALINGS IN THE SOFTWARE. |
| 25 |
</copyright> |
| 26 |
|
| 27 |
<description summary="High-resolution timestamps for input events"> |
| 28 |
This protocol specifies a way for a client to request and receive |
| 29 |
high-resolution timestamps for input events. |
| 30 |
|
| 31 |
Warning! The protocol described in this file is experimental and |
| 32 |
backward incompatible changes may be made. Backward compatible changes |
| 33 |
may be added together with the corresponding interface version bump. |
| 34 |
Backward incompatible changes are done by bumping the version number in |
| 35 |
the protocol and interface names and resetting the interface version. |
| 36 |
Once the protocol is to be declared stable, the 'z' prefix and the |
| 37 |
version number in the protocol and interface names are removed and the |
| 38 |
interface version number is reset. |
| 39 |
</description> |
| 40 |
|
| 41 |
<interface name="zwp_input_timestamps_manager_v1" version="1"> |
| 42 |
<description summary="context object for high-resolution input timestamps"> |
| 43 |
A global interface used for requesting high-resolution timestamps |
| 44 |
for input events. |
| 45 |
</description> |
| 46 |
|
| 47 |
<request name="destroy" type="destructor"> |
| 48 |
<description summary="destroy the input timestamps manager object"> |
| 49 |
Informs the server that the client will no longer be using this |
| 50 |
protocol object. Existing objects created by this object are not |
| 51 |
affected. |
| 52 |
</description> |
| 53 |
</request> |
| 54 |
|
| 55 |
<request name="get_keyboard_timestamps"> |
| 56 |
<description summary="subscribe to high-resolution keyboard timestamp events"> |
| 57 |
Creates a new input timestamps object that represents a subscription |
| 58 |
to high-resolution timestamp events for all wl_keyboard events that |
| 59 |
carry a timestamp. |
| 60 |
|
| 61 |
If the associated wl_keyboard object is invalidated, either through |
| 62 |
client action (e.g. release) or server-side changes, the input |
| 63 |
timestamps object becomes inert and the client should destroy it |
| 64 |
by calling zwp_input_timestamps_v1.destroy. |
| 65 |
</description> |
| 66 |
<arg name="id" type="new_id" interface="zwp_input_timestamps_v1"/> |
| 67 |
<arg name="keyboard" type="object" interface="wl_keyboard" |
| 68 |
summary="the wl_keyboard object for which to get timestamp events"/> |
| 69 |
</request> |
| 70 |
|
| 71 |
<request name="get_pointer_timestamps"> |
| 72 |
<description summary="subscribe to high-resolution pointer timestamp events"> |
| 73 |
Creates a new input timestamps object that represents a subscription |
| 74 |
to high-resolution timestamp events for all wl_pointer events that |
| 75 |
carry a timestamp. |
| 76 |
|
| 77 |
If the associated wl_pointer object is invalidated, either through |
| 78 |
client action (e.g. release) or server-side changes, the input |
| 79 |
timestamps object becomes inert and the client should destroy it |
| 80 |
by calling zwp_input_timestamps_v1.destroy. |
| 81 |
</description> |
| 82 |
<arg name="id" type="new_id" interface="zwp_input_timestamps_v1"/> |
| 83 |
<arg name="pointer" type="object" interface="wl_pointer" |
| 84 |
summary="the wl_pointer object for which to get timestamp events"/> |
| 85 |
</request> |
| 86 |
|
| 87 |
<request name="get_touch_timestamps"> |
| 88 |
<description summary="subscribe to high-resolution touch timestamp events"> |
| 89 |
Creates a new input timestamps object that represents a subscription |
| 90 |
to high-resolution timestamp events for all wl_touch events that |
| 91 |
carry a timestamp. |
| 92 |
|
| 93 |
If the associated wl_touch object becomes invalid, either through |
| 94 |
client action (e.g. release) or server-side changes, the input |
| 95 |
timestamps object becomes inert and the client should destroy it |
| 96 |
by calling zwp_input_timestamps_v1.destroy. |
| 97 |
</description> |
| 98 |
<arg name="id" type="new_id" interface="zwp_input_timestamps_v1"/> |
| 99 |
<arg name="touch" type="object" interface="wl_touch" |
| 100 |
summary="the wl_touch object for which to get timestamp events"/> |
| 101 |
</request> |
| 102 |
</interface> |
| 103 |
|
| 104 |
<interface name="zwp_input_timestamps_v1" version="1"> |
| 105 |
<description summary="context object for input timestamps"> |
| 106 |
Provides high-resolution timestamp events for a set of subscribed input |
| 107 |
events. The set of subscribed input events is determined by the |
| 108 |
zwp_input_timestamps_manager_v1 request used to create this object. |
| 109 |
</description> |
| 110 |
|
| 111 |
<request name="destroy" type="destructor"> |
| 112 |
<description summary="destroy the input timestamps object"> |
| 113 |
Informs the server that the client will no longer be using this |
| 114 |
protocol object. After the server processes the request, no more |
| 115 |
timestamp events will be emitted. |
| 116 |
</description> |
| 117 |
</request> |
| 118 |
|
| 119 |
<event name="timestamp"> |
| 120 |
<description summary="high-resolution timestamp event"> |
| 121 |
The timestamp event is associated with the first subsequent input event |
| 122 |
carrying a timestamp which belongs to the set of input events this |
| 123 |
object is subscribed to. |
| 124 |
|
| 125 |
The timestamp provided by this event is a high-resolution version of |
| 126 |
the timestamp argument of the associated input event. The provided |
| 127 |
timestamp is in the same clock domain and is at least as accurate as |
| 128 |
the associated input event timestamp. |
| 129 |
|
| 130 |
The timestamp is expressed as tv_sec_hi, tv_sec_lo, tv_nsec triples, |
| 131 |
each component being an unsigned 32-bit value. Whole seconds are in |
| 132 |
tv_sec which is a 64-bit value combined from tv_sec_hi and tv_sec_lo, |
| 133 |
and the additional fractional part in tv_nsec as nanoseconds. Hence, |
| 134 |
for valid timestamps tv_nsec must be in [0, 999999999]. |
| 135 |
</description> |
| 136 |
<arg name="tv_sec_hi" type="uint" |
| 137 |
summary="high 32 bits of the seconds part of the timestamp"/> |
| 138 |
<arg name="tv_sec_lo" type="uint" |
| 139 |
summary="low 32 bits of the seconds part of the timestamp"/> |
| 140 |
<arg name="tv_nsec" type="uint" |
| 141 |
summary="nanoseconds part of the timestamp"/> |
| 142 |
</event> |
| 143 |
</interface> |
| 144 |
|
| 145 |
</protocol> |