![]() |
libdisplaydevice master
C++ library to modify display devices.
|
Cross-platform API for display wake and display-sleep prevention. More...
#include <src/common/include/display_device/display_power_interface.h>
Public Member Functions | |
| virtual std::unique_ptr< DisplayPowerGuardInterface > | keepDisplayAwake (const std::string &reason)=0 |
| Keep displays awake until the returned guard is destroyed. | |
| virtual bool | wakeDisplay (const std::string &display_name, std::chrono::milliseconds timeout)=0 |
| Ask the platform to wake a display before detection or capture. | |
| virtual | ~DisplayPowerInterface ()=default |
| Default virtual destructor. | |
Cross-platform API for display wake and display-sleep prevention.
This API prepares displays for capture. It does not change display topology, primary display selection, resolution, refresh rate, HDR state, or any persisted display settings.
|
nodiscardpure virtual |
Keep displays awake until the returned guard is destroyed.
| reason | Short human-readable reason for the platform power assertion. |
Implemented in display_device::MacDisplayPower, and display_device::WinDisplayPower.
|
nodiscardpure virtual |
Ask the platform to wake a display before detection or capture.
A successful result means the platform accepted the wake request and any platform-specific detection that this implementation can perform has passed. Some platforms cannot verify that the requested capture selector is awake, so callers should still retry their own capture-target enumeration after this method succeeds.
| display_name | Platform capture selector returned by SettingsManagerInterface::getDisplayName. |
| timeout | Maximum time to wait before the caller retries capture-target detection. |
Implemented in display_device::MacDisplayPower, and display_device::WinDisplayPower.