From d5de1a01c4f1e1bd83eec09783e2e89578d9e04f Mon Sep 17 00:00:00 2001 From: ZGaetano Date: Wed, 6 May 2026 19:49:30 -0400 Subject: [PATCH] =?UTF-8?q?Add=20displayinfo.h=20=E2=80=94=20cross-platfor?= =?UTF-8?q?m=20display=20enumeration=20header?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/wg/displayinfo.h | 24 ++++++++++++++++++++++++ 1 file changed, 24 insertions(+) create mode 100644 src/wg/displayinfo.h diff --git a/src/wg/displayinfo.h b/src/wg/displayinfo.h new file mode 100644 index 0000000..3c305bd --- /dev/null +++ b/src/wg/displayinfo.h @@ -0,0 +1,24 @@ +#pragma once +// src/wg/displayinfo.h — Cross-platform display enumeration. +// +// C++17 header (no Qt, no Boost). +// Provides display info for registration with DragonRelay. + +#include +#include + +namespace wg { + +struct DisplayInfo { + std::string name; // OS display name (e.g. "\\.\DISPLAY2" on Windows, "HDMI-1" on Linux) + std::string friendlyName; // Human-readable (e.g. "Generic PnP Monitor" or same as name) + int width; // Horizontal resolution in pixels + int height; // Vertical resolution in pixels + bool isPrimary; // True if this is the primary display +}; + +// Returns all currently connected displays. +// Returns an empty vector on error (never throws). +std::vector enumerateDisplays(); + +} // namespace wg