Loading...
Searching...
No Matches
wayland::zwp_tablet_pad_group_v2_t Class Reference

a set of buttons, rings and strips More...

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

Inheritance diagram for wayland::zwp_tablet_pad_group_v2_t:
[legend]
Collaboration diagram for wayland::zwp_tablet_pad_group_v2_t:
[legend]

## 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 5250 of file wayland-client-protocol-unstable.hpp.

## Member Enumeration Documentation

## wrapper_type

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 117 of file wayland-client.hpp.

## Member Function Documentation

## c_ptr()

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

## get_class()

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

## get_id()

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

## get_version()

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

## get_wrapper_type()

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.

## on_buttons()

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.

## on_done()

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.

## on_mode_switch()

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.

## on_modes()

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.

## on_ring()

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.

## on_strip()

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.

## operator bool()

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

## operator!=()

bool wayland::proxy_t::operator!= | ( | const proxy_t & | right | ) | const

inherited

Check whether two wrappers refer to different objects.

## operator==()

bool wayland::proxy_t::operator== | ( | const proxy_t & | right | ) | const

inherited

Check whether two wrappers refer to the same object.

## proxy_has_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

## proxy_release()

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.

## set_queue()

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.

The documentation for this class was generated from the following files:

- obj-x86_64-linux-gnu/wayland-client-protocol-unstable.hpp
- obj-x86_64-linux-gnu/wayland-client-protocol-unstable.cpp
- obj-x86_64-linux-gnu/wayland-server-protocol-unstable.cpp