.TH "wayland::zwp_tablet_pad_v2_t" 3 "Wed May 3 2023" "Version 1.0.0" "Wayland++" \" -*- nroff -*- .ad l .nh .SH NAME wayland::zwp_tablet_pad_v2_t \- a set of buttons, rings and strips .SH SYNOPSIS .br .PP .PP \fC#include \fP .PP Inherits \fBwayland::proxy_t\fP\&. .SS "Public Types" .in +1c .ti -1c .RI "enum class \fBwrapper_type\fP { \fBstandard\fP, \fBdisplay\fP, \fBforeign\fP, \fBproxy_wrapper\fP }" .br .in -1c .SS "Public Member Functions" .in +1c .ti -1c .RI "void \fBset_feedback\fP (uint32_t button, std::string const &description, uint32_t serial)" .br .RI "set compositor feedback " .ti -1c .RI "std::function< void(\fBzwp_tablet_pad_group_v2_t\fP)> & \fBon_group\fP ()" .br .RI "group announced " .ti -1c .RI "std::function< void(std::string)> & \fBon_path\fP ()" .br .RI "path to the device " .ti -1c .RI "std::function< void(uint32_t)> & \fBon_buttons\fP ()" .br .RI "buttons announced " .ti -1c .RI "std::function< void()> & \fBon_done\fP ()" .br .RI "pad description event sequence complete " .ti -1c .RI "std::function< void(uint32_t, uint32_t, zwp_tablet_pad_v2_button_state)> & \fBon_button\fP ()" .br .RI "physical button state " .ti -1c .RI "std::function< void(uint32_t, \fBzwp_tablet_v2_t\fP, \fBsurface_t\fP)> & \fBon_enter\fP ()" .br .RI "enter event " .ti -1c .RI "std::function< void(uint32_t, \fBsurface_t\fP)> & \fBon_leave\fP ()" .br .RI "enter event " .ti -1c .RI "std::function< void()> & \fBon_removed\fP ()" .br .RI "pad removed event " .ti -1c .RI "uint32_t \fBget_id\fP () const" .br .RI "Get the id of a proxy object\&. " .ti -1c .RI "std::string \fBget_class\fP () const" .br .RI "Get the interface name (class) of a proxy object\&. " .ti -1c .RI "uint32_t \fBget_version\fP () const" .br .RI "Get the protocol object version of a proxy object\&. " .ti -1c .RI "\fBwrapper_type\fP \fBget_wrapper_type\fP () const" .br .RI "Get the type of a proxy object\&. " .ti -1c .RI "void \fBset_queue\fP (\fBevent_queue_t\fP queue)" .br .RI "Assign a proxy to an event queue\&. " .ti -1c .RI "wl_proxy * \fBc_ptr\fP () const" .br .RI "Get a pointer to the underlying C struct\&. " .ti -1c .RI "bool \fBproxy_has_object\fP () const" .br .RI "Check whether this wrapper actually wraps an object\&. " .ti -1c .RI "\fBoperator bool\fP () const" .br .RI "Check whether this wrapper actually wraps an object\&. " .ti -1c .RI "bool \fBoperator==\fP (const \fBproxy_t\fP &right) const" .br .RI "Check whether two wrappers refer to the same object\&. " .ti -1c .RI "bool \fBoperator!=\fP (const \fBproxy_t\fP &right) const" .br .RI "Check whether two wrappers refer to different objects\&. " .ti -1c .RI "void \fBproxy_release\fP ()" .br .RI "Release the wrapped object (if any), making this an empty wrapper\&. " .in -1c .SS "Static Public Attributes" .in +1c .ti -1c .RI "static constexpr std::uint32_t \fBset_feedback_since_version\fP = 1" .br .RI "Minimum protocol version required for the \fBset_feedback\fP function\&. " .in -1c .SH "Detailed Description" .PP a set of buttons, rings and strips 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\&. .PP Pad devices have no axes that control the cursor and are generally auxiliary devices to the tool devices used on the tablet surface\&. .PP 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\&. .PP 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\&. .PP 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\&. .PP Definition at line \fB5414\fP of file \fBwayland\-client\-protocol\-unstable\&.hpp\fP\&. .SH "Member Enumeration Documentation" .PP .SS "enum class \fBwayland::proxy_t::wrapper_type\fP\fC [strong]\fP, \fC [inherited]\fP" Underlying wl_proxy type and properties of a \fBproxy_t\fP that affect construction, destruction, and event handling .PP \fBEnumerator\fP .in +1c .TP \fB\fIstandard \fP\fP C pointer is a standard type compatible with wl_proxy*\&. Events are dispatched and it is destructed when the \fBproxy_t\fP is destructed\&. User data is set\&. .TP \fB\fIdisplay \fP\fP C pointer is a wl_display*\&. No events are dispatched, wl_display_disconnect is called when the \fBproxy_t\fP is destructed\&. User data is set\&. .TP \fB\fIforeign \fP\fP C pointer is a standard type compatible with wl_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_destroy is not called when the \fBproxy_t\fP is destructed, user data is not touched\&. Consequently, there is no reference counting for the \fBproxy_t\fP\&. Lifetime of such wrappers should preferably be short to minimize the chance that the owning library decides to destroy the wl_proxy\&. .TP \fB\fIproxy_wrapper \fP\fP C pointer is a wl_proxy* that was constructed with wl_proxy_create_wrapper\&. No events are dispatched, wl_proxy_wrapper_destroy is called when the \fBproxy_t\fP is destroyed\&. Reference counting is active\&. A reference to the \fBproxy_t\fP creating this proxy wrapper is held to extend its lifetime until after the proxy wrapper is destroyed\&. .PP Definition at line \fB115\fP of file \fBwayland\-client\&.hpp\fP\&. .SH "Member Function Documentation" .PP .SS "wl_proxy * wayland::proxy_t::c_ptr () const\fC [inherited]\fP" .PP Get a pointer to the underlying C struct\&. .PP \fBReturns\fP .RS 4 The underlying wl_proxy wrapped by this \fBproxy_t\fP if it exists, otherwise an exception is thrown .RE .PP .SS "std::string wayland::proxy_t::get_class () const\fC [inherited]\fP" .PP Get the interface name (class) of a proxy object\&. .PP \fBReturns\fP .RS 4 The interface name of the object associated with the proxy .RE .PP .SS "uint32_t wayland::proxy_t::get_id () const\fC [inherited]\fP" .PP Get the id of a proxy object\&. .PP \fBReturns\fP .RS 4 The id the object associated with the proxy .RE .PP .SS "uint32_t wayland::proxy_t::get_version () const\fC [inherited]\fP" .PP 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\&. .PP 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\&. .PP \fBdisplay_t\fP will always return version 0\&. .PP \fBReturns\fP .RS 4 The protocol object version of the proxy or 0 .RE .PP .SS "\fBwrapper_type\fP wayland::proxy_t::get_wrapper_type () const\fC [inline]\fP, \fC [inherited]\fP" .PP Get the type of a proxy object\&. .PP Definition at line \fB301\fP of file \fBwayland\-client\&.hpp\fP\&. .SS "std::function< void(uint32_t, uint32_t, zwp_tablet_pad_v2_button_state)> & zwp_tablet_pad_v2_t::on_button ()" .PP physical button state .PP \fBParameters\fP .RS 4 \fItime\fP the time of the event with millisecond granularity .br \fIbutton\fP the index of the button that changed state .br \fIstate\fP .RE .PP Sent whenever the physical state of a button changes\&. .PP Definition at line \fB8033\fP of file \fBwayland\-client\-protocol\-unstable\&.cpp\fP\&. .SS "std::function< void(uint32_t)> & zwp_tablet_pad_v2_t::on_buttons ()" .PP buttons announced .PP \fBParameters\fP .RS 4 \fIbuttons\fP the number of buttons .RE .PP Sent on wp_tablet_pad initialization to announce the available buttons\&. .PP 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\&. .PP Definition at line \fB8023\fP of file \fBwayland\-client\-protocol\-unstable\&.cpp\fP\&. .SS "std::function< void()> & zwp_tablet_pad_v2_t::on_done ()" .PP 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\&. .PP Definition at line \fB8028\fP of file \fBwayland\-client\-protocol\-unstable\&.cpp\fP\&. .SS "std::function< void(uint32_t, \fBzwp_tablet_v2_t\fP, \fBsurface_t\fP)> & zwp_tablet_pad_v2_t::on_enter ()" .PP enter event .PP \fBParameters\fP .RS 4 \fIserial\fP serial number of the enter event .br \fItablet\fP the tablet the pad is attached to .br \fIsurface\fP surface the pad is focused on .RE .PP Notification that this pad is focused on the specified surface\&. .PP Definition at line \fB8038\fP of file \fBwayland\-client\-protocol\-unstable\&.cpp\fP\&. .SS "std::function< void(\fBzwp_tablet_pad_group_v2_t\fP)> & zwp_tablet_pad_v2_t::on_group ()" .PP group announced .PP \fBParameters\fP .RS 4 \fIpad_group\fP .RE .PP Sent on wp_tablet_pad initialization to announce available groups\&. One event is sent for each pad group available\&. .PP This event is sent in the initial burst of events before the wp_tablet_pad\&.done event\&. At least one group will be announced\&. .PP Definition at line \fB8013\fP of file \fBwayland\-client\-protocol\-unstable\&.cpp\fP\&. .SS "std::function< void(uint32_t, \fBsurface_t\fP)> & zwp_tablet_pad_v2_t::on_leave ()" .PP enter event .PP \fBParameters\fP .RS 4 \fIserial\fP serial number of the leave event .br \fIsurface\fP surface the pad is no longer focused on .RE .PP Notification that this pad is no longer focused on the specified surface\&. .PP Definition at line \fB8043\fP of file \fBwayland\-client\-protocol\-unstable\&.cpp\fP\&. .SS "std::function< void(std::string)> & zwp_tablet_pad_v2_t::on_path ()" .PP path to the device .PP \fBParameters\fP .RS 4 \fIpath\fP path to local device .RE .PP 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\&. .PP 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\&. .PP This event is sent in the initial burst of events before the wp_tablet_pad\&.done event\&. .PP Definition at line \fB8018\fP of file \fBwayland\-client\-protocol\-unstable\&.cpp\fP\&. .SS "std::function< void()> & zwp_tablet_pad_v2_t::on_removed ()" .PP 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\&. .PP 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\&. .PP Definition at line \fB8048\fP of file \fBwayland\-client\-protocol\-unstable\&.cpp\fP\&. .SS "wayland::proxy_t::operator bool () const\fC [inherited]\fP" .PP Check whether this wrapper actually wraps an object\&. .PP \fBReturns\fP .RS 4 true if there is an underlying object, false if this wrapper is empty .RE .PP .SS "bool wayland::proxy_t::operator!= (const \fBproxy_t\fP & right) const\fC [inherited]\fP" .PP Check whether two wrappers refer to different objects\&. .SS "bool wayland::proxy_t::operator== (const \fBproxy_t\fP & right) const\fC [inherited]\fP" .PP Check whether two wrappers refer to the same object\&. .SS "bool wayland::proxy_t::proxy_has_object () const\fC [inherited]\fP" .PP Check whether this wrapper actually wraps an object\&. .PP \fBReturns\fP .RS 4 true if there is an underlying object, false if this wrapper is empty .RE .PP .SS "void wayland::proxy_t::proxy_release ()\fC [inherited]\fP" .PP Release the wrapped object (if any), making this an empty wrapper\&. Note that \fBdisplay_t\fP instances cannot be released this way\&. Attempts to do so are ignored\&. .PP \fBExamples\fP .in +1c \fBforeign_display\&.cpp\fP\&. .SS "void zwp_tablet_pad_v2_t::set_feedback (uint32_t button, std::string const & description, uint32_t serial)" .PP set compositor feedback .PP \fBParameters\fP .RS 4 \fIbutton\fP button index .br \fIdescription\fP button description .br \fIserial\fP serial of the mode switch event .RE .PP 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\&. .PP 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)\&. .PP 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\&. .PP 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\&. .PP 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\&. .PP Definition at line \fB8007\fP of file \fBwayland\-client\-protocol\-unstable\&.cpp\fP\&. .SS "void wayland::proxy_t::set_queue (\fBevent_queue_t\fP queue)\fC [inherited]\fP" .PP Assign a proxy to an event queue\&. .PP \fBParameters\fP .RS 4 \fIqueue\fP The event queue that will handle this proxy .RE .PP Assign proxy to event queue\&. Events coming from proxy will be queued in queue instead of the display's main queue\&. .PP See also: \fBdisplay_t::dispatch_queue()\fP\&. .PP \fBExamples\fP .in +1c \fBproxy_wrapper\&.cpp\fP\&. .SH "Member Data Documentation" .PP .SS "constexpr std::uint32_t wayland::zwp_tablet_pad_v2_t::set_feedback_since_version = 1\fC [static]\fP, \fC [constexpr]\fP" .PP Minimum protocol version required for the \fBset_feedback\fP function\&. .PP Definition at line \fB5479\fP of file \fBwayland\-client\-protocol\-unstable\&.hpp\fP\&. .SH "Author" .PP Generated automatically by Doxygen for Wayland++ from the source code\&.