input-timestamps-unstable-v1.xml 7.0 KB

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