Hermes 0.7.0
Linux game streaming host
Loading...
Searching...
No Matches
wl::display_t Class Reference

Public Member Functions

int init (const char *display_name=nullptr)
 Initialize display. If display_name == nullptr -> display_name = std::getenv("WAYLAND_DISPLAY").
void roundtrip ()
bool dispatch (std::chrono::milliseconds timeout)
 Waits up to the specified timeout to dispatch new events on the wl_display.
int connection_error ()
 The errno-style code of the connection's fatal error, 0 for none. A protocol error (EPROTO) is fatal for the whole connection: no further event is ever delivered, so waiting on one looks exactly like a timeout. The first call after the error logs it, later calls only report it.
wl_registry * registry ()
display_internal_t::pointer get ()

Detailed Description

Definition at line 258 of file wayland.h.

Member Function Documentation

◆ connection_error()

int wl::display_t::connection_error ( )

The errno-style code of the connection's fatal error, 0 for none. A protocol error (EPROTO) is fatal for the whole connection: no further event is ever delivered, so waiting on one looks exactly like a timeout. The first call after the error logs it, later calls only report it.

Definition at line 176 of file wayland.cpp.

◆ 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, false if the timeout expired or the connection is dead; connection_error() tells the two apart.

Definition at line 143 of file wayland.cpp.

◆ get()

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

Definition at line 287 of file wayland.h.

◆ init()

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

Initialize display. If display_name == nullptr -> display_name = std::getenv("WAYLAND_DISPLAY").

Parameters
display_nameThe name of the display.
Returns
0 on success, -1 on failure.

Definition at line 112 of file wayland.cpp.

◆ registry()

wl_registry * wl::display_t::registry ( )

Definition at line 194 of file wayland.cpp.

◆ roundtrip()

void wl::display_t::roundtrip ( )

Definition at line 133 of file wayland.cpp.


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