8#include "../FoundationBase.h"
10#include <glm/vec2.hpp>
22 Monitor(
const glm::ivec2& position,
const glm::ivec2& size);
26 static void enumerate();
27 static size_t getCount();
28 static const Monitor& get(
size_t idx);
29 static const Monitor* findByName(
const std::string& name);
30 static const Monitor* findFromPoint(
const glm::ivec2& point);
31 static const Monitor* findFromRect(
const glm::ivec2& tl,
const glm::ivec2& br);
33 void* getIdentifier()
const {
return identifier; }
34 const std::string& getName()
const {
return name; }
35 const glm::ivec2& getPosition()
const {
return position; }
36 const glm::ivec2& getSize()
const {
return size; }
37 glm::ivec2 getCentre()
const {
return position + (size / 2); }
40 using List = std::vector<Monitor>;
43 void* identifier =
nullptr;
50 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.