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
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
use status::NvAPI_Status;
use handles::NvPhysicalGpuHandle;
nvenum! {
pub enum NV_MONITOR_CONN_TYPE / MonitorConnectorType {
NV_MONITOR_CONN_TYPE_UNINITIALIZED / Uninitialized = 0,
NV_MONITOR_CONN_TYPE_VGA / Vga = 2,
NV_MONITOR_CONN_TYPE_COMPONENT / Component = 3,
NV_MONITOR_CONN_TYPE_SVIDEO / SVideo = 4,
NV_MONITOR_CONN_TYPE_HDMI / Hdmi = 5,
NV_MONITOR_CONN_TYPE_DVI / Dvi = 6,
NV_MONITOR_CONN_TYPE_LVDS / Lvds = 7,
NV_MONITOR_CONN_TYPE_DP / DisplayPort = 8,
NV_MONITOR_CONN_TYPE_COMPOSITE / Composite = 9,
NV_MONITOR_CONN_TYPE_UNKNOWN / Unknown = -1,
}
}
nvenum_display! {
MonitorConnectorType => _
}
nvbits! {
pub enum NV_GPU_CONNECTED_IDS_FLAG / ConnectedIdsFlags {
NV_GPU_CONNECTED_IDS_FLAG_UNCACHED / UNCACHED = 0x01,
NV_GPU_CONNECTED_IDS_FLAG_SLI / SLI = 0x02,
NV_GPU_CONNECTED_IDS_FLAG_LIDSTATE / LID_STATE = 0x04,
NV_GPU_CONNECTED_IDS_FLAG_FAKE / FAKE = 0x08,
NV_GPU_CONNECTED_IDS_FLAG_EXCLUDE_MST / EXCLUDE_MST = 0x10,
}
}
nvbits! {
pub enum NV_GPU_DISPLAYIDS_FLAGS / DisplayIdsFlags {
NV_GPU_DISPLAYIDS_FLAGS_DYNAMIC / DYNAMIC = 0x01,
NV_GPU_DISPLAYIDS_FLAGS_MST_ROOT_NODE / MST_ROOT_NODE = 0x02,
NV_GPU_DISPLAYIDS_FLAGS_ACTIVE / ACTIVE = 0x04,
NV_GPU_DISPLAYIDS_FLAGS_CLUSTER / CLUSTER = 0x08,
NV_GPU_DISPLAYIDS_FLAGS_OS_VISIBLE / OS_VISIBLE = 0x10,
NV_GPU_DISPLAYIDS_FLAGS_WIRELESS / WIRELESS = 0x20,
NV_GPU_DISPLAYIDS_FLAGS_CONNECTED / CONNECTED = 0x40,
NV_GPU_DISPLAYIDS_FLAGS_RESERVED_INTERNAL / RESERVED_INTERNAL = 0x1ff80,
NV_GPU_DISPLAYIDS_FLAGS_PHYSICALLY_CONNECTED / PHYSICALLY_CONNECTED = 0x20000,
NV_GPU_DISPLAYIDS_FLAGS_RESERVED / RESERVED = 0xfffc0000u32,
}
}
nvstruct! {
pub struct NV_GPU_DISPLAYIDS {
pub version: u32,
pub connectorType: NV_MONITOR_CONN_TYPE,
pub displayId: u32,
pub flags: NV_GPU_DISPLAYIDS_FLAGS,
}
}
nvversion! { NV_GPU_DISPLAYIDS_VER1(NV_GPU_DISPLAYIDS = 4 * 4, 1) }
nvversion! { NV_GPU_DISPLAYIDS_VER2(NV_GPU_DISPLAYIDS = 4 * 4, 3) }
nvversion! { NV_GPU_DISPLAYIDS_VER = NV_GPU_DISPLAYIDS_VER2 }
nvapi! {
pub type GPU_GetConnectedDisplayIds = extern "C" fn(hPhysicalGPU: NvPhysicalGpuHandle, pDisplayIds: *mut NV_GPU_DISPLAYIDS, pDisplayIdCount: *mut u32, flags: NV_GPU_CONNECTED_IDS_FLAG) -> NvAPI_Status;
pub unsafe fn NvAPI_GPU_GetConnectedDisplayIds;
}
nvapi! {
pub type GPU_GetAllDisplayIds = extern "C" fn(hPhysicalGPU: NvPhysicalGpuHandle, pDisplayIds: *mut NV_GPU_DISPLAYIDS, pDisplayIdCount: *mut u32) -> NvAPI_Status;
pub unsafe fn NvAPI_GPU_GetAllDisplayIds;
}