|
1 | 1 | <?xml version="1.0" encoding="UTF-8"?> |
2 | | -<protocol name="tablet_unstable_v2"> |
| 2 | +<protocol name="tablet_v2"> |
3 | 3 |
|
4 | 4 | <copyright> |
5 | 5 | Copyright 2014 © Stephen "Lyude" Chandler Paul |
6 | | - Copyright 2015-2016 © Red Hat, Inc. |
| 6 | + Copyright 2015-2024 © Red Hat, Inc. |
7 | 7 |
|
8 | 8 | Permission is hereby granted, free of charge, to any person |
9 | 9 | obtaining a copy of this software and associated documentation files |
|
104 | 104 | compositor-specific policy when a tool can be removed. Common approaches |
105 | 105 | will likely include some form of removing a tool when all tablets the |
106 | 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 | 107 | </description> |
117 | 108 |
|
118 | | - <interface name="zwp_tablet_manager_v2" version="1"> |
| 109 | + <interface name="zwp_tablet_manager_v2" version="2"> |
119 | 110 | <description summary="controller object for graphic tablet devices"> |
120 | 111 | An object that provides access to the graphics tablets available on this |
121 | 112 | system. All tablets are associated with a seat, to get access to the |
|
139 | 130 | </request> |
140 | 131 | </interface> |
141 | 132 |
|
142 | | - <interface name="zwp_tablet_seat_v2" version="1"> |
| 133 | + <interface name="zwp_tablet_seat_v2" version="2"> |
143 | 134 | <description summary="controller object for graphic tablet devices of a seat"> |
144 | 135 | An object that provides access to the graphics tablets available on this |
145 | 136 | seat. After binding to this interface, the compositor sends a set of |
|
190 | 181 | </event> |
191 | 182 | </interface> |
192 | 183 |
|
193 | | - <interface name="zwp_tablet_tool_v2" version="1"> |
| 184 | + <interface name="zwp_tablet_tool_v2" version="2"> |
194 | 185 | <description summary="a physical tablet tool"> |
195 | 186 | An object that represents a physical tool that has been, or is |
196 | 187 | currently in use with a tablet in this seat. Each wp_tablet_tool |
|
576 | 567 | </enum> |
577 | 568 | </interface> |
578 | 569 |
|
579 | | - <interface name="zwp_tablet_v2" version="1"> |
| 570 | + <interface name="zwp_tablet_v2" version="2"> |
580 | 571 | <description summary="graphics tablet device"> |
581 | 572 | The wp_tablet interface represents one graphics tablet device. The |
582 | 573 | tablet interface itself does not generate events; all events are |
|
596 | 587 |
|
597 | 588 | <event name="name"> |
598 | 589 | <description summary="tablet device name"> |
| 590 | + A descriptive name for the tablet device. |
| 591 | + |
| 592 | + If the device has no descriptive name, this event is not sent. |
| 593 | + |
599 | 594 | This event is sent in the initial burst of events before the |
600 | | - wp_tablet.done event. |
| 595 | + wp_tablet.done event. |
601 | 596 | </description> |
602 | 597 | <arg name="name" type="string" summary="the device name"/> |
603 | 598 | </event> |
604 | 599 |
|
605 | 600 | <event name="id"> |
606 | | - <description summary="tablet device USB vendor/product id"> |
| 601 | + <description summary="tablet device vendor/product id"> |
| 602 | + The vendor and product IDs for the tablet device. |
| 603 | + |
| 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 USB |
| 606 | + vendor and product ID. If no wp_tablet.bustype is sent, the ID |
| 607 | + is to be interpreted as USB vendor and product ID. |
| 608 | + |
| 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. |
| 611 | + |
607 | 612 | This event is sent in the initial burst of events before the |
608 | 613 | wp_tablet.done event. |
609 | 614 | </description> |
610 | | - <arg name="vid" type="uint" summary="USB vendor id"/> |
611 | | - <arg name="pid" type="uint" summary="USB product id"/> |
| 615 | + <arg name="vid" type="uint" summary="vendor id"/> |
| 616 | + <arg name="pid" type="uint" summary="product id"/> |
612 | 617 | </event> |
613 | 618 |
|
614 | 619 | <event name="path"> |
|
649 | 654 | the object. |
650 | 655 | </description> |
651 | 656 | </event> |
| 657 | + |
| 658 | + <!-- Version 2 additions --> |
| 659 | + |
| 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> |
| 670 | + |
| 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's |
| 674 | + linux/input.h |
| 675 | + |
| 676 | + If the device has no known bustype or the bustype cannot be |
| 677 | + queried, this event is not sent. |
| 678 | + |
| 679 | + This event is sent in the initial burst of events before the |
| 680 | + wp_tablet.done event. |
| 681 | + </description> |
| 682 | + <arg name="bustype" type="uint" enum="bustype" summary="bus type"/> |
| 683 | + </event> |
652 | 684 | </interface> |
653 | 685 |
|
654 | | - <interface name="zwp_tablet_pad_ring_v2" version="1"> |
| 686 | + <interface name="zwp_tablet_pad_ring_v2" version="2"> |
655 | 687 | <description summary="pad ring"> |
656 | 688 | A circular interaction area, such as the touch ring on the Wacom Intuos |
657 | 689 | Pro series tablets. |
|
765 | 797 | </event> |
766 | 798 | </interface> |
767 | 799 |
|
768 | | - <interface name="zwp_tablet_pad_strip_v2" version="1"> |
| 800 | + <interface name="zwp_tablet_pad_strip_v2" version="2"> |
769 | 801 | <description summary="pad strip"> |
770 | 802 | A linear interaction area, such as the strips found in Wacom Cintiq |
771 | 803 | models. |
|
881 | 913 | </event> |
882 | 914 | </interface> |
883 | 915 |
|
884 | | - <interface name="zwp_tablet_pad_group_v2" version="1"> |
| 916 | + <interface name="zwp_tablet_pad_group_v2" version="2"> |
885 | 917 | <description summary="a set of buttons, rings and strips"> |
886 | 918 | A pad group describes a distinct (sub)set of buttons, rings and strips |
887 | 919 | present in the tablet. The criteria of this grouping is usually positional, |
|
984 | 1016 | <description summary="mode switch event"> |
985 | 1017 | Notification that the mode was switched. |
986 | 1018 |
|
987 | | - A mode applies to all buttons, rings and strips in a group |
| 1019 | + A mode applies to all buttons, rings, strips and dials in a group |
988 | 1020 | simultaneously, but a client is not required to assign different actions |
989 | 1021 | for each mode. For example, a client may have mode-specific button |
990 | 1022 | mappings but map the ring to vertical scrolling in all modes. Mode |
991 | 1023 | indices start at 0. |
992 | 1024 |
|
993 | 1025 | Switching modes is compositor-dependent. The compositor may provide |
994 | | - visual cues to the client about the mode, e.g. by toggling LEDs on |
| 1026 | + visual cues to the user about the mode, e.g. by toggling LEDs on |
995 | 1027 | the tablet device. Mode-switching may be software-controlled or |
996 | 1028 | controlled by one or more physical buttons. For example, on a Wacom |
997 | 1029 | Intuos Pro, the button inside the ring may be assigned to switch |
|
1005 | 1037 | previous mode, the client should immediately issue a |
1006 | 1038 | wp_tablet_pad.set_feedback request for each changed button. |
1007 | 1039 |
|
1008 | | - If a ring or strip action in the new mode differs from the action |
| 1040 | + If a ring, strip or dial action in the new mode differs from the action |
1009 | 1041 | in the previous mode, the client should immediately issue a |
1010 | | - wp_tablet_ring.set_feedback or wp_tablet_strip.set_feedback request |
1011 | | - for each changed ring or strip. |
| 1042 | + wp_tablet_ring.set_feedback, wp_tablet_strip.set_feedback or |
| 1043 | + wp_tablet_dial.set_feedback request for each changed ring, strip or dial. |
1012 | 1044 | </description> |
1013 | 1045 | <arg name="time" type="uint" summary="the time of the event with millisecond granularity"/> |
1014 | 1046 | <arg name="serial" type="uint"/> |
1015 | 1047 | <arg name="mode" type="uint" summary="the new mode of the pad"/> |
1016 | 1048 | </event> |
| 1049 | + |
| 1050 | + <!-- Version 2 additions --> |
| 1051 | + |
| 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. |
| 1056 | + |
| 1057 | + This event is sent in the initial burst of events before the |
| 1058 | + wp_tablet_pad_group.done event. |
| 1059 | + </description> |
| 1060 | + <arg name="dial" type="new_id" interface="zwp_tablet_pad_dial_v2"/> |
| 1061 | + </event> |
1017 | 1062 | </interface> |
1018 | 1063 |
|
1019 | | - <interface name="zwp_tablet_pad_v2" version="1"> |
1020 | | - <description summary="a set of buttons, rings and strips"> |
1021 | | - A pad device is a set of buttons, rings and strips |
| 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 dials |
1022 | 1067 | usually physically present on the tablet device itself. Some |
1023 | 1068 | exceptions exist where the pad device is physically detached, e.g. the |
1024 | 1069 | Wacom ExpressKey Remote. |
|
1032 | 1077 | This initial event sequence is terminated by a wp_tablet_pad.done |
1033 | 1078 | event. |
1034 | 1079 |
|
1035 | | - All pad features (buttons, rings and strips) are logically divided into |
| 1080 | + All pad features (buttons, rings, strips and dials) are logically divided into |
1036 | 1081 | groups and all pads have at least one group. The available groups are |
1037 | 1082 | notified through the wp_tablet_pad.group event; the compositor will |
1038 | 1083 | emit one event per group before emitting wp_tablet_pad.done. |
|
1175 | 1220 | </description> |
1176 | 1221 | </event> |
1177 | 1222 | </interface> |
| 1223 | + |
| 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. |
| 1227 | + |
| 1228 | + Events on a dial are logically grouped by the wl_tablet_pad_dial.frame |
| 1229 | + event. |
| 1230 | + </description> |
| 1231 | + |
| 1232 | + <request name="set_feedback"> |
| 1233 | + <description summary="set compositor feedback"> |
| 1234 | + Requests the compositor to use the provided feedback string |
| 1235 | + associated with this dial. This request should be issued immediately |
| 1236 | + after a wp_tablet_pad_group.mode_switch event from the corresponding |
| 1237 | + group is received, or whenever the dial is mapped to a different |
| 1238 | + action. See wp_tablet_pad_group.mode_switch for more details. |
| 1239 | + |
| 1240 | + Clients are encouraged to provide context-aware descriptions for |
| 1241 | + the actions associated with the dial, and compositors may use this |
| 1242 | + information to offer visual feedback about the button layout |
| 1243 | + (eg. on-screen displays). |
| 1244 | + |
| 1245 | + The provided string 'description' is a UTF-8 encoded string to be |
| 1246 | + associated with this ring, and is considered user-visible; general |
| 1247 | + internationalization rules apply. |
| 1248 | + |
| 1249 | + The serial argument will be that of the last |
| 1250 | + wp_tablet_pad_group.mode_switch event received for the group of this |
| 1251 | + dial. Requests providing other serials than the most recent one will be |
| 1252 | + 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> |
| 1257 | + |
| 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> |
| 1263 | + |
| 1264 | + <event name="delta"> |
| 1265 | + <description summary="delta movement"> |
| 1266 | + Sent whenever the position on a dial changes. |
| 1267 | + |
| 1268 | + This event carries the wheel delta as multiples or fractions |
| 1269 | + of 120 with each multiple of 120 representing one logical wheel detent. |
| 1270 | + For example, an axis_value120 of 30 is one quarter of |
| 1271 | + a logical wheel step in the positive direction, a value120 of |
| 1272 | + -240 are two logical wheel steps in the negative direction within the |
| 1273 | + same hardware event. See the wl_pointer.axis_value120 for more details. |
| 1274 | + |
| 1275 | + The value120 must not be zero. |
| 1276 | + </description> |
| 1277 | + <arg name="value120" type="int" summary="rotation distance as fraction of 120"/> |
| 1278 | + </event> |
| 1279 | + |
| 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 logical |
| 1283 | + hardware dial event. A client is expected to accumulate the data |
| 1284 | + in all events within the frame before proceeding. |
| 1285 | + |
| 1286 | + All wp_tablet_pad_dial events before a wp_tablet_pad_dial.frame event belong |
| 1287 | + logically together. |
| 1288 | + |
| 1289 | + A wp_tablet_pad_dial.frame event is sent for every logical event |
| 1290 | + group, even if the group only contains a single wp_tablet_pad_dial |
| 1291 | + 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> |
1178 | 1297 | </protocol> |
0 commit comments