![]() |
libdisplaydevice master
C++ library to modify display devices.
|
Default implementation for the WinDisplayDeviceInterface. More...
#include <src/windows/include/display_device/windows/win_display_device.h>
Public Member Functions | |
| EnumeratedDeviceList | enumAvailableDevices () const override |
| Enumerate the available (active and inactive) devices. | |
| DeviceDisplayModeMap | getCurrentDisplayModes (const StringSet &device_ids) const override |
| Get current display modes for the devices. | |
| HdrStateMap | getCurrentHdrStates (const StringSet &device_ids) const override |
| Get HDR state for the devices. | |
| ActiveTopology | getCurrentTopology () const override |
| Get the active (current) topology. | |
| std::string | getDisplayName (const std::string &device_id) const override |
| Get display name associated with the device. | |
| bool | isApiAccessAvailable () const override |
| Check if the API for changing display settings is accessible. | |
| bool | isPrimary (const std::string &device_id) const override |
| Check whether the specified device is primary. | |
| bool | isTopologyTheSame (const ActiveTopology &lhs, const ActiveTopology &rhs) const override |
| Check if the topologies are close enough to be considered the same by the OS. | |
| bool | isTopologyValid (const ActiveTopology &topology) const override |
| Verify if the active topology is valid. | |
| bool | setAsPrimary (const std::string &device_id) override |
| Set the device as a primary display. | |
| bool | setDisplayModes (const DeviceDisplayModeMap &modes) override |
| Set new display modes for the devices. | |
| bool | setHdrStates (const HdrStateMap &states) override |
| Set HDR states for the devices. | |
| bool | setTopology (const ActiveTopology &new_topology) override |
| Set a new active topology for the OS. | |
| WinDisplayDevice (std::shared_ptr< WinApiLayerInterface > w_api) | |
Public Member Functions inherited from display_device::WinDisplayDeviceInterface | |
| virtual | ~WinDisplayDeviceInterface ()=default |
| Default virtual destructor. | |
Default implementation for the WinDisplayDeviceInterface.
|
explicit |
Default constructor for the class.
| w_api | A pointer to the Windows API layer. Will throw on nullptr! |
|
nodiscardoverridevirtual |
Enumerate the available (active and inactive) devices.
*Examples**
Implements display_device::WinDisplayDeviceInterface.
|
nodiscardoverridevirtual |
Get current display modes for the devices.
| device_ids | A list of devices to get the modes for. |
*Examples**
Implements display_device::WinDisplayDeviceInterface.
|
nodiscardoverridevirtual |
Get HDR state for the devices.
| device_ids | A list of devices to get the HDR states for. |
*Examples**
Implements display_device::WinDisplayDeviceInterface.
|
nodiscardoverridevirtual |
Get the active (current) topology.
*Examples**
Implements display_device::WinDisplayDeviceInterface.
|
nodiscardoverridevirtual |
Get display name associated with the device.
| device_id | A device to get display name for. |
*Examples**
Implements display_device::WinDisplayDeviceInterface.
|
nodiscardoverridevirtual |
Check if the API for changing display settings is accessible.
*Examples**
Implements display_device::WinDisplayDeviceInterface.
|
nodiscardoverridevirtual |
Check whether the specified device is primary.
| device_id | A device to perform the check for. |
*Examples**
Implements display_device::WinDisplayDeviceInterface.
|
nodiscardoverridevirtual |
Check if the topologies are close enough to be considered the same by the OS.
| lhs | First topology to compare. |
| rhs | Second topology to compare. |
*Examples**
Implements display_device::WinDisplayDeviceInterface.
|
nodiscardoverridevirtual |
Verify if the active topology is valid.
This is mostly meant as a sanity check or to verify that it is still valid after a manual modification to an existing topology.
| topology | Topology to validate. |
*Examples**
Implements display_device::WinDisplayDeviceInterface.
|
nodiscardoverridevirtual |
Set the device as a primary display.
| device_id | A device to set as primary. |
*Examples**
Implements display_device::WinDisplayDeviceInterface.
|
nodiscardoverridevirtual |
Set new display modes for the devices.
| modes | A map of modes to set. |
*Examples**
Implements display_device::WinDisplayDeviceInterface.
|
nodiscardoverridevirtual |
Set HDR states for the devices.
| states | A map of HDR states to set. |
unknown states are provided, they will be silently ignored and current state will not be changed.*Examples**
Implements display_device::WinDisplayDeviceInterface.
|
nodiscardoverridevirtual |
Set a new active topology for the OS.
| new_topology | New device topology to set. |
*Examples**
Implements display_device::WinDisplayDeviceInterface.