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