10namespace display_device {
38 [[nodiscard]]
virtual std::string
getDisplayName(
const std::string &device_id)
const = 0;
87 [[nodiscard]]
virtual bool isPrimary(
const std::string &device_id)
const = 0;
94 [[nodiscard]]
virtual bool setAsPrimary(
const std::string &device_id) = 0;
Higher level abstracted API for interacting with macOS display devices.
Definition mac_display_device_interface.h:14
virtual MacActiveTopology getCurrentTopology() const =0
Get the active topology.
virtual bool setTopology(const MacActiveTopology &new_topology)=0
Set a new active topology.
virtual bool isPrimary(const std::string &device_id) const =0
Check whether the specified device is primary.
virtual bool isTopologyValid(const MacActiveTopology &topology) const =0
Verify if the active topology is valid.
virtual EnumeratedDeviceList enumAvailableDevices() const =0
Enumerate the available display devices.
virtual bool setHdrStates(const MacHdrStateMap &states)=0
Set HDR states for the devices.
virtual bool setDisplayModes(const MacDeviceDisplayModeMap &modes)=0
Set new display modes for the devices.
virtual std::string getDisplayName(const std::string &device_id) const =0
Get the macOS capture selector associated with the device.
virtual MacHdrStateMap getCurrentHdrStates(const StringSet &device_ids) const =0
Get HDR state for the devices.
virtual ~MacDisplayDeviceInterface()=default
Default virtual destructor.
virtual MacDeviceDisplayModeMap getCurrentDisplayModes(const StringSet &device_ids) const =0
Get current display modes for the devices.
virtual bool isTopologyTheSame(const MacActiveTopology &lhs, const MacActiveTopology &rhs) const =0
Check if the topologies are close enough to be considered the same by macOS.
virtual bool setAsPrimary(const std::string &device_id)=0
Set the device as a primary display.
virtual bool isApiAccessAvailable() const =0
Check if the API for changing display settings is accessible.
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 macOS specific display device types.
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
std::vector< std::vector< std::string > > MacActiveTopology
A LIST[LIST[DEVICE_ID]] structure which represents active macOS display topology.
Definition types.h:59