🛠️🐜 Antkeeper superbuild with dependencies included https://antkeeper.com
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

1178 lines
50 KiB

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