16namespace display_device {
30 std::shared_ptr<WinDisplayDeviceInterface> dd_api,
31 std::shared_ptr<AudioContextInterface> audio_context_api,
32 std::unique_ptr<PersistentState> persistent_state,
44 [[nodiscard]] std::string
getDisplayName(
const std::string &device_id)
const override;
65 [[nodiscard]]
const std::shared_ptr<AudioContextInterface> &
getAudioContextApi()
const;
152 std::shared_ptr<WinDisplayDeviceInterface> m_dd_api;
153 std::shared_ptr<AudioContextInterface> m_audio_context_api;
154 std::unique_ptr<PersistentState> m_persistence_state;
Declarations for the AudioContextInterface.
A class for applying and reverting display device settings.
Definition settings_manager_interface.h:14
RevertResult
Outcome values when trying to revert settings.
Definition settings_manager_interface.h:32
ApplyResult
Outcome values when trying to apply settings.
Definition settings_manager_interface.h:19
Default implementation for the SettingsManagerInterface.
Definition settings_manager.h:20
ApplyResult applySettings(const SingleDisplayConfiguration &config) override
Apply the provided configuration to the system.
Definition settings_manager_apply.cpp:27
SettingsManager(std::shared_ptr< WinDisplayDeviceInterface > dd_api, std::shared_ptr< AudioContextInterface > audio_context_api, std::unique_ptr< PersistentState > persistent_state, WinWorkarounds workarounds)
Definition settings_manager_general.cpp:17
RevertResult revertModifiedSettings(const ActiveTopology ¤t_topology, bool &system_settings_touched, bool *switched_topology=nullptr)
Try to revert the modified settings.
Definition settings_manager_revert.cpp:182
EnumeratedDeviceList enumAvailableDevices() const override
Enumerate the available (active and inactive) devices.
Definition settings_manager_general.cpp:43
RevertResult revertModifiedHdrStates(const SingleDisplayConfigState::Modified &modified_state, DdGuardFn &guard_fn, bool &system_settings_touched)
Revert HDR changes tracked in the modified settings state.
Definition settings_manager_revert.cpp:102
bool preparePrimaryDevice(const SingleDisplayConfiguration &config, const std::string &device_to_configure, DdGuardFn &guard_fn, SingleDisplayConfigState &new_state, bool &system_settings_touched)
Changes or restores the primary device based on the cached state, new state and configuration.
Definition settings_manager_apply.cpp:207
RevertResult revertModifiedPrimaryDevice(const SingleDisplayConfigState::Modified &modified_state, DdGuardFn &guard_fn, bool &system_settings_touched)
Revert primary device changes tracked in the modified settings state.
Definition settings_manager_revert.cpp:158
std::string getDisplayName(const std::string &device_id) const override
Get the platform-specific display name associated with the device.
Definition settings_manager_general.cpp:47
std::optional< std::tuple< SingleDisplayConfigState, std::string, StringSet > > prepareTopology(const SingleDisplayConfiguration &config, const ActiveTopology &topology_before_changes, bool &release_context, bool &system_settings_touched)
Preps the topology so that the further settings could be applied.
Definition settings_manager_apply.cpp:121
bool resetPersistence() override
Reset the persistence in case the settings cannot be reverted.
Definition settings_manager_general.cpp:55
bool prepareHdrStates(const SingleDisplayConfiguration &config, const std::string &device_to_configure, const StringSet &additional_devices_to_configure, DdGuardFn &guard_fn, SingleDisplayConfigState &new_state, bool &system_settings_touched)
Changes or restores the HDR states based on the cached state, new state and configuration.
Definition settings_manager_apply.cpp:321
RevertResult revertModifiedDisplayModes(const SingleDisplayConfigState::Modified &modified_state, DdGuardFn &guard_fn, bool &system_settings_touched)
Revert display mode changes tracked in the modified settings state.
Definition settings_manager_revert.cpp:127
RevertResult revertSettings() override
Revert the applied configuration and restore the previous settings.
Definition settings_manager_revert.cpp:26
bool prepareDisplayModes(const SingleDisplayConfiguration &config, const std::string &device_to_configure, const StringSet &additional_devices_to_configure, DdGuardFn &guard_fn, SingleDisplayConfigState &new_state, bool &system_settings_touched)
Changes or restores the display modes based on the cached state, new state and configuration.
Definition settings_manager_apply.cpp:261
const std::shared_ptr< AudioContextInterface > & getAudioContextApi() const
Get the audio context API.
Definition settings_manager_general.cpp:51
std::vector< EnumeratedDevice > EnumeratedDeviceList
A list of EnumeratedDevice objects.
Definition types.h:208
std::set< std::string, std::less<> > StringSet
Ordered set keyed by strings with transparent comparisons.
Definition types.h:46
Declarations for the SettingsManagerInterface.
Data for tracking the modified changes.
Definition types.h:144
Arbitrary data for making and undoing changes.
Definition types.h:126
Configuration centered around a single display.
Definition types.h:216
Settings for workarounds/hacks for Windows.
Definition types.h:186
Declarations for the WinDisplayDeviceInterface.
Declarations for the PersistentState.
std::vector< std::vector< std::string > > ActiveTopology
A LIST[LIST[DEVICE_ID]] structure which represents an active topology.
Definition types.h:96
std::function< void()> DdGuardFn
Default function type used for cleanup/guard functions.
Definition types.h:181