![]() |
libdisplaydevice master
C++ library to modify display devices.
|
Shared utility-level code for macOS API wrappers. More...
Functions | |
| std::optional< MacSingleDisplayConfigState::Initial > | computeInitialState (const std::optional< MacSingleDisplayConfigState::Initial > &prev_state, const MacActiveTopology &topology_before_changes, const EnumeratedDeviceList &devices) |
| Compute the initial state that should be used for future reverts. | |
| MacDeviceDisplayModeMap | 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 MacDeviceDisplayModeMap &original_modes) |
| Compute display modes requested by a single-display configuration. | |
| StringSet | flattenTopology (const MacActiveTopology &topology) |
| Get all the device ids in the topology. | |
| bool | fuzzyCompareModes (const MacDisplayMode &lhs, const MacDisplayMode &rhs) |
| Check if two macOS display modes are close enough to be treated as equal. | |
| bool | fuzzyCompareRefreshRates (const Rational &lhs, const Rational &rhs) |
| Check if two refresh rates are close enough to be treated as equal. | |
| std::string | getPrimaryDevice (const MacDisplayDeviceInterface &mac_dd, const MacActiveTopology &topology) |
| Get one primary device from the provided topology. | |
| bool | isSuccess (MacApiError error_code) |
| Check if a macOS API error represents success. | |
| MacDdGuardFn | modeGuardFn (MacDisplayDeviceInterface &mac_dd, const MacDeviceDisplayModeMap &modes) |
| Make a guard function for display modes. | |
| void | noopGuard () |
| Function that does nothing. | |
| std::optional< MacSingleDisplayConfigState::Initial > | stripInitialState (const MacSingleDisplayConfigState::Initial &initial_state, const EnumeratedDeviceList &devices) |
| Remove unavailable devices from a stored initial state. | |
Shared utility-level code for macOS API wrappers.
Shared utility-level code for macOS settings.
|
nodiscard |
Compute the initial state that should be used for future reverts.
| prev_state | Previous initial state if one was persisted. |
| topology_before_changes | Current topology before applying a new configuration. |
| devices | Currently available devices. |
|
nodiscard |
Compute display modes requested by a single-display configuration.
| resolution | Optional resolution override. |
| refresh_rate | Optional refresh-rate override. |
| configuring_primary_devices | True when an empty device id selected primary devices. |
| device_to_configure | Main device being configured. |
| additional_devices_to_configure | Additional devices mirrored with the main device. |
| original_modes | Current or persisted display modes used as the base. |
|
nodiscard |
Get all the device ids in the topology.
| topology | Topology to flatten. |
|
nodiscard |
Check if two macOS display modes are close enough to be treated as equal.
| lhs | First mode to compare. |
| rhs | Second mode to compare. |
|
nodiscard |
Check if two refresh rates are close enough to be treated as equal.
| lhs | First refresh rate to compare. |
| rhs | Second refresh rate to compare. |
|
nodiscard |
Get one primary device from the provided topology.
| mac_dd | Interface for interacting with the OS. |
| topology | Topology to search. |
|
nodiscard |
Check if a macOS API error represents success.
| error_code | Error code to check. |
|
nodiscard |
Make a guard function for display modes.
| mac_dd | Interface for interacting with the OS. |
| modes | Display modes to restore when the guard runs. |
|
nodiscard |
Remove unavailable devices from a stored initial state.
| initial_state | State to strip. |
| devices | Currently available devices. |