8#include "../FoundationBase.h"
10#include <glm/vec2.hpp>
21 static void enumerate();
22 static size_t getCount();
23 static const Monitor& get(
size_t idx);
24 static const Monitor* findByName(
const std::string& name);
25 static const Monitor* findFromPoint(
const glm::ivec2& point);
26 static const Monitor* findFromRect(
const glm::ivec2& tl,
const glm::ivec2& br);
28 void* getIdentifier()
const {
return identifier; }
29 const std::string& getName()
const {
return name; }
30 const glm::ivec2& getPosition()
const {
return position; }
31 const glm::ivec2& getSize()
const {
return size; }
32 glm::ivec2 getCentre()
const {
return position + (size / 2); }
35 using List = std::vector<Monitor>;
38 void* identifier =
nullptr;
45 static BOOL callback(HMONITOR monitor, HDC, RECT* coords, LPARAM);
Helper class for enumerating available displays on the host computer.
glm::ivec2 size
Size of this monitor in desktop coordinates.
glm::ivec2 position
Position of this monitor in desktop coordinates.
std::string name
User-friendly name for this monitor.
Contains all Cogs related functionality.