Ream v0.1.0-1
C++ graphics library for Linux
Loading...
Searching...
No Matches
Public Member Functions | Static Public Member Functions | List of all members
RWLPlatformHandle Class Reference

Wayland platform handle. More...

#include <RWLPlatformHandle.h>

+ Inheritance diagram for RWLPlatformHandle:

Public Member Functions

wl_display * wlDisplay () const noexcept
 Returns the wrapped wl_display connection.
 
 ~RWLPlatformHandle () noexcept
 Destroys the handle, disconnecting the wl_display if it is owned.
 
- Public Member Functions inherited from RPlatformHandle
RPlatform platform () const noexcept
 Returns the platform this handle belongs to.
 
RWLPlatformHandleasWL () noexcept
 Casts this handle to a Wayland platform handle.
 
RDRMPlatformHandleasDRM () noexcept
 Casts this handle to a DRM platform handle.
 
- Public Member Functions inherited from RObject
 RObject ()=default
 Constructs a default RObject.
 

Static Public Member Functions

static std::shared_ptr< RWLPlatformHandleMake (wl_display *wlDisplay, CZOwn ownership) noexcept
 Creates a Wayland platform handle from an existing display connection.
 

Detailed Description

Wayland platform handle.

RWLPlatformHandle is the RPlatformHandle for the Wayland platform (RPlatform::Wayland). It wraps a client wl_display connection that Ream uses to talk to the compositor, and can be obtained from an RPlatformHandle via asWL().

Constructor & Destructor Documentation

◆ ~RWLPlatformHandle()

~RWLPlatformHandle ( )
noexcept

Destroys the handle, disconnecting the wl_display if it is owned.

Member Function Documentation

◆ Make()

static std::shared_ptr< RWLPlatformHandle > Make ( wl_display *  wlDisplay,
CZOwn  ownership 
)
staticnoexcept

Creates a Wayland platform handle from an existing display connection.

Parameters
wlDisplayThe wl_display connection. Must not be null.
ownershipWhether this handle owns wlDisplay (and disconnects it on destruction) or merely borrows it.
Returns
A valid handle on success, nullptr if wlDisplay is null.

◆ wlDisplay()

wl_display * wlDisplay ( ) const
inlinenoexcept

Returns the wrapped wl_display connection.