Represents a generic Wayland handle with managed lifetime. More...
#include <kanzi/core.ui/platform/windowing_ng/wayland/wayland_optional_handle.hpp>
Public Member Functions | |
| KZ_NO_DISCARD wl_proxy * | getNativeProxy () const noexcept |
| Gets the underlying native Wayland proxy. | |
Static Public Member Functions | |
| static KZ_NO_DISCARD wl_proxy * | getNativeProxy (NativeHandle handle) noexcept |
| Gets the underlying native Wayland proxy. | |
Static Public Attributes | |
| static const wl_interface | s_nativeInterface |
| Represents the underlying native interface. | |
Additional Inherited Members | |
Protected Types inherited from kanzi::OptionalHandle< NativeHandle, nullptr, deleter > | |
| using | HandleType |
| Alias for this handle type. | |
| using | NativeHandleType |
| Alias for the underlying native handle type. | |
Protected Member Functions inherited from kanzi::OptionalHandle< NativeHandle, nullptr, deleter > | |
| KZ_NO_DISCARD optional< NativeHandle > | createOptional () const noexcept |
| Creates a kanzi::optional copy of the native handle. | |
| KZ_NO_DISCARD const NativeHandle | get () const noexcept |
| Provides access to stored handle. | |
| KZ_NO_DISCARD NativeHandle | get () noexcept |
| Provides access to stored handle. | |
| KZ_NO_DISCARD const NativeHandle | getNativeHandle () const noexcept |
| Provides access to stored handle. | |
| KZ_NO_DISCARD NativeHandle | 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 NativeHandle && | operator* () &&noexcept |
| Provides access to stored handle via rvalue reference. | |
| KZ_NO_DISCARD NativeHandle & | operator* () &noexcept |
| Provides access to stored handle via reference. | |
| KZ_NO_DISCARD const NativeHandle && | operator* () const &&noexcept |
| Provides access to stored handle via const rvalue reference. | |
| KZ_NO_DISCARD const NativeHandle & | operator* () const &noexcept |
| Provides access to stored handle via const reference. | |
| OptionalHandle & | operator= (const NativeHandle &value) |
| Copy assignment operator. | |
| OptionalHandle & | operator= (const OptionalHandle &other)=delete |
| Copy assignment operator. | |
| OptionalHandle & | operator= (NativeHandle &&value) noexcept |
| Move assignment operator. | |
| OptionalHandle & | operator= (OptionalHandle &&other) noexcept |
| Move assignment operator. | |
| OptionalHandle () noexcept | |
| Constructor. | |
| OptionalHandle (const NativeHandle &nativeHandle) noexcept | |
| Constructor. | |
| OptionalHandle (const OptionalHandle &other)=delete | |
| Copy constructor. | |
| OptionalHandle (OptionalHandle &&other) noexcept | |
| Move constructor. | |
| NativeHandle | release () noexcept |
| Releases ownership of a native handle without destroying the resource. | |
| void | reset () noexcept |
| Replaces stored handle with sentinel value. | |
| void | reset (U &&newHandle) noexcept |
| Stores a new handle inside. | |
| void | swap (OptionalHandle &other) |
| Swap function. | |
| KZ_NO_DISCARD optional< NativeHandle > | toOptional () &&noexcept |
| Converts OptionalHandle to kanzi::optional. | |
| ~OptionalHandle () | |
| Destructor. | |
Static Protected Member Functions inherited from kanzi::OptionalHandle< NativeHandle, nullptr, deleter > | |
| static constexpr auto | getDeleter () noexcept |
| Gets deleter function. | |
| static constexpr NativeHandle | getSentinel () noexcept |
| Gets sentinel value that can be used to represent invalid handle. | |
Protected Attributes inherited from kanzi::OptionalHandle< NativeHandle, nullptr, deleter > | |
| FlatOptional< NativeHandle, sentinel > | m_handle |
| Native handle that is managed by this class. | |
Represents a generic Wayland handle with managed lifetime.
Uses CRTP pattern. The user is encouraged to derive from it and pass itself as a template parameter.
| NativeHandle | Native Wayland handle type. |
| deleter | Deleter function for the handle. |
|
inlinestaticnoexcept |
Gets the underlying native Wayland proxy.
| handle | Native handle to get Wayland proxy for. |
|
inlinenoexcept |
Gets the underlying native Wayland proxy.
|
static |
Represents the underlying native interface.