Sunshine0.0.5917
Sunshine 0.0.5917
Self-hosted game stream host for Moonlight.
Loading...
Searching...
No Matches
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:

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_t & operator= (const monitor_t &)=delete
monitor_t & operator= (monitor_t &&)=delete
void wl_done (wl_output *)
 Acknowledge completion of a wl-output metadata update.
void wl_geometry (wl_output *, std::int32_t, std::int32_t, std::int32_t, std::int32_t, std::int32_t, const char *, const char *, std::int32_t)
 Ignore physical wl-output geometry; monitor placement comes from xdg-output 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 *, std::int32_t)
 Ignore wl-output scale; capture uses the active pixel mode and xdg-output logical size.
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.
std::int32_t refresh_mhz {0}
 Refresh rate of the current mode in mHz, 0 when the compositor did not say.
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)
explicit

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 * )
inline

Acknowledge completion of a wl-output metadata update.

Retain the wl-output listener signature while ignoring the output argument.

◆ wl_geometry()

void wl::monitor_t::wl_geometry ( wl_output * ,
std::int32_t ,
std::int32_t ,
std::int32_t ,
std::int32_t ,
std::int32_t ,
const char * ,
const char * ,
std::int32_t  )
inline

Ignore physical wl-output geometry; monitor placement comes from xdg-output metadata.

Retain the wl-output listener signature while ignoring all event arguments.

◆ 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 * ,
std::int32_t  )
inline

Ignore wl-output scale; capture uses the active pixel mode and xdg-output logical size.

Retain the wl-output listener signature while ignoring both event arguments.

◆ 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: