15namespace display_device {
40 [[nodiscard]] std::string
getDisplayName(
const std::string &device_id)
const override;
75 [[nodiscard]]
bool isPrimary(
const std::string &device_id)
const override;
80 [[nodiscard]]
bool setAsPrimary(
const std::string &device_id)
override;
99 [[nodiscard]] std::optional<MacDisplayId> getDisplayId(std::string_view device_id,
MacQueryType query_type)
const;
101 std::shared_ptr<MacApiLayerInterface> m_m_api;
Higher level abstracted API for interacting with macOS display devices.
Definition mac_display_device_interface.h:14
Default implementation for the MacDisplayDeviceInterface.
Definition mac_display_device.h:19
bool setDisplayModes(const MacDeviceDisplayModeMap &modes) override
Set new display modes for the devices.
Definition mac_display_device_modes.cpp:84
EnumeratedDeviceList enumAvailableDevices() const override
Enumerate the available display devices.
Definition mac_display_device_general.cpp:26
bool setAsPrimary(const std::string &device_id) override
Set the device as a primary display.
Definition mac_display_device_primary.cpp:14
bool isTopologyValid(const MacActiveTopology &topology) const override
Verify if the active topology is valid.
Definition mac_display_device_topology.cpp:44
bool isPrimary(const std::string &device_id) const override
Check whether the specified device is primary.
Definition mac_display_device_primary.cpp:9
bool setHdrStates(const MacHdrStateMap &states) override
Set HDR states for the devices.
Definition mac_display_device_hdr.cpp:21
std::string getDisplayName(const std::string &device_id) const override
Get the macOS capture selector associated with the device.
Definition mac_display_device_general.cpp:66
MacDeviceDisplayModeMap getCurrentDisplayModes(const StringSet &device_ids) const override
Get current display modes for the devices.
Definition mac_display_device_modes.cpp:58
MacActiveTopology getCurrentTopology() const override
Get the active topology.
Definition mac_display_device_topology.cpp:12
bool isApiAccessAvailable() const override
Check if the API for changing display settings is accessible.
Definition mac_display_device_general.cpp:22
MacHdrStateMap getCurrentHdrStates(const StringSet &device_ids) const override
Get HDR state for the devices.
Definition mac_display_device_hdr.cpp:12
MacDisplayDevice(std::shared_ptr< MacApiLayerInterface > m_api)
Default constructor for the class.
Definition mac_display_device_general.cpp:15
bool setTopology(const MacActiveTopology &new_topology) override
Set a new active topology.
Definition mac_display_device_topology.cpp:81
bool isTopologyTheSame(const MacActiveTopology &lhs, const MacActiveTopology &rhs) const override
Check if the topologies are close enough to be considered the same by macOS.
Definition mac_display_device_topology.cpp:65
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 MacApiLayerInterface.
Declarations for the MacDisplayDeviceInterface.
StringMap< std::optional< HdrState > > MacHdrStateMap
Ordered map of [DEVICE_ID -> std::optional<HdrState>].
Definition types.h:87
StringMap< MacDisplayMode > MacDeviceDisplayModeMap
Ordered map of [DEVICE_ID -> MacDisplayMode].
Definition types.h:82
MacQueryType
Type of display list to query from macOS.
Definition types.h:48
std::vector< std::vector< std::string > > MacActiveTopology
A LIST[LIST[DEVICE_ID]] structure which represents active macOS display topology.
Definition types.h:59