zwp_tablet_pad_v2¤
wayland.zwp_tablet_pad_v2 ¤
A set of buttons, rings, strips and dials
A pad device is a set of buttons, rings, strips and dials usually physically present on the tablet device itself. Some exceptions exist where the pad device is physically detached, e.g. the Wacom ExpressKey Remote.
Pad devices have no axes that control the cursor and are generally auxiliary devices to the tool devices used on the tablet surface.
A pad device has a number of static characteristics, e.g. the number of rings. These capabilities are sent in an event sequence after the wp_tablet_seat.pad_added event before any actual events from this pad. This initial event sequence is terminated by a wp_tablet_pad.done event.
All pad features (buttons, rings, strips and dials) are logically divided into groups and all pads have at least one group. The available groups are notified through the wp_tablet_pad.group event; the compositor will emit one event per group before emitting wp_tablet_pad.done.
Groups may have multiple modes. Modes allow clients to map multiple actions to a single pad feature. Only one mode can be active per group, although different groups may have different active modes.
Methods:
-
set_feedback
–Set compositor feedback
-
destroy
–Destroy the pad object
-
on_group
–Group announced.
-
on_path
–Path to the device.
-
on_buttons
–Buttons announced.
-
on_done
–Pad description event sequence complete.
-
on_button
–Physical button state.
-
on_enter
–Enter event.
-
on_leave
–Leave event.
-
on_removed
–Pad removed event.
button_state ¤
events
group ¤
group(pad_group: zwp_tablet_pad_group_v2) -> None
Group announced
Sent on wp_tablet_pad initialization to announce available groups. One event is sent for each pad group available.
This event is sent in the initial burst of events before the wp_tablet_pad.done event. At least one group will be announced.
path ¤
Path to the device
A system-specific device path that indicates which device is behind this wp_tablet_pad. This information may be used to gather additional information about the device, e.g. through libwacom.
The format of the path is unspecified, it may be a device node, a sysfs path, or some other identifier. It is up to the client to identify the string provided.
This event is sent in the initial burst of events before the wp_tablet_pad.done event.
Parameters:
buttons ¤
done ¤
done() -> None
Pad description event sequence complete
This event signals the end of the initial burst of descriptive events. A client may consider the static description of the pad to be complete and finalize initialization of the pad.
enter ¤
enter(serial: int, tablet: zwp_tablet_v2, surface: wl_surface) -> None
Enter event
Notification that this pad is focused on the specified surface.
Parameters:
-
serial
¤int
) –Serial number of the enter event
-
tablet
¤zwp_tablet_v2
) –The tablet the pad is attached to
-
surface
¤wl_surface
) –Surface the pad is focused on
leave ¤
leave(serial: int, surface: wl_surface) -> None
Leave event
Notification that this pad is no longer focused on the specified surface.
Parameters:
-
serial
¤int
) –Serial number of the leave event
-
surface
¤wl_surface
) –Surface the pad is no longer focused on
removed ¤
removed() -> None
Pad removed event
Sent when the pad has been removed from the system. When a tablet is removed its pad(s) will be removed too.
When this event is received, the client must destroy all rings, strips and groups that were offered by this pad, and issue wp_tablet_pad.destroy the pad itself.
set_feedback ¤
Set compositor feedback
Requests the compositor to use the provided feedback string associated with this button. This request should be issued immediately after a wp_tablet_pad_group.mode_switch event from the corresponding group is received, or whenever a button is mapped to a different action. See wp_tablet_pad_group.mode_switch for more details.
Clients are encouraged to provide context-aware descriptions for the actions associated with each button, and compositors may use this information to offer visual feedback on the button layout (e.g. on-screen displays).
Button indices start at 0. Setting the feedback string on a button that is reserved by the compositor (i.e. not belonging to any wp_tablet_pad_group) does not generate an error but the compositor is free to ignore the request.
The provided string 'description' is a UTF-8 encoded string to be associated with this ring, and is considered user-visible; general internationalization rules apply.
The serial argument will be that of the last wp_tablet_pad_group.mode_switch event received for the group of this button. Requests providing other serials than the most recent one will be ignored.
Parameters:
destroy ¤
destroy() -> None
Destroy the pad object
Destroy the wp_tablet_pad object. Objects created from this object are unaffected and should be destroyed separately.
on_group ¤
on_group(pad_group: zwp_tablet_pad_group_v2) -> None
Group announced.
Override to handle wayland.zwp_tablet_pad_v2.events.group
.
on_path ¤
on_path(path: str) -> None
Path to the device.
Override to handle wayland.zwp_tablet_pad_v2.events.path
.
on_buttons ¤
on_buttons(buttons: int) -> None
Buttons announced.
Override to handle wayland.zwp_tablet_pad_v2.events.buttons
.
on_done ¤
on_done() -> None
Pad description event sequence complete.
Override to handle wayland.zwp_tablet_pad_v2.events.done
.
on_button ¤
on_button(time: int, button: int, state: button_state) -> None
Physical button state.
Override to handle wayland.zwp_tablet_pad_v2.events.button
.
on_enter ¤
on_enter(serial: int, tablet: zwp_tablet_v2, surface: wl_surface) -> None
Enter event.
Override to handle wayland.zwp_tablet_pad_v2.events.enter
.
on_leave ¤
on_leave(serial: int, surface: wl_surface) -> None
Leave event.
Override to handle wayland.zwp_tablet_pad_v2.events.leave
.
on_removed ¤
on_removed() -> None
Pad removed event.
Override to handle wayland.zwp_tablet_pad_v2.events.removed
.