Debian Codegraph @

unstable/tablet/tablet-unstable-v2.xml

raw
1 <?xml version="1.0" encoding="UTF-8"?>
2 <protocol name="tablet_unstable_v2">
3
4 <copyright>
5 Copyright 2014 © Stephen "Lyude" Chandler Paul
6 Copyright 2015-2016 © Red Hat, Inc.
7
8 Permission is hereby granted, free of charge, to any person
9 obtaining a copy of this software and associated documentation files
10 (the "Software"), to deal in the Software without restriction,
11 including without limitation the rights to use, copy, modify, merge,
12 publish, distribute, sublicense, and/or sell copies of the Software,
13 and to permit persons to whom the Software is furnished to do so,
14 subject to the following conditions:
15
16 The above copyright notice and this permission notice (including the
17 next paragraph) shall be included in all copies or substantial
18 portions of the Software.
19
20 THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
21 EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
22 MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
23 NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS
24 BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN
25 ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
26 CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
27 SOFTWARE.
28 </copyright>
29
30 <description summary="Wayland protocol for graphics tablets">
31 This description provides a high-level overview of the interplay between
32 the interfaces defined this protocol. For details, see the protocol
33 specification.
34
35 More than one tablet may exist, and device-specifics matter. Tablets are
36 not represented by a single virtual device like wl_pointer. A client
37 binds to the tablet manager object which is just a proxy object. From
38 that, the client requests wp_tablet_manager.get_tablet_seat(wl_seat)
39 and that returns the actual interface that has all the tablets. With
40 this indirection, we can avoid merging wp_tablet into the actual Wayland
41 protocol, a long-term benefit.
42
43 The wp_tablet_seat sends a "tablet added" event for each tablet
44 connected. That event is followed by descriptive events about the
45 hardware; currently that includes events for name, vid/pid and
46 a wp_tablet.path event that describes a local path. This path can be
47 used to uniquely identify a tablet or get more information through
48 libwacom. Emulated or nested tablets can skip any of those, e.g. a
49 virtual tablet may not have a vid/pid. The sequence of descriptive
50 events is terminated by a wp_tablet.done event to signal that a client
51 may now finalize any initialization for that tablet.
52
53 Events from tablets require a tool in proximity. Tools are also managed
54 by the tablet seat; a "tool added" event is sent whenever a tool is new
55 to the compositor. That event is followed by a number of descriptive
56 events about the hardware; currently that includes capabilities,
57 hardware id and serial number, and tool type. Similar to the tablet
58 interface, a wp_tablet_tool.done event is sent to terminate that initial
59 sequence.
60
61 Any event from a tool happens on the wp_tablet_tool interface. When the
62 tool gets into proximity of the tablet, a proximity_in event is sent on
63 the wp_tablet_tool interface, listing the tablet and the surface. That
64 event is followed by a motion event with the coordinates. After that,
65 it's the usual motion, axis, button, etc. events. The protocol's
66 serialisation means events are grouped by wp_tablet_tool.frame events.
67
68 Two special events (that don't exist in X) are down and up. They signal
69 "tip touching the surface". For tablets without real proximity
70 detection, the sequence is: proximity_in, motion, down, frame.
71
72 When the tool leaves proximity, a proximity_out event is sent. If any
73 button is still down, a button release event is sent before this
74 proximity event. These button events are sent in the same frame as the
75 proximity event to signal to the client that the buttons were held when
76 the tool left proximity.
77
78 If the tool moves out of the surface but stays in proximity (i.e.
79 between windows), compositor-specific grab policies apply. This usually
80 means that the proximity-out is delayed until all buttons are released.
81
82 Moving a tool physically from one tablet to the other has no real effect
83 on the protocol, since we already have the tool object from the "tool
84 added" event. All the information is already there and the proximity
85 events on both tablets are all a client needs to reconstruct what
86 happened.
87
88 Some extra axes are normalized, i.e. the client knows the range as
89 specified in the protocol (e.g. [0, 65535]), the granularity however is
90 unknown. The current normalized axes are pressure, distance, and slider.
91
92 Other extra axes are in physical units as specified in the protocol.
93 The current extra axes with physical units are tilt, rotation and
94 wheel rotation.
95
96 Since tablets work independently of the pointer controlled by the mouse,
97 the focus handling is independent too and controlled by proximity.
98 The wp_tablet_tool.set_cursor request sets a tool-specific cursor.
99 This cursor surface may be the same as the mouse cursor, and it may be
100 the same across tools but it is possible to be more fine-grained. For
101 example, a client may set different cursors for the pen and eraser.
102
103 Tools are generally independent of tablets and it is
104 compositor-specific policy when a tool can be removed. Common approaches
105 will likely include some form of removing a tool when all tablets the
106 tool was used on are removed.
107
108 Disclaimer: This protocol extension has been marked stable. This copy is
109 no longer used and only retained for backwards compatibility. The
110 canonical version can be found in the stable/ directory.
111 </description>
112
113 <interface name="zwp_tablet_manager_v2" version="1">
114 <description summary="controller object for graphic tablet devices">
115 An object that provides access to the graphics tablets available on this
116 system. All tablets are associated with a seat, to get access to the
117 actual tablets, use wp_tablet_manager.get_tablet_seat.
118 </description>
119
120 <request name="get_tablet_seat">
121 <description summary="get the tablet seat">
122 Get the wp_tablet_seat object for the given seat. This object
123 provides access to all graphics tablets in this seat.
124 </description>
125 <arg name="tablet_seat" type="new_id" interface="zwp_tablet_seat_v2"/>
126 <arg name="seat" type="object" interface="wl_seat" summary="The wl_seat object to retrieve the tablets for" />
127 </request>
128
129 <request name="destroy" type="destructor">
130 <description summary="release the memory for the tablet manager object">
131 Destroy the wp_tablet_manager object. Objects created from this
132 object are unaffected and should be destroyed separately.
133 </description>
134 </request>
135 </interface>
136
137 <interface name="zwp_tablet_seat_v2" version="1">
138 <description summary="controller object for graphic tablet devices of a seat">
139 An object that provides access to the graphics tablets available on this
140 seat. After binding to this interface, the compositor sends a set of
141 wp_tablet_seat.tablet_added and wp_tablet_seat.tool_added events.
142 </description>
143
144 <request name="destroy" type="destructor">
145 <description summary="release the memory for the tablet seat object">
146 Destroy the wp_tablet_seat object. Objects created from this
147 object are unaffected and should be destroyed separately.
148 </description>
149 </request>
150
151 <event name="tablet_added">
152 <description summary="new device notification">
153 This event is sent whenever a new tablet becomes available on this
154 seat. This event only provides the object id of the tablet, any
155 static information about the tablet (device name, vid/pid, etc.) is
156 sent through the wp_tablet interface.
157 </description>
158 <arg name="id" type="new_id" interface="zwp_tablet_v2" summary="the newly added graphics tablet"/>
159 </event>
160
161 <event name="tool_added">
162 <description summary="a new tool has been used with a tablet">
163 This event is sent whenever a tool that has not previously been used
164 with a tablet comes into use. This event only provides the object id
165 of the tool; any static information about the tool (capabilities,
166 type, etc.) is sent through the wp_tablet_tool interface.
167 </description>
168 <arg name="id" type="new_id" interface="zwp_tablet_tool_v2" summary="the newly added tablet tool"/>
169 </event>
170
171 <event name="pad_added">
172 <description summary="new pad notification">
173 This event is sent whenever a new pad is known to the system. Typically,
174 pads are physically attached to tablets and a pad_added event is
175 sent immediately after the wp_tablet_seat.tablet_added.
176 However, some standalone pad devices logically attach to tablets at
177 runtime, and the client must wait for wp_tablet_pad.enter to know
178 the tablet a pad is attached to.
179
180 This event only provides the object id of the pad. All further
181 features (buttons, strips, rings) are sent through the wp_tablet_pad
182 interface.
183 </description>
184 <arg name="id" type="new_id" interface="zwp_tablet_pad_v2" summary="the newly added pad"/>
185 </event>
186 </interface>
187
188 <interface name="zwp_tablet_tool_v2" version="1">
189 <description summary="a physical tablet tool">
190 An object that represents a physical tool that has been, or is
191 currently in use with a tablet in this seat. Each wp_tablet_tool
192 object stays valid until the client destroys it; the compositor
193 reuses the wp_tablet_tool object to indicate that the object's
194 respective physical tool has come into proximity of a tablet again.
195
196 A wp_tablet_tool object's relation to a physical tool depends on the
197 tablet's ability to report serial numbers. If the tablet supports
198 this capability, then the object represents a specific physical tool
199 and can be identified even when used on multiple tablets.
200
201 A tablet tool has a number of static characteristics, e.g. tool type,
202 hardware_serial and capabilities. These capabilities are sent in an
203 event sequence after the wp_tablet_seat.tool_added event before any
204 actual events from this tool. This initial event sequence is
205 terminated by a wp_tablet_tool.done event.
206
207 Tablet tool events are grouped by wp_tablet_tool.frame events.
208 Any events received before a wp_tablet_tool.frame event should be
209 considered part of the same hardware state change.
210 </description>
211
212 <request name="set_cursor">
213 <description summary="set the tablet tool's surface">
214 Sets the surface of the cursor used for this tool on the given
215 tablet. This request only takes effect if the tool is in proximity
216 of one of the requesting client's surfaces or the surface parameter
217 is the current pointer surface. If there was a previous surface set
218 with this request it is replaced. If surface is NULL, the cursor
219 image is hidden.
220
221 The parameters hotspot_x and hotspot_y define the position of the
222 pointer surface relative to the pointer location. Its top-left corner
223 is always at (x, y) - (hotspot_x, hotspot_y), where (x, y) are the
224 coordinates of the pointer location, in surface-local coordinates.
225
226 On surface.attach requests to the pointer surface, hotspot_x and
227 hotspot_y are decremented by the x and y parameters passed to the
228 request. Attach must be confirmed by wl_surface.commit as usual.
229
230 The hotspot can also be updated by passing the currently set pointer
231 surface to this request with new values for hotspot_x and hotspot_y.
232
233 The current and pending input regions of the wl_surface are cleared,
234 and wl_surface.set_input_region is ignored until the wl_surface is no
235 longer used as the cursor. When the use as a cursor ends, the current
236 and pending input regions become undefined, and the wl_surface is
237 unmapped.
238
239 This request gives the surface the role of a wp_tablet_tool cursor. A
240 surface may only ever be used as the cursor surface for one
241 wp_tablet_tool. If the surface already has another role or has
242 previously been used as cursor surface for a different tool, a
243 protocol error is raised.
244 </description>
245 <arg name="serial" type="uint" summary="serial of the proximity_in event"/>
246 <arg name="surface" type="object" interface="wl_surface" allow-null="true"/>
247 <arg name="hotspot_x" type="int" summary="surface-local x coordinate"/>
248 <arg name="hotspot_y" type="int" summary="surface-local y coordinate"/>
249 </request>
250
251 <request name="destroy" type="destructor">
252 <description summary="destroy the tool object">
253 This destroys the client's resource for this tool object.
254 </description>
255 </request>
256
257 <enum name="type">
258 <description summary="a physical tool type">
259 Describes the physical type of a tool. The physical type of a tool
260 generally defines its base usage.
261
262 The mouse tool represents a mouse-shaped tool that is not a relative
263 device but bound to the tablet's surface, providing absolute
264 coordinates.
265
266 The lens tool is a mouse-shaped tool with an attached lens to
267 provide precision focus.
268 </description>
269 <entry name="pen" value="0x140" summary="Pen"/>
270 <entry name="eraser" value="0x141" summary="Eraser"/>
271 <entry name="brush" value="0x142" summary="Brush"/>
272 <entry name="pencil" value="0x143" summary="Pencil"/>
273 <entry name="airbrush" value="0x144" summary="Airbrush"/>
274 <entry name="finger" value="0x145" summary="Finger"/>
275 <entry name="mouse" value="0x146" summary="Mouse"/>
276 <entry name="lens" value="0x147" summary="Lens"/>
277 </enum>
278
279 <event name="type">
280 <description summary="tool type">
281 The tool type is the high-level type of the tool and usually decides
282 the interaction expected from this tool.
283
284 This event is sent in the initial burst of events before the
285 wp_tablet_tool.done event.
286 </description>
287 <arg name="tool_type" type="uint" enum="type" summary="the physical tool type"/>
288 </event>
289
290 <event name="hardware_serial">
291 <description summary="unique hardware serial number of the tool">
292 If the physical tool can be identified by a unique 64-bit serial
293 number, this event notifies the client of this serial number.
294
295 If multiple tablets are available in the same seat and the tool is
296 uniquely identifiable by the serial number, that tool may move
297 between tablets.
298
299 Otherwise, if the tool has no serial number and this event is
300 missing, the tool is tied to the tablet it first comes into
301 proximity with. Even if the physical tool is used on multiple
302 tablets, separate wp_tablet_tool objects will be created, one per
303 tablet.
304
305 This event is sent in the initial burst of events before the
306 wp_tablet_tool.done event.
307 </description>
308 <arg name="hardware_serial_hi" type="uint" summary="the unique serial number of the tool, most significant bits"/>
309 <arg name="hardware_serial_lo" type="uint" summary="the unique serial number of the tool, least significant bits"/>
310 </event>
311
312 <event name="hardware_id_wacom">
313 <description summary="hardware id notification in Wacom's format">
314 This event notifies the client of a hardware id available on this tool.
315
316 The hardware id is a device-specific 64-bit id that provides extra
317 information about the tool in use, beyond the wl_tool.type
318 enumeration. The format of the id is specific to tablets made by
319 Wacom Inc. For example, the hardware id of a Wacom Grip
320 Pen (a stylus) is 0x802.
321
322 This event is sent in the initial burst of events before the
323 wp_tablet_tool.done event.
324 </description>
325 <arg name="hardware_id_hi" type="uint" summary="the hardware id, most significant bits"/>
326 <arg name="hardware_id_lo" type="uint" summary="the hardware id, least significant bits"/>
327 </event>
328
329 <enum name="capability">
330 <description summary="capability flags for a tool">
331 Describes extra capabilities on a tablet.
332
333 Any tool must provide x and y values, extra axes are
334 device-specific.
335 </description>
336 <entry name="tilt" value="1" summary="Tilt axes"/>
337 <entry name="pressure" value="2" summary="Pressure axis"/>
338 <entry name="distance" value="3" summary="Distance axis"/>
339 <entry name="rotation" value="4" summary="Z-rotation axis"/>
340 <entry name="slider" value="5" summary="Slider axis"/>
341 <entry name="wheel" value="6" summary="Wheel axis"/>
342 </enum>
343
344 <event name="capability">
345 <description summary="tool capability notification">
346 This event notifies the client of any capabilities of this tool,
347 beyond the main set of x/y axes and tip up/down detection.
348
349 One event is sent for each extra capability available on this tool.
350
351 This event is sent in the initial burst of events before the
352 wp_tablet_tool.done event.
353 </description>
354 <arg name="capability" type="uint" enum="capability" summary="the capability"/>
355 </event>
356
357 <event name="done">
358 <description summary="tool description events sequence complete">
359 This event signals the end of the initial burst of descriptive
360 events. A client may consider the static description of the tool to
361 be complete and finalize initialization of the tool.
362 </description>
363 </event>
364
365 <event name="removed">
366 <description summary="tool removed">
367 This event is sent when the tool is removed from the system and will
368 send no further events. Should the physical tool come back into
369 proximity later, a new wp_tablet_tool object will be created.
370
371 It is compositor-dependent when a tool is removed. A compositor may
372 remove a tool on proximity out, tablet removal or any other reason.
373 A compositor may also keep a tool alive until shutdown.
374
375 If the tool is currently in proximity, a proximity_out event will be
376 sent before the removed event. See wp_tablet_tool.proximity_out for
377 the handling of any buttons logically down.
378
379 When this event is received, the client must wp_tablet_tool.destroy
380 the object.
381 </description>
382 </event>
383
384 <event name="proximity_in">
385 <description summary="proximity in event">
386 Notification that this tool is focused on a certain surface.
387
388 This event can be received when the tool has moved from one surface to
389 another, or when the tool has come back into proximity above the
390 surface.
391
392 If any button is logically down when the tool comes into proximity,
393 the respective button event is sent after the proximity_in event but
394 within the same frame as the proximity_in event.
395 </description>
396 <arg name="serial" type="uint"/>
397 <arg name="tablet" type="object" interface="zwp_tablet_v2" summary="The tablet the tool is in proximity of"/>
398 <arg name="surface" type="object" interface="wl_surface" summary="The current surface the tablet tool is over"/>
399 </event>
400
401 <event name="proximity_out">
402 <description summary="proximity out event">
403 Notification that this tool has either left proximity, or is no
404 longer focused on a certain surface.
405
406 When the tablet tool leaves proximity of the tablet, button release
407 events are sent for each button that was held down at the time of
408 leaving proximity. These events are sent before the proximity_out
409 event but within the same wp_tablet.frame.
410
411 If the tool stays within proximity of the tablet, but the focus
412 changes from one surface to another, a button release event may not
413 be sent until the button is actually released or the tool leaves the
414 proximity of the tablet.
415 </description>
416 </event>
417
418 <event name="down">
419 <description summary="tablet tool is making contact">
420 Sent whenever the tablet tool comes in contact with the surface of the
421 tablet.
422
423 If the tool is already in contact with the tablet when entering the
424 input region, the client owning said region will receive a
425 wp_tablet.proximity_in event, followed by a wp_tablet.down
426 event and a wp_tablet.frame event.
427
428 Note that this event describes logical contact, not physical
429 contact. On some devices, a compositor may not consider a tool in
430 logical contact until a minimum physical pressure threshold is
431 exceeded.
432 </description>
433 <arg name="serial" type="uint"/>
434 </event>
435
436 <event name="up">
437 <description summary="tablet tool is no longer making contact">
438 Sent whenever the tablet tool stops making contact with the surface of
439 the tablet, or when the tablet tool moves out of the input region
440 and the compositor grab (if any) is dismissed.
441
442 If the tablet tool moves out of the input region while in contact
443 with the surface of the tablet and the compositor does not have an
444 ongoing grab on the surface, the client owning said region will
445 receive a wp_tablet.up event, followed by a wp_tablet.proximity_out
446 event and a wp_tablet.frame event. If the compositor has an ongoing
447 grab on this device, this event sequence is sent whenever the grab
448 is dismissed in the future.
449
450 Note that this event describes logical contact, not physical
451 contact. On some devices, a compositor may not consider a tool out
452 of logical contact until physical pressure falls below a specific
453 threshold.
454 </description>
455 </event>
456
457 <event name="motion">
458 <description summary="motion event">
459 Sent whenever a tablet tool moves.
460 </description>
461 <arg name="x" type="fixed" summary="surface-local x coordinate"/>
462 <arg name="y" type="fixed" summary="surface-local y coordinate"/>
463 </event>
464
465 <event name="pressure">
466 <description summary="pressure change event">
467 Sent whenever the pressure axis on a tool changes. The value of this
468 event is normalized to a value between 0 and 65535.
469
470 Note that pressure may be nonzero even when a tool is not in logical
471 contact. See the down and up events for more details.
472 </description>
473 <arg name="pressure" type="uint" summary="The current pressure value"/>
474 </event>
475
476 <event name="distance">
477 <description summary="distance change event">
478 Sent whenever the distance axis on a tool changes. The value of this
479 event is normalized to a value between 0 and 65535.
480
481 Note that distance may be nonzero even when a tool is not in logical
482 contact. See the down and up events for more details.
483 </description>
484 <arg name="distance" type="uint" summary="The current distance value"/>
485 </event>
486
487 <event name="tilt">
488 <description summary="tilt change event">
489 Sent whenever one or both of the tilt axes on a tool change. Each tilt
490 value is in degrees, relative to the z-axis of the tablet.
491 The angle is positive when the top of a tool tilts along the
492 positive x or y axis.
493 </description>
494 <arg name="tilt_x" type="fixed" summary="The current value of the X tilt axis"/>
495 <arg name="tilt_y" type="fixed" summary="The current value of the Y tilt axis"/>
496 </event>
497
498 <event name="rotation">
499 <description summary="z-rotation change event">
500 Sent whenever the z-rotation axis on the tool changes. The
501 rotation value is in degrees clockwise from the tool's
502 logical neutral position.
503 </description>
504 <arg name="degrees" type="fixed" summary="The current rotation of the Z axis"/>
505 </event>
506
507 <event name="slider">
508 <description summary="Slider position change event">
509 Sent whenever the slider position on the tool changes. The
510 value is normalized between -65535 and 65535, with 0 as the logical
511 neutral position of the slider.
512
513 The slider is available on e.g. the Wacom Airbrush tool.
514 </description>
515 <arg name="position" type="int" summary="The current position of slider"/>
516 </event>
517
518 <event name="wheel">
519 <description summary="Wheel delta event">
520 Sent whenever the wheel on the tool emits an event. This event
521 contains two values for the same axis change. The degrees value is
522 in the same orientation as the wl_pointer.vertical_scroll axis. The
523 clicks value is in discrete logical clicks of the mouse wheel. This
524 value may be zero if the movement of the wheel was less
525 than one logical click.
526
527 Clients should choose either value and avoid mixing degrees and
528 clicks. The compositor may accumulate values smaller than a logical
529 click and emulate click events when a certain threshold is met.
530 Thus, wl_tablet_tool.wheel events with non-zero clicks values may
531 have different degrees values.
532 </description>
533 <arg name="degrees" type="fixed" summary="The wheel delta in degrees"/>
534 <arg name="clicks" type="int" summary="The wheel delta in discrete clicks"/>
535 </event>
536
537 <enum name="button_state">
538 <description summary="physical button state">
539 Describes the physical state of a button that produced the button event.
540 </description>
541 <entry name="released" value="0" summary="button is not pressed"/>
542 <entry name="pressed" value="1" summary="button is pressed"/>
543 </enum>
544
545 <event name="button">
546 <description summary="button event">
547 Sent whenever a button on the tool is pressed or released.
548
549 If a button is held down when the tool moves in or out of proximity,
550 button events are generated by the compositor. See
551 wp_tablet_tool.proximity_in and wp_tablet_tool.proximity_out for
552 details.
553 </description>
554 <arg name="serial" type="uint"/>
555 <arg name="button" type="uint" summary="The button whose state has changed"/>
556 <arg name="state" type="uint" enum="button_state" summary="Whether the button was pressed or released"/>
557 </event>
558
559 <event name="frame">
560 <description summary="frame event">
561 Marks the end of a series of axis and/or button updates from the
562 tablet. The Wayland protocol requires axis updates to be sent
563 sequentially, however all events within a frame should be considered
564 one hardware event.
565 </description>
566 <arg name="time" type="uint" summary="The time of the event with millisecond granularity"/>
567 </event>
568
569 <enum name="error">
570 <entry name="role" value="0" summary="given wl_surface has another role"/>
571 </enum>
572 </interface>
573
574 <interface name="zwp_tablet_v2" version="1">
575 <description summary="graphics tablet device">
576 The wp_tablet interface represents one graphics tablet device. The
577 tablet interface itself does not generate events; all events are
578 generated by wp_tablet_tool objects when in proximity above a tablet.
579
580 A tablet has a number of static characteristics, e.g. device name and
581 pid/vid. These capabilities are sent in an event sequence after the
582 wp_tablet_seat.tablet_added event. This initial event sequence is
583 terminated by a wp_tablet.done event.
584 </description>
585
586 <request name="destroy" type="destructor">
587 <description summary="destroy the tablet object">
588 This destroys the client's resource for this tablet object.
589 </description>
590 </request>
591
592 <event name="name">
593 <description summary="tablet device name">
594 A descriptive name for the tablet device.
595
596 If the device has no descriptive name, this event is not sent.
597
598 This event is sent in the initial burst of events before the
599 wp_tablet.done event.
600 </description>
601 <arg name="name" type="string" summary="the device name"/>
602 </event>
603
604 <event name="id">
605 <description summary="tablet device USB vendor/product id">
606 The USB vendor and product IDs for the tablet device.
607
608 If the device has no USB vendor/product ID, this event is not sent.
609 This can happen for virtual devices or non-USB devices, for instance.
610
611 This event is sent in the initial burst of events before the
612 wp_tablet.done event.
613 </description>
614 <arg name="vid" type="uint" summary="USB vendor id"/>
615 <arg name="pid" type="uint" summary="USB product id"/>
616 </event>
617
618 <event name="path">
619 <description summary="path to the device">
620 A system-specific device path that indicates which device is behind
621 this wp_tablet. This information may be used to gather additional
622 information about the device, e.g. through libwacom.
623
624 A device may have more than one device path. If so, multiple
625 wp_tablet.path events are sent. A device may be emulated and not
626 have a device path, and in that case this event will not be sent.
627
628 The format of the path is unspecified, it may be a device node, a
629 sysfs path, or some other identifier. It is up to the client to
630 identify the string provided.
631
632 This event is sent in the initial burst of events before the
633 wp_tablet.done event.
634 </description>
635 <arg name="path" type="string" summary="path to local device"/>
636 </event>
637
638 <event name="done">
639 <description summary="tablet description events sequence complete">
640 This event is sent immediately to signal the end of the initial
641 burst of descriptive events. A client may consider the static
642 description of the tablet to be complete and finalize initialization
643 of the tablet.
644 </description>
645 </event>
646
647 <event name="removed">
648 <description summary="tablet removed event">
649 Sent when the tablet has been removed from the system. When a tablet
650 is removed, some tools may be removed.
651
652 When this event is received, the client must wp_tablet.destroy
653 the object.
654 </description>
655 </event>
656 </interface>
657
658 <interface name="zwp_tablet_pad_ring_v2" version="1">
659 <description summary="pad ring">
660 A circular interaction area, such as the touch ring on the Wacom Intuos
661 Pro series tablets.
662
663 Events on a ring are logically grouped by the wl_tablet_pad_ring.frame
664 event.
665 </description>
666
667 <request name="set_feedback">
668 <description summary="set compositor feedback">
669 Request that the compositor use the provided feedback string
670 associated with this ring. This request should be issued immediately
671 after a wp_tablet_pad_group.mode_switch event from the corresponding
672 group is received, or whenever the ring is mapped to a different
673 action. See wp_tablet_pad_group.mode_switch for more details.
674
675 Clients are encouraged to provide context-aware descriptions for
676 the actions associated with the ring; compositors may use this
677 information to offer visual feedback about the button layout
678 (eg. on-screen displays).
679
680 The provided string 'description' is a UTF-8 encoded string to be
681 associated with this ring, and is considered user-visible; general
682 internationalization rules apply.
683
684 The serial argument will be that of the last
685 wp_tablet_pad_group.mode_switch event received for the group of this
686 ring. Requests providing other serials than the most recent one will be
687 ignored.
688 </description>
689 <arg name="description" type="string" summary="ring description"/>
690 <arg name="serial" type="uint" summary="serial of the mode switch event"/>
691 </request>
692
693 <request name="destroy" type="destructor">
694 <description summary="destroy the ring object">
695 This destroys the client's resource for this ring object.
696 </description>
697 </request>
698
699 <enum name="source">
700 <description summary="ring axis source">
701 Describes the source types for ring events. This indicates to the
702 client how a ring event was physically generated; a client may
703 adjust the user interface accordingly. For example, events
704 from a "finger" source may trigger kinetic scrolling.
705 </description>
706 <entry name="finger" value="1" summary="finger"/>
707 </enum>
708
709 <event name="source">
710 <description summary="ring event source">
711 Source information for ring events.
712
713 This event does not occur on its own. It is sent before a
714 wp_tablet_pad_ring.frame event and carries the source information
715 for all events within that frame.
716
717 The source specifies how this event was generated. If the source is
718 wp_tablet_pad_ring.source.finger, a wp_tablet_pad_ring.stop event
719 will be sent when the user lifts the finger off the device.
720
721 This event is optional. If the source is unknown for an interaction,
722 no event is sent.
723 </description>
724 <arg name="source" type="uint" enum="source" summary="the event source"/>
725 </event>
726
727 <event name="angle">
728 <description summary="angle changed">
729 Sent whenever the angle on a ring changes.
730
731 The angle is provided in degrees clockwise from the logical
732 north of the ring in the pad's current rotation.
733 </description>
734 <arg name="degrees" type="fixed" summary="the current angle in degrees"/>
735 </event>
736
737 <event name="stop">
738 <description summary="interaction stopped">
739 Stop notification for ring events.
740
741 For some wp_tablet_pad_ring.source types, a wp_tablet_pad_ring.stop
742 event is sent to notify a client that the interaction with the ring
743 has terminated. This enables the client to implement kinetic scrolling.
744 See the wp_tablet_pad_ring.source documentation for information on
745 when this event may be generated.
746
747 Any wp_tablet_pad_ring.angle events with the same source after this
748 event should be considered as the start of a new interaction.
749 </description>
750 </event>
751
752 <event name="frame">
753 <description summary="end of a ring event sequence">
754 Indicates the end of a set of ring events that logically belong
755 together. A client is expected to accumulate the data in all events
756 within the frame before proceeding.
757
758 All wp_tablet_pad_ring events before a wp_tablet_pad_ring.frame event belong
759 logically together. For example, on termination of a finger interaction
760 on a ring the compositor will send a wp_tablet_pad_ring.source event,
761 a wp_tablet_pad_ring.stop event and a wp_tablet_pad_ring.frame event.
762
763 A wp_tablet_pad_ring.frame event is sent for every logical event
764 group, even if the group only contains a single wp_tablet_pad_ring
765 event. Specifically, a client may get a sequence: angle, frame,
766 angle, frame, etc.
767 </description>
768 <arg name="time" type="uint" summary="timestamp with millisecond granularity"/>
769 </event>
770 </interface>
771
772 <interface name="zwp_tablet_pad_strip_v2" version="1">
773 <description summary="pad strip">
774 A linear interaction area, such as the strips found in Wacom Cintiq
775 models.
776
777 Events on a strip are logically grouped by the wl_tablet_pad_strip.frame
778 event.
779 </description>
780
781 <request name="set_feedback">
782 <description summary="set compositor feedback">
783 Requests the compositor to use the provided feedback string
784 associated with this strip. This request should be issued immediately
785 after a wp_tablet_pad_group.mode_switch event from the corresponding
786 group is received, or whenever the strip is mapped to a different
787 action. See wp_tablet_pad_group.mode_switch for more details.
788
789 Clients are encouraged to provide context-aware descriptions for
790 the actions associated with the strip, and compositors may use this
791 information to offer visual feedback about the button layout
792 (eg. on-screen displays).
793
794 The provided string 'description' is a UTF-8 encoded string to be
795 associated with this ring, and is considered user-visible; general
796 internationalization rules apply.
797
798 The serial argument will be that of the last
799 wp_tablet_pad_group.mode_switch event received for the group of this
800 strip. Requests providing other serials than the most recent one will be
801 ignored.
802 </description>
803 <arg name="description" type="string" summary="strip description"/>
804 <arg name="serial" type="uint" summary="serial of the mode switch event"/>
805 </request>
806
807 <request name="destroy" type="destructor">
808 <description summary="destroy the strip object">
809 This destroys the client's resource for this strip object.
810 </description>
811 </request>
812
813 <enum name="source">
814 <description summary="strip axis source">
815 Describes the source types for strip events. This indicates to the
816 client how a strip event was physically generated; a client may
817 adjust the user interface accordingly. For example, events
818 from a "finger" source may trigger kinetic scrolling.
819 </description>
820 <entry name="finger" value="1" summary="finger"/>
821 </enum>
822
823 <event name="source">
824 <description summary="strip event source">
825 Source information for strip events.
826
827 This event does not occur on its own. It is sent before a
828 wp_tablet_pad_strip.frame event and carries the source information
829 for all events within that frame.
830
831 The source specifies how this event was generated. If the source is
832 wp_tablet_pad_strip.source.finger, a wp_tablet_pad_strip.stop event
833 will be sent when the user lifts their finger off the device.
834
835 This event is optional. If the source is unknown for an interaction,
836 no event is sent.
837 </description>
838 <arg name="source" type="uint" enum="source" summary="the event source"/>
839 </event>
840
841 <event name="position">
842 <description summary="position changed">
843 Sent whenever the position on a strip changes.
844
845 The position is normalized to a range of [0, 65535], the 0-value
846 represents the top-most and/or left-most position of the strip in
847 the pad's current rotation.
848 </description>
849 <arg name="position" type="uint" summary="the current position"/>
850 </event>
851
852 <event name="stop">
853 <description summary="interaction stopped">
854 Stop notification for strip events.
855
856 For some wp_tablet_pad_strip.source types, a wp_tablet_pad_strip.stop
857 event is sent to notify a client that the interaction with the strip
858 has terminated. This enables the client to implement kinetic
859 scrolling. See the wp_tablet_pad_strip.source documentation for
860 information on when this event may be generated.
861
862 Any wp_tablet_pad_strip.position events with the same source after this
863 event should be considered as the start of a new interaction.
864 </description>
865 </event>
866
867 <event name="frame">
868 <description summary="end of a strip event sequence">
869 Indicates the end of a set of events that represent one logical
870 hardware strip event. A client is expected to accumulate the data
871 in all events within the frame before proceeding.
872
873 All wp_tablet_pad_strip events before a wp_tablet_pad_strip.frame event belong
874 logically together. For example, on termination of a finger interaction
875 on a strip the compositor will send a wp_tablet_pad_strip.source event,
876 a wp_tablet_pad_strip.stop event and a wp_tablet_pad_strip.frame
877 event.
878
879 A wp_tablet_pad_strip.frame event is sent for every logical event
880 group, even if the group only contains a single wp_tablet_pad_strip
881 event. Specifically, a client may get a sequence: position, frame,
882 position, frame, etc.
883 </description>
884 <arg name="time" type="uint" summary="timestamp with millisecond granularity"/>
885 </event>
886 </interface>
887
888 <interface name="zwp_tablet_pad_group_v2" version="1">
889 <description summary="a set of buttons, rings and strips">
890 A pad group describes a distinct (sub)set of buttons, rings and strips
891 present in the tablet. The criteria of this grouping is usually positional,
892 eg. if a tablet has buttons on the left and right side, 2 groups will be
893 presented. The physical arrangement of groups is undisclosed and may
894 change on the fly.
895
896 Pad groups will announce their features during pad initialization. Between
897 the corresponding wp_tablet_pad.group event and wp_tablet_pad_group.done, the
898 pad group will announce the buttons, rings and strips contained in it,
899 plus the number of supported modes.
900
901 Modes are a mechanism to allow multiple groups of actions for every element
902 in the pad group. The number of groups and available modes in each is
903 persistent across device plugs. The current mode is user-switchable, it
904 will be announced through the wp_tablet_pad_group.mode_switch event both
905 whenever it is switched, and after wp_tablet_pad.enter.
906
907 The current mode logically applies to all elements in the pad group,
908 although it is at clients' discretion whether to actually perform different
909 actions, and/or issue the respective .set_feedback requests to notify the
910 compositor. See the wp_tablet_pad_group.mode_switch event for more details.
911 </description>
912
913 <request name="destroy" type="destructor">
914 <description summary="destroy the pad object">
915 Destroy the wp_tablet_pad_group object. Objects created from this object
916 are unaffected and should be destroyed separately.
917 </description>
918 </request>
919
920 <event name="buttons">
921 <description summary="buttons announced">
922 Sent on wp_tablet_pad_group initialization to announce the available
923 buttons in the group. Button indices start at 0, a button may only be
924 in one group at a time.
925
926 This event is first sent in the initial burst of events before the
927 wp_tablet_pad_group.done event.
928
929 Some buttons are reserved by the compositor. These buttons may not be
930 assigned to any wp_tablet_pad_group. Compositors may broadcast this
931 event in the case of changes to the mapping of these reserved buttons.
932 If the compositor happens to reserve all buttons in a group, this event
933 will be sent with an empty array.
934 </description>
935 <arg name="buttons" type="array" summary="buttons in this group"/>
936 </event>
937
938 <event name="ring">
939 <description summary="ring announced">
940 Sent on wp_tablet_pad_group initialization to announce available rings.
941 One event is sent for each ring available on this pad group.
942
943 This event is sent in the initial burst of events before the
944 wp_tablet_pad_group.done event.
945 </description>
946 <arg name="ring" type="new_id" interface="zwp_tablet_pad_ring_v2"/>
947 </event>
948
949 <event name="strip">
950 <description summary="strip announced">
951 Sent on wp_tablet_pad initialization to announce available strips.
952 One event is sent for each strip available on this pad group.
953
954 This event is sent in the initial burst of events before the
955 wp_tablet_pad_group.done event.
956 </description>
957 <arg name="strip" type="new_id" interface="zwp_tablet_pad_strip_v2"/>
958 </event>
959
960 <event name="modes">
961 <description summary="mode-switch ability announced">
962 Sent on wp_tablet_pad_group initialization to announce that the pad
963 group may switch between modes. A client may use a mode to store a
964 specific configuration for buttons, rings and strips and use the
965 wl_tablet_pad_group.mode_switch event to toggle between these
966 configurations. Mode indices start at 0.
967
968 Switching modes is compositor-dependent. See the
969 wp_tablet_pad_group.mode_switch event for more details.
970
971 This event is sent in the initial burst of events before the
972 wp_tablet_pad_group.done event. This event is only sent when more than
973 more than one mode is available.
974 </description>
975 <arg name="modes" type="uint" summary="the number of modes"/>
976 </event>
977
978 <event name="done">
979 <description summary="tablet group description events sequence complete">
980 This event is sent immediately to signal the end of the initial
981 burst of descriptive events. A client may consider the static
982 description of the tablet to be complete and finalize initialization
983 of the tablet group.
984 </description>
985 </event>
986
987 <event name="mode_switch">
988 <description summary="mode switch event">
989 Notification that the mode was switched.
990
991 A mode applies to all buttons, rings and strips in a group
992 simultaneously, but a client is not required to assign different actions
993 for each mode. For example, a client may have mode-specific button
994 mappings but map the ring to vertical scrolling in all modes. Mode
995 indices start at 0.
996
997 Switching modes is compositor-dependent. The compositor may provide
998 visual cues to the client about the mode, e.g. by toggling LEDs on
999 the tablet device. Mode-switching may be software-controlled or
1000 controlled by one or more physical buttons. For example, on a Wacom
1001 Intuos Pro, the button inside the ring may be assigned to switch
1002 between modes.
1003
1004 The compositor will also send this event after wp_tablet_pad.enter on
1005 each group in order to notify of the current mode. Groups that only
1006 feature one mode will use mode=0 when emitting this event.
1007
1008 If a button action in the new mode differs from the action in the
1009 previous mode, the client should immediately issue a
1010 wp_tablet_pad.set_feedback request for each changed button.
1011
1012 If a ring or strip action in the new mode differs from the action
1013 in the previous mode, the client should immediately issue a
1014 wp_tablet_ring.set_feedback or wp_tablet_strip.set_feedback request
1015 for each changed ring or strip.
1016 </description>
1017 <arg name="time" type="uint" summary="the time of the event with millisecond granularity"/>
1018 <arg name="serial" type="uint"/>
1019 <arg name="mode" type="uint" summary="the new mode of the pad"/>
1020 </event>
1021 </interface>
1022
1023 <interface name="zwp_tablet_pad_v2" version="1">
1024 <description summary="a set of buttons, rings and strips">
1025 A pad device is a set of buttons, rings and strips
1026 usually physically present on the tablet device itself. Some
1027 exceptions exist where the pad device is physically detached, e.g. the
1028 Wacom ExpressKey Remote.
1029
1030 Pad devices have no axes that control the cursor and are generally
1031 auxiliary devices to the tool devices used on the tablet surface.
1032
1033 A pad device has a number of static characteristics, e.g. the number
1034 of rings. These capabilities are sent in an event sequence after the
1035 wp_tablet_seat.pad_added event before any actual events from this pad.
1036 This initial event sequence is terminated by a wp_tablet_pad.done
1037 event.
1038
1039 All pad features (buttons, rings and strips) are logically divided into
1040 groups and all pads have at least one group. The available groups are
1041 notified through the wp_tablet_pad.group event; the compositor will
1042 emit one event per group before emitting wp_tablet_pad.done.
1043
1044 Groups may have multiple modes. Modes allow clients to map multiple
1045 actions to a single pad feature. Only one mode can be active per group,
1046 although different groups may have different active modes.
1047 </description>
1048
1049 <request name="set_feedback">
1050 <description summary="set compositor feedback">
1051 Requests the compositor to use the provided feedback string
1052 associated with this button. This request should be issued immediately
1053 after a wp_tablet_pad_group.mode_switch event from the corresponding
1054 group is received, or whenever a button is mapped to a different
1055 action. See wp_tablet_pad_group.mode_switch for more details.
1056
1057 Clients are encouraged to provide context-aware descriptions for
1058 the actions associated with each button, and compositors may use
1059 this information to offer visual feedback on the button layout
1060 (e.g. on-screen displays).
1061
1062 Button indices start at 0. Setting the feedback string on a button
1063 that is reserved by the compositor (i.e. not belonging to any
1064 wp_tablet_pad_group) does not generate an error but the compositor
1065 is free to ignore the request.
1066
1067 The provided string 'description' is a UTF-8 encoded string to be
1068 associated with this ring, and is considered user-visible; general
1069 internationalization rules apply.
1070
1071 The serial argument will be that of the last
1072 wp_tablet_pad_group.mode_switch event received for the group of this
1073 button. Requests providing other serials than the most recent one will
1074 be ignored.
1075 </description>
1076 <arg name="button" type="uint" summary="button index"/>
1077 <arg name="description" type="string" summary="button description"/>
1078 <arg name="serial" type="uint" summary="serial of the mode switch event"/>
1079 </request>
1080
1081 <request name="destroy" type="destructor">
1082 <description summary="destroy the pad object">
1083 Destroy the wp_tablet_pad object. Objects created from this object
1084 are unaffected and should be destroyed separately.
1085 </description>
1086 </request>
1087
1088 <event name="group">
1089 <description summary="group announced">
1090 Sent on wp_tablet_pad initialization to announce available groups.
1091 One event is sent for each pad group available.
1092
1093 This event is sent in the initial burst of events before the
1094 wp_tablet_pad.done event. At least one group will be announced.
1095 </description>
1096 <arg name="pad_group" type="new_id" interface="zwp_tablet_pad_group_v2"/>
1097 </event>
1098
1099 <event name="path">
1100 <description summary="path to the device">
1101 A system-specific device path that indicates which device is behind
1102 this wp_tablet_pad. This information may be used to gather additional
1103 information about the device, e.g. through libwacom.
1104
1105 The format of the path is unspecified, it may be a device node, a
1106 sysfs path, or some other identifier. It is up to the client to
1107 identify the string provided.
1108
1109 This event is sent in the initial burst of events before the
1110 wp_tablet_pad.done event.
1111 </description>
1112 <arg name="path" type="string" summary="path to local device"/>
1113 </event>
1114
1115 <event name="buttons">
1116 <description summary="buttons announced">
1117 Sent on wp_tablet_pad initialization to announce the available
1118 buttons.
1119
1120 This event is sent in the initial burst of events before the
1121 wp_tablet_pad.done event. This event is only sent when at least one
1122 button is available.
1123 </description>
1124 <arg name="buttons" type="uint" summary="the number of buttons"/>
1125 </event>
1126
1127 <event name="done">
1128 <description summary="pad description event sequence complete">
1129 This event signals the end of the initial burst of descriptive
1130 events. A client may consider the static description of the pad to
1131 be complete and finalize initialization of the pad.
1132 </description>
1133 </event>
1134
1135 <enum name="button_state">
1136 <description summary="physical button state">
1137 Describes the physical state of a button that caused the button
1138 event.
1139 </description>
1140 <entry name="released" value="0" summary="the button is not pressed"/>
1141 <entry name="pressed" value="1" summary="the button is pressed"/>
1142 </enum>
1143
1144 <event name="button">
1145 <description summary="physical button state">
1146 Sent whenever the physical state of a button changes.
1147 </description>
1148 <arg name="time" type="uint" summary="the time of the event with millisecond granularity"/>
1149 <arg name="button" type="uint" summary="the index of the button that changed state"/>
1150 <arg name="state" type="uint" enum="button_state"/>
1151 </event>
1152
1153 <event name="enter">
1154 <description summary="enter event">
1155 Notification that this pad is focused on the specified surface.
1156 </description>
1157 <arg name="serial" type="uint" summary="serial number of the enter event"/>
1158 <arg name="tablet" type="object" interface="zwp_tablet_v2" summary="the tablet the pad is attached to"/>
1159 <arg name="surface" type="object" interface="wl_surface" summary="surface the pad is focused on"/>
1160 </event>
1161
1162 <event name="leave">
1163 <description summary="leave event">
1164 Notification that this pad is no longer focused on the specified
1165 surface.
1166 </description>
1167 <arg name="serial" type="uint" summary="serial number of the leave event"/>
1168 <arg name="surface" type="object" interface="wl_surface" summary="surface the pad is no longer focused on"/>
1169 </event>
1170
1171 <event name="removed">
1172 <description summary="pad removed event">
1173 Sent when the pad has been removed from the system. When a tablet
1174 is removed its pad(s) will be removed too.
1175
1176 When this event is received, the client must destroy all rings, strips
1177 and groups that were offered by this pad, and issue wp_tablet_pad.destroy
1178 the pad itself.
1179 </description>
1180 </event>
1181 </interface>
1182 </protocol>