Kanzi  3.9.9
Kanzi Engine C++ API
kanzi::wayland::WaylandInterface< T, NativeHandle, Listener > Class Template Reference

Represents a generic Wayland interface handle with managed lifetime. More...

#include <kanzi/core.ui/platform/windowing_ng/wayland/wayland_interface.hpp>

Public Types

using ListenerType = Listener
 Generic alias to query for appropriate listener type. More...
 

Public Member Functions

template<typename L = 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 NativeHandle * getNativeHandle () const noexcept
 Gets the underlying native handle. More...
 

Static Public Member Functions

static KZ_NO_DISCARD unsigned int askVersion (NativeHandle *handle) noexcept
 Requests compositor which interface version we use. More...
 

Detailed Description

template<typename T, typename NativeHandle, typename Listener = void>
class kanzi::wayland::WaylandInterface< T, NativeHandle, Listener >

Represents a generic Wayland interface handle with managed lifetime.

Uses CRTP pattern. The user is encouraged to derive from it and pass itself as a template parameter.

Template Parameters
TCRTP derived class.
NativeHandleNative Wayland handle type.
ListenerNative Wayland listener type associated with interface.
Since
Kanzi 3.9.8

Member Typedef Documentation

template<typename T, typename NativeHandle, typename Listener = void>
using kanzi::wayland::WaylandInterface< T, NativeHandle, Listener >::ListenerType = Listener

Generic alias to query for appropriate listener type.

Member Function Documentation

template<typename T, typename NativeHandle, typename Listener = void>
static KZ_NO_DISCARD unsigned int kanzi::wayland::WaylandInterface< T, NativeHandle, Listener >::askVersion ( NativeHandle *  handle)
inlinestaticnoexcept

Requests compositor which interface version we use.

Returns
Current interface version.
template<typename T, typename NativeHandle, typename Listener = void>
KZ_NO_DISCARD unsigned int kanzi::wayland::WaylandInterface< T, NativeHandle, Listener >::askVersion ( ) const
inlinenoexcept

Requests compositor which interface version we use.

Returns
Current interface version.
template<typename T, typename NativeHandle, typename Listener = void>
KZ_NO_DISCARD NativeHandle* kanzi::wayland::WaylandInterface< T, NativeHandle, Listener >::getNativeHandle ( ) const
inlinenoexcept

Gets the underlying native handle.

Returns
Native Wayland handle.
template<typename T, typename NativeHandle, typename Listener = void>
template<typename L = Listener>
bool kanzi::wayland::WaylandInterface< T, NativeHandle, Listener >::addListener ( enable_if_t<!is_same< L, void >::value, const L & >  listener,
void *  data 
) const
inlinenoexcept

Adds a listener to Wayland object.

Template Parameters
LListener type.
Parameters
listenerListener to attach.
dataData pointer to receive when the listener is called.
Returns
On success, true, otherwise false.

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