![]() |
libdisplaydevice v2026.322.2407
C++ library to modify display devices.
|
A class for applying and reverting display device settings. More...
#include <src/common/include/display_device/settings_manager_interface.h>
Public Types | |
| enum class | ApplyResult { Ok , ApiTemporarilyUnavailable , DevicePrepFailed , PrimaryDevicePrepFailed , DisplayModePrepFailed , HdrStatePrepFailed , PersistenceSaveFailed } |
| Outcome values when trying to apply settings. More... | |
| enum class | RevertResult { Ok , ApiTemporarilyUnavailable , TopologyIsInvalid , SwitchingTopologyFailed , RevertingPrimaryDeviceFailed , RevertingDisplayModesFailed , RevertingHdrStatesFailed , PersistenceSaveFailed } |
| Outcome values when trying to revert settings. More... | |
Public Member Functions | |
| virtual ApplyResult | applySettings (const SingleDisplayConfiguration &config)=0 |
| Apply the provided configuration to the system. | |
| virtual EnumeratedDeviceList | enumAvailableDevices () const =0 |
| Enumerate the available (active and inactive) devices. | |
| virtual std::string | getDisplayName (const std::string &device_id) const =0 |
| Get display name associated with the device. | |
| virtual bool | resetPersistence ()=0 |
| Reset the persistence in case the settings cannot be reverted. | |
| virtual RevertResult | revertSettings ()=0 |
| Revert the applied configuration and restore the previous settings. | |
| virtual | ~SettingsManagerInterface ()=default |
| Default virtual destructor. | |
A class for applying and reverting display device settings.
|
strong |
Outcome values when trying to apply settings.
|
strong |
Outcome values when trying to revert settings.
|
nodiscardpure virtual |
Apply the provided configuration to the system.
| config | A desired configuration for the display device. |
*Examples**
Implemented in display_device::SettingsManager.
|
nodiscardpure virtual |
Enumerate the available (active and inactive) devices.
*Examples**
Implemented in display_device::SettingsManager.
|
nodiscardpure virtual |
Get display name associated with the device.
| device_id | A device to get display name for. |
*Examples**
Implemented in display_device::SettingsManager.
|
nodiscardpure virtual |
Reset the persistence in case the settings cannot be reverted.
In case the settings cannot be reverted, because the display is turned or some other reason, this allows to "accept" the current state and start from scratch, but only if the persistence was cleared successfully.
*Examples**
Implemented in display_device::SettingsManager.
|
nodiscardpure virtual |
Revert the applied configuration and restore the previous settings.
*Examples**
Implemented in display_device::SettingsManager.