Kanzi  3.9.8
Kanzi Engine C++ API
kanzi::wayland::WaylandSeat Class Reference

Represents a Wayland seat and abstracts the underlying capabilities. More...

#include <kanzi/core.ui/platform/input_ng/wayland/wayland_seat.hpp>

Inheritance diagram for kanzi::wayland::WaylandSeat:
[legend]

Public Member Functions

template<typename T >
bool addCapabilityListener (const typename T::ListenerType &listener, void *data) const noexcept
 Adds a listener to a capability. More...
 
template<typename T >
bool hasCapability () const noexcept
 Checks whether the capability is supported by the current environment. More...
 
template<typename T >
void setCapabilityListener (const typename T::ListenerType &listener, void *data) noexcept
 Helper function to register a listener for a capability. More...
 
void updateCapabilities (uint32_t capabilityMask) noexcept
 Updates the capability status with the provided capability mask. More...
 
 WaylandSeat (wl_seat *nativeHandle) noexcept
 Constructor. More...
 
- Public Member Functions inherited from kanzi::wayland::WaylandInterface< WaylandSeat, wl_seat, wl_seat_listener >
bool addListener (enable_if_t<!is_same< L, void >::value, const L & > listener, void *data) const noexcept
 Adds a listener to Wayland object. More...
 
KZ_NO_DISCARD unsigned int askVersion () const noexcept
 Requests compositor which interface version we use. More...
 
KZ_NO_DISCARD wl_seat * getNativeHandle () const noexcept
 Gets the underlying native handle. More...
 

Static Public Attributes

static const wl_interface s_nativeInterface
 Represents the underlying native interface. More...
 

Additional Inherited Members

- Public Types inherited from kanzi::wayland::WaylandInterface< WaylandSeat, wl_seat, wl_seat_listener >
using ListenerType = wl_seat_listener
 Generic alias to query for appropriate listener type. More...
 
- Static Public Member Functions inherited from kanzi::wayland::WaylandInterface< WaylandSeat, wl_seat, wl_seat_listener >
static KZ_NO_DISCARD unsigned int askVersion (wl_seat *handle) noexcept
 Requests compositor which interface version we use. More...
 

Detailed Description

Represents a Wayland seat and abstracts the underlying capabilities.

Since
Kanzi 3.9.8

Constructor & Destructor Documentation

kanzi::wayland::WaylandSeat::WaylandSeat ( wl_seat *  nativeHandle)
explicitnoexcept

Constructor.

Parameters
nativeHandleNative Wayland handle.

Member Function Documentation

void kanzi::wayland::WaylandSeat::updateCapabilities ( uint32_t  capabilityMask)
noexcept

Updates the capability status with the provided capability mask.

See also
updateCapability()
Parameters
capabilityMaskCapability mask provided by Wayland.
template<typename T >
bool kanzi::wayland::WaylandSeat::hasCapability ( ) const
inlinenoexcept

Checks whether the capability is supported by the current environment.

Template Parameters
TCapability type to check.
Returns
If capability is supported, true, otherwise false.
template<typename T >
void kanzi::wayland::WaylandSeat::setCapabilityListener ( const typename T::ListenerType &  listener,
void data 
)
inlinenoexcept

Helper function to register a listener for a capability.

This class stores listener internally and reattaches it to the specified capability whenever this capability becomes available. For example, if keyboard becomes unavailable and then available again, registered listener automatically reattaches to that capability.

See also
addCapabilityListener()
Template Parameters
TCapability type for which to register a listener.
Parameters
listenerListener to register.
dataData pointer to receive when the listener is called.
template<typename T >
bool kanzi::wayland::WaylandSeat::addCapabilityListener ( const typename T::ListenerType &  listener,
void data 
) const
inlinenoexcept

Adds a listener to a capability.

Template Parameters
TCapability type for which to add a listener.
Parameters
listenerListener to attach.
dataData pointer to receive when the listener is called.
Returns
On success, true, otherwise false.

Member Data Documentation

const wl_interface kanzi::wayland::WaylandSeat::s_nativeInterface
static

Represents the underlying native interface.


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