wayland::zwp_tablet_pad_v2_t(3)
π
wayland::zwp_tablet_pad_v2_t(3) β the Wayland++ bestie entry π
okay so you're in the Wayland++ manual, bestie, and this page is all about wayland::zwp_tablet_pad_v2_t(3) β the pad-device wrapper. It's giving "extra buttons, rings and strips on your tablet" energy, and honestly? iconic. π
π NAME π
wayland::zwp_tablet_pad_v2_t β a set of buttons, rings and strips. That's the whole vibe: it's the pad device object, and it's literally described as a set of buttons, rings and strips. Slay. π
β¨ SYNOPSIS β¨
#include <wayland-client-protocol-unstable.hpp>
Inherits wayland::proxy_t.
πΈ Public Types πΈ
enum class wrapper_type { standard, display, foreign, proxy_wrapper }β the wrapper-type enum, inherited from the proxy situation, and yes it has exactly those four values:standard,display,foreign, andproxy_wrapper.
π¦ Public Member Functions π¦
void set_feedback (uint32_t button, std::string const &description, uint32_t serial)β set compositor feedback. That's the label, bestie, and it takes abutton, adescription, and aserial.std::function< void(zwp_tablet_pad_group_v2_t)> & on_group ()β group announced. This is the callback situation for when a group gets announced. πstd::function< void(std::string)> & on_path ()β path to the device. Yes, it gives you the device path.std::function< void(uint32_t)> & on_buttons ()β buttons announced. The buttons are being announced, periodt.std::function< void()> & on_done ()β pad description event sequence complete. This is the "okay, the pad description event sequence is done" callback.std::function< void(uint32_t, uint32_t, zwp_tablet_pad_v2_button_state)> & on_button ()β physical button state. It's giving physical button state callback with twouint32_ts and azwp_tablet_pad_v2_button_state.std::function< void(uint32_t, zwp_tablet_v2_t, surface_t)> & on_enter ()β enter event. This one is the enter event callback.std::function< void(uint32_t, surface_t)> & on_leave ()β enter event. Yep, the page labels this one "enter event" too, so I'm preserving exactly what's written here, bestie π. No renaming, no fixing, no cap.std::function< void()> & on_removed ()β pad removed event. The pad has been removed; this is the callback for that.uint32_t get_id () constβ Get the id of a proxy object.std::string get_class () constβ Get the interface name (class) of a proxy object.uint32_t get_version () constβ Get the protocol object version of a proxy object.wrapper_type get_wrapper_type () constβ Get the type of a proxy object.void set_queue (event_queue_t queue)β Assign a proxy to an event queue.wl_proxy * c_ptr () constβ Get a pointer to the underlying C struct.bool proxy_has_object () constβ Check whether this wrapper actually wraps an object.operator bool () constβ Check whether this wrapper actually wraps an object. Same energy, different syntax. πbool operator== (const proxy_t &right) constβ Check whether two wrappers refer to the same object.bool operator!= (const proxy_t &right) constβ Check whether two wrappers refer to different objects.void proxy_release ()β Release the wrapped object (if any), making this an empty wrapper.
π Static Public Attributes π
static constexpr std::uint32_t set_feedback_since_version = 1β Minimum protocol version required for theset_feedbackfunction. Version gate noted, bestie. β¨
π«Ά Detailed Description π«Ά
okay so a pad device is a set of buttons, rings and strips usually physically present on the tablet device itself. Some exceptions exist where the pad device is physically detached, e.g. the Wacom ExpressKey Remote. Detached-pad representation, we love to see it. π¦
Pad devices have no axes that control the cursor and are generally auxiliary devices to the tool devices used on the tablet surface. So they're not out here steering the cursor β they're auxiliary besties to the tool devices 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. So yes: capabilities first, actual pad events after, and wp_tablet_pad.done closes out that initial sequence. π
All pad features (buttons, rings and strips) 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. Group notification order is very much a thing here. π
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. So like: one active mode per group, but different groups can have different active modes. Lowkey important. β¨
Definition at line 5415 of file wayland-client-protocol-unstable.hpp.
π Member Enumeration Documentation π
π enum class wayland::proxy_t::wrapper_type [strong], [inherited]
Underlying wl_proxy type and properties of a proxy_t that affect construction, destruction, and event handling.
Enumerator
standardβ C pointer is a standard type compatible withwl_proxy*. Events are dispatched and it is destructed when theproxy_tis destructed. User data is set.displayβ C pointer is awl_display*. No events are dispatched,wl_display_disconnectis called when theproxy_tis destructed. User data is set.foreignβ C pointer is a standard type compatible withwl_proxy*, but another library owns it and it should not be touched in a way that could affect the operation of the other library. No events are dispatched,wl_proxy_destroyis not called when theproxy_tis destructed, user data is not touched. Consequently, there is no reference counting for theproxy_t. Lifetime of such wrappers should preferably be short to minimize the chance that the owning library decides to destroy thewl_proxy. Careful with this one, bestie β it's the "another library owns it, don't touch it weirdly" situation. π«Άproxy_wrapperβ C pointer is awl_proxy*that was constructed withwl_proxy_create_wrapper. No events are dispatched,wl_proxy_wrapper_destroyis called when theproxy_tis destroyed. Reference counting is active. A reference to theproxy_tcreating this proxy wrapper is held to extend its lifetime until after the proxy wrapper is destroyed. Reference-counting realness. π
Definition at line 117 of file wayland-client.hpp.
π Member Function Documentation π
okay bestie, this is where the actual functions live. grab a snack π and let's get into it.
π«Ά wl_proxy * wayland::proxy_t::c_ptr () const [inherited]
this one hands you the raw C struct pointer. like, the actual wl_proxy underneath all the C++ wrapper vibes.
Returns: the underlying wl_proxy wrapped by this proxy_t if it exists β otherwise an exception is thrown π. no cap.
π«Ά std::string wayland::proxy_t::get_class () const [inherited]
get the interface name (class) of a proxy object.
Returns: the interface name of the object associated with the proxy β¨.
π«Ά uint32_t wayland::proxy_t::get_id () const [inherited]
get the id of a proxy object.
Returns: the id of the object associated with the proxy π .
π«Ά uint32_t wayland::proxy_t::get_version () const [inherited]
get the protocol object version of a proxy object. gets the protocol object version of a proxy object, or 0 if the proxy was created with unversioned API.
a returned value of 0 means that no version information is available, so the caller must make safe assumptions about the object's real version.
display_t will always return version 0.
Returns: the protocol object version of the proxy or 0 π«Ά.
π«Ά wrapper_type wayland::proxy_t::get_wrapper_type () const [inline], [inherited]
get the type of a proxy object.
Definition at line 303 of file wayland-client.hpp.
π«Ά std::function< void(uint32_t, uint32_t, zwp_tablet_pad_v2_button_state)> & zwp_tablet_pad_v2_t::on_button ()
physical button state π.
Parameters:
- time β the time of the event with millisecond granularity
- button β the index of the button that changed state
- state β (no description in the original, just vibes)
sent whenever the physical state of a button changes.
Definition at line 8033 of file wayland-client-protocol-unstable.cpp.
π«Ά std::function< void(uint32_t)> & zwp_tablet_pad_v2_t::on_buttons ()
buttons announced π.
Parameters:
- buttons β the number of buttons
sent on wp_tablet_pad initialization to announce the available buttons.
this event is sent in the initial burst of events before the wp_tablet_pad.done event. this event is only sent when at least one button is available.
Definition at line 8023 of file wayland-client-protocol-unstable.cpp.
π«Ά std::function< void()> & zwp_tablet_pad_v2_t::on_done ()
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 β¨.
Definition at line 8028 of file wayland-client-protocol-unstable.cpp.
π«Ά std::function< void(uint32_t, zwp_tablet_v2_t, surface_t)> & zwp_tablet_pad_v2_t::on_enter ()
enter event πΈ.
Parameters:
- serial β serial number of the enter event
- tablet β the tablet the pad is attached to
- surface β surface the pad is focused on
notification that this pad is focused on the specified surface.
Definition at line 8038 of file wayland-client-protocol-unstable.cpp.
π«Ά std::function< void(zwp_tablet_pad_group_v2_t)> & zwp_tablet_pad_v2_t::on_group ()
group announced π¦.
Parameters:
- pad_group β (no description in the original)
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.
Definition at line 8013 of file wayland-client-protocol-unstable.cpp.
π«Ά std::function< void(uint32_t, surface_t)> & zwp_tablet_pad_v2_t::on_leave ()
enter event β yes, the original literally says βenter eventβ under the leave function. iconic typo, weβre keeping it fr fr π.
Parameters:
- serial β serial number of the leave event
- surface β surface the pad is no longer focused on
notification that this pad is no longer focused on the specified surface.
Definition at line 8043 of file wayland-client-protocol-unstable.cpp.
π«Ά std::function< void(std::string)> & zwp_tablet_pad_v2_t::on_path ()
path to the device π§.
Parameters:
- path β path to local 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.
Definition at line 8018 of file wayland-client-protocol-unstable.cpp.
π«Ά std::function< void()> & zwp_tablet_pad_v2_t::on_removed ()
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.
Definition at line 8048 of file wayland-client-protocol-unstable.cpp.
π«Ά wayland::proxy_t::operator bool () const [inherited]
check whether this wrapper actually wraps an object.
Returns: true if there is an underlying object, false if this wrapper is empty π.
π«Ά bool wayland::proxy_t::operator!= (const proxy_t & right) const [inherited]
check whether two wrappers refer to different objects.
π«Ά bool wayland::proxy_t::operator== (const proxy_t & right) const [inherited]
check whether two wrappers refer to the same object.
π«Ά bool wayland::proxy_t::proxy_has_object () const [inherited]
check whether this wrapper actually wraps an object.
Returns: true if there is an underlying object, false if this wrapper is empty π.
π«Ά void wayland::proxy_t::proxy_release () [inherited]
release the wrapped object (if any), making this an empty wrapper. note that display_t instances cannot be released this way. attempts to do so are ignored.
Examples: foreign_display.cpp.
π«Ά void zwp_tablet_pad_v2_t::set_feedback (uint32_t button, std::string const & description, uint32_t serial)
set compositor feedback π .
Parameters:
- button β button index
- description β button description
- serial β serial of the mode switch event
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. (yes, the original says βringβ for a button β we donβt make the rules π.)
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.
Definition at line 8007 of file wayland-client-protocol-unstable.cpp.
π«Ά void wayland::proxy_t::set_queue (event_queue_t queue) [inherited]
assign a proxy to an event queue π.
Parameters:
- queue β the event queue that will handle this proxy
assign proxy to event queue. events coming from proxy will be queued in queue instead of the display's main queue.
See also: display_t::dispatch_queue().
Examples: proxy_wrapper.cpp.
π Member Data Documentation π
std::uint32_t wayland::zwp_tablet_pad_v2_t::set_feedback_since_version = 1 [static], [constexpr]
minimum protocol version required for the set_feedback function.
Definition at line 5480 of file wayland-client-protocol-unstable.hpp.
πΈ Author πΈ
generated automatically by Doxygen for Wayland++ from the source code. slay β¨.
thatβs the whole page bestie! this little manual page is from Wayland++ version 1.0.1, dated Fri Mar 27 2026 13:1 β ok bye, go touch some grass and then come back and write some Wayland code ππ«Ά.
π¦ where this page comes from
- ubuntu stonking: waylandpp-dev 1.0.1-2 Β· BSD-2-Clause
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms