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