Add displayinfo.h — cross-platform display enumeration header
This commit is contained in:
parent
fe7f0ac27a
commit
d5de1a01c4
1 changed files with 24 additions and 0 deletions
24
src/wg/displayinfo.h
Normal file
24
src/wg/displayinfo.h
Normal 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
|
||||
Loading…
Reference in a new issue