| 1 |
<?xml version="1.0" encoding="UTF-8"?> |
| 2 |
<protocol name="tablet_unstable_v1"> |
| 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 |
Warning! The protocol described in this file is experimental and |
| 109 |
backward incompatible changes may be made. Backward compatible changes |
| 110 |
may be added together with the corresponding interface version bump. |
| 111 |
Backward incompatible changes are done by bumping the version number in |
| 112 |
the protocol and interface names and resetting the interface version. |
| 113 |
Once the protocol is to be declared stable, the 'z' prefix and the |
| 114 |
version number in the protocol and interface names are removed and the |
| 115 |
interface version number is reset. |
| 116 |
</description> |
| 117 |
|
| 118 |
<interface name="zwp_tablet_manager_v1" version="1"> |
| 119 |
<description summary="controller object for graphic tablet devices"> |
| 120 |
An object that provides access to the graphics tablets available on this |
| 121 |
system. All tablets are associated with a seat, to get access to the |
| 122 |
actual tablets, use wp_tablet_manager.get_tablet_seat. |
| 123 |
</description> |
| 124 |
|
| 125 |
<request name="get_tablet_seat"> |
| 126 |
<description summary="get the tablet seat"> |
| 127 |
Get the wp_tablet_seat object for the given seat. This object |
| 128 |
provides access to all graphics tablets in this seat. |
| 129 |
</description> |
| 130 |
<arg name="tablet_seat" type="new_id" interface="zwp_tablet_seat_v1"/> |
| 131 |
<arg name="seat" type="object" interface="wl_seat" summary="The wl_seat object to retrieve the tablets for" /> |
| 132 |
</request> |
| 133 |
|
| 134 |
<request name="destroy" type="destructor"> |
| 135 |
<description summary="release the memory for the tablet manager object"> |
| 136 |
Destroy the wp_tablet_manager object. Objects created from this |
| 137 |
object are unaffected and should be destroyed separately. |
| 138 |
</description> |
| 139 |
</request> |
| 140 |
</interface> |
| 141 |
|
| 142 |
<interface name="zwp_tablet_seat_v1" version="1"> |
| 143 |
<description summary="controller object for graphic tablet devices of a seat"> |
| 144 |
An object that provides access to the graphics tablets available on this |
| 145 |
seat. After binding to this interface, the compositor sends a set of |
| 146 |
wp_tablet_seat.tablet_added and wp_tablet_seat.tool_added events. |
| 147 |
</description> |
| 148 |
|
| 149 |
<request name="destroy" type="destructor"> |
| 150 |
<description summary="release the memory for the tablet seat object"> |
| 151 |
Destroy the wp_tablet_seat object. Objects created from this |
| 152 |
object are unaffected and should be destroyed separately. |
| 153 |
</description> |
| 154 |
</request> |
| 155 |
|
| 156 |
<event name="tablet_added"> |
| 157 |
<description summary="new device notification"> |
| 158 |
This event is sent whenever a new tablet becomes available on this |
| 159 |
seat. This event only provides the object id of the tablet, any |
| 160 |
static information about the tablet (device name, vid/pid, etc.) is |
| 161 |
sent through the wp_tablet interface. |
| 162 |
</description> |
| 163 |
<arg name="id" type="new_id" interface="zwp_tablet_v1" summary="the newly added graphics tablet"/> |
| 164 |
</event> |
| 165 |
|
| 166 |
<event name="tool_added"> |
| 167 |
<description summary="a new tool has been used with a tablet"> |
| 168 |
This event is sent whenever a tool that has not previously been used |
| 169 |
with a tablet comes into use. This event only provides the object id |
| 170 |
of the tool; any static information about the tool (capabilities, |
| 171 |
type, etc.) is sent through the wp_tablet_tool interface. |
| 172 |
</description> |
| 173 |
<arg name="id" type="new_id" interface="zwp_tablet_tool_v1" summary="the newly added tablet tool"/> |
| 174 |
</event> |
| 175 |
</interface> |
| 176 |
|
| 177 |
<interface name="zwp_tablet_tool_v1" version="1"> |
| 178 |
<description summary="a physical tablet tool"> |
| 179 |
An object that represents a physical tool that has been, or is |
| 180 |
currently in use with a tablet in this seat. Each wp_tablet_tool |
| 181 |
object stays valid until the client destroys it; the compositor |
| 182 |
reuses the wp_tablet_tool object to indicate that the object's |
| 183 |
respective physical tool has come into proximity of a tablet again. |
| 184 |
|
| 185 |
A wp_tablet_tool object's relation to a physical tool depends on the |
| 186 |
tablet's ability to report serial numbers. If the tablet supports |
| 187 |
this capability, then the object represents a specific physical tool |
| 188 |
and can be identified even when used on multiple tablets. |
| 189 |
|
| 190 |
A tablet tool has a number of static characteristics, e.g. tool type, |
| 191 |
hardware_serial and capabilities. These capabilities are sent in an |
| 192 |
event sequence after the wp_tablet_seat.tool_added event before any |
| 193 |
actual events from this tool. This initial event sequence is |
| 194 |
terminated by a wp_tablet_tool.done event. |
| 195 |
|
| 196 |
Tablet tool events are grouped by wp_tablet_tool.frame events. |
| 197 |
Any events received before a wp_tablet_tool.frame event should be |
| 198 |
considered part of the same hardware state change. |
| 199 |
</description> |
| 200 |
|
| 201 |
<request name="set_cursor"> |
| 202 |
<description summary="set the tablet tool's surface"> |
| 203 |
Sets the surface of the cursor used for this tool on the given |
| 204 |
tablet. This request only takes effect if the tool is in proximity |
| 205 |
of one of the requesting client's surfaces or the surface parameter |
| 206 |
is the current pointer surface. If there was a previous surface set |
| 207 |
with this request it is replaced. If surface is NULL, the cursor |
| 208 |
image is hidden. |
| 209 |
|
| 210 |
The parameters hotspot_x and hotspot_y define the position of the |
| 211 |
pointer surface relative to the pointer location. Its top-left corner |
| 212 |
is always at (x, y) - (hotspot_x, hotspot_y), where (x, y) are the |
| 213 |
coordinates of the pointer location, in surface-local coordinates. |
| 214 |
|
| 215 |
On surface.attach requests to the pointer surface, hotspot_x and |
| 216 |
hotspot_y are decremented by the x and y parameters passed to the |
| 217 |
request. Attach must be confirmed by wl_surface.commit as usual. |
| 218 |
|
| 219 |
The hotspot can also be updated by passing the currently set pointer |
| 220 |
surface to this request with new values for hotspot_x and hotspot_y. |
| 221 |
|
| 222 |
The current and pending input regions of the wl_surface are cleared, |
| 223 |
and wl_surface.set_input_region is ignored until the wl_surface is no |
| 224 |
longer used as the cursor. When the use as a cursor ends, the current |
| 225 |
and pending input regions become undefined, and the wl_surface is |
| 226 |
unmapped. |
| 227 |
|
| 228 |
This request gives the surface the role of a cursor. The role |
| 229 |
assigned by this request is the same as assigned by |
| 230 |
wl_pointer.set_cursor meaning the same surface can be |
| 231 |
used both as a wl_pointer cursor and a wp_tablet cursor. If the |
| 232 |
surface already has another role, it raises a protocol error. |
| 233 |
The surface may be used on multiple tablets and across multiple |
| 234 |
seats. |
| 235 |
</description> |
| 236 |
<arg name="serial" type="uint" summary="serial of the enter event"/> |
| 237 |
<arg name="surface" type="object" interface="wl_surface" allow-null="true"/> |
| 238 |
<arg name="hotspot_x" type="int" summary="surface-local x coordinate"/> |
| 239 |
<arg name="hotspot_y" type="int" summary="surface-local y coordinate"/> |
| 240 |
</request> |
| 241 |
|
| 242 |
<request name="destroy" type="destructor"> |
| 243 |
<description summary="destroy the tool object"> |
| 244 |
This destroys the client's resource for this tool object. |
| 245 |
</description> |
| 246 |
</request> |
| 247 |
|
| 248 |
<enum name="type"> |
| 249 |
<description summary="a physical tool type"> |
| 250 |
Describes the physical type of a tool. The physical type of a tool |
| 251 |
generally defines its base usage. |
| 252 |
|
| 253 |
The mouse tool represents a mouse-shaped tool that is not a relative |
| 254 |
device but bound to the tablet's surface, providing absolute |
| 255 |
coordinates. |
| 256 |
|
| 257 |
The lens tool is a mouse-shaped tool with an attached lens to |
| 258 |
provide precision focus. |
| 259 |
</description> |
| 260 |
<entry name="pen" value="0x140" summary="Pen"/> |
| 261 |
<entry name="eraser" value="0x141" summary="Eraser"/> |
| 262 |
<entry name="brush" value="0x142" summary="Brush"/> |
| 263 |
<entry name="pencil" value="0x143" summary="Pencil"/> |
| 264 |
<entry name="airbrush" value="0x144" summary="Airbrush"/> |
| 265 |
<entry name="finger" value="0x145" summary="Finger"/> |
| 266 |
<entry name="mouse" value="0x146" summary="Mouse"/> |
| 267 |
<entry name="lens" value="0x147" summary="Lens"/> |
| 268 |
</enum> |
| 269 |
|
| 270 |
<event name="type"> |
| 271 |
<description summary="tool type"> |
| 272 |
The tool type is the high-level type of the tool and usually decides |
| 273 |
the interaction expected from this tool. |
| 274 |
|
| 275 |
This event is sent in the initial burst of events before the |
| 276 |
wp_tablet_tool.done event. |
| 277 |
</description> |
| 278 |
<arg name="tool_type" type="uint" enum="type" summary="the physical tool type"/> |
| 279 |
</event> |
| 280 |
|
| 281 |
<event name="hardware_serial"> |
| 282 |
<description summary="unique hardware serial number of the tool"> |
| 283 |
If the physical tool can be identified by a unique 64-bit serial |
| 284 |
number, this event notifies the client of this serial number. |
| 285 |
|
| 286 |
If multiple tablets are available in the same seat and the tool is |
| 287 |
uniquely identifiable by the serial number, that tool may move |
| 288 |
between tablets. |
| 289 |
|
| 290 |
Otherwise, if the tool has no serial number and this event is |
| 291 |
missing, the tool is tied to the tablet it first comes into |
| 292 |
proximity with. Even if the physical tool is used on multiple |
| 293 |
tablets, separate wp_tablet_tool objects will be created, one per |
| 294 |
tablet. |
| 295 |
|
| 296 |
This event is sent in the initial burst of events before the |
| 297 |
wp_tablet_tool.done event. |
| 298 |
</description> |
| 299 |
<arg name="hardware_serial_hi" type="uint" summary="the unique serial number of the tool, most significant bits"/> |
| 300 |
<arg name="hardware_serial_lo" type="uint" summary="the unique serial number of the tool, least significant bits"/> |
| 301 |
</event> |
| 302 |
|
| 303 |
<event name="hardware_id_wacom"> |
| 304 |
<description summary="hardware id notification in Wacom's format"> |
| 305 |
This event notifies the client of a hardware id available on this tool. |
| 306 |
|
| 307 |
The hardware id is a device-specific 64-bit id that provides extra |
| 308 |
information about the tool in use, beyond the wl_tool.type |
| 309 |
enumeration. The format of the id is specific to tablets made by |
| 310 |
Wacom Inc. For example, the hardware id of a Wacom Grip |
| 311 |
Pen (a stylus) is 0x802. |
| 312 |
|
| 313 |
This event is sent in the initial burst of events before the |
| 314 |
wp_tablet_tool.done event. |
| 315 |
</description> |
| 316 |
<arg name="hardware_id_hi" type="uint" summary="the hardware id, most significant bits"/> |
| 317 |
<arg name="hardware_id_lo" type="uint" summary="the hardware id, least significant bits"/> |
| 318 |
</event> |
| 319 |
|
| 320 |
<enum name="capability"> |
| 321 |
<description summary="capability flags for a tool"> |
| 322 |
Describes extra capabilities on a tablet. |
| 323 |
|
| 324 |
Any tool must provide x and y values, extra axes are |
| 325 |
device-specific. |
| 326 |
</description> |
| 327 |
<entry name="tilt" value="1" summary="Tilt axes"/> |
| 328 |
<entry name="pressure" value="2" summary="Pressure axis"/> |
| 329 |
<entry name="distance" value="3" summary="Distance axis"/> |
| 330 |
<entry name="rotation" value="4" summary="Z-rotation axis"/> |
| 331 |
<entry name="slider" value="5" summary="Slider axis"/> |
| 332 |
<entry name="wheel" value="6" summary="Wheel axis"/> |
| 333 |
</enum> |
| 334 |
|
| 335 |
<event name="capability"> |
| 336 |
<description summary="tool capability notification"> |
| 337 |
This event notifies the client of any capabilities of this tool, |
| 338 |
beyond the main set of x/y axes and tip up/down detection. |
| 339 |
|
| 340 |
One event is sent for each extra capability available on this tool. |
| 341 |
|
| 342 |
This event is sent in the initial burst of events before the |
| 343 |
wp_tablet_tool.done event. |
| 344 |
</description> |
| 345 |
<arg name="capability" type="uint" enum="capability" summary="the capability"/> |
| 346 |
</event> |
| 347 |
|
| 348 |
<event name="done"> |
| 349 |
<description summary="tool description events sequence complete"> |
| 350 |
This event signals the end of the initial burst of descriptive |
| 351 |
events. A client may consider the static description of the tool to |
| 352 |
be complete and finalize initialization of the tool. |
| 353 |
</description> |
| 354 |
</event> |
| 355 |
|
| 356 |
<event name="removed"> |
| 357 |
<description summary="tool removed"> |
| 358 |
This event is sent when the tool is removed from the system and will |
| 359 |
send no further events. Should the physical tool come back into |
| 360 |
proximity later, a new wp_tablet_tool object will be created. |
| 361 |
|
| 362 |
It is compositor-dependent when a tool is removed. A compositor may |
| 363 |
remove a tool on proximity out, tablet removal or any other reason. |
| 364 |
A compositor may also keep a tool alive until shutdown. |
| 365 |
|
| 366 |
If the tool is currently in proximity, a proximity_out event will be |
| 367 |
sent before the removed event. See wp_tablet_tool.proximity_out for |
| 368 |
the handling of any buttons logically down. |
| 369 |
|
| 370 |
When this event is received, the client must wp_tablet_tool.destroy |
| 371 |
the object. |
| 372 |
</description> |
| 373 |
</event> |
| 374 |
|
| 375 |
<event name="proximity_in"> |
| 376 |
<description summary="proximity in event"> |
| 377 |
Notification that this tool is focused on a certain surface. |
| 378 |
|
| 379 |
This event can be received when the tool has moved from one surface to |
| 380 |
another, or when the tool has come back into proximity above the |
| 381 |
surface. |
| 382 |
|
| 383 |
If any button is logically down when the tool comes into proximity, |
| 384 |
the respective button event is sent after the proximity_in event but |
| 385 |
within the same frame as the proximity_in event. |
| 386 |
</description> |
| 387 |
<arg name="serial" type="uint"/> |
| 388 |
<arg name="tablet" type="object" interface="zwp_tablet_v1" summary="The tablet the tool is in proximity of"/> |
| 389 |
<arg name="surface" type="object" interface="wl_surface" summary="The current surface the tablet tool is over"/> |
| 390 |
</event> |
| 391 |
|
| 392 |
<event name="proximity_out"> |
| 393 |
<description summary="proximity out event"> |
| 394 |
Notification that this tool has either left proximity, or is no |
| 395 |
longer focused on a certain surface. |
| 396 |
|
| 397 |
When the tablet tool leaves proximity of the tablet, button release |
| 398 |
events are sent for each button that was held down at the time of |
| 399 |
leaving proximity. These events are sent before the proximity_out |
| 400 |
event but within the same wp_tablet.frame. |
| 401 |
|
| 402 |
If the tool stays within proximity of the tablet, but the focus |
| 403 |
changes from one surface to another, a button release event may not |
| 404 |
be sent until the button is actually released or the tool leaves the |
| 405 |
proximity of the tablet. |
| 406 |
</description> |
| 407 |
</event> |
| 408 |
|
| 409 |
<event name="down"> |
| 410 |
<description summary="tablet tool is making contact"> |
| 411 |
Sent whenever the tablet tool comes in contact with the surface of the |
| 412 |
tablet. |
| 413 |
|
| 414 |
If the tool is already in contact with the tablet when entering the |
| 415 |
input region, the client owning said region will receive a |
| 416 |
wp_tablet.proximity_in event, followed by a wp_tablet.down |
| 417 |
event and a wp_tablet.frame event. |
| 418 |
|
| 419 |
Note that this event describes logical contact, not physical |
| 420 |
contact. On some devices, a compositor may not consider a tool in |
| 421 |
logical contact until a minimum physical pressure threshold is |
| 422 |
exceeded. |
| 423 |
</description> |
| 424 |
<arg name="serial" type="uint"/> |
| 425 |
</event> |
| 426 |
|
| 427 |
<event name="up"> |
| 428 |
<description summary="tablet tool is no longer making contact"> |
| 429 |
Sent whenever the tablet tool stops making contact with the surface of |
| 430 |
the tablet, or when the tablet tool moves out of the input region |
| 431 |
and the compositor grab (if any) is dismissed. |
| 432 |
|
| 433 |
If the tablet tool moves out of the input region while in contact |
| 434 |
with the surface of the tablet and the compositor does not have an |
| 435 |
ongoing grab on the surface, the client owning said region will |
| 436 |
receive a wp_tablet.up event, followed by a wp_tablet.proximity_out |
| 437 |
event and a wp_tablet.frame event. If the compositor has an ongoing |
| 438 |
grab on this device, this event sequence is sent whenever the grab |
| 439 |
is dismissed in the future. |
| 440 |
|
| 441 |
Note that this event describes logical contact, not physical |
| 442 |
contact. On some devices, a compositor may not consider a tool out |
| 443 |
of logical contact until physical pressure falls below a specific |
| 444 |
threshold. |
| 445 |
</description> |
| 446 |
</event> |
| 447 |
|
| 448 |
<event name="motion"> |
| 449 |
<description summary="motion event"> |
| 450 |
Sent whenever a tablet tool moves. |
| 451 |
</description> |
| 452 |
<arg name="x" type="fixed" summary="surface-local x coordinate"/> |
| 453 |
<arg name="y" type="fixed" summary="surface-local y coordinate"/> |
| 454 |
</event> |
| 455 |
|
| 456 |
<event name="pressure"> |
| 457 |
<description summary="pressure change event"> |
| 458 |
Sent whenever the pressure axis on a tool changes. The value of this |
| 459 |
event is normalized to a value between 0 and 65535. |
| 460 |
|
| 461 |
Note that pressure may be nonzero even when a tool is not in logical |
| 462 |
contact. See the down and up events for more details. |
| 463 |
</description> |
| 464 |
<arg name="pressure" type="uint" summary="The current pressure value"/> |
| 465 |
</event> |
| 466 |
|
| 467 |
<event name="distance"> |
| 468 |
<description summary="distance change event"> |
| 469 |
Sent whenever the distance axis on a tool changes. The value of this |
| 470 |
event is normalized to a value between 0 and 65535. |
| 471 |
|
| 472 |
Note that distance may be nonzero even when a tool is not in logical |
| 473 |
contact. See the down and up events for more details. |
| 474 |
</description> |
| 475 |
<arg name="distance" type="uint" summary="The current distance value"/> |
| 476 |
</event> |
| 477 |
|
| 478 |
<event name="tilt"> |
| 479 |
<description summary="tilt change event"> |
| 480 |
Sent whenever one or both of the tilt axes on a tool change. Each tilt |
| 481 |
value is in 0.01 of a degree, relative to the z-axis of the tablet. |
| 482 |
The angle is positive when the top of a tool tilts along the |
| 483 |
positive x or y axis. |
| 484 |
</description> |
| 485 |
<arg name="tilt_x" type="int" summary="The current value of the X tilt axis"/> |
| 486 |
<arg name="tilt_y" type="int" summary="The current value of the Y tilt axis"/> |
| 487 |
</event> |
| 488 |
|
| 489 |
<event name="rotation"> |
| 490 |
<description summary="z-rotation change event"> |
| 491 |
Sent whenever the z-rotation axis on the tool changes. The |
| 492 |
rotation value is in 0.01 of a degree clockwise from the tool's |
| 493 |
logical neutral position. |
| 494 |
</description> |
| 495 |
<arg name="degrees" type="int" summary="The current rotation of the Z axis"/> |
| 496 |
</event> |
| 497 |
|
| 498 |
<event name="slider"> |
| 499 |
<description summary="Slider position change event"> |
| 500 |
Sent whenever the slider position on the tool changes. The |
| 501 |
value is normalized between -65535 and 65535, with 0 as the logical |
| 502 |
neutral position of the slider. |
| 503 |
|
| 504 |
The slider is available on e.g. the Wacom Airbrush tool. |
| 505 |
</description> |
| 506 |
<arg name="position" type="int" summary="The current position of slider"/> |
| 507 |
</event> |
| 508 |
|
| 509 |
<event name="wheel"> |
| 510 |
<description summary="Wheel delta event"> |
| 511 |
Sent whenever the wheel on the tool emits an event. This event |
| 512 |
contains two values for the same axis change. The degrees value is |
| 513 |
in 0.01 of a degree in the same orientation as the |
| 514 |
wl_pointer.vertical_scroll axis. The clicks value is in discrete |
| 515 |
logical clicks of the mouse wheel. This value may be zero if the |
| 516 |
movement of the wheel was less than one logical click. |
| 517 |
|
| 518 |
Clients should choose either value and avoid mixing degrees and |
| 519 |
clicks. The compositor may accumulate values smaller than a logical |
| 520 |
click and emulate click events when a certain threshold is met. |
| 521 |
Thus, wl_tablet_tool.wheel events with non-zero clicks values may |
| 522 |
have different degrees values. |
| 523 |
</description> |
| 524 |
<arg name="degrees" type="int" summary="The wheel delta in 0.01 of a degree"/> |
| 525 |
<arg name="clicks" type="int" summary="The wheel delta in discrete clicks"/> |
| 526 |
</event> |
| 527 |
|
| 528 |
<enum name="button_state"> |
| 529 |
<description summary="physical button state"> |
| 530 |
Describes the physical state of a button that produced the button event. |
| 531 |
</description> |
| 532 |
<entry name="released" value="0" summary="button is not pressed"/> |
| 533 |
<entry name="pressed" value="1" summary="button is pressed"/> |
| 534 |
</enum> |
| 535 |
|
| 536 |
<event name="button"> |
| 537 |
<description summary="button event"> |
| 538 |
Sent whenever a button on the tool is pressed or released. |
| 539 |
|
| 540 |
If a button is held down when the tool moves in or out of proximity, |
| 541 |
button events are generated by the compositor. See |
| 542 |
wp_tablet_tool.proximity_in and wp_tablet_tool.proximity_out for |
| 543 |
details. |
| 544 |
</description> |
| 545 |
<arg name="serial" type="uint"/> |
| 546 |
<arg name="button" type="uint" summary="The button whose state has changed"/> |
| 547 |
<arg name="state" type="uint" enum="button_state" summary="Whether the button was pressed or released"/> |
| 548 |
</event> |
| 549 |
|
| 550 |
<event name="frame"> |
| 551 |
<description summary="frame event"> |
| 552 |
Marks the end of a series of axis and/or button updates from the |
| 553 |
tablet. The Wayland protocol requires axis updates to be sent |
| 554 |
sequentially, however all events within a frame should be considered |
| 555 |
one hardware event. |
| 556 |
</description> |
| 557 |
<arg name="time" type="uint" summary="The time of the event with millisecond granularity"/> |
| 558 |
</event> |
| 559 |
|
| 560 |
<enum name="error"> |
| 561 |
<entry name="role" value="0" summary="given wl_surface has another role"/> |
| 562 |
</enum> |
| 563 |
</interface> |
| 564 |
|
| 565 |
<interface name="zwp_tablet_v1" version="1"> |
| 566 |
<description summary="graphics tablet device"> |
| 567 |
The wp_tablet interface represents one graphics tablet device. The |
| 568 |
tablet interface itself does not generate events; all events are |
| 569 |
generated by wp_tablet_tool objects when in proximity above a tablet. |
| 570 |
|
| 571 |
A tablet has a number of static characteristics, e.g. device name and |
| 572 |
pid/vid. These capabilities are sent in an event sequence after the |
| 573 |
wp_tablet_seat.tablet_added event. This initial event sequence is |
| 574 |
terminated by a wp_tablet.done event. |
| 575 |
</description> |
| 576 |
|
| 577 |
<request name="destroy" type="destructor"> |
| 578 |
<description summary="destroy the tablet object"> |
| 579 |
This destroys the client's resource for this tablet object. |
| 580 |
</description> |
| 581 |
</request> |
| 582 |
|
| 583 |
<event name="name"> |
| 584 |
<description summary="tablet device name"> |
| 585 |
This event is sent in the initial burst of events before the |
| 586 |
wp_tablet.done event. |
| 587 |
</description> |
| 588 |
<arg name="name" type="string" summary="the device name"/> |
| 589 |
</event> |
| 590 |
|
| 591 |
<event name="id"> |
| 592 |
<description summary="tablet device USB vendor/product id"> |
| 593 |
This event is sent in the initial burst of events before the |
| 594 |
wp_tablet.done event. |
| 595 |
</description> |
| 596 |
<arg name="vid" type="uint" summary="USB vendor id"/> |
| 597 |
<arg name="pid" type="uint" summary="USB product id"/> |
| 598 |
</event> |
| 599 |
|
| 600 |
<event name="path"> |
| 601 |
<description summary="path to the device"> |
| 602 |
A system-specific device path that indicates which device is behind |
| 603 |
this wp_tablet. This information may be used to gather additional |
| 604 |
information about the device, e.g. through libwacom. |
| 605 |
|
| 606 |
A device may have more than one device path. If so, multiple |
| 607 |
wp_tablet.path events are sent. A device may be emulated and not |
| 608 |
have a device path, and in that case this event will not be sent. |
| 609 |
|
| 610 |
The format of the path is unspecified, it may be a device node, a |
| 611 |
sysfs path, or some other identifier. It is up to the client to |
| 612 |
identify the string provided. |
| 613 |
|
| 614 |
This event is sent in the initial burst of events before the |
| 615 |
wp_tablet.done event. |
| 616 |
</description> |
| 617 |
<arg name="path" type="string" summary="path to local device"/> |
| 618 |
</event> |
| 619 |
|
| 620 |
<event name="done"> |
| 621 |
<description summary="tablet description events sequence complete"> |
| 622 |
This event is sent immediately to signal the end of the initial |
| 623 |
burst of descriptive events. A client may consider the static |
| 624 |
description of the tablet to be complete and finalize initialization |
| 625 |
of the tablet. |
| 626 |
</description> |
| 627 |
</event> |
| 628 |
|
| 629 |
<event name="removed"> |
| 630 |
<description summary="tablet removed event"> |
| 631 |
Sent when the tablet has been removed from the system. When a tablet |
| 632 |
is removed, some tools may be removed. |
| 633 |
|
| 634 |
When this event is received, the client must wp_tablet.destroy |
| 635 |
the object. |
| 636 |
</description> |
| 637 |
</event> |
| 638 |
</interface> |
| 639 |
|
| 640 |
</protocol> |