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

Wayland output metadata used to match a configured display name. More...

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

Collaboration diagram for wl::monitor_t:
[legend]

Public Member Functions

void listen (zxdg_output_manager_v1 *output_manager)
 Attach xdg-output and wl-output listeners for this monitor.
 
 monitor_t (const monitor_t &)=delete
 
 monitor_t (monitor_t &&)=delete
 
 monitor_t (wl_output *output)
 Track a Wayland output and its advertised modes.
 
monitor_toperator= (const monitor_t &)=delete
 
monitor_toperator= (monitor_t &&)=delete
 
void wl_done (wl_output *wl_output)
 Acknowledge completion of a wl-output metadata update.
 
void wl_geometry (wl_output *wl_output, std::int32_t x, std::int32_t y, std::int32_t physical_width, std::int32_t physical_height, std::int32_t subpixel, const char *make, const char *model, std::int32_t transform)
 Receive physical wl-output geometry metadata.
 
void wl_mode (wl_output *wl_output, std::uint32_t flags, std::int32_t width, std::int32_t height, std::int32_t refresh)
 Store the active pixel mode reported by wl-output.
 
void wl_scale (wl_output *wl_output, std::int32_t factor)
 Receive the wl-output scale factor.
 
void xdg_description (zxdg_output_v1 *, const char *description)
 Store the xdg-output human-readable monitor description.
 
void xdg_done (zxdg_output_v1 *)
 Acknowledge completion of an xdg-output metadata update.
 
void xdg_name (zxdg_output_v1 *, const char *name)
 Store the xdg-output logical monitor name.
 
void xdg_position (zxdg_output_v1 *, std::int32_t x, std::int32_t y)
 Store the logical monitor position reported by xdg-output.
 
void xdg_size (zxdg_output_v1 *, std::int32_t width, std::int32_t height)
 Store the logical monitor size reported by xdg-output.
 

Public Attributes

std::string description
 xdg-output description used for logs and UI.
 
std::string name
 xdg-output name used for display selection.
 
wl_output * output
 Wayland output associated with this monitor.
 
platf::touch_port_t viewport
 Logical monitor bounds used to scale absolute input.
 
wl_output_listener wl_listener
 Callback table for wl-output events.
 
zxdg_output_v1_listener xdg_listener
 Callback table for xdg-output events.
 

Detailed Description

Wayland output metadata used to match a configured display name.

Constructor & Destructor Documentation

◆ monitor_t()

wl::monitor_t::monitor_t ( wl_output * output)
inlineexplicit

Track a Wayland output and its advertised modes.

Parameters
outputWayland output object being described.

Member Function Documentation

◆ listen()

void wl::monitor_t::listen ( zxdg_output_manager_v1 * output_manager)

Attach xdg-output and wl-output listeners for this monitor.

Parameters
output_managerxdg-output manager used to query logical monitor metadata.

◆ wl_done()

void wl::monitor_t::wl_done ( wl_output * wl_output)
inline

Acknowledge completion of a wl-output metadata update.

Parameters
wl_outputWayland output.

◆ wl_geometry()

void wl::monitor_t::wl_geometry ( wl_output * wl_output,
std::int32_t x,
std::int32_t y,
std::int32_t physical_width,
std::int32_t physical_height,
std::int32_t subpixel,
const char * make,
const char * model,
std::int32_t transform )
inline

Receive physical wl-output geometry metadata.

Parameters
wl_outputWayland output.
xHorizontal coordinate reported by Wayland.
yVertical coordinate reported by Wayland.
physical_widthPhysical width in millimeters.
physical_heightPhysical height in millimeters.
subpixelWayland subpixel layout enum.
makeMonitor manufacturer string reported by Wayland.
modelMonitor model string reported by Wayland.
transformWayland output transform value.

◆ wl_mode()

void wl::monitor_t::wl_mode ( wl_output * wl_output,
std::uint32_t flags,
std::int32_t width,
std::int32_t height,
std::int32_t refresh )

Store the active pixel mode reported by wl-output.

Parameters
wl_outputWayland output.
flagsBit flags that modify the requested operation.
widthFrame or display width in pixels.
heightFrame or display height in pixels.
refreshOutput refresh rate in mHz.

◆ wl_scale()

void wl::monitor_t::wl_scale ( wl_output * wl_output,
std::int32_t factor )
inline

Receive the wl-output scale factor.

Parameters
wl_outputWayland output.
factorWayland output scale factor.

◆ xdg_description()

void wl::monitor_t::xdg_description ( zxdg_output_v1 * ,
const char * description )

Store the xdg-output human-readable monitor description.

Parameters
descriptionHuman-readable description used in log output.

◆ xdg_name()

void wl::monitor_t::xdg_name ( zxdg_output_v1 * ,
const char * name )
inline

Store the xdg-output logical monitor name.

Parameters
nameHuman-readable name to assign.

◆ xdg_position()

void wl::monitor_t::xdg_position ( zxdg_output_v1 * ,
std::int32_t x,
std::int32_t y )

Store the logical monitor position reported by xdg-output.

Parameters
xHorizontal coordinate reported by Wayland.
yVertical coordinate reported by Wayland.

◆ xdg_size()

void wl::monitor_t::xdg_size ( zxdg_output_v1 * ,
std::int32_t width,
std::int32_t height )

Store the logical monitor size reported by xdg-output.

Parameters
widthFrame or display width in pixels.
heightFrame or display height in pixels.

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