Represents a Wayland seat and abstracts the underlying capabilities. More...
#include <kanzi/core.ui/platform/input_ng/wayland/wayland_seat.hpp>
Public Member Functions | |
| template<typename T > | |
| bool | addCapability (typename T::Listener &&listener, void *data) noexcept |
| Adds a capability. | |
| template<typename T > | |
| const T & | getCapability () const noexcept |
| template<typename T > | |
| T & | getCapability () noexcept |
| template<typename T > | |
| bool | hasCapability () const noexcept |
| Checks whether the capability is supported by the current environment. | |
| template<typename T > | |
| bool | isCapabilityAddedByCompositor (uint32_t capabilityMask) const noexcept |
| Checks whether a capability was added by the provided capabilityMask. | |
| template<typename T > | |
| bool | isCapabilityRemovedByCompositor (uint32_t capabilityMask) const noexcept |
| Checks whether a capability was removed by the provided capabilityMask. | |
| template<typename T > | |
| void | removeCapability () noexcept |
| Removes capability. | |
Static Public Attributes | |
| static const uint32_t | s_maxVersion |
| Represents maximum interface version supported by the Wayland implementation that Kanzi libraries were compiled against. | |
| static const wl_interface | s_nativeInterface |
| Represents the underlying native interface. | |
Protected Member Functions | |
| WaylandSeatMethods () noexcept=default | |
| Constructor. | |
| WaylandSeatMethods (const NativeHandleType &handle) noexcept | |
| Constructor. | |
Protected Member Functions inherited from kanzi::OptionalHandle< T, sentinel, deleter, typename > | |
| KZ_NO_DISCARD optional< T > | createOptional () const noexcept |
| Creates a kanzi::optional copy of the native handle. | |
| KZ_NO_DISCARD const T | get () const noexcept |
| Provides access to stored handle. | |
| KZ_NO_DISCARD T | get () noexcept |
| Provides access to stored handle. | |
| KZ_NO_DISCARD const T | getNativeHandle () const noexcept |
| Provides access to stored handle. | |
| KZ_NO_DISCARD T | getNativeHandle () noexcept |
| Provides access to stored handle. | |
| KZ_NO_DISCARD bool | hasValue () const noexcept |
| Checks if a handle is stored. | |
| KZ_NO_DISCARD | operator bool () const noexcept |
| Conversion operator to bool. | |
| KZ_NO_DISCARD T && | operator* () &&noexcept |
| Provides access to stored handle via rvalue reference. | |
| KZ_NO_DISCARD T & | operator* () &noexcept |
| Provides access to stored handle via reference. | |
| KZ_NO_DISCARD const T && | operator* () const &&noexcept |
| Provides access to stored handle via const rvalue reference. | |
| KZ_NO_DISCARD const T & | operator* () const &noexcept |
| Provides access to stored handle via const reference. | |
| OptionalHandle & | operator= (const OptionalHandle &other)=delete |
| Copy assignment operator. | |
| OptionalHandle & | operator= (const T &value) |
| Copy assignment operator. | |
| OptionalHandle & | operator= (OptionalHandle &&other) noexcept |
| Move assignment operator. | |
| OptionalHandle & | operator= (T &&value) noexcept |
| Move assignment operator. | |
| OptionalHandle () noexcept | |
| Constructor. | |
| OptionalHandle (const OptionalHandle &other)=delete | |
| Copy constructor. | |
| OptionalHandle (const T &nativeHandle) noexcept | |
| Constructor. | |
| OptionalHandle (OptionalHandle &&other) noexcept | |
| Move constructor. | |
| T | release () noexcept |
| Releases ownership of a native handle without destroying the resource. | |
| void | reset () noexcept |
| Replaces stored handle with sentinel value. | |
| template<typename U , typename = enable_if_t<is_same_v<T, decay_t<U>>>> | |
| void | reset (U &&newHandle) noexcept |
| Stores a new handle inside. | |
| void | swap (OptionalHandle &other) |
| Swap function. | |
| KZ_NO_DISCARD optional< T > | toOptional () &&noexcept |
| Converts OptionalHandle to kanzi::optional. | |
| ~OptionalHandle () | |
| Destructor. | |
Additional Inherited Members | |
Protected Types inherited from kanzi::OptionalHandle< T, sentinel, deleter, typename > | |
| using | HandleType |
| Alias for this handle type. | |
| using | NativeHandleType |
| Alias for the underlying native handle type. | |
Static Protected Member Functions inherited from kanzi::OptionalHandle< T, sentinel, deleter, typename > | |
| static constexpr auto | getDeleter () noexcept |
| Gets deleter function. | |
| static constexpr T | getSentinel () noexcept |
| Gets sentinel value that can be used to represent invalid handle. | |
Protected Attributes inherited from kanzi::OptionalHandle< T, sentinel, deleter, typename > | |
| FlatOptional< T, sentinel > | m_handle |
| Native handle that is managed by this class. | |
Represents a Wayland seat and abstracts the underlying capabilities.
|
explicitprotecteddefaultnoexcept |
Constructor.
|
explicitprotectednoexcept |
Constructor.
| handle | Native handle. |
Checks whether the capability is supported by the current environment.
| T | Capability type to check. |
Adds a capability.
| T | Capability type. |
| listener | Listener to attach. |
| data | Data pointer to receive when the listener is called. |
Removes capability.
| T | Capability to remove. |
Checks whether a capability was added by the provided capabilityMask.
| T | Capability type. |
| capabilityMask | Capability mask provided by Wayland. |
Checks whether a capability was removed by the provided capabilityMask.
| T | Capability type. |
| capabilityMask | Capability mask provided by Wayland. |
|
static |
Represents the underlying native interface.
Represents maximum interface version supported by the Wayland implementation that Kanzi libraries were compiled against.
Defines correct maximum possible interface version based on available events and requests.