1b877906bSopenharmony_ci<?xml version="1.0" encoding="UTF-8"?> 2b877906bSopenharmony_ci<protocol name="relative_pointer_unstable_v1"> 3b877906bSopenharmony_ci 4b877906bSopenharmony_ci <copyright> 5b877906bSopenharmony_ci Copyright © 2014 Jonas Ådahl 6b877906bSopenharmony_ci Copyright © 2015 Red Hat Inc. 7b877906bSopenharmony_ci 8b877906bSopenharmony_ci Permission is hereby granted, free of charge, to any person obtaining a 9b877906bSopenharmony_ci copy of this software and associated documentation files (the "Software"), 10b877906bSopenharmony_ci to deal in the Software without restriction, including without limitation 11b877906bSopenharmony_ci the rights to use, copy, modify, merge, publish, distribute, sublicense, 12b877906bSopenharmony_ci and/or sell copies of the Software, and to permit persons to whom the 13b877906bSopenharmony_ci Software is furnished to do so, subject to the following conditions: 14b877906bSopenharmony_ci 15b877906bSopenharmony_ci The above copyright notice and this permission notice (including the next 16b877906bSopenharmony_ci paragraph) shall be included in all copies or substantial portions of the 17b877906bSopenharmony_ci Software. 18b877906bSopenharmony_ci 19b877906bSopenharmony_ci THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 20b877906bSopenharmony_ci IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 21b877906bSopenharmony_ci FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL 22b877906bSopenharmony_ci THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 23b877906bSopenharmony_ci LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING 24b877906bSopenharmony_ci FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER 25b877906bSopenharmony_ci DEALINGS IN THE SOFTWARE. 26b877906bSopenharmony_ci </copyright> 27b877906bSopenharmony_ci 28b877906bSopenharmony_ci <description summary="protocol for relative pointer motion events"> 29b877906bSopenharmony_ci This protocol specifies a set of interfaces used for making clients able to 30b877906bSopenharmony_ci receive relative pointer events not obstructed by barriers (such as the 31b877906bSopenharmony_ci monitor edge or other pointer barriers). 32b877906bSopenharmony_ci 33b877906bSopenharmony_ci To start receiving relative pointer events, a client must first bind the 34b877906bSopenharmony_ci global interface "wp_relative_pointer_manager" which, if a compositor 35b877906bSopenharmony_ci supports relative pointer motion events, is exposed by the registry. After 36b877906bSopenharmony_ci having created the relative pointer manager proxy object, the client uses 37b877906bSopenharmony_ci it to create the actual relative pointer object using the 38b877906bSopenharmony_ci "get_relative_pointer" request given a wl_pointer. The relative pointer 39b877906bSopenharmony_ci motion events will then, when applicable, be transmitted via the proxy of 40b877906bSopenharmony_ci the newly created relative pointer object. See the documentation of the 41b877906bSopenharmony_ci relative pointer interface for more details. 42b877906bSopenharmony_ci 43b877906bSopenharmony_ci Warning! The protocol described in this file is experimental and backward 44b877906bSopenharmony_ci incompatible changes may be made. Backward compatible changes may be added 45b877906bSopenharmony_ci together with the corresponding interface version bump. Backward 46b877906bSopenharmony_ci incompatible changes are done by bumping the version number in the protocol 47b877906bSopenharmony_ci and interface names and resetting the interface version. Once the protocol 48b877906bSopenharmony_ci is to be declared stable, the 'z' prefix and the version number in the 49b877906bSopenharmony_ci protocol and interface names are removed and the interface version number is 50b877906bSopenharmony_ci reset. 51b877906bSopenharmony_ci </description> 52b877906bSopenharmony_ci 53b877906bSopenharmony_ci <interface name="zwp_relative_pointer_manager_v1" version="1"> 54b877906bSopenharmony_ci <description summary="get relative pointer objects"> 55b877906bSopenharmony_ci A global interface used for getting the relative pointer object for a 56b877906bSopenharmony_ci given pointer. 57b877906bSopenharmony_ci </description> 58b877906bSopenharmony_ci 59b877906bSopenharmony_ci <request name="destroy" type="destructor"> 60b877906bSopenharmony_ci <description summary="destroy the relative pointer manager object"> 61b877906bSopenharmony_ci Used by the client to notify the server that it will no longer use this 62b877906bSopenharmony_ci relative pointer manager object. 63b877906bSopenharmony_ci </description> 64b877906bSopenharmony_ci </request> 65b877906bSopenharmony_ci 66b877906bSopenharmony_ci <request name="get_relative_pointer"> 67b877906bSopenharmony_ci <description summary="get a relative pointer object"> 68b877906bSopenharmony_ci Create a relative pointer interface given a wl_pointer object. See the 69b877906bSopenharmony_ci wp_relative_pointer interface for more details. 70b877906bSopenharmony_ci </description> 71b877906bSopenharmony_ci <arg name="id" type="new_id" interface="zwp_relative_pointer_v1"/> 72b877906bSopenharmony_ci <arg name="pointer" type="object" interface="wl_pointer"/> 73b877906bSopenharmony_ci </request> 74b877906bSopenharmony_ci </interface> 75b877906bSopenharmony_ci 76b877906bSopenharmony_ci <interface name="zwp_relative_pointer_v1" version="1"> 77b877906bSopenharmony_ci <description summary="relative pointer object"> 78b877906bSopenharmony_ci A wp_relative_pointer object is an extension to the wl_pointer interface 79b877906bSopenharmony_ci used for emitting relative pointer events. It shares the same focus as 80b877906bSopenharmony_ci wl_pointer objects of the same seat and will only emit events when it has 81b877906bSopenharmony_ci focus. 82b877906bSopenharmony_ci </description> 83b877906bSopenharmony_ci 84b877906bSopenharmony_ci <request name="destroy" type="destructor"> 85b877906bSopenharmony_ci <description summary="release the relative pointer object"/> 86b877906bSopenharmony_ci </request> 87b877906bSopenharmony_ci 88b877906bSopenharmony_ci <event name="relative_motion"> 89b877906bSopenharmony_ci <description summary="relative pointer motion"> 90b877906bSopenharmony_ci Relative x/y pointer motion from the pointer of the seat associated with 91b877906bSopenharmony_ci this object. 92b877906bSopenharmony_ci 93b877906bSopenharmony_ci A relative motion is in the same dimension as regular wl_pointer motion 94b877906bSopenharmony_ci events, except they do not represent an absolute position. For example, 95b877906bSopenharmony_ci moving a pointer from (x, y) to (x', y') would have the equivalent 96b877906bSopenharmony_ci relative motion (x' - x, y' - y). If a pointer motion caused the 97b877906bSopenharmony_ci absolute pointer position to be clipped by for example the edge of the 98b877906bSopenharmony_ci monitor, the relative motion is unaffected by the clipping and will 99b877906bSopenharmony_ci represent the unclipped motion. 100b877906bSopenharmony_ci 101b877906bSopenharmony_ci This event also contains non-accelerated motion deltas. The 102b877906bSopenharmony_ci non-accelerated delta is, when applicable, the regular pointer motion 103b877906bSopenharmony_ci delta as it was before having applied motion acceleration and other 104b877906bSopenharmony_ci transformations such as normalization. 105b877906bSopenharmony_ci 106b877906bSopenharmony_ci Note that the non-accelerated delta does not represent 'raw' events as 107b877906bSopenharmony_ci they were read from some device. Pointer motion acceleration is device- 108b877906bSopenharmony_ci and configuration-specific and non-accelerated deltas and accelerated 109b877906bSopenharmony_ci deltas may have the same value on some devices. 110b877906bSopenharmony_ci 111b877906bSopenharmony_ci Relative motions are not coupled to wl_pointer.motion events, and can be 112b877906bSopenharmony_ci sent in combination with such events, but also independently. There may 113b877906bSopenharmony_ci also be scenarios where wl_pointer.motion is sent, but there is no 114b877906bSopenharmony_ci relative motion. The order of an absolute and relative motion event 115b877906bSopenharmony_ci originating from the same physical motion is not guaranteed. 116b877906bSopenharmony_ci 117b877906bSopenharmony_ci If the client needs button events or focus state, it can receive them 118b877906bSopenharmony_ci from a wl_pointer object of the same seat that the wp_relative_pointer 119b877906bSopenharmony_ci object is associated with. 120b877906bSopenharmony_ci </description> 121b877906bSopenharmony_ci <arg name="utime_hi" type="uint" 122b877906bSopenharmony_ci summary="high 32 bits of a 64 bit timestamp with microsecond granularity"/> 123b877906bSopenharmony_ci <arg name="utime_lo" type="uint" 124b877906bSopenharmony_ci summary="low 32 bits of a 64 bit timestamp with microsecond granularity"/> 125b877906bSopenharmony_ci <arg name="dx" type="fixed" 126b877906bSopenharmony_ci summary="the x component of the motion vector"/> 127b877906bSopenharmony_ci <arg name="dy" type="fixed" 128b877906bSopenharmony_ci summary="the y component of the motion vector"/> 129b877906bSopenharmony_ci <arg name="dx_unaccel" type="fixed" 130b877906bSopenharmony_ci summary="the x component of the unaccelerated motion vector"/> 131b877906bSopenharmony_ci <arg name="dy_unaccel" type="fixed" 132b877906bSopenharmony_ci summary="the y component of the unaccelerated motion vector"/> 133b877906bSopenharmony_ci </event> 134b877906bSopenharmony_ci </interface> 135b877906bSopenharmony_ci 136b877906bSopenharmony_ci</protocol> 137