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);
29 const std::string&
getName()
const {
return name; }
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);
#define COGSFOUNDATION_API
Definition: FoundationBase.h:31
Helper class for enumerating available displays on the host computer.
Definition: Monitor.h:19
const glm::ivec2 & getSize() const
Definition: Monitor.h:31
static List monitors
Definition: Monitor.h:37
glm::ivec2 size
Size of this monitor in desktop coordinates.
Definition: Monitor.h:41
const glm::ivec2 & getPosition() const
Definition: Monitor.h:30
std::vector< Monitor > List
Definition: Monitor.h:35
glm::ivec2 position
Position of this monitor in desktop coordinates.
Definition: Monitor.h:40
void * getIdentifier() const
Definition: Monitor.h:28
glm::ivec2 getCentre() const
Definition: Monitor.h:32
std::string name
User-friendly name for this monitor.
Definition: Monitor.h:39
const std::string & getName() const
Definition: Monitor.h:29
Main Cogs namespace.
Definition: MortonCode.h:5