Add displayinfo.h — cross-platform display enumeration header

This commit is contained in:
Zac Gaetano 2026-05-06 19:49:30 -04:00
parent fe7f0ac27a
commit d5de1a01c4

24
src/wg/displayinfo.h Normal file
View file

@ -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 <string>
#include <vector>
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<DisplayInfo> enumerateDisplays();
} // namespace wg