10namespace display_device {
85 [[nodiscard]]
virtual std::string
getDeviceId(
const DISPLAYCONFIG_PATH_INFO &path)
const = 0;
92 [[nodiscard]]
virtual std::vector<std::byte>
getEdid(
const DISPLAYCONFIG_PATH_INFO &path)
const = 0;
122 [[nodiscard]]
virtual std::string
getFriendlyName(
const DISPLAYCONFIG_PATH_INFO &path)
const = 0;
141 [[nodiscard]]
virtual std::string
getDisplayName(
const DISPLAYCONFIG_PATH_INFO &path)
const = 0;
158 [[nodiscard]]
virtual LONG
setDisplayConfig(std::vector<DISPLAYCONFIG_PATH_INFO> paths, std::vector<DISPLAYCONFIG_MODE_INFO> modes, UINT32 flags) = 0;
170 [[nodiscard]]
virtual std::optional<HdrState>
getHdrState(
const DISPLAYCONFIG_PATH_INFO &path)
const = 0;
198 [[nodiscard]]
virtual std::optional<Rational>
getDisplayScale(
const std::string &display_name,
const DISPLAYCONFIG_SOURCE_MODE &source_mode)
const = 0;
Lowest level Windows API wrapper for easy mocking.
Definition win_api_layer_interface.h:14
virtual std::string getDisplayName(const DISPLAYCONFIG_PATH_INFO &path) const =0
Get the logical display name for the path.
virtual LONG setDisplayConfig(std::vector< DISPLAYCONFIG_PATH_INFO > paths, std::vector< DISPLAYCONFIG_MODE_INFO > modes, UINT32 flags)=0
Direct wrapper around the SetDisplayConfig WinAPI.
virtual ~WinApiLayerInterface()=default
Default virtual destructor.
virtual std::string getDeviceId(const DISPLAYCONFIG_PATH_INFO &path) const =0
Get a stable and persistent device id for the path.
virtual bool setHdrState(const DISPLAYCONFIG_PATH_INFO &path, HdrState state)=0
Set the HDR state for the path.
virtual std::string getMonitorDevicePath(const DISPLAYCONFIG_PATH_INFO &path) const =0
Get a string that represents a path from the adapter to the display target.
virtual std::vector< std::byte > getEdid(const DISPLAYCONFIG_PATH_INFO &path) const =0
Get EDID byte array for the path.
virtual std::optional< Rational > getDisplayScale(const std::string &display_name, const DISPLAYCONFIG_SOURCE_MODE &source_mode) const =0
Get the scaling value for the display.
virtual std::string getFriendlyName(const DISPLAYCONFIG_PATH_INFO &path) const =0
Get the user-friendly name for the path.
virtual std::optional< PathAndModeData > queryDisplayConfig(QueryType type) const =0
Query Windows for the device paths and associated modes.
virtual std::string getErrorString(LONG error_code) const =0
Stringify the error code from Windows API.
virtual std::optional< HdrState > getHdrState(const DISPLAYCONFIG_PATH_INFO &path) const =0
Get the HDR state the path.
HdrState
The device's HDR state in the operating system.
Definition types.h:18
Declarations for Windows specific types.
QueryType
Type of query the OS should perform while searching for display devices.
Definition types.h:26