Higher level abstracted API for interacting Windows' display device(s).
Definition win_display_device_interface.h:17
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
Shared "utility-level" code for Settings.
Definition settings_utils.h:18
DeviceDisplayModeMap computeNewDisplayModes(const std::optional< Resolution > &resolution, const std::optional< FloatingPoint > &refresh_rate, bool configuring_primary_devices, const std::string &device_to_configure, const StringSet &additional_devices_to_configure, const DeviceDisplayModeMap &original_modes)
Compute new display modes from arbitrary data.
Definition settings_utils.cpp:214
DdGuardFn hdrStateGuardFn(WinDisplayDeviceInterface &win_dd, const ActiveTopology &topology)
Make guard function for the HDR states.
Definition settings_utils.cpp:379
std::tuple< ActiveTopology, std::string, StringSet > computeNewTopologyAndMetadata(SingleDisplayConfiguration::DevicePreparation device_prep, const std::string &device_id, const SingleDisplayConfigState::Initial &initial_state)
Compute new topology + metadata from config settings and initial state.
Definition settings_utils.cpp:198
void blankHdrStates(WinDisplayDeviceInterface &win_dd, const std::optional< std::chrono::milliseconds > &delay)
Toggle enabled HDR states off and on again if quick succession.
Definition settings_utils.cpp:289
ActiveTopology computeNewTopology(SingleDisplayConfiguration::DevicePreparation device_prep, bool configuring_primary_devices, const std::string &device_to_configure, const StringSet &additional_devices_to_configure, const ActiveTopology &initial_topology)
Compute new topology from arbitrary data.
Definition settings_utils.cpp:155
std::string getPrimaryDevice(const WinDisplayDeviceInterface &win_dd, const ActiveTopology &topology)
Get one primary device from the provided topology.
Definition settings_utils.cpp:116
StringSet flattenTopology(const ActiveTopology &topology)
Get all the device ids in the topology.
Definition settings_utils.cpp:90
DdGuardFn modeGuardFn(WinDisplayDeviceInterface &win_dd, const ActiveTopology &topology)
Make guard function for the display modes.
Definition settings_utils.cpp:349
DdGuardFn primaryGuardFn(WinDisplayDeviceInterface &win_dd, const ActiveTopology &topology)
Make guard function for the primary display.
Definition settings_utils.cpp:364
std::optional< SingleDisplayConfigState::Initial > computeInitialState(const std::optional< SingleDisplayConfigState::Initial > &prev_state, const ActiveTopology &topology_before_changes, const EnumeratedDeviceList &devices)
Compute the new intial state from arbitrary data.
Definition settings_utils.cpp:127
ActiveTopology createFullExtendedTopology(const WinDisplayDeviceInterface &win_dd)
Create extended topology from all the available devices.
Definition settings_utils.cpp:101
std::optional< SingleDisplayConfigState::Initial > stripInitialState(const SingleDisplayConfigState::Initial &initial_state, const EnumeratedDeviceList &devices)
Strip the initial state of non-existing devices.
Definition settings_utils.cpp:181
DdGuardFn topologyGuardFn(WinDisplayDeviceInterface &win_dd, const ActiveTopology &topology)
Make guard function for the topology.
Definition settings_utils.cpp:338
HdrStateMap computeNewHdrStates(const std::optional< HdrState > &hdr_state, bool configuring_primary_devices, const std::string &device_to_configure, const StringSet &additional_devices_to_configure, const HdrStateMap &original_states)
Compute new HDR states from arbitrary data.
Definition settings_utils.cpp:259
Data that represents the original system state and is used as a base when trying to re-apply settings...
Definition types.h:131
DevicePreparation
Enum detailing how to prepare the display device.
Definition types.h:220
Declarations for the WinDisplayDeviceInterface.
Declarations for Windows specific types.
StringMap< DisplayMode > DeviceDisplayModeMap
Ordered map of [DEVICE_ID -> DisplayMode].
Definition types.h:116
std::vector< std::vector< std::string > > ActiveTopology
A LIST[LIST[DEVICE_ID]] structure which represents an active topology.
Definition types.h:96
StringMap< std::optional< HdrState > > HdrStateMap
Ordered map of [DEVICE_ID -> std::optional<HdrState>].
Definition types.h:121
std::function< void()> DdGuardFn
Default function type used for cleanup/guard functions.
Definition types.h:181