Simulated Reality SDK 7500c78d v1.30.2.51085 2024-04-26T11:23:03Z
Stable
Classes | Namespaces | Macros | Functions
WindowsDisplayUtilities.h File Reference
#include <Windows.h>
#include <SetupAPI.h>
#include <tuple>
#include <vector>
#include <set>
#include <string>
#include <fstream>
#include <map>
#include <physicalmonitorEnumerationapi.h>
#include "sr/types.h"
Include dependency graph for WindowsDisplayUtilities.h:

Go to the source code of this file.

Classes

union  SR::EdidData
 
struct  SR::Resolution
 
struct  SR::DDCCISettings
 Holds all data required to set the DDC/CI settings of the display. More...
 
struct  SR::MonitorData
 

Namespaces

namespace  SR
 Namespace containing all C++ Simulated Reality classes.
 

Macros

#define DIMENCOSR_API
 

Functions

DIMENCOSR_API bool SR::isProductCodeSupported (std::string productCode)
 checks if the given productCode is supported More...
 
DIMENCOSR_API bool SR::getNativeResolution (const LUID adapterLuid, const UINT32 targetId, DISPLAYCONFIG_TARGET_PREFERRED_MODE &PreferredMode)
 Gets preferred or recommended resolutions of the monitor. More...
 
DIMENCOSR_API HRESULT SR::GetPathInfo (HMONITOR hMonitor, _Out_ DISPLAYCONFIG_PATH_INFO *pPathInfo)
 Gets path of the given monitor handler. More...
 
DIMENCOSR_API bool SR::getDisplayResolution (LPCSTR deviceName, int &height, int &width)
 Get display resolution of the given monitor. More...
 
DIMENCOSR_API bool SR::getMonitorList (std::vector< MonitorData > &monitors)
 Gets all active monitor handles and EDID information. More...
 
DIMENCOSR_API bool SR::getEdidData (const HKEY &hDevRegKey, EdidData &edid)
 Gets edid data given a key from the registry and parses the data. More...
 
DIMENCOSR_API void SR::logSrMonitor (MonitorData data, bool srDisplay)
 logs the virtual rectangle, virtual position and the srDisplay boolean More...
 
DIMENCOSR_API void SR::printMonitorList (std::vector< MonitorData > monitors)
 logs all members for a given list of MonitorData More...
 
DIMENCOSR_API bool SR::getKnownMonitors (const std::vector< MonitorData > &monitors, std::vector< MonitorData > &knownMonitors)
 Gets a list of SR displays from a list of displays. Clears knownMonitors and appends SR monitors found in monitors. More...
 
DIMENCOSR_API bool SR::getDDCCISupportedMonitors (const std::vector< MonitorData > &monitors, std::vector< DDCCISettings > &DDCCISupportedMonitors)
 gets a list of SR displays that support DDC/CI. Clears DDCCISupportedMonitors and appends the DDC/CI settings of SR displays known to support DDC/CI. More...
 
DIMENCOSR_API bool SR::disableAttachDetachNotifications ()
 returns true if attach/detach notifications should be disabled for the currently attached monitors. This function assumes only one SR device is attached at a time, it uses the list disableAttachDetachNotificationsByProductCode which should only contain laptop product codes. This function only verifies an SR device by EDID, so it is assumed any SR device will have an EDID that it does not share with non-SR devices. Because it can only verify an SR device by EDID it will only disable notifications related to FPC attach/detach and not monitor attach/detach. Which are events that should not happen for a laptop. More...
 
DIMENCOSR_API bool SR::matchProductId (const std::string productCode, const MonitorData &monitorData)
 Check expected EDID productId for a given product code. More...
 
DIMENCOSR_API void SR::addPreferredResolution (std::vector< MonitorData > &externalMonitors)
 add preferred resolution of the given monitors More...
 
DIMENCOSR_API void SR::addCloneStatus (std::vector< MonitorData > &externalMonitors)
 add clone or duplicate status of connected monitors More...
 
DIMENCOSR_API bool SR::monitorEquals (const SR::MonitorData &monitorA, const SR::MonitorData &monitorB)
 Compare two given monitors and see if they are the equal based on the EDID data in MonitorData. More...
 
DIMENCOSR_API bool SR::monitorConfigurationEquals (const SR::MonitorData &monitorA, const SR::MonitorData &monitorB)
 Compare two given monitors and see if they are the equal based on the resolution and duplication values. Specifically, the rectangle, isDuplicated, and displayResolution members are compared. More...
 
DIMENCOSR_API bool SR::hasNonNativeResolution (const SR::MonitorData &monitor)
 Compare the displayResolution and the nativeResolution of the given monitor. More...
 
DIMENCOSR_API std::vector< RECT > SR::getMonitorRectangles (const std::vector< MonitorData > &monitors)
 Extract RECT rectangles from a list of MonitorData monitors. More...
 
DIMENCOSR_API void SR::waitForChangeMonitorRectangles (std::vector< RECT > &monitorRectangles, unsigned int timeBetweenChecks, bool &active)
 Updates monitorRectangles with the rectangles of the monitors currently returned by getMonitorList() and blocks until this list has changed (as a set) More...
 
DIMENCOSR_API double SR::getMonitorRefreshRate (HMONITOR monitorHandle)
 Return the refresh rate in hertz of the monitor that is represented by the given monitorHandle If the monitor handle is invalid or the refresh rate could otherwise not be retrieved a default value of 60 will be returned. More...
 

Macro Definition Documentation

◆ DIMENCOSR_API

#define DIMENCOSR_API

Copyright (C) 2022 Dimenco

This software has been provided under the Dimenco EULA. (End User License Agreement) You can find the agreement at https://www.dimenco.eu/eula

This source code is considered Protected Code under the definitions of the EULA.