AtlatestRepositorysigil-ui
1
<?xml version="1.0" encoding="UTF-8"?>2
<protocol name="tablet_v2">4
<copyright>5
Copyright 2014 © Stephen "Lyude" Chandler Paul6
Copyright 2015-2024 © Red Hat, Inc.8
Permission is hereby granted, free of charge, to any person9
obtaining a copy of this software and associated documentation files10
(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:16
The above copyright notice and this permission notice (including the17
next paragraph) shall be included in all copies or substantial18
portions of the Software.20
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,21
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF22
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND23
NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS24
BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN25
ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN26
CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE27
SOFTWARE.28
</copyright>30
<description summary="Wayland protocol for graphics tablets">31
This description provides a high-level overview of the interplay between32
the interfaces defined this protocol. For details, see the protocol33
specification.35
More than one tablet may exist, and device-specifics matter. Tablets are36
not represented by a single virtual device like wl_pointer. A client37
binds to the tablet manager object which is just a proxy object. From38
that, the client requests wp_tablet_manager.get_tablet_seat(wl_seat)39
and that returns the actual interface that has all the tablets. With40
this indirection, we can avoid merging wp_tablet into the actual Wayland41
protocol, a long-term benefit.43
The wp_tablet_seat sends a "tablet added" event for each tablet44
connected. That event is followed by descriptive events about the45
hardware; currently that includes events for name, vid/pid and46
a wp_tablet.path event that describes a local path. This path can be47
used to uniquely identify a tablet or get more information through48
libwacom. Emulated or nested tablets can skip any of those, e.g. a49
virtual tablet may not have a vid/pid. The sequence of descriptive50
events is terminated by a wp_tablet.done event to signal that a client51
may now finalize any initialization for that tablet.53
Events from tablets require a tool in proximity. Tools are also managed54
by the tablet seat; a "tool added" event is sent whenever a tool is new55
to the compositor. That event is followed by a number of descriptive56
events about the hardware; currently that includes capabilities,57
hardware id and serial number, and tool type. Similar to the tablet58
interface, a wp_tablet_tool.done event is sent to terminate that initial59
sequence.61
Any event from a tool happens on the wp_tablet_tool interface. When the62
tool gets into proximity of the tablet, a proximity_in event is sent on63
the wp_tablet_tool interface, listing the tablet and the surface. That64
event is followed by a motion event with the coordinates. After that,65
it's the usual motion, axis, button, etc. events. The protocol's66
serialisation means events are grouped by wp_tablet_tool.frame events.68
Two special events (that don't exist in X) are down and up. They signal69
"tip touching the surface". For tablets without real proximity70
detection, the sequence is: proximity_in, motion, down, frame.72
When the tool leaves proximity, a proximity_out event is sent. If any73
button is still down, a button release event is sent before this74
proximity event. These button events are sent in the same frame as the75
proximity event to signal to the client that the buttons were held when76
the tool left proximity.78
If the tool moves out of the surface but stays in proximity (i.e.79
between windows), compositor-specific grab policies apply. This usually80
means that the proximity-out is delayed until all buttons are released.82
Moving a tool physically from one tablet to the other has no real effect83
on the protocol, since we already have the tool object from the "tool84
added" event. All the information is already there and the proximity85
events on both tablets are all a client needs to reconstruct what86
happened.88
Some extra axes are normalized, i.e. the client knows the range as89
specified in the protocol (e.g. [0, 65535]), the granularity however is90
unknown. The current normalized axes are pressure, distance, and slider.92
Other extra axes are in physical units as specified in the protocol.93
The current extra axes with physical units are tilt, rotation and94
wheel rotation.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 be100
the same across tools but it is possible to be more fine-grained. For101
example, a client may set different cursors for the pen and eraser.103
Tools are generally independent of tablets and it is104
compositor-specific policy when a tool can be removed. Common approaches105
will likely include some form of removing a tool when all tablets the106
tool was used on are removed.107
</description>109
<interface name="zwp_tablet_manager_v2" version="2">110
<description summary="controller object for graphic tablet devices">111
An object that provides access to the graphics tablets available on this112
system. All tablets are associated with a seat, to get access to the113
actual tablets, use wp_tablet_manager.get_tablet_seat.114
</description>116
<request name="get_tablet_seat">117
<description summary="get the tablet seat">118
Get the wp_tablet_seat object for the given seat. This object119
provides access to all graphics tablets in this seat.120
</description>121
<arg name="tablet_seat" type="new_id" interface="zwp_tablet_seat_v2"/>122
<arg name="seat" type="object" interface="wl_seat" summary="The wl_seat object to retrieve the tablets for" />123
</request>125
<request name="destroy" type="destructor">126
<description summary="release the memory for the tablet manager object">127
Destroy the wp_tablet_manager object. Objects created from this128
object are unaffected and should be destroyed separately.129
</description>130
</request>131
</interface>133
<interface name="zwp_tablet_seat_v2" version="2">134
<description summary="controller object for graphic tablet devices of a seat">135
An object that provides access to the graphics tablets available on this136
seat. After binding to this interface, the compositor sends a set of137
wp_tablet_seat.tablet_added and wp_tablet_seat.tool_added events.138
</description>140
<request name="destroy" type="destructor">141
<description summary="release the memory for the tablet seat object">142
Destroy the wp_tablet_seat object. Objects created from this143
object are unaffected and should be destroyed separately.144
</description>145
</request>147
<event name="tablet_added">148
<description summary="new device notification">149
This event is sent whenever a new tablet becomes available on this150
seat. This event only provides the object id of the tablet, any151
static information about the tablet (device name, vid/pid, etc.) is152
sent through the wp_tablet interface.153
</description>154
<arg name="id" type="new_id" interface="zwp_tablet_v2" summary="the newly added graphics tablet"/>155
</event>157
<event name="tool_added">158
<description summary="a new tool has been used with a tablet">159
This event is sent whenever a tool that has not previously been used160
with a tablet comes into use. This event only provides the object id161
of the tool; any static information about the tool (capabilities,162
type, etc.) is sent through the wp_tablet_tool interface.163
</description>164
<arg name="id" type="new_id" interface="zwp_tablet_tool_v2" summary="the newly added tablet tool"/>165
</event>167
<event name="pad_added">168
<description summary="new pad notification">169
This event is sent whenever a new pad is known to the system. Typically,170
pads are physically attached to tablets and a pad_added event is171
sent immediately after the wp_tablet_seat.tablet_added.172
However, some standalone pad devices logically attach to tablets at173
runtime, and the client must wait for wp_tablet_pad.enter to know174
the tablet a pad is attached to.176
This event only provides the object id of the pad. All further177
features (buttons, strips, rings) are sent through the wp_tablet_pad178
interface.179
</description>180
<arg name="id" type="new_id" interface="zwp_tablet_pad_v2" summary="the newly added pad"/>181
</event>182
</interface>184
<interface name="zwp_tablet_tool_v2" version="2">185
<description summary="a physical tablet tool">186
An object that represents a physical tool that has been, or is187
currently in use with a tablet in this seat. Each wp_tablet_tool188
object stays valid until the client destroys it; the compositor189
reuses the wp_tablet_tool object to indicate that the object's190
respective physical tool has come into proximity of a tablet again.192
A wp_tablet_tool object's relation to a physical tool depends on the193
tablet's ability to report serial numbers. If the tablet supports194
this capability, then the object represents a specific physical tool195
and can be identified even when used on multiple tablets.197
A tablet tool has a number of static characteristics, e.g. tool type,198
hardware_serial and capabilities. These capabilities are sent in an199
event sequence after the wp_tablet_seat.tool_added event before any200
actual events from this tool. This initial event sequence is201
terminated by a wp_tablet_tool.done event.203
Tablet tool events are grouped by wp_tablet_tool.frame events.204
Any events received before a wp_tablet_tool.frame event should be205
considered part of the same hardware state change.206
</description>208
<request name="set_cursor">209
<description summary="set the tablet tool's surface">210
Sets the surface of the cursor used for this tool on the given211
tablet. This request only takes effect if the tool is in proximity212
of one of the requesting client's surfaces or the surface parameter213
is the current pointer surface. If there was a previous surface set214
with this request it is replaced. If surface is NULL, the cursor215
image is hidden.217
The parameters hotspot_x and hotspot_y define the position of the218
pointer surface relative to the pointer location. Its top-left corner219
is always at (x, y) - (hotspot_x, hotspot_y), where (x, y) are the220
coordinates of the pointer location, in surface-local coordinates.222
On surface.attach requests to the pointer surface, hotspot_x and223
hotspot_y are decremented by the x and y parameters passed to the224
request. Attach must be confirmed by wl_surface.commit as usual.226
The hotspot can also be updated by passing the currently set pointer227
surface to this request with new values for hotspot_x and hotspot_y.229
The current and pending input regions of the wl_surface are cleared,230
and wl_surface.set_input_region is ignored until the wl_surface is no231
longer used as the cursor. When the use as a cursor ends, the current232
and pending input regions become undefined, and the wl_surface is233
unmapped.235
This request gives the surface the role of a wp_tablet_tool cursor. A236
surface may only ever be used as the cursor surface for one237
wp_tablet_tool. If the surface already has another role or has238
previously been used as cursor surface for a different tool, a239
protocol error is raised.240
</description>241
<arg name="serial" type="uint" summary="serial of the proximity_in event"/>242
<arg name="surface" type="object" interface="wl_surface" allow-null="true"/>243
<arg name="hotspot_x" type="int" summary="surface-local x coordinate"/>244
<arg name="hotspot_y" type="int" summary="surface-local y coordinate"/>245
</request>247
<request name="destroy" type="destructor">248
<description summary="destroy the tool object">249
This destroys the client's resource for this tool object.250
</description>251
</request>253
<enum name="type">254
<description summary="a physical tool type">255
Describes the physical type of a tool. The physical type of a tool256
generally defines its base usage.258
The mouse tool represents a mouse-shaped tool that is not a relative259
device but bound to the tablet's surface, providing absolute260
coordinates.262
The lens tool is a mouse-shaped tool with an attached lens to263
provide precision focus.264
</description>265
<entry name="pen" value="0x140" summary="Pen"/>266
<entry name="eraser" value="0x141" summary="Eraser"/>267
<entry name="brush" value="0x142" summary="Brush"/>268
<entry name="pencil" value="0x143" summary="Pencil"/>269
<entry name="airbrush" value="0x144" summary="Airbrush"/>270
<entry name="finger" value="0x145" summary="Finger"/>271
<entry name="mouse" value="0x146" summary="Mouse"/>272
<entry name="lens" value="0x147" summary="Lens"/>273
</enum>275
<event name="type">276
<description summary="tool type">277
The tool type is the high-level type of the tool and usually decides278
the interaction expected from this tool.280
This event is sent in the initial burst of events before the281
wp_tablet_tool.done event.282
</description>283
<arg name="tool_type" type="uint" enum="type" summary="the physical tool type"/>284
</event>286
<event name="hardware_serial">287
<description summary="unique hardware serial number of the tool">288
If the physical tool can be identified by a unique 64-bit serial289
number, this event notifies the client of this serial number.291
If multiple tablets are available in the same seat and the tool is292
uniquely identifiable by the serial number, that tool may move293
between tablets.295
Otherwise, if the tool has no serial number and this event is296
missing, the tool is tied to the tablet it first comes into297
proximity with. Even if the physical tool is used on multiple298
tablets, separate wp_tablet_tool objects will be created, one per299
tablet.301
This event is sent in the initial burst of events before the302
wp_tablet_tool.done event.303
</description>304
<arg name="hardware_serial_hi" type="uint" summary="the unique serial number of the tool, most significant bits"/>305
<arg name="hardware_serial_lo" type="uint" summary="the unique serial number of the tool, least significant bits"/>306
</event>308
<event name="hardware_id_wacom">309
<description summary="hardware id notification in Wacom's format">310
This event notifies the client of a hardware id available on this tool.312
The hardware id is a device-specific 64-bit id that provides extra313
information about the tool in use, beyond the wl_tool.type314
enumeration. The format of the id is specific to tablets made by315
Wacom Inc. For example, the hardware id of a Wacom Grip316
Pen (a stylus) is 0x802.318
This event is sent in the initial burst of events before the319
wp_tablet_tool.done event.320
</description>321
<arg name="hardware_id_hi" type="uint" summary="the hardware id, most significant bits"/>322
<arg name="hardware_id_lo" type="uint" summary="the hardware id, least significant bits"/>323
</event>325
<enum name="capability">326
<description summary="capability flags for a tool">327
Describes extra capabilities on a tablet.329
Any tool must provide x and y values, extra axes are330
device-specific.331
</description>332
<entry name="tilt" value="1" summary="Tilt axes"/>333
<entry name="pressure" value="2" summary="Pressure axis"/>334
<entry name="distance" value="3" summary="Distance axis"/>335
<entry name="rotation" value="4" summary="Z-rotation axis"/>336
<entry name="slider" value="5" summary="Slider axis"/>337
<entry name="wheel" value="6" summary="Wheel axis"/>338
</enum>340
<event name="capability">341
<description summary="tool capability notification">342
This event notifies the client of any capabilities of this tool,343
beyond the main set of x/y axes and tip up/down detection.345
One event is sent for each extra capability available on this tool.347
This event is sent in the initial burst of events before the348
wp_tablet_tool.done event.349
</description>350
<arg name="capability" type="uint" enum="capability" summary="the capability"/>351
</event>353
<event name="done">354
<description summary="tool description events sequence complete">355
This event signals the end of the initial burst of descriptive356
events. A client may consider the static description of the tool to357
be complete and finalize initialization of the tool.358
</description>359
</event>361
<event name="removed">362
<description summary="tool removed">363
This event is sent when the tool is removed from the system and will364
send no further events. Should the physical tool come back into365
proximity later, a new wp_tablet_tool object will be created.367
It is compositor-dependent when a tool is removed. A compositor may368
remove a tool on proximity out, tablet removal or any other reason.369
A compositor may also keep a tool alive until shutdown.371
If the tool is currently in proximity, a proximity_out event will be372
sent before the removed event. See wp_tablet_tool.proximity_out for373
the handling of any buttons logically down.375
When this event is received, the client must wp_tablet_tool.destroy376
the object.377
</description>378
</event>380
<event name="proximity_in">381
<description summary="proximity in event">382
Notification that this tool is focused on a certain surface.384
This event can be received when the tool has moved from one surface to385
another, or when the tool has come back into proximity above the386
surface.388
If any button is logically down when the tool comes into proximity,389
the respective button event is sent after the proximity_in event but390
within the same frame as the proximity_in event.391
</description>392
<arg name="serial" type="uint"/>393
<arg name="tablet" type="object" interface="zwp_tablet_v2" summary="The tablet the tool is in proximity of"/>394
<arg name="surface" type="object" interface="wl_surface" summary="The current surface the tablet tool is over"/>395
</event>397
<event name="proximity_out">398
<description summary="proximity out event">399
Notification that this tool has either left proximity, or is no400
longer focused on a certain surface.402
When the tablet tool leaves proximity of the tablet, button release403
events are sent for each button that was held down at the time of404
leaving proximity. These events are sent before the proximity_out405
event but within the same wp_tablet.frame.407
If the tool stays within proximity of the tablet, but the focus408
changes from one surface to another, a button release event may not409
be sent until the button is actually released or the tool leaves the410
proximity of the tablet.411
</description>412
</event>414
<event name="down">415
<description summary="tablet tool is making contact">416
Sent whenever the tablet tool comes in contact with the surface of the417
tablet.419
If the tool is already in contact with the tablet when entering the420
input region, the client owning said region will receive a421
wp_tablet.proximity_in event, followed by a wp_tablet.down422
event and a wp_tablet.frame event.424
Note that this event describes logical contact, not physical425
contact. On some devices, a compositor may not consider a tool in426
logical contact until a minimum physical pressure threshold is427
exceeded.428
</description>429
<arg name="serial" type="uint"/>430
</event>432
<event name="up">433
<description summary="tablet tool is no longer making contact">434
Sent whenever the tablet tool stops making contact with the surface of435
the tablet, or when the tablet tool moves out of the input region436
and the compositor grab (if any) is dismissed.438
If the tablet tool moves out of the input region while in contact439
with the surface of the tablet and the compositor does not have an440
ongoing grab on the surface, the client owning said region will441
receive a wp_tablet.up event, followed by a wp_tablet.proximity_out442
event and a wp_tablet.frame event. If the compositor has an ongoing443
grab on this device, this event sequence is sent whenever the grab444
is dismissed in the future.446
Note that this event describes logical contact, not physical447
contact. On some devices, a compositor may not consider a tool out448
of logical contact until physical pressure falls below a specific449
threshold.450
</description>451
</event>453
<event name="motion">454
<description summary="motion event">455
Sent whenever a tablet tool moves.456
</description>457
<arg name="x" type="fixed" summary="surface-local x coordinate"/>458
<arg name="y" type="fixed" summary="surface-local y coordinate"/>459
</event>461
<event name="pressure">462
<description summary="pressure change event">463
Sent whenever the pressure axis on a tool changes. The value of this464
event is normalized to a value between 0 and 65535.466
Note that pressure may be nonzero even when a tool is not in logical467
contact. See the down and up events for more details.468
</description>469
<arg name="pressure" type="uint" summary="The current pressure value"/>470
</event>472
<event name="distance">473
<description summary="distance change event">474
Sent whenever the distance axis on a tool changes. The value of this475
event is normalized to a value between 0 and 65535.477
Note that distance may be nonzero even when a tool is not in logical478
contact. See the down and up events for more details.479
</description>480
<arg name="distance" type="uint" summary="The current distance value"/>481
</event>483
<event name="tilt">484
<description summary="tilt change event">485
Sent whenever one or both of the tilt axes on a tool change. Each tilt486
value is in degrees, relative to the z-axis of the tablet.487
The angle is positive when the top of a tool tilts along the488
positive x or y axis.489
</description>490
<arg name="tilt_x" type="fixed" summary="The current value of the X tilt axis"/>491
<arg name="tilt_y" type="fixed" summary="The current value of the Y tilt axis"/>492
</event>494
<event name="rotation">495
<description summary="z-rotation change event">496
Sent whenever the z-rotation axis on the tool changes. The497
rotation value is in degrees clockwise from the tool's498
logical neutral position.499
</description>500
<arg name="degrees" type="fixed" summary="The current rotation of the Z axis"/>501
</event>503
<event name="slider">504
<description summary="Slider position change event">505
Sent whenever the slider position on the tool changes. The506
value is normalized between -65535 and 65535, with 0 as the logical507
neutral position of the slider.509
The slider is available on e.g. the Wacom Airbrush tool.510
</description>511
<arg name="position" type="int" summary="The current position of slider"/>512
</event>514
<event name="wheel">515
<description summary="Wheel delta event">516
Sent whenever the wheel on the tool emits an event. This event517
contains two values for the same axis change. The degrees value is518
in the same orientation as the wl_pointer.vertical_scroll axis. The519
clicks value is in discrete logical clicks of the mouse wheel. This520
value may be zero if the movement of the wheel was less521
than one logical click.523
Clients should choose either value and avoid mixing degrees and524
clicks. The compositor may accumulate values smaller than a logical525
click and emulate click events when a certain threshold is met.526
Thus, wl_tablet_tool.wheel events with non-zero clicks values may527
have different degrees values.528
</description>529
<arg name="degrees" type="fixed" summary="The wheel delta in degrees"/>530
<arg name="clicks" type="int" summary="The wheel delta in discrete clicks"/>531
</event>533
<enum name="button_state">534
<description summary="physical button state">535
Describes the physical state of a button that produced the button event.536
</description>537
<entry name="released" value="0" summary="button is not pressed"/>538
<entry name="pressed" value="1" summary="button is pressed"/>539
</enum>541
<event name="button">542
<description summary="button event">543
Sent whenever a button on the tool is pressed or released.545
If a button is held down when the tool moves in or out of proximity,546
button events are generated by the compositor. See547
wp_tablet_tool.proximity_in and wp_tablet_tool.proximity_out for548
details.549
</description>550
<arg name="serial" type="uint"/>551
<arg name="button" type="uint" summary="The button whose state has changed"/>552
<arg name="state" type="uint" enum="button_state" summary="Whether the button was pressed or released"/>553
</event>555
<event name="frame">556
<description summary="frame event">557
Marks the end of a series of axis and/or button updates from the558
tablet. The Wayland protocol requires axis updates to be sent559
sequentially, however all events within a frame should be considered560
one hardware event.561
</description>562
<arg name="time" type="uint" summary="The time of the event with millisecond granularity"/>563
</event>565
<enum name="error">566
<entry name="role" value="0" summary="given wl_surface has another role"/>567
</enum>568
</interface>570
<interface name="zwp_tablet_v2" version="2">571
<description summary="graphics tablet device">572
The wp_tablet interface represents one graphics tablet device. The573
tablet interface itself does not generate events; all events are574
generated by wp_tablet_tool objects when in proximity above a tablet.576
A tablet has a number of static characteristics, e.g. device name and577
pid/vid. These capabilities are sent in an event sequence after the578
wp_tablet_seat.tablet_added event. This initial event sequence is579
terminated by a wp_tablet.done event.580
</description>582
<request name="destroy" type="destructor">583
<description summary="destroy the tablet object">584
This destroys the client's resource for this tablet object.585
</description>586
</request>588
<event name="name">589
<description summary="tablet device name">590
A descriptive name for the tablet device.592
If the device has no descriptive name, this event is not sent.594
This event is sent in the initial burst of events before the595
wp_tablet.done event.596
</description>597
<arg name="name" type="string" summary="the device name"/>598
</event>600
<event name="id">601
<description summary="tablet device vendor/product id">602
The vendor and product IDs for the tablet device.604
The interpretation of the id depends on the wp_tablet.bustype.605
Prior to version v2 of this protocol, the id was implied to be a USB606
vendor and product ID. If no wp_tablet.bustype is sent, the ID607
is to be interpreted as USB vendor and product ID.609
If the device has no vendor/product ID, this event is not sent.610
This can happen for virtual devices or non-USB devices, for instance.612
This event is sent in the initial burst of events before the613
wp_tablet.done event.614
</description>615
<arg name="vid" type="uint" summary="vendor id"/>616
<arg name="pid" type="uint" summary="product id"/>617
</event>619
<event name="path">620
<description summary="path to the device">621
A system-specific device path that indicates which device is behind622
this wp_tablet. This information may be used to gather additional623
information about the device, e.g. through libwacom.625
A device may have more than one device path. If so, multiple626
wp_tablet.path events are sent. A device may be emulated and not627
have a device path, and in that case this event will not be sent.629
The format of the path is unspecified, it may be a device node, a630
sysfs path, or some other identifier. It is up to the client to631
identify the string provided.633
This event is sent in the initial burst of events before the634
wp_tablet.done event.635
</description>636
<arg name="path" type="string" summary="path to local device"/>637
</event>639
<event name="done">640
<description summary="tablet description events sequence complete">641
This event is sent immediately to signal the end of the initial642
burst of descriptive events. A client may consider the static643
description of the tablet to be complete and finalize initialization644
of the tablet.645
</description>646
</event>648
<event name="removed">649
<description summary="tablet removed event">650
Sent when the tablet has been removed from the system. When a tablet651
is removed, some tools may be removed.653
When this event is received, the client must wp_tablet.destroy654
the object.655
</description>656
</event>658
<!-- Version 2 additions -->660
<enum name="bustype" since="2">661
<description summary="bus type ">662
Describes the bus types this tablet is connected to.663
</description>664
<entry name="usb" value="3" summary="USB"/>665
<entry name="bluetooth" value="5" summary="Bluetooth"/>666
<entry name="virtual" value="6" summary="Virtual"/>667
<entry name="serial" value="17" summary="Serial"/>668
<entry name="i2c" value="24" summary="I2C"/>669
</enum>671
<event name="bustype" since="2">672
<description summary="tablet device bus type">673
The bustype argument is one of the BUS_ defines in the Linux kernel's674
linux/input.h676
If the device has no known bustype or the bustype cannot be677
queried, this event is not sent.679
This event is sent in the initial burst of events before the680
wp_tablet.done event.681
</description>682
<arg name="bustype" type="uint" enum="bustype" summary="bus type"/>683
</event>684
</interface>686
<interface name="zwp_tablet_pad_ring_v2" version="2">687
<description summary="pad ring">688
A circular interaction area, such as the touch ring on the Wacom Intuos689
Pro series tablets.691
Events on a ring are logically grouped by the wl_tablet_pad_ring.frame692
event.693
</description>695
<request name="set_feedback">696
<description summary="set compositor feedback">697
Request that the compositor use the provided feedback string698
associated with this ring. This request should be issued immediately699
after a wp_tablet_pad_group.mode_switch event from the corresponding700
group is received, or whenever the ring is mapped to a different701
action. See wp_tablet_pad_group.mode_switch for more details.703
Clients are encouraged to provide context-aware descriptions for704
the actions associated with the ring; compositors may use this705
information to offer visual feedback about the button layout706
(eg. on-screen displays).708
The provided string 'description' is a UTF-8 encoded string to be709
associated with this ring, and is considered user-visible; general710
internationalization rules apply.712
The serial argument will be that of the last713
wp_tablet_pad_group.mode_switch event received for the group of this714
ring. Requests providing other serials than the most recent one will be715
ignored.716
</description>717
<arg name="description" type="string" summary="ring description"/>718
<arg name="serial" type="uint" summary="serial of the mode switch event"/>719
</request>721
<request name="destroy" type="destructor">722
<description summary="destroy the ring object">723
This destroys the client's resource for this ring object.724
</description>725
</request>727
<enum name="source">728
<description summary="ring axis source">729
Describes the source types for ring events. This indicates to the730
client how a ring event was physically generated; a client may731
adjust the user interface accordingly. For example, events732
from a "finger" source may trigger kinetic scrolling.733
</description>734
<entry name="finger" value="1" summary="finger"/>735
</enum>737
<event name="source">738
<description summary="ring event source">739
Source information for ring events.741
This event does not occur on its own. It is sent before a742
wp_tablet_pad_ring.frame event and carries the source information743
for all events within that frame.745
The source specifies how this event was generated. If the source is746
wp_tablet_pad_ring.source.finger, a wp_tablet_pad_ring.stop event747
will be sent when the user lifts the finger off the device.749
This event is optional. If the source is unknown for an interaction,750
no event is sent.751
</description>752
<arg name="source" type="uint" enum="source" summary="the event source"/>753
</event>755
<event name="angle">756
<description summary="angle changed">757
Sent whenever the angle on a ring changes.759
The angle is provided in degrees clockwise from the logical760
north of the ring in the pad's current rotation.761
</description>762
<arg name="degrees" type="fixed" summary="the current angle in degrees"/>763
</event>765
<event name="stop">766
<description summary="interaction stopped">767
Stop notification for ring events.769
For some wp_tablet_pad_ring.source types, a wp_tablet_pad_ring.stop770
event is sent to notify a client that the interaction with the ring771
has terminated. This enables the client to implement kinetic scrolling.772
See the wp_tablet_pad_ring.source documentation for information on773
when this event may be generated.775
Any wp_tablet_pad_ring.angle events with the same source after this776
event should be considered as the start of a new interaction.777
</description>778
</event>780
<event name="frame">781
<description summary="end of a ring event sequence">782
Indicates the end of a set of ring events that logically belong783
together. A client is expected to accumulate the data in all events784
within the frame before proceeding.786
All wp_tablet_pad_ring events before a wp_tablet_pad_ring.frame event belong787
logically together. For example, on termination of a finger interaction788
on a ring the compositor will send a wp_tablet_pad_ring.source event,789
a wp_tablet_pad_ring.stop event and a wp_tablet_pad_ring.frame event.791
A wp_tablet_pad_ring.frame event is sent for every logical event792
group, even if the group only contains a single wp_tablet_pad_ring793
event. Specifically, a client may get a sequence: angle, frame,794
angle, frame, etc.795
</description>796
<arg name="time" type="uint" summary="timestamp with millisecond granularity"/>797
</event>798
</interface>800
<interface name="zwp_tablet_pad_strip_v2" version="2">801
<description summary="pad strip">802
A linear interaction area, such as the strips found in Wacom Cintiq803
models.805
Events on a strip are logically grouped by the wl_tablet_pad_strip.frame806
event.807
</description>809
<request name="set_feedback">810
<description summary="set compositor feedback">811
Requests the compositor to use the provided feedback string812
associated with this strip. This request should be issued immediately813
after a wp_tablet_pad_group.mode_switch event from the corresponding814
group is received, or whenever the strip is mapped to a different815
action. See wp_tablet_pad_group.mode_switch for more details.817
Clients are encouraged to provide context-aware descriptions for818
the actions associated with the strip, and compositors may use this819
information to offer visual feedback about the button layout820
(eg. on-screen displays).822
The provided string 'description' is a UTF-8 encoded string to be823
associated with this ring, and is considered user-visible; general824
internationalization rules apply.826
The serial argument will be that of the last827
wp_tablet_pad_group.mode_switch event received for the group of this828
strip. Requests providing other serials than the most recent one will be829
ignored.830
</description>831
<arg name="description" type="string" summary="strip description"/>832
<arg name="serial" type="uint" summary="serial of the mode switch event"/>833
</request>835
<request name="destroy" type="destructor">836
<description summary="destroy the strip object">837
This destroys the client's resource for this strip object.838
</description>839
</request>841
<enum name="source">842
<description summary="strip axis source">843
Describes the source types for strip events. This indicates to the844
client how a strip event was physically generated; a client may845
adjust the user interface accordingly. For example, events846
from a "finger" source may trigger kinetic scrolling.847
</description>848
<entry name="finger" value="1" summary="finger"/>849
</enum>851
<event name="source">852
<description summary="strip event source">853
Source information for strip events.855
This event does not occur on its own. It is sent before a856
wp_tablet_pad_strip.frame event and carries the source information857
for all events within that frame.859
The source specifies how this event was generated. If the source is860
wp_tablet_pad_strip.source.finger, a wp_tablet_pad_strip.stop event861
will be sent when the user lifts their finger off the device.863
This event is optional. If the source is unknown for an interaction,864
no event is sent.865
</description>866
<arg name="source" type="uint" enum="source" summary="the event source"/>867
</event>869
<event name="position">870
<description summary="position changed">871
Sent whenever the position on a strip changes.873
The position is normalized to a range of [0, 65535], the 0-value874
represents the top-most and/or left-most position of the strip in875
the pad's current rotation.876
</description>877
<arg name="position" type="uint" summary="the current position"/>878
</event>880
<event name="stop">881
<description summary="interaction stopped">882
Stop notification for strip events.884
For some wp_tablet_pad_strip.source types, a wp_tablet_pad_strip.stop885
event is sent to notify a client that the interaction with the strip886
has terminated. This enables the client to implement kinetic887
scrolling. See the wp_tablet_pad_strip.source documentation for888
information on when this event may be generated.890
Any wp_tablet_pad_strip.position events with the same source after this891
event should be considered as the start of a new interaction.892
</description>893
</event>895
<event name="frame">896
<description summary="end of a strip event sequence">897
Indicates the end of a set of events that represent one logical898
hardware strip event. A client is expected to accumulate the data899
in all events within the frame before proceeding.901
All wp_tablet_pad_strip events before a wp_tablet_pad_strip.frame event belong902
logically together. For example, on termination of a finger interaction903
on a strip the compositor will send a wp_tablet_pad_strip.source event,904
a wp_tablet_pad_strip.stop event and a wp_tablet_pad_strip.frame905
event.907
A wp_tablet_pad_strip.frame event is sent for every logical event908
group, even if the group only contains a single wp_tablet_pad_strip909
event. Specifically, a client may get a sequence: position, frame,910
position, frame, etc.911
</description>912
<arg name="time" type="uint" summary="timestamp with millisecond granularity"/>913
</event>914
</interface>916
<interface name="zwp_tablet_pad_group_v2" version="2">917
<description summary="a set of buttons, rings and strips">918
A pad group describes a distinct (sub)set of buttons, rings and strips919
present in the tablet. The criteria of this grouping is usually positional,920
eg. if a tablet has buttons on the left and right side, 2 groups will be921
presented. The physical arrangement of groups is undisclosed and may922
change on the fly.924
Pad groups will announce their features during pad initialization. Between925
the corresponding wp_tablet_pad.group event and wp_tablet_pad_group.done, the926
pad group will announce the buttons, rings and strips contained in it,927
plus the number of supported modes.929
Modes are a mechanism to allow multiple groups of actions for every element930
in the pad group. The number of groups and available modes in each is931
persistent across device plugs. The current mode is user-switchable, it932
will be announced through the wp_tablet_pad_group.mode_switch event both933
whenever it is switched, and after wp_tablet_pad.enter.935
The current mode logically applies to all elements in the pad group,936
although it is at clients' discretion whether to actually perform different937
actions, and/or issue the respective .set_feedback requests to notify the938
compositor. See the wp_tablet_pad_group.mode_switch event for more details.939
</description>941
<request name="destroy" type="destructor">942
<description summary="destroy the pad object">943
Destroy the wp_tablet_pad_group object. Objects created from this object944
are unaffected and should be destroyed separately.945
</description>946
</request>948
<event name="buttons">949
<description summary="buttons announced">950
Sent on wp_tablet_pad_group initialization to announce the available951
buttons in the group. Button indices start at 0, a button may only be952
in one group at a time.954
This event is first sent in the initial burst of events before the955
wp_tablet_pad_group.done event.957
Some buttons are reserved by the compositor. These buttons may not be958
assigned to any wp_tablet_pad_group. Compositors may broadcast this959
event in the case of changes to the mapping of these reserved buttons.960
If the compositor happens to reserve all buttons in a group, this event961
will be sent with an empty array.962
</description>963
<arg name="buttons" type="array" summary="buttons in this group"/>964
</event>966
<event name="ring">967
<description summary="ring announced">968
Sent on wp_tablet_pad_group initialization to announce available rings.969
One event is sent for each ring available on this pad group.971
This event is sent in the initial burst of events before the972
wp_tablet_pad_group.done event.973
</description>974
<arg name="ring" type="new_id" interface="zwp_tablet_pad_ring_v2"/>975
</event>977
<event name="strip">978
<description summary="strip announced">979
Sent on wp_tablet_pad initialization to announce available strips.980
One event is sent for each strip available on this pad group.982
This event is sent in the initial burst of events before the983
wp_tablet_pad_group.done event.984
</description>985
<arg name="strip" type="new_id" interface="zwp_tablet_pad_strip_v2"/>986
</event>988
<event name="modes">989
<description summary="mode-switch ability announced">990
Sent on wp_tablet_pad_group initialization to announce that the pad991
group may switch between modes. A client may use a mode to store a992
specific configuration for buttons, rings and strips and use the993
wl_tablet_pad_group.mode_switch event to toggle between these994
configurations. Mode indices start at 0.996
Switching modes is compositor-dependent. See the997
wp_tablet_pad_group.mode_switch event for more details.999
This event is sent in the initial burst of events before the1000
wp_tablet_pad_group.done event. This event is only sent when more than1001
more than one mode is available.1002
</description>1003
<arg name="modes" type="uint" summary="the number of modes"/>1004
</event>1006
<event name="done">1007
<description summary="tablet group description events sequence complete">1008
This event is sent immediately to signal the end of the initial1009
burst of descriptive events. A client may consider the static1010
description of the tablet to be complete and finalize initialization1011
of the tablet group.1012
</description>1013
</event>1015
<event name="mode_switch">1016
<description summary="mode switch event">1017
Notification that the mode was switched.1019
A mode applies to all buttons, rings, strips and dials in a group1020
simultaneously, but a client is not required to assign different actions1021
for each mode. For example, a client may have mode-specific button1022
mappings but map the ring to vertical scrolling in all modes. Mode1023
indices start at 0.1025
Switching modes is compositor-dependent. The compositor may provide1026
visual cues to the user about the mode, e.g. by toggling LEDs on1027
the tablet device. Mode-switching may be software-controlled or1028
controlled by one or more physical buttons. For example, on a Wacom1029
Intuos Pro, the button inside the ring may be assigned to switch1030
between modes.1032
The compositor will also send this event after wp_tablet_pad.enter on1033
each group in order to notify of the current mode. Groups that only1034
feature one mode will use mode=0 when emitting this event.1036
If a button action in the new mode differs from the action in the1037
previous mode, the client should immediately issue a1038
wp_tablet_pad.set_feedback request for each changed button.1040
If a ring, strip or dial action in the new mode differs from the action1041
in the previous mode, the client should immediately issue a1042
wp_tablet_ring.set_feedback, wp_tablet_strip.set_feedback or1043
wp_tablet_dial.set_feedback request for each changed ring, strip or dial.1044
</description>1045
<arg name="time" type="uint" summary="the time of the event with millisecond granularity"/>1046
<arg name="serial" type="uint"/>1047
<arg name="mode" type="uint" summary="the new mode of the pad"/>1048
</event>1050
<!-- Version 2 additions -->1052
<event name="dial" since="2">1053
<description summary="dial announced">1054
Sent on wp_tablet_pad initialization to announce available dials.1055
One event is sent for each dial available on this pad group.1057
This event is sent in the initial burst of events before the1058
wp_tablet_pad_group.done event.1059
</description>1060
<arg name="dial" type="new_id" interface="zwp_tablet_pad_dial_v2"/>1061
</event>1062
</interface>1064
<interface name="zwp_tablet_pad_v2" version="2">1065
<description summary="a set of buttons, rings, strips and dials">1066
A pad device is a set of buttons, rings, strips and dials1067
usually physically present on the tablet device itself. Some1068
exceptions exist where the pad device is physically detached, e.g. the1069
Wacom ExpressKey Remote.1071
Pad devices have no axes that control the cursor and are generally1072
auxiliary devices to the tool devices used on the tablet surface.1074
A pad device has a number of static characteristics, e.g. the number1075
of rings. These capabilities are sent in an event sequence after the1076
wp_tablet_seat.pad_added event before any actual events from this pad.1077
This initial event sequence is terminated by a wp_tablet_pad.done1078
event.1080
All pad features (buttons, rings, strips and dials) are logically divided into1081
groups and all pads have at least one group. The available groups are1082
notified through the wp_tablet_pad.group event; the compositor will1083
emit one event per group before emitting wp_tablet_pad.done.1085
Groups may have multiple modes. Modes allow clients to map multiple1086
actions to a single pad feature. Only one mode can be active per group,1087
although different groups may have different active modes.1088
</description>1090
<request name="set_feedback">1091
<description summary="set compositor feedback">1092
Requests the compositor to use the provided feedback string1093
associated with this button. This request should be issued immediately1094
after a wp_tablet_pad_group.mode_switch event from the corresponding1095
group is received, or whenever a button is mapped to a different1096
action. See wp_tablet_pad_group.mode_switch for more details.1098
Clients are encouraged to provide context-aware descriptions for1099
the actions associated with each button, and compositors may use1100
this information to offer visual feedback on the button layout1101
(e.g. on-screen displays).1103
Button indices start at 0. Setting the feedback string on a button1104
that is reserved by the compositor (i.e. not belonging to any1105
wp_tablet_pad_group) does not generate an error but the compositor1106
is free to ignore the request.1108
The provided string 'description' is a UTF-8 encoded string to be1109
associated with this ring, and is considered user-visible; general1110
internationalization rules apply.1112
The serial argument will be that of the last1113
wp_tablet_pad_group.mode_switch event received for the group of this1114
button. Requests providing other serials than the most recent one will1115
be ignored.1116
</description>1117
<arg name="button" type="uint" summary="button index"/>1118
<arg name="description" type="string" summary="button description"/>1119
<arg name="serial" type="uint" summary="serial of the mode switch event"/>1120
</request>1122
<request name="destroy" type="destructor">1123
<description summary="destroy the pad object">1124
Destroy the wp_tablet_pad object. Objects created from this object1125
are unaffected and should be destroyed separately.1126
</description>1127
</request>1129
<event name="group">1130
<description summary="group announced">1131
Sent on wp_tablet_pad initialization to announce available groups.1132
One event is sent for each pad group available.1134
This event is sent in the initial burst of events before the1135
wp_tablet_pad.done event. At least one group will be announced.1136
</description>1137
<arg name="pad_group" type="new_id" interface="zwp_tablet_pad_group_v2"/>1138
</event>1140
<event name="path">1141
<description summary="path to the device">1142
A system-specific device path that indicates which device is behind1143
this wp_tablet_pad. This information may be used to gather additional1144
information about the device, e.g. through libwacom.1146
The format of the path is unspecified, it may be a device node, a1147
sysfs path, or some other identifier. It is up to the client to1148
identify the string provided.1150
This event is sent in the initial burst of events before the1151
wp_tablet_pad.done event.1152
</description>1153
<arg name="path" type="string" summary="path to local device"/>1154
</event>1156
<event name="buttons">1157
<description summary="buttons announced">1158
Sent on wp_tablet_pad initialization to announce the available1159
buttons.1161
This event is sent in the initial burst of events before the1162
wp_tablet_pad.done event. This event is only sent when at least one1163
button is available.1164
</description>1165
<arg name="buttons" type="uint" summary="the number of buttons"/>1166
</event>1168
<event name="done">1169
<description summary="pad description event sequence complete">1170
This event signals the end of the initial burst of descriptive1171
events. A client may consider the static description of the pad to1172
be complete and finalize initialization of the pad.1173
</description>1174
</event>1176
<enum name="button_state">1177
<description summary="physical button state">1178
Describes the physical state of a button that caused the button1179
event.1180
</description>1181
<entry name="released" value="0" summary="the button is not pressed"/>1182
<entry name="pressed" value="1" summary="the button is pressed"/>1183
</enum>1185
<event name="button">1186
<description summary="physical button state">1187
Sent whenever the physical state of a button changes.1188
</description>1189
<arg name="time" type="uint" summary="the time of the event with millisecond granularity"/>1190
<arg name="button" type="uint" summary="the index of the button that changed state"/>1191
<arg name="state" type="uint" enum="button_state"/>1192
</event>1194
<event name="enter">1195
<description summary="enter event">1196
Notification that this pad is focused on the specified surface.1197
</description>1198
<arg name="serial" type="uint" summary="serial number of the enter event"/>1199
<arg name="tablet" type="object" interface="zwp_tablet_v2" summary="the tablet the pad is attached to"/>1200
<arg name="surface" type="object" interface="wl_surface" summary="surface the pad is focused on"/>1201
</event>1203
<event name="leave">1204
<description summary="leave event">1205
Notification that this pad is no longer focused on the specified1206
surface.1207
</description>1208
<arg name="serial" type="uint" summary="serial number of the leave event"/>1209
<arg name="surface" type="object" interface="wl_surface" summary="surface the pad is no longer focused on"/>1210
</event>1212
<event name="removed">1213
<description summary="pad removed event">1214
Sent when the pad has been removed from the system. When a tablet1215
is removed its pad(s) will be removed too.1217
When this event is received, the client must destroy all rings, strips1218
and groups that were offered by this pad, and issue wp_tablet_pad.destroy1219
the pad itself.1220
</description>1221
</event>1222
</interface>1224
<interface name="zwp_tablet_pad_dial_v2" version="2">1225
<description summary="pad dial">1226
A rotary control, e.g. a dial or a wheel.1228
Events on a dial are logically grouped by the wl_tablet_pad_dial.frame1229
event.1230
</description>1232
<request name="set_feedback">1233
<description summary="set compositor feedback">1234
Requests the compositor to use the provided feedback string1235
associated with this dial. This request should be issued immediately1236
after a wp_tablet_pad_group.mode_switch event from the corresponding1237
group is received, or whenever the dial is mapped to a different1238
action. See wp_tablet_pad_group.mode_switch for more details.1240
Clients are encouraged to provide context-aware descriptions for1241
the actions associated with the dial, and compositors may use this1242
information to offer visual feedback about the button layout1243
(eg. on-screen displays).1245
The provided string 'description' is a UTF-8 encoded string to be1246
associated with this ring, and is considered user-visible; general1247
internationalization rules apply.1249
The serial argument will be that of the last1250
wp_tablet_pad_group.mode_switch event received for the group of this1251
dial. Requests providing other serials than the most recent one will be1252
ignored.1253
</description>1254
<arg name="description" type="string" summary="dial description"/>1255
<arg name="serial" type="uint" summary="serial of the mode switch event"/>1256
</request>1258
<request name="destroy" type="destructor">1259
<description summary="destroy the dial object">1260
This destroys the client's resource for this dial object.1261
</description>1262
</request>1264
<event name="delta">1265
<description summary="delta movement">1266
Sent whenever the position on a dial changes.1268
This event carries the wheel delta as multiples or fractions1269
of 120 with each multiple of 120 representing one logical wheel detent.1270
For example, an axis_value120 of 30 is one quarter of1271
a logical wheel step in the positive direction, a value120 of1272
-240 are two logical wheel steps in the negative direction within the1273
same hardware event. See the wl_pointer.axis_value120 for more details.1275
The value120 must not be zero.1276
</description>1277
<arg name="value120" type="int" summary="rotation distance as fraction of 120"/>1278
</event>1280
<event name="frame">1281
<description summary="end of a dial event sequence">1282
Indicates the end of a set of events that represent one logical1283
hardware dial event. A client is expected to accumulate the data1284
in all events within the frame before proceeding.1286
All wp_tablet_pad_dial events before a wp_tablet_pad_dial.frame event belong1287
logically together.1289
A wp_tablet_pad_dial.frame event is sent for every logical event1290
group, even if the group only contains a single wp_tablet_pad_dial1291
event. Specifically, a client may get a sequence: delta, frame,1292
delta, frame, etc.1293
</description>1294
<arg name="time" type="uint" summary="timestamp with millisecond granularity"/>1295
</event>1296
</interface>1297
</protocol>