---
name: "wayland_zwp_tablet_pad_group_v2_t"
section: "3"
platform: "linux"
package: "waylandpp-dev"
version: "1.0.0-6+b2"
release: "Debian 13 (Trixie)"
platforms: ["linux"]
url: "https://new.carta.tech/wayland_zwp_tablet_pad_group_v2_t"
---

# wayland\_zwp\_tablet\_pad\_group\_v2\_t(3)

a set of buttons, rings and strips

## NAME

wayland::zwp\_tablet\_pad\_group\_v2\_t - a set of buttons, rings and strips

## SYNOPSIS

`#include <wayland-client-protocol-unstable.hpp>`

Inherits **wayland::proxy\_t**.

### Public Types

enum class **wrapper\_type** { **standard**, **display**, **foreign**, **proxy\_wrapper** }\

### Public Member Functions

std::function\< void(array\_t)\> & **on\_buttons** ()\
 buttons announced  std::function\< void(**zwp\_tablet\_pad\_ring\_v2\_t**)\> & **on\_ring** ()\
 ring announced  std::function\< void(**zwp\_tablet\_pad\_strip\_v2\_t**)\> & **on\_strip** ()\
 strip announced  std::function\< void(uint32\_t)\> & **on\_modes** ()\
 mode-switch ability announced  std::function\< void()\> & **on\_done** ()\
 tablet group description events sequence complete  std::function\< void(uint32\_t, uint32\_t, uint32\_t)\> & **on\_mode\_switch** ()\
 mode switch event  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.  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.

## Detailed Description

a set of buttons, rings and strips

A pad group describes a distinct (sub)set of buttons, rings and strips present in the tablet. The criteria of this grouping is usually positional, eg. if a tablet has buttons on the left and right side, 2 groups will be presented. The physical arrangement of groups is undisclosed and may change on the fly.

Pad groups will announce their features during pad initialization. Between the corresponding wp\_tablet\_pad.group event and wp\_tablet\_pad\_group.done, the pad group will announce the buttons, rings and strips contained in it, plus the number of supported modes.

Modes are a mechanism to allow multiple groups of actions for every element in the pad group. The number of groups and available modes in each is persistent across device plugs. The current mode is user-switchable, it will be announced through the wp\_tablet\_pad\_group.mode\_switch event both whenever it is switched, and after wp\_tablet\_pad.enter.

The current mode logically applies to all elements in the pad group, although it is at clients' discretion whether to actually perform different actions, and/or issue the respective .set\_feedback requests to notify the compositor. See the wp\_tablet\_pad\_group.mode\_switch event for more details.

Definition at line **5249** 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 with wl\_proxy\*. Events are dispatched and it is destructed when the* **proxy\_t** *is destructed. User data is set.*

- *display*

  *C pointer is a wl\_display\*. No events are dispatched, wl\_display\_disconnect is called when the* **proxy\_t** *is destructed. User data is set.*

- *foreign*

  *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* **proxy\_t** *is destructed, user data is not touched. Consequently, there is no reference counting for the* **proxy\_t***. Lifetime of such wrappers should preferably be short to minimize the chance that the owning library decides to destroy the wl\_proxy.*

- *proxy\_wrapper*

  *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* **proxy\_t** *is destroyed. Reference counting is active. A reference to the* **proxy\_t** *creating this proxy wrapper is held to extend its lifetime until after the proxy wrapper is destroyed.*

*Definition at line* **116** *of file* **wayland-client.hpp***.*

## Member Function Documentation

### wl\_proxy \* wayland::proxy\_t::c\_ptr () const` [inherited]`

*Get a pointer to the underlying C struct.*

**Returns**

*The underlying wl\_proxy wrapped by this* **proxy\_t** *if it exists, otherwise an exception is thrown*

### 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 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* **302** *of file* **wayland-client.hpp***.*

### std::function\< void(array\_t)\> & zwp\_tablet\_pad\_group\_v2\_t::on\_buttons ()

*buttons announced*

**Parameters**

*buttons buttons in this group*

*Sent on wp\_tablet\_pad\_group initialization to announce the available buttons in the group. Button indices start at 0, a button may only be in one group at a time.*

*This event is first sent in the initial burst of events before the wp\_tablet\_pad\_group.done event.*

*Some buttons are reserved by the compositor. These buttons may not be assigned to any wp\_tablet\_pad\_group. Compositors may broadcast this event in the case of changes to the mapping of these reserved buttons. If the compositor happens to reserve all buttons in a group, this event will be sent with an empty array.*

*Definition at line* **7899** *of file* **wayland-client-protocol-unstable.cpp***.*

### std::function\< void()\> & zwp\_tablet\_pad\_group\_v2\_t::on\_done ()

*tablet group description events sequence complete This event is sent immediately to signal the end of the initial burst of descriptive events. A client may consider the static description of the tablet to be complete and finalize initialization of the tablet group.*

*Definition at line* **7919** *of file* **wayland-client-protocol-unstable.cpp***.*

### std::function\< void(uint32\_t, uint32\_t, uint32\_t)\> & zwp\_tablet\_pad\_group\_v2\_t::on\_mode\_switch ()

*mode switch event*

**Parameters**

*time the time of the event with millisecond granularity* \
 *serial* \
 *mode the new mode of the pad*

*Notification that the mode was switched.*

*A mode applies to all buttons, rings and strips in a group simultaneously, but a client is not required to assign different actions for each mode. For example, a client may have mode-specific button mappings but map the ring to vertical scrolling in all modes. Mode indices start at 0.*

*Switching modes is compositor-dependent. The compositor may provide visual cues to the client about the mode, e.g. by toggling LEDs on the tablet device. Mode-switching may be software-controlled or controlled by one or more physical buttons. For example, on a Wacom Intuos Pro, the button inside the ring may be assigned to switch between modes.*

*The compositor will also send this event after wp\_tablet\_pad.enter on each group in order to notify of the current mode. Groups that only feature one mode will use mode=0 when emitting this event.*

*If a button action in the new mode differs from the action in the previous mode, the client should immediately issue a wp\_tablet\_pad.set\_feedback request for each changed button.*

*If a ring or strip action in the new mode differs from the action in the previous mode, the client should immediately issue a wp\_tablet\_ring.set\_feedback or wp\_tablet\_strip.set\_feedback request for each changed ring or strip.*

*Definition at line* **7924** *of file* **wayland-client-protocol-unstable.cpp***.*

### std::function\< void(uint32\_t)\> & zwp\_tablet\_pad\_group\_v2\_t::on\_modes ()

*mode-switch ability announced*

**Parameters**

*modes the number of modes*

*Sent on wp\_tablet\_pad\_group initialization to announce that the pad group may switch between modes. A client may use a mode to store a specific configuration for buttons, rings and strips and use the wl\_tablet\_pad\_group.mode\_switch event to toggle between these configurations. Mode indices start at 0.*

*Switching modes is compositor-dependent. See the wp\_tablet\_pad\_group.mode\_switch event for more details.*

*This event is sent in the initial burst of events before the wp\_tablet\_pad\_group.done event. This event is only sent when more than more than one mode is available.*

*Definition at line* **7914** *of file* **wayland-client-protocol-unstable.cpp***.*

### std::function\< void(zwp\_tablet\_pad\_ring\_v2\_t)\> & zwp\_tablet\_pad\_group\_v2\_t::on\_ring ()

*ring announced*

**Parameters**

*ring*

*Sent on wp\_tablet\_pad\_group initialization to announce available rings. One event is sent for each ring available on this pad group.*

*This event is sent in the initial burst of events before the wp\_tablet\_pad\_group.done event.*

*Definition at line* **7904** *of file* **wayland-client-protocol-unstable.cpp***.*

### std::function\< void(zwp\_tablet\_pad\_strip\_v2\_t)\> & zwp\_tablet\_pad\_group\_v2\_t::on\_strip ()

*strip announced*

**Parameters**

*strip*

*Sent on wp\_tablet\_pad initialization to announce available strips. One event is sent for each strip available on this pad group.*

*This event is sent in the initial burst of events before the wp\_tablet\_pad\_group.done event.*

*Definition at line* **7909** *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 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***.*

## Author

*Generated automatically by Doxygen for Wayland++ from the source code.*
