1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
use fmt;
use Display as WinDisplay;
// ---------------------------------------------------------------------------
// CCD Path Configuration Flags
// ---------------------------------------------------------------------------
/// Flag indicating that a DISPLAYCONFIG_PATH_INFO represents an active display path.
pub const DISPLAYCONFIG_PATH_ACTIVE: u32 = 0x00000001;
/// Sentinel value indicating an invalid mode index in a display path structure.
pub const DISPLAYCONFIG_PATH_MODE_IDX_INVALID: u32 = 0xffffffff;
// ---------------------------------------------------------------------------
// DISPLAYCONFIG_MODE_INFO Type Constants
// ---------------------------------------------------------------------------
/// `DISPLAYCONFIG_MODE_INFO` carrying a `DISPLAYCONFIG_SOURCE_MODE` union arm.
/// This mode describes the virtual desktop position and resolution for a source.
pub const DISPLAYCONFIG_MODE_INFO_TYPE_SOURCE: DISPLAYCONFIG_MODE_INFO_TYPE =
DISPLAYCONFIG_MODE_INFO_TYPE;
/// `DISPLAYCONFIG_MODE_INFO` carrying a `DISPLAYCONFIG_TARGET_MODE` union arm.
/// This mode describes the pixel clock, sync frequencies, and signal format for a target.
pub const DISPLAYCONFIG_MODE_INFO_TYPE_TARGET: DISPLAYCONFIG_MODE_INFO_TYPE =
DISPLAYCONFIG_MODE_INFO_TYPE;
// ---------------------------------------------------------------------------
// Device-Info Type IDs for CCD Extensions
// ---------------------------------------------------------------------------
/// `DisplayConfigSetDeviceInfo` type for toggling HDR output on a target.
/// Maps to `DISPLAYCONFIG_DEVICE_INFO_TYPE` value 12 in ntddvdeo.h.
pub const DISPLAYCONFIG_DEVICE_INFO_SET_HDR_STATE: DISPLAYCONFIG_DEVICE_INFO_TYPE =
DISPLAYCONFIG_DEVICE_INFO_TYPE;
/// `DisplayConfigSetDeviceInfo` type for changing the DPI scaling factor.
///
/// This is an undocumented extension used by the Windows Display Settings UI.
/// The numeric value -3 is the de-facto constant observed across Windows 10 and 11.
///
/// IMPORTANT: Uses explicit i32 literal value directly to avoid type conversion issues.
pub const DISPLAYCONFIG_DEVICE_INFO_SET_DPI_SCALE: DISPLAYCONFIG_DEVICE_INFO_TYPE =
DISPLAYCONFIG_DEVICE_INFO_TYPE;
// ---------------------------------------------------------------------------
// Custom Structures for Undocumented Device-Info Payloads
// ---------------------------------------------------------------------------
/// Payload structure for `DisplayConfigSetDeviceInfo` HDR state changes.
///
/// The `enabled` field must be 0 (disable) or 1 (enable). Pass this structure
/// to `DisplayConfigSetDeviceInfo` with type `DISPLAYCONFIG_DEVICE_INFO_SET_HDR_STATE`.
/// Payload structure for `DisplayConfigSetDeviceInfo` DPI scale changes.
///
/// The `scale_factor_as_percent` field represents the target DPI percentage
/// (100 = 100%, 125 = 125%, 150 = 150%, etc.). Pass this structure to
/// `DisplayConfigSetDeviceInfo` with type `DISPLAYCONFIG_DEVICE_INFO_SET_DPI_SCALE`.
// ---------------------------------------------------------------------------
// CcdRawData — Raw CCD Path and Mode Buffers
// ---------------------------------------------------------------------------
/// Holds the raw CCD path and mode arrays returned by `QueryDisplayConfig`.
/// These structures are preserved for later manipulation and validation during
/// topology commit operations.