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