Sunshine master
Self-hosted game stream host for Moonlight.
wl::display_t Class Reference

Wayland display connection used to dispatch capture events. More...

#include <src/platform/linux/wayland.h>

Public Member Functions

bool dispatch (std::chrono::milliseconds timeout)
 Waits up to the specified timeout to dispatch new events on the wl_display.
 
display_internal_t::pointer get ()
 Return the native Wayland display pointer.
 
int init (const char *display_name=nullptr)
 Connect to the requested Wayland display.
 
wl_registry * registry ()
 Return the Wayland registry for global discovery.
 
void roundtrip ()
 Flush pending Wayland requests and wait for replies.
 

Detailed Description

Wayland display connection used to dispatch capture events.

Member Function Documentation

◆ dispatch()

bool wl::display_t::dispatch ( std::chrono::milliseconds timeout)

Waits up to the specified timeout to dispatch new events on the wl_display.

Parameters
timeoutThe timeout in milliseconds.
Returns
true if new events were dispatched or false if the timeout expired.

◆ get()

display_internal_t::pointer wl::display_t::get ( )
inline

Return the native Wayland display pointer.

Returns
Native display connection owned by this wrapper.

◆ init()

int wl::display_t::init ( const char * display_name = nullptr)

Connect to the requested Wayland display.

Parameters
display_nameWayland display name, or nullptr to use WAYLAND_DISPLAY.
Returns
0 when the connection is opened and initialized; -1 on failure.

◆ registry()

wl_registry * wl::display_t::registry ( )

Return the Wayland registry for global discovery.

Returns
Wayland registry used to discover compositor globals.

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