Kanzi 3.9.10
kanzi::wayland::WaylandRegistry Class Reference

Wayland registry wrapper class. More...

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

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

Public Member Functions

KZ_NO_DISCARD voidbind (const wl_interface *interface, unsigned int registerName, unsigned int version) const noexcept
 Bind an interface to the display.
 
template<typename T >
KZ_NO_DISCARDbindTo (const wl_interface *interface, unsigned int registerName, unsigned int version) const noexcept
 Bind and interface to the display and cast to the correct type.
 
 WaylandRegistry (const WaylandDisplay &waylandDisplay) noexcept
 Constructor.
 
 WaylandRegistry (wl_registry *nativeHandle) noexcept
 Constructor.
 
- Public Member Functions inherited from kanzi::wayland::WaylandInterface< WaylandRegistry, wl_registry, wl_registry_listener >
bool addListener (enable_if_t<!is_same< L, void >::value, const L & > listener, void *data) const noexcept
 Adds a listener to Wayland object.
 
KZ_NO_DISCARD unsigned int askVersion () const noexcept
 Requests compositor which interface version we use.
 
KZ_NO_DISCARD wl_registry * getNativeHandle () const noexcept
 Gets the underlying native handle.
 

Static Public Attributes

static const wl_interface s_nativeInterface
 Represents the underlying native interface.
 

Additional Inherited Members

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

Detailed Description

Wayland registry wrapper class.

Since
Kanzi 3.9.8

Constructor & Destructor Documentation

◆ WaylandRegistry() [1/2]

kanzi::wayland::WaylandRegistry::WaylandRegistry ( wl_registry * nativeHandle)
explicitnoexcept

Constructor.

Parameters
nativeHandleNative Wayland handle.

◆ WaylandRegistry() [2/2]

kanzi::wayland::WaylandRegistry::WaylandRegistry ( const WaylandDisplay & waylandDisplay)
explicitnoexcept

Constructor.

Parameters
waylandDisplayWaylandDisplay to construct WaylandRegistry from.

Member Function Documentation

◆ bind()

KZ_NO_DISCARD void * kanzi::wayland::WaylandRegistry::bind ( const wl_interface * interface,
unsigned int registerName,
unsigned int version ) const
noexcept

Bind an interface to the display.

Parameters
interfaceInterface to bind.
registerNameUnique numeric name of the interface.
versionVersion of the interface to request.
Returns
Handle to the bound interface.

◆ bindTo()

template<typename T >
KZ_NO_DISCARD T kanzi::wayland::WaylandRegistry::bindTo ( const wl_interface * interface,
unsigned int registerName,
unsigned int version ) const
inlinenoexcept

Bind and interface to the display and cast to the correct type.

Prefer using this function instead of bind() because it casts handle to the specified type.

See also
bind()
Template Parameters
TWayland type to which to cast handle.
Parameters
interfaceInterface to bind.
registerNameUnique numeric name of the interface.
versionVersion of the interface to request.
Returns
Handle to the bound interface.

Member Data Documentation

◆ s_nativeInterface

const wl_interface kanzi::wayland::WaylandRegistry::s_nativeInterface
static

Represents the underlying native interface.


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