Sha256: 89e76bec56c44554d6e827474143624a9d4bc25d9fc95de6074419a2890d430f
Contents?: true
Size: 779 Bytes
Versions: 4
Compression:
Stored size: 779 Bytes
Contents
#include "screen.h" #include "reflex/exception.h" namespace Reflex { struct Screen::Data { HMONITOR handle = NULL; };// Screen::Data void Screen_initialize (Screen* pthis, HMONITOR hmonitor) { pthis->self->handle = hmonitor; } Screen::Screen () { } Screen::~Screen () { } Bounds Screen::frame () const { if (!*this) invalid_state_error(__FILE__, __LINE__); MONITORINFO mi = {0}; mi.cbSize = sizeof(mi); if (!GetMonitorInfo(self->handle, &mi)) system_error(__FILE__, __LINE__); const auto& r = mi.rcMonitor; return Bounds(r.left, r.top, r.right - r.left, r.bottom - r.top); } Screen::operator bool () const { return self->handle; } bool Screen::operator ! () const { return !operator bool(); } }// Reflex
Version data entries
4 entries across 4 versions & 1 rubygems
Version | Path |
---|---|
reflexion-0.3.3 | src/win32/screen.cpp |
reflexion-0.3.2 | src/win32/screen.cpp |
reflexion-0.3.1 | src/win32/screen.cpp |
reflexion-0.3 | src/win32/screen.cpp |