1*6c119a46SAndroid Build Coastguard Worker<?xml version="1.0" encoding="UTF-8"?>
2*6c119a46SAndroid Build Coastguard Worker<protocol name="pointer_constraints_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 constraining pointer motions">
29*6c119a46SAndroid Build Coastguard Worker    This protocol specifies a set of interfaces used for adding constraints to
30*6c119a46SAndroid Build Coastguard Worker    the motion of a pointer. Possible constraints include confining pointer
31*6c119a46SAndroid Build Coastguard Worker    motions to a given region, or locking it to its current position.
32*6c119a46SAndroid Build Coastguard Worker
33*6c119a46SAndroid Build Coastguard Worker    In order to constrain the pointer, a client must first bind the global
34*6c119a46SAndroid Build Coastguard Worker    interface "wp_pointer_constraints" which, if a compositor supports pointer
35*6c119a46SAndroid Build Coastguard Worker    constraints, is exposed by the registry. Using the bound global object, the
36*6c119a46SAndroid Build Coastguard Worker    client uses the request that corresponds to the type of constraint it wants
37*6c119a46SAndroid Build Coastguard Worker    to make. See wp_pointer_constraints for more details.
38*6c119a46SAndroid Build Coastguard Worker
39*6c119a46SAndroid Build Coastguard Worker    Warning! The protocol described in this file is experimental and backward
40*6c119a46SAndroid Build Coastguard Worker    incompatible changes may be made. Backward compatible changes may be added
41*6c119a46SAndroid Build Coastguard Worker    together with the corresponding interface version bump. Backward
42*6c119a46SAndroid Build Coastguard Worker    incompatible changes are done by bumping the version number in the protocol
43*6c119a46SAndroid Build Coastguard Worker    and interface names and resetting the interface version. Once the protocol
44*6c119a46SAndroid Build Coastguard Worker    is to be declared stable, the 'z' prefix and the version number in the
45*6c119a46SAndroid Build Coastguard Worker    protocol and interface names are removed and the interface version number is
46*6c119a46SAndroid Build Coastguard Worker    reset.
47*6c119a46SAndroid Build Coastguard Worker  </description>
48*6c119a46SAndroid Build Coastguard Worker
49*6c119a46SAndroid Build Coastguard Worker  <interface name="zwp_pointer_constraints_v1" version="1">
50*6c119a46SAndroid Build Coastguard Worker    <description summary="constrain the movement of a pointer">
51*6c119a46SAndroid Build Coastguard Worker      The global interface exposing pointer constraining functionality. It
52*6c119a46SAndroid Build Coastguard Worker      exposes two requests: lock_pointer for locking the pointer to its
53*6c119a46SAndroid Build Coastguard Worker      position, and confine_pointer for locking the pointer to a region.
54*6c119a46SAndroid Build Coastguard Worker
55*6c119a46SAndroid Build Coastguard Worker      The lock_pointer and confine_pointer requests create the objects
56*6c119a46SAndroid Build Coastguard Worker      wp_locked_pointer and wp_confined_pointer respectively, and the client can
57*6c119a46SAndroid Build Coastguard Worker      use these objects to interact with the lock.
58*6c119a46SAndroid Build Coastguard Worker
59*6c119a46SAndroid Build Coastguard Worker      For any surface, only one lock or confinement may be active across all
60*6c119a46SAndroid Build Coastguard Worker      wl_pointer objects of the same seat. If a lock or confinement is requested
61*6c119a46SAndroid Build Coastguard Worker      when another lock or confinement is active or requested on the same surface
62*6c119a46SAndroid Build Coastguard Worker      and with any of the wl_pointer objects of the same seat, an
63*6c119a46SAndroid Build Coastguard Worker      'already_constrained' error will be raised.
64*6c119a46SAndroid Build Coastguard Worker    </description>
65*6c119a46SAndroid Build Coastguard Worker
66*6c119a46SAndroid Build Coastguard Worker    <enum name="error">
67*6c119a46SAndroid Build Coastguard Worker      <description summary="wp_pointer_constraints error values">
68*6c119a46SAndroid Build Coastguard Worker	These errors can be emitted in response to wp_pointer_constraints
69*6c119a46SAndroid Build Coastguard Worker	requests.
70*6c119a46SAndroid Build Coastguard Worker      </description>
71*6c119a46SAndroid Build Coastguard Worker      <entry name="already_constrained" value="1"
72*6c119a46SAndroid Build Coastguard Worker	     summary="pointer constraint already requested on that surface"/>
73*6c119a46SAndroid Build Coastguard Worker    </enum>
74*6c119a46SAndroid Build Coastguard Worker
75*6c119a46SAndroid Build Coastguard Worker    <enum name="lifetime">
76*6c119a46SAndroid Build Coastguard Worker      <description summary="constraint lifetime">
77*6c119a46SAndroid Build Coastguard Worker	These values represent different lifetime semantics. They are passed
78*6c119a46SAndroid Build Coastguard Worker	as arguments to the factory requests to specify how the constraint
79*6c119a46SAndroid Build Coastguard Worker	lifetimes should be managed.
80*6c119a46SAndroid Build Coastguard Worker      </description>
81*6c119a46SAndroid Build Coastguard Worker      <entry name="oneshot" value="1">
82*6c119a46SAndroid Build Coastguard Worker	<description summary="the pointer constraint is defunct once deactivated">
83*6c119a46SAndroid Build Coastguard Worker	  A oneshot pointer constraint will never reactivate once it has been
84*6c119a46SAndroid Build Coastguard Worker	  deactivated. See the corresponding deactivation event
85*6c119a46SAndroid Build Coastguard Worker	  (wp_locked_pointer.unlocked and wp_confined_pointer.unconfined) for
86*6c119a46SAndroid Build Coastguard Worker	  details.
87*6c119a46SAndroid Build Coastguard Worker	</description>
88*6c119a46SAndroid Build Coastguard Worker      </entry>
89*6c119a46SAndroid Build Coastguard Worker      <entry name="persistent" value="2">
90*6c119a46SAndroid Build Coastguard Worker	<description summary="the pointer constraint may reactivate">
91*6c119a46SAndroid Build Coastguard Worker	  A persistent pointer constraint may again reactivate once it has
92*6c119a46SAndroid Build Coastguard Worker	  been deactivated. See the corresponding deactivation event
93*6c119a46SAndroid Build Coastguard Worker	  (wp_locked_pointer.unlocked and wp_confined_pointer.unconfined) for
94*6c119a46SAndroid Build Coastguard Worker	  details.
95*6c119a46SAndroid Build Coastguard Worker	</description>
96*6c119a46SAndroid Build Coastguard Worker      </entry>
97*6c119a46SAndroid Build Coastguard Worker    </enum>
98*6c119a46SAndroid Build Coastguard Worker
99*6c119a46SAndroid Build Coastguard Worker    <request name="destroy" type="destructor">
100*6c119a46SAndroid Build Coastguard Worker      <description summary="destroy the pointer constraints manager object">
101*6c119a46SAndroid Build Coastguard Worker	Used by the client to notify the server that it will no longer use this
102*6c119a46SAndroid Build Coastguard Worker	pointer constraints object.
103*6c119a46SAndroid Build Coastguard Worker      </description>
104*6c119a46SAndroid Build Coastguard Worker    </request>
105*6c119a46SAndroid Build Coastguard Worker
106*6c119a46SAndroid Build Coastguard Worker    <request name="lock_pointer">
107*6c119a46SAndroid Build Coastguard Worker      <description summary="lock pointer to a position">
108*6c119a46SAndroid Build Coastguard Worker	The lock_pointer request lets the client request to disable movements of
109*6c119a46SAndroid Build Coastguard Worker	the virtual pointer (i.e. the cursor), effectively locking the pointer
110*6c119a46SAndroid Build Coastguard Worker	to a position. This request may not take effect immediately; in the
111*6c119a46SAndroid Build Coastguard Worker	future, when the compositor deems implementation-specific constraints
112*6c119a46SAndroid Build Coastguard Worker	are satisfied, the pointer lock will be activated and the compositor
113*6c119a46SAndroid Build Coastguard Worker	sends a locked event.
114*6c119a46SAndroid Build Coastguard Worker
115*6c119a46SAndroid Build Coastguard Worker	The protocol provides no guarantee that the constraints are ever
116*6c119a46SAndroid Build Coastguard Worker	satisfied, and does not require the compositor to send an error if the
117*6c119a46SAndroid Build Coastguard Worker	constraints cannot ever be satisfied. It is thus possible to request a
118*6c119a46SAndroid Build Coastguard Worker	lock that will never activate.
119*6c119a46SAndroid Build Coastguard Worker
120*6c119a46SAndroid Build Coastguard Worker	There may not be another pointer constraint of any kind requested or
121*6c119a46SAndroid Build Coastguard Worker	active on the surface for any of the wl_pointer objects of the seat of
122*6c119a46SAndroid Build Coastguard Worker	the passed pointer when requesting a lock. If there is, an error will be
123*6c119a46SAndroid Build Coastguard Worker	raised. See general pointer lock documentation for more details.
124*6c119a46SAndroid Build Coastguard Worker
125*6c119a46SAndroid Build Coastguard Worker	The intersection of the region passed with this request and the input
126*6c119a46SAndroid Build Coastguard Worker	region of the surface is used to determine where the pointer must be
127*6c119a46SAndroid Build Coastguard Worker	in order for the lock to activate. It is up to the compositor whether to
128*6c119a46SAndroid Build Coastguard Worker	warp the pointer or require some kind of user interaction for the lock
129*6c119a46SAndroid Build Coastguard Worker	to activate. If the region is null the surface input region is used.
130*6c119a46SAndroid Build Coastguard Worker
131*6c119a46SAndroid Build Coastguard Worker	A surface may receive pointer focus without the lock being activated.
132*6c119a46SAndroid Build Coastguard Worker
133*6c119a46SAndroid Build Coastguard Worker	The request creates a new object wp_locked_pointer which is used to
134*6c119a46SAndroid Build Coastguard Worker	interact with the lock as well as receive updates about its state. See
135*6c119a46SAndroid Build Coastguard Worker	the the description of wp_locked_pointer for further information.
136*6c119a46SAndroid Build Coastguard Worker
137*6c119a46SAndroid Build Coastguard Worker	Note that while a pointer is locked, the wl_pointer objects of the
138*6c119a46SAndroid Build Coastguard Worker	corresponding seat will not emit any wl_pointer.motion events, but
139*6c119a46SAndroid Build Coastguard Worker	relative motion events will still be emitted via wp_relative_pointer
140*6c119a46SAndroid Build Coastguard Worker	objects of the same seat. wl_pointer.axis and wl_pointer.button events
141*6c119a46SAndroid Build Coastguard Worker	are unaffected.
142*6c119a46SAndroid Build Coastguard Worker      </description>
143*6c119a46SAndroid Build Coastguard Worker      <arg name="id" type="new_id" interface="zwp_locked_pointer_v1"/>
144*6c119a46SAndroid Build Coastguard Worker      <arg name="surface" type="object" interface="wl_surface"
145*6c119a46SAndroid Build Coastguard Worker	   summary="surface to lock pointer to"/>
146*6c119a46SAndroid Build Coastguard Worker      <arg name="pointer" type="object" interface="wl_pointer"
147*6c119a46SAndroid Build Coastguard Worker	   summary="the pointer that should be locked"/>
148*6c119a46SAndroid Build Coastguard Worker      <arg name="region" type="object" interface="wl_region" allow-null="true"
149*6c119a46SAndroid Build Coastguard Worker	   summary="region of surface"/>
150*6c119a46SAndroid Build Coastguard Worker      <arg name="lifetime" type="uint" enum="lifetime" summary="lock lifetime"/>
151*6c119a46SAndroid Build Coastguard Worker    </request>
152*6c119a46SAndroid Build Coastguard Worker
153*6c119a46SAndroid Build Coastguard Worker    <request name="confine_pointer">
154*6c119a46SAndroid Build Coastguard Worker      <description summary="confine pointer to a region">
155*6c119a46SAndroid Build Coastguard Worker	The confine_pointer request lets the client request to confine the
156*6c119a46SAndroid Build Coastguard Worker	pointer cursor to a given region. This request may not take effect
157*6c119a46SAndroid Build Coastguard Worker	immediately; in the future, when the compositor deems implementation-
158*6c119a46SAndroid Build Coastguard Worker	specific constraints are satisfied, the pointer confinement will be
159*6c119a46SAndroid Build Coastguard Worker	activated and the compositor sends a confined event.
160*6c119a46SAndroid Build Coastguard Worker
161*6c119a46SAndroid Build Coastguard Worker	The intersection of the region passed with this request and the input
162*6c119a46SAndroid Build Coastguard Worker	region of the surface is used to determine where the pointer must be
163*6c119a46SAndroid Build Coastguard Worker	in order for the confinement to activate. It is up to the compositor
164*6c119a46SAndroid Build Coastguard Worker	whether to warp the pointer or require some kind of user interaction for
165*6c119a46SAndroid Build Coastguard Worker	the confinement to activate. If the region is null the surface input
166*6c119a46SAndroid Build Coastguard Worker	region is used.
167*6c119a46SAndroid Build Coastguard Worker
168*6c119a46SAndroid Build Coastguard Worker	The request will create a new object wp_confined_pointer which is used
169*6c119a46SAndroid Build Coastguard Worker	to interact with the confinement as well as receive updates about its
170*6c119a46SAndroid Build Coastguard Worker	state. See the the description of wp_confined_pointer for further
171*6c119a46SAndroid Build Coastguard Worker	information.
172*6c119a46SAndroid Build Coastguard Worker      </description>
173*6c119a46SAndroid Build Coastguard Worker      <arg name="id" type="new_id" interface="zwp_confined_pointer_v1"/>
174*6c119a46SAndroid Build Coastguard Worker      <arg name="surface" type="object" interface="wl_surface"
175*6c119a46SAndroid Build Coastguard Worker	   summary="surface to lock pointer to"/>
176*6c119a46SAndroid Build Coastguard Worker      <arg name="pointer" type="object" interface="wl_pointer"
177*6c119a46SAndroid Build Coastguard Worker	   summary="the pointer that should be confined"/>
178*6c119a46SAndroid Build Coastguard Worker      <arg name="region" type="object" interface="wl_region" allow-null="true"
179*6c119a46SAndroid Build Coastguard Worker	   summary="region of surface"/>
180*6c119a46SAndroid Build Coastguard Worker      <arg name="lifetime" type="uint" enum="lifetime" summary="confinement lifetime"/>
181*6c119a46SAndroid Build Coastguard Worker    </request>
182*6c119a46SAndroid Build Coastguard Worker  </interface>
183*6c119a46SAndroid Build Coastguard Worker
184*6c119a46SAndroid Build Coastguard Worker  <interface name="zwp_locked_pointer_v1" version="1">
185*6c119a46SAndroid Build Coastguard Worker    <description summary="receive relative pointer motion events">
186*6c119a46SAndroid Build Coastguard Worker      The wp_locked_pointer interface represents a locked pointer state.
187*6c119a46SAndroid Build Coastguard Worker
188*6c119a46SAndroid Build Coastguard Worker      While the lock of this object is active, the wl_pointer objects of the
189*6c119a46SAndroid Build Coastguard Worker      associated seat will not emit any wl_pointer.motion events.
190*6c119a46SAndroid Build Coastguard Worker
191*6c119a46SAndroid Build Coastguard Worker      This object will send the event 'locked' when the lock is activated.
192*6c119a46SAndroid Build Coastguard Worker      Whenever the lock is activated, it is guaranteed that the locked surface
193*6c119a46SAndroid Build Coastguard Worker      will already have received pointer focus and that the pointer will be
194*6c119a46SAndroid Build Coastguard Worker      within the region passed to the request creating this object.
195*6c119a46SAndroid Build Coastguard Worker
196*6c119a46SAndroid Build Coastguard Worker      To unlock the pointer, send the destroy request. This will also destroy
197*6c119a46SAndroid Build Coastguard Worker      the wp_locked_pointer object.
198*6c119a46SAndroid Build Coastguard Worker
199*6c119a46SAndroid Build Coastguard Worker      If the compositor decides to unlock the pointer the unlocked event is
200*6c119a46SAndroid Build Coastguard Worker      sent. See wp_locked_pointer.unlock for details.
201*6c119a46SAndroid Build Coastguard Worker
202*6c119a46SAndroid Build Coastguard Worker      When unlocking, the compositor may warp the cursor position to the set
203*6c119a46SAndroid Build Coastguard Worker      cursor position hint. If it does, it will not result in any relative
204*6c119a46SAndroid Build Coastguard Worker      motion events emitted via wp_relative_pointer.
205*6c119a46SAndroid Build Coastguard Worker
206*6c119a46SAndroid Build Coastguard Worker      If the surface the lock was requested on is destroyed and the lock is not
207*6c119a46SAndroid Build Coastguard Worker      yet activated, the wp_locked_pointer object is now defunct and must be
208*6c119a46SAndroid Build Coastguard Worker      destroyed.
209*6c119a46SAndroid Build Coastguard Worker    </description>
210*6c119a46SAndroid Build Coastguard Worker
211*6c119a46SAndroid Build Coastguard Worker    <request name="destroy" type="destructor">
212*6c119a46SAndroid Build Coastguard Worker      <description summary="destroy the locked pointer object">
213*6c119a46SAndroid Build Coastguard Worker	Destroy the locked pointer object. If applicable, the compositor will
214*6c119a46SAndroid Build Coastguard Worker	unlock the pointer.
215*6c119a46SAndroid Build Coastguard Worker      </description>
216*6c119a46SAndroid Build Coastguard Worker    </request>
217*6c119a46SAndroid Build Coastguard Worker
218*6c119a46SAndroid Build Coastguard Worker    <request name="set_cursor_position_hint">
219*6c119a46SAndroid Build Coastguard Worker      <description summary="set the pointer cursor position hint">
220*6c119a46SAndroid Build Coastguard Worker	Set the cursor position hint relative to the top left corner of the
221*6c119a46SAndroid Build Coastguard Worker	surface.
222*6c119a46SAndroid Build Coastguard Worker
223*6c119a46SAndroid Build Coastguard Worker	If the client is drawing its own cursor, it should update the position
224*6c119a46SAndroid Build Coastguard Worker	hint to the position of its own cursor. A compositor may use this
225*6c119a46SAndroid Build Coastguard Worker	information to warp the pointer upon unlock in order to avoid pointer
226*6c119a46SAndroid Build Coastguard Worker	jumps.
227*6c119a46SAndroid Build Coastguard Worker
228*6c119a46SAndroid Build Coastguard Worker	The cursor position hint is double buffered. The new hint will only take
229*6c119a46SAndroid Build Coastguard Worker	effect when the associated surface gets it pending state applied. See
230*6c119a46SAndroid Build Coastguard Worker	wl_surface.commit for details.
231*6c119a46SAndroid Build Coastguard Worker      </description>
232*6c119a46SAndroid Build Coastguard Worker      <arg name="surface_x" type="fixed"
233*6c119a46SAndroid Build Coastguard Worker	   summary="surface-local x coordinate"/>
234*6c119a46SAndroid Build Coastguard Worker      <arg name="surface_y" type="fixed"
235*6c119a46SAndroid Build Coastguard Worker	   summary="surface-local y coordinate"/>
236*6c119a46SAndroid Build Coastguard Worker    </request>
237*6c119a46SAndroid Build Coastguard Worker
238*6c119a46SAndroid Build Coastguard Worker    <request name="set_region">
239*6c119a46SAndroid Build Coastguard Worker      <description summary="set a new lock region">
240*6c119a46SAndroid Build Coastguard Worker	Set a new region used to lock the pointer.
241*6c119a46SAndroid Build Coastguard Worker
242*6c119a46SAndroid Build Coastguard Worker	The new lock region is double-buffered. The new lock region will
243*6c119a46SAndroid Build Coastguard Worker	only take effect when the associated surface gets its pending state
244*6c119a46SAndroid Build Coastguard Worker	applied. See wl_surface.commit for details.
245*6c119a46SAndroid Build Coastguard Worker
246*6c119a46SAndroid Build Coastguard Worker	For details about the lock region, see wp_locked_pointer.
247*6c119a46SAndroid Build Coastguard Worker      </description>
248*6c119a46SAndroid Build Coastguard Worker      <arg name="region" type="object" interface="wl_region" allow-null="true"
249*6c119a46SAndroid Build Coastguard Worker	   summary="region of surface"/>
250*6c119a46SAndroid Build Coastguard Worker    </request>
251*6c119a46SAndroid Build Coastguard Worker
252*6c119a46SAndroid Build Coastguard Worker    <event name="locked">
253*6c119a46SAndroid Build Coastguard Worker      <description summary="lock activation event">
254*6c119a46SAndroid Build Coastguard Worker	Notification that the pointer lock of the seat's pointer is activated.
255*6c119a46SAndroid Build Coastguard Worker      </description>
256*6c119a46SAndroid Build Coastguard Worker    </event>
257*6c119a46SAndroid Build Coastguard Worker
258*6c119a46SAndroid Build Coastguard Worker    <event name="unlocked">
259*6c119a46SAndroid Build Coastguard Worker      <description summary="lock deactivation event">
260*6c119a46SAndroid Build Coastguard Worker	Notification that the pointer lock of the seat's pointer is no longer
261*6c119a46SAndroid Build Coastguard Worker	active. If this is a oneshot pointer lock (see
262*6c119a46SAndroid Build Coastguard Worker	wp_pointer_constraints.lifetime) this object is now defunct and should
263*6c119a46SAndroid Build Coastguard Worker	be destroyed. If this is a persistent pointer lock (see
264*6c119a46SAndroid Build Coastguard Worker	wp_pointer_constraints.lifetime) this pointer lock may again
265*6c119a46SAndroid Build Coastguard Worker	reactivate in the future.
266*6c119a46SAndroid Build Coastguard Worker      </description>
267*6c119a46SAndroid Build Coastguard Worker    </event>
268*6c119a46SAndroid Build Coastguard Worker  </interface>
269*6c119a46SAndroid Build Coastguard Worker
270*6c119a46SAndroid Build Coastguard Worker  <interface name="zwp_confined_pointer_v1" version="1">
271*6c119a46SAndroid Build Coastguard Worker    <description summary="confined pointer object">
272*6c119a46SAndroid Build Coastguard Worker      The wp_confined_pointer interface represents a confined pointer state.
273*6c119a46SAndroid Build Coastguard Worker
274*6c119a46SAndroid Build Coastguard Worker      This object will send the event 'confined' when the confinement is
275*6c119a46SAndroid Build Coastguard Worker      activated. Whenever the confinement is activated, it is guaranteed that
276*6c119a46SAndroid Build Coastguard Worker      the surface the pointer is confined to will already have received pointer
277*6c119a46SAndroid Build Coastguard Worker      focus and that the pointer will be within the region passed to the request
278*6c119a46SAndroid Build Coastguard Worker      creating this object. It is up to the compositor to decide whether this
279*6c119a46SAndroid Build Coastguard Worker      requires some user interaction and if the pointer will warp to within the
280*6c119a46SAndroid Build Coastguard Worker      passed region if outside.
281*6c119a46SAndroid Build Coastguard Worker
282*6c119a46SAndroid Build Coastguard Worker      To unconfine the pointer, send the destroy request. This will also destroy
283*6c119a46SAndroid Build Coastguard Worker      the wp_confined_pointer object.
284*6c119a46SAndroid Build Coastguard Worker
285*6c119a46SAndroid Build Coastguard Worker      If the compositor decides to unconfine the pointer the unconfined event is
286*6c119a46SAndroid Build Coastguard Worker      sent. The wp_confined_pointer object is at this point defunct and should
287*6c119a46SAndroid Build Coastguard Worker      be destroyed.
288*6c119a46SAndroid Build Coastguard Worker    </description>
289*6c119a46SAndroid Build Coastguard Worker
290*6c119a46SAndroid Build Coastguard Worker    <request name="destroy" type="destructor">
291*6c119a46SAndroid Build Coastguard Worker      <description summary="destroy the confined pointer object">
292*6c119a46SAndroid Build Coastguard Worker	Destroy the confined pointer object. If applicable, the compositor will
293*6c119a46SAndroid Build Coastguard Worker	unconfine the pointer.
294*6c119a46SAndroid Build Coastguard Worker      </description>
295*6c119a46SAndroid Build Coastguard Worker    </request>
296*6c119a46SAndroid Build Coastguard Worker
297*6c119a46SAndroid Build Coastguard Worker    <request name="set_region">
298*6c119a46SAndroid Build Coastguard Worker      <description summary="set a new confine region">
299*6c119a46SAndroid Build Coastguard Worker	Set a new region used to confine the pointer.
300*6c119a46SAndroid Build Coastguard Worker
301*6c119a46SAndroid Build Coastguard Worker	The new confine region is double-buffered. The new confine region will
302*6c119a46SAndroid Build Coastguard Worker	only take effect when the associated surface gets its pending state
303*6c119a46SAndroid Build Coastguard Worker	applied. See wl_surface.commit for details.
304*6c119a46SAndroid Build Coastguard Worker
305*6c119a46SAndroid Build Coastguard Worker	If the confinement is active when the new confinement region is applied
306*6c119a46SAndroid Build Coastguard Worker	and the pointer ends up outside of newly applied region, the pointer may
307*6c119a46SAndroid Build Coastguard Worker	warped to a position within the new confinement region. If warped, a
308*6c119a46SAndroid Build Coastguard Worker	wl_pointer.motion event will be emitted, but no
309*6c119a46SAndroid Build Coastguard Worker	wp_relative_pointer.relative_motion event.
310*6c119a46SAndroid Build Coastguard Worker
311*6c119a46SAndroid Build Coastguard Worker	The compositor may also, instead of using the new region, unconfine the
312*6c119a46SAndroid Build Coastguard Worker	pointer.
313*6c119a46SAndroid Build Coastguard Worker
314*6c119a46SAndroid Build Coastguard Worker	For details about the confine region, see wp_confined_pointer.
315*6c119a46SAndroid Build Coastguard Worker      </description>
316*6c119a46SAndroid Build Coastguard Worker      <arg name="region" type="object" interface="wl_region" allow-null="true"
317*6c119a46SAndroid Build Coastguard Worker	   summary="region of surface"/>
318*6c119a46SAndroid Build Coastguard Worker    </request>
319*6c119a46SAndroid Build Coastguard Worker
320*6c119a46SAndroid Build Coastguard Worker    <event name="confined">
321*6c119a46SAndroid Build Coastguard Worker      <description summary="pointer confined">
322*6c119a46SAndroid Build Coastguard Worker	Notification that the pointer confinement of the seat's pointer is
323*6c119a46SAndroid Build Coastguard Worker	activated.
324*6c119a46SAndroid Build Coastguard Worker      </description>
325*6c119a46SAndroid Build Coastguard Worker    </event>
326*6c119a46SAndroid Build Coastguard Worker
327*6c119a46SAndroid Build Coastguard Worker    <event name="unconfined">
328*6c119a46SAndroid Build Coastguard Worker      <description summary="pointer unconfined">
329*6c119a46SAndroid Build Coastguard Worker	Notification that the pointer confinement of the seat's pointer is no
330*6c119a46SAndroid Build Coastguard Worker	longer active. If this is a oneshot pointer confinement (see
331*6c119a46SAndroid Build Coastguard Worker	wp_pointer_constraints.lifetime) this object is now defunct and should
332*6c119a46SAndroid Build Coastguard Worker	be destroyed. If this is a persistent pointer confinement (see
333*6c119a46SAndroid Build Coastguard Worker	wp_pointer_constraints.lifetime) this pointer confinement may again
334*6c119a46SAndroid Build Coastguard Worker	reactivate in the future.
335*6c119a46SAndroid Build Coastguard Worker      </description>
336*6c119a46SAndroid Build Coastguard Worker    </event>
337*6c119a46SAndroid Build Coastguard Worker  </interface>
338*6c119a46SAndroid Build Coastguard Worker
339*6c119a46SAndroid Build Coastguard Worker</protocol>
340