]> git.proxmox.com Git - rustc.git/blob - vendor/windows/src/Windows/Graphics/Display/mod.rs
New upstream version 1.70.0+dfsg1
[rustc.git] / vendor / windows / src / Windows / Graphics / Display / mod.rs
1 #[cfg(feature = "Graphics_Display_Core")]
2 pub mod Core;
3 #[doc(hidden)]
4 #[repr(transparent)]
5 pub struct IAdvancedColorInfo(::windows::core::IUnknown);
6 unsafe impl ::windows::core::Interface for IAdvancedColorInfo {
7 type Vtable = IAdvancedColorInfo_Vtbl;
8 }
9 impl ::core::clone::Clone for IAdvancedColorInfo {
10 fn clone(&self) -> Self {
11 Self(self.0.clone())
12 }
13 }
14 unsafe impl ::windows::core::ComInterface for IAdvancedColorInfo {
15 const IID: ::windows::core::GUID = ::windows::core::GUID::from_u128(0x8797dcfb_b229_4081_ae9a_2cc85e34ad6a);
16 }
17 #[repr(C)]
18 #[doc(hidden)]
19 pub struct IAdvancedColorInfo_Vtbl {
20 pub base__: ::windows::core::IInspectable_Vtbl,
21 pub CurrentAdvancedColorKind: unsafe extern "system" fn(this: *mut ::core::ffi::c_void, result__: *mut AdvancedColorKind) -> ::windows::core::HRESULT,
22 #[cfg(feature = "Foundation")]
23 pub RedPrimary: unsafe extern "system" fn(this: *mut ::core::ffi::c_void, result__: *mut super::super::Foundation::Point) -> ::windows::core::HRESULT,
24 #[cfg(not(feature = "Foundation"))]
25 RedPrimary: usize,
26 #[cfg(feature = "Foundation")]
27 pub GreenPrimary: unsafe extern "system" fn(this: *mut ::core::ffi::c_void, result__: *mut super::super::Foundation::Point) -> ::windows::core::HRESULT,
28 #[cfg(not(feature = "Foundation"))]
29 GreenPrimary: usize,
30 #[cfg(feature = "Foundation")]
31 pub BluePrimary: unsafe extern "system" fn(this: *mut ::core::ffi::c_void, result__: *mut super::super::Foundation::Point) -> ::windows::core::HRESULT,
32 #[cfg(not(feature = "Foundation"))]
33 BluePrimary: usize,
34 #[cfg(feature = "Foundation")]
35 pub WhitePoint: unsafe extern "system" fn(this: *mut ::core::ffi::c_void, result__: *mut super::super::Foundation::Point) -> ::windows::core::HRESULT,
36 #[cfg(not(feature = "Foundation"))]
37 WhitePoint: usize,
38 pub MaxLuminanceInNits: unsafe extern "system" fn(this: *mut ::core::ffi::c_void, result__: *mut f32) -> ::windows::core::HRESULT,
39 pub MinLuminanceInNits: unsafe extern "system" fn(this: *mut ::core::ffi::c_void, result__: *mut f32) -> ::windows::core::HRESULT,
40 pub MaxAverageFullFrameLuminanceInNits: unsafe extern "system" fn(this: *mut ::core::ffi::c_void, result__: *mut f32) -> ::windows::core::HRESULT,
41 pub SdrWhiteLevelInNits: unsafe extern "system" fn(this: *mut ::core::ffi::c_void, result__: *mut f32) -> ::windows::core::HRESULT,
42 pub IsHdrMetadataFormatCurrentlySupported: unsafe extern "system" fn(this: *mut ::core::ffi::c_void, format: HdrMetadataFormat, result__: *mut bool) -> ::windows::core::HRESULT,
43 pub IsAdvancedColorKindAvailable: unsafe extern "system" fn(this: *mut ::core::ffi::c_void, kind: AdvancedColorKind, result__: *mut bool) -> ::windows::core::HRESULT,
44 }
45 #[doc(hidden)]
46 #[repr(transparent)]
47 pub struct IBrightnessOverride(::windows::core::IUnknown);
48 unsafe impl ::windows::core::Interface for IBrightnessOverride {
49 type Vtable = IBrightnessOverride_Vtbl;
50 }
51 impl ::core::clone::Clone for IBrightnessOverride {
52 fn clone(&self) -> Self {
53 Self(self.0.clone())
54 }
55 }
56 unsafe impl ::windows::core::ComInterface for IBrightnessOverride {
57 const IID: ::windows::core::GUID = ::windows::core::GUID::from_u128(0x96c9621a_c143_4392_bedd_4a7e9574c8fd);
58 }
59 #[repr(C)]
60 #[doc(hidden)]
61 pub struct IBrightnessOverride_Vtbl {
62 pub base__: ::windows::core::IInspectable_Vtbl,
63 pub IsSupported: unsafe extern "system" fn(this: *mut ::core::ffi::c_void, result__: *mut bool) -> ::windows::core::HRESULT,
64 pub IsOverrideActive: unsafe extern "system" fn(this: *mut ::core::ffi::c_void, result__: *mut bool) -> ::windows::core::HRESULT,
65 pub BrightnessLevel: unsafe extern "system" fn(this: *mut ::core::ffi::c_void, result__: *mut f64) -> ::windows::core::HRESULT,
66 pub SetBrightnessLevel: unsafe extern "system" fn(this: *mut ::core::ffi::c_void, brightnesslevel: f64, options: DisplayBrightnessOverrideOptions) -> ::windows::core::HRESULT,
67 pub SetBrightnessScenario: unsafe extern "system" fn(this: *mut ::core::ffi::c_void, scenario: DisplayBrightnessScenario, options: DisplayBrightnessOverrideOptions) -> ::windows::core::HRESULT,
68 pub GetLevelForScenario: unsafe extern "system" fn(this: *mut ::core::ffi::c_void, scenario: DisplayBrightnessScenario, result__: *mut f64) -> ::windows::core::HRESULT,
69 pub StartOverride: unsafe extern "system" fn(this: *mut ::core::ffi::c_void) -> ::windows::core::HRESULT,
70 pub StopOverride: unsafe extern "system" fn(this: *mut ::core::ffi::c_void) -> ::windows::core::HRESULT,
71 #[cfg(feature = "Foundation")]
72 pub IsSupportedChanged: unsafe extern "system" fn(this: *mut ::core::ffi::c_void, handler: *mut ::core::ffi::c_void, result__: *mut super::super::Foundation::EventRegistrationToken) -> ::windows::core::HRESULT,
73 #[cfg(not(feature = "Foundation"))]
74 IsSupportedChanged: usize,
75 #[cfg(feature = "Foundation")]
76 pub RemoveIsSupportedChanged: unsafe extern "system" fn(this: *mut ::core::ffi::c_void, token: super::super::Foundation::EventRegistrationToken) -> ::windows::core::HRESULT,
77 #[cfg(not(feature = "Foundation"))]
78 RemoveIsSupportedChanged: usize,
79 #[cfg(feature = "Foundation")]
80 pub IsOverrideActiveChanged: unsafe extern "system" fn(this: *mut ::core::ffi::c_void, handler: *mut ::core::ffi::c_void, result__: *mut super::super::Foundation::EventRegistrationToken) -> ::windows::core::HRESULT,
81 #[cfg(not(feature = "Foundation"))]
82 IsOverrideActiveChanged: usize,
83 #[cfg(feature = "Foundation")]
84 pub RemoveIsOverrideActiveChanged: unsafe extern "system" fn(this: *mut ::core::ffi::c_void, token: super::super::Foundation::EventRegistrationToken) -> ::windows::core::HRESULT,
85 #[cfg(not(feature = "Foundation"))]
86 RemoveIsOverrideActiveChanged: usize,
87 #[cfg(feature = "Foundation")]
88 pub BrightnessLevelChanged: unsafe extern "system" fn(this: *mut ::core::ffi::c_void, handler: *mut ::core::ffi::c_void, result__: *mut super::super::Foundation::EventRegistrationToken) -> ::windows::core::HRESULT,
89 #[cfg(not(feature = "Foundation"))]
90 BrightnessLevelChanged: usize,
91 #[cfg(feature = "Foundation")]
92 pub RemoveBrightnessLevelChanged: unsafe extern "system" fn(this: *mut ::core::ffi::c_void, token: super::super::Foundation::EventRegistrationToken) -> ::windows::core::HRESULT,
93 #[cfg(not(feature = "Foundation"))]
94 RemoveBrightnessLevelChanged: usize,
95 }
96 #[doc(hidden)]
97 #[repr(transparent)]
98 pub struct IBrightnessOverrideSettings(::windows::core::IUnknown);
99 unsafe impl ::windows::core::Interface for IBrightnessOverrideSettings {
100 type Vtable = IBrightnessOverrideSettings_Vtbl;
101 }
102 impl ::core::clone::Clone for IBrightnessOverrideSettings {
103 fn clone(&self) -> Self {
104 Self(self.0.clone())
105 }
106 }
107 unsafe impl ::windows::core::ComInterface for IBrightnessOverrideSettings {
108 const IID: ::windows::core::GUID = ::windows::core::GUID::from_u128(0xd112ab2a_7604_4dba_bcf8_4b6f49502cb0);
109 }
110 #[repr(C)]
111 #[doc(hidden)]
112 pub struct IBrightnessOverrideSettings_Vtbl {
113 pub base__: ::windows::core::IInspectable_Vtbl,
114 pub DesiredLevel: unsafe extern "system" fn(this: *mut ::core::ffi::c_void, result__: *mut f64) -> ::windows::core::HRESULT,
115 pub DesiredNits: unsafe extern "system" fn(this: *mut ::core::ffi::c_void, result__: *mut f32) -> ::windows::core::HRESULT,
116 }
117 #[doc(hidden)]
118 #[repr(transparent)]
119 pub struct IBrightnessOverrideSettingsStatics(::windows::core::IUnknown);
120 unsafe impl ::windows::core::Interface for IBrightnessOverrideSettingsStatics {
121 type Vtable = IBrightnessOverrideSettingsStatics_Vtbl;
122 }
123 impl ::core::clone::Clone for IBrightnessOverrideSettingsStatics {
124 fn clone(&self) -> Self {
125 Self(self.0.clone())
126 }
127 }
128 unsafe impl ::windows::core::ComInterface for IBrightnessOverrideSettingsStatics {
129 const IID: ::windows::core::GUID = ::windows::core::GUID::from_u128(0xd487dc90_6f74_440b_b383_5fe96cf00b0f);
130 }
131 #[repr(C)]
132 #[doc(hidden)]
133 pub struct IBrightnessOverrideSettingsStatics_Vtbl {
134 pub base__: ::windows::core::IInspectable_Vtbl,
135 pub CreateFromLevel: unsafe extern "system" fn(this: *mut ::core::ffi::c_void, level: f64, result__: *mut *mut ::core::ffi::c_void) -> ::windows::core::HRESULT,
136 pub CreateFromNits: unsafe extern "system" fn(this: *mut ::core::ffi::c_void, nits: f32, result__: *mut *mut ::core::ffi::c_void) -> ::windows::core::HRESULT,
137 pub CreateFromDisplayBrightnessOverrideScenario: unsafe extern "system" fn(this: *mut ::core::ffi::c_void, overridescenario: DisplayBrightnessOverrideScenario, result__: *mut *mut ::core::ffi::c_void) -> ::windows::core::HRESULT,
138 }
139 #[doc(hidden)]
140 #[repr(transparent)]
141 pub struct IBrightnessOverrideStatics(::windows::core::IUnknown);
142 unsafe impl ::windows::core::Interface for IBrightnessOverrideStatics {
143 type Vtable = IBrightnessOverrideStatics_Vtbl;
144 }
145 impl ::core::clone::Clone for IBrightnessOverrideStatics {
146 fn clone(&self) -> Self {
147 Self(self.0.clone())
148 }
149 }
150 unsafe impl ::windows::core::ComInterface for IBrightnessOverrideStatics {
151 const IID: ::windows::core::GUID = ::windows::core::GUID::from_u128(0x03a7b9ed_e1f1_4a68_a11f_946ad8ce5393);
152 }
153 #[repr(C)]
154 #[doc(hidden)]
155 pub struct IBrightnessOverrideStatics_Vtbl {
156 pub base__: ::windows::core::IInspectable_Vtbl,
157 pub GetDefaultForSystem: unsafe extern "system" fn(this: *mut ::core::ffi::c_void, result__: *mut *mut ::core::ffi::c_void) -> ::windows::core::HRESULT,
158 pub GetForCurrentView: unsafe extern "system" fn(this: *mut ::core::ffi::c_void, result__: *mut *mut ::core::ffi::c_void) -> ::windows::core::HRESULT,
159 #[cfg(feature = "Foundation")]
160 pub SaveForSystemAsync: unsafe extern "system" fn(this: *mut ::core::ffi::c_void, value: *mut ::core::ffi::c_void, result__: *mut *mut ::core::ffi::c_void) -> ::windows::core::HRESULT,
161 #[cfg(not(feature = "Foundation"))]
162 SaveForSystemAsync: usize,
163 }
164 #[doc(hidden)]
165 #[repr(transparent)]
166 pub struct IColorOverrideSettings(::windows::core::IUnknown);
167 unsafe impl ::windows::core::Interface for IColorOverrideSettings {
168 type Vtable = IColorOverrideSettings_Vtbl;
169 }
170 impl ::core::clone::Clone for IColorOverrideSettings {
171 fn clone(&self) -> Self {
172 Self(self.0.clone())
173 }
174 }
175 unsafe impl ::windows::core::ComInterface for IColorOverrideSettings {
176 const IID: ::windows::core::GUID = ::windows::core::GUID::from_u128(0xfbefa134_4a81_4c4d_a5b6_7d1b5c4bd00b);
177 }
178 #[repr(C)]
179 #[doc(hidden)]
180 pub struct IColorOverrideSettings_Vtbl {
181 pub base__: ::windows::core::IInspectable_Vtbl,
182 pub DesiredDisplayColorOverrideScenario: unsafe extern "system" fn(this: *mut ::core::ffi::c_void, result__: *mut DisplayColorOverrideScenario) -> ::windows::core::HRESULT,
183 }
184 #[doc(hidden)]
185 #[repr(transparent)]
186 pub struct IColorOverrideSettingsStatics(::windows::core::IUnknown);
187 unsafe impl ::windows::core::Interface for IColorOverrideSettingsStatics {
188 type Vtable = IColorOverrideSettingsStatics_Vtbl;
189 }
190 impl ::core::clone::Clone for IColorOverrideSettingsStatics {
191 fn clone(&self) -> Self {
192 Self(self.0.clone())
193 }
194 }
195 unsafe impl ::windows::core::ComInterface for IColorOverrideSettingsStatics {
196 const IID: ::windows::core::GUID = ::windows::core::GUID::from_u128(0xb068e05f_c41f_4ac9_afab_827ab6248f9a);
197 }
198 #[repr(C)]
199 #[doc(hidden)]
200 pub struct IColorOverrideSettingsStatics_Vtbl {
201 pub base__: ::windows::core::IInspectable_Vtbl,
202 pub CreateFromDisplayColorOverrideScenario: unsafe extern "system" fn(this: *mut ::core::ffi::c_void, overridescenario: DisplayColorOverrideScenario, result__: *mut *mut ::core::ffi::c_void) -> ::windows::core::HRESULT,
203 }
204 #[doc(hidden)]
205 #[repr(transparent)]
206 pub struct IDisplayEnhancementOverride(::windows::core::IUnknown);
207 unsafe impl ::windows::core::Interface for IDisplayEnhancementOverride {
208 type Vtable = IDisplayEnhancementOverride_Vtbl;
209 }
210 impl ::core::clone::Clone for IDisplayEnhancementOverride {
211 fn clone(&self) -> Self {
212 Self(self.0.clone())
213 }
214 }
215 unsafe impl ::windows::core::ComInterface for IDisplayEnhancementOverride {
216 const IID: ::windows::core::GUID = ::windows::core::GUID::from_u128(0x429594cf_d97a_4b02_a428_5c4292f7f522);
217 }
218 #[repr(C)]
219 #[doc(hidden)]
220 pub struct IDisplayEnhancementOverride_Vtbl {
221 pub base__: ::windows::core::IInspectable_Vtbl,
222 pub ColorOverrideSettings: unsafe extern "system" fn(this: *mut ::core::ffi::c_void, result__: *mut *mut ::core::ffi::c_void) -> ::windows::core::HRESULT,
223 pub SetColorOverrideSettings: unsafe extern "system" fn(this: *mut ::core::ffi::c_void, value: *mut ::core::ffi::c_void) -> ::windows::core::HRESULT,
224 pub BrightnessOverrideSettings: unsafe extern "system" fn(this: *mut ::core::ffi::c_void, result__: *mut *mut ::core::ffi::c_void) -> ::windows::core::HRESULT,
225 pub SetBrightnessOverrideSettings: unsafe extern "system" fn(this: *mut ::core::ffi::c_void, value: *mut ::core::ffi::c_void) -> ::windows::core::HRESULT,
226 pub CanOverride: unsafe extern "system" fn(this: *mut ::core::ffi::c_void, result__: *mut bool) -> ::windows::core::HRESULT,
227 pub IsOverrideActive: unsafe extern "system" fn(this: *mut ::core::ffi::c_void, result__: *mut bool) -> ::windows::core::HRESULT,
228 pub GetCurrentDisplayEnhancementOverrideCapabilities: unsafe extern "system" fn(this: *mut ::core::ffi::c_void, result__: *mut *mut ::core::ffi::c_void) -> ::windows::core::HRESULT,
229 pub RequestOverride: unsafe extern "system" fn(this: *mut ::core::ffi::c_void) -> ::windows::core::HRESULT,
230 pub StopOverride: unsafe extern "system" fn(this: *mut ::core::ffi::c_void) -> ::windows::core::HRESULT,
231 #[cfg(feature = "Foundation")]
232 pub CanOverrideChanged: unsafe extern "system" fn(this: *mut ::core::ffi::c_void, handler: *mut ::core::ffi::c_void, result__: *mut super::super::Foundation::EventRegistrationToken) -> ::windows::core::HRESULT,
233 #[cfg(not(feature = "Foundation"))]
234 CanOverrideChanged: usize,
235 #[cfg(feature = "Foundation")]
236 pub RemoveCanOverrideChanged: unsafe extern "system" fn(this: *mut ::core::ffi::c_void, token: super::super::Foundation::EventRegistrationToken) -> ::windows::core::HRESULT,
237 #[cfg(not(feature = "Foundation"))]
238 RemoveCanOverrideChanged: usize,
239 #[cfg(feature = "Foundation")]
240 pub IsOverrideActiveChanged: unsafe extern "system" fn(this: *mut ::core::ffi::c_void, handler: *mut ::core::ffi::c_void, result__: *mut super::super::Foundation::EventRegistrationToken) -> ::windows::core::HRESULT,
241 #[cfg(not(feature = "Foundation"))]
242 IsOverrideActiveChanged: usize,
243 #[cfg(feature = "Foundation")]
244 pub RemoveIsOverrideActiveChanged: unsafe extern "system" fn(this: *mut ::core::ffi::c_void, token: super::super::Foundation::EventRegistrationToken) -> ::windows::core::HRESULT,
245 #[cfg(not(feature = "Foundation"))]
246 RemoveIsOverrideActiveChanged: usize,
247 #[cfg(feature = "Foundation")]
248 pub DisplayEnhancementOverrideCapabilitiesChanged: unsafe extern "system" fn(this: *mut ::core::ffi::c_void, handler: *mut ::core::ffi::c_void, result__: *mut super::super::Foundation::EventRegistrationToken) -> ::windows::core::HRESULT,
249 #[cfg(not(feature = "Foundation"))]
250 DisplayEnhancementOverrideCapabilitiesChanged: usize,
251 #[cfg(feature = "Foundation")]
252 pub RemoveDisplayEnhancementOverrideCapabilitiesChanged: unsafe extern "system" fn(this: *mut ::core::ffi::c_void, token: super::super::Foundation::EventRegistrationToken) -> ::windows::core::HRESULT,
253 #[cfg(not(feature = "Foundation"))]
254 RemoveDisplayEnhancementOverrideCapabilitiesChanged: usize,
255 }
256 #[doc(hidden)]
257 #[repr(transparent)]
258 pub struct IDisplayEnhancementOverrideCapabilities(::windows::core::IUnknown);
259 unsafe impl ::windows::core::Interface for IDisplayEnhancementOverrideCapabilities {
260 type Vtable = IDisplayEnhancementOverrideCapabilities_Vtbl;
261 }
262 impl ::core::clone::Clone for IDisplayEnhancementOverrideCapabilities {
263 fn clone(&self) -> Self {
264 Self(self.0.clone())
265 }
266 }
267 unsafe impl ::windows::core::ComInterface for IDisplayEnhancementOverrideCapabilities {
268 const IID: ::windows::core::GUID = ::windows::core::GUID::from_u128(0x457060de_ee5a_47b7_9918_1e51e812ccc8);
269 }
270 #[repr(C)]
271 #[doc(hidden)]
272 pub struct IDisplayEnhancementOverrideCapabilities_Vtbl {
273 pub base__: ::windows::core::IInspectable_Vtbl,
274 pub IsBrightnessControlSupported: unsafe extern "system" fn(this: *mut ::core::ffi::c_void, result__: *mut bool) -> ::windows::core::HRESULT,
275 pub IsBrightnessNitsControlSupported: unsafe extern "system" fn(this: *mut ::core::ffi::c_void, result__: *mut bool) -> ::windows::core::HRESULT,
276 #[cfg(feature = "Foundation_Collections")]
277 pub GetSupportedNitRanges: unsafe extern "system" fn(this: *mut ::core::ffi::c_void, result__: *mut *mut ::core::ffi::c_void) -> ::windows::core::HRESULT,
278 #[cfg(not(feature = "Foundation_Collections"))]
279 GetSupportedNitRanges: usize,
280 }
281 #[doc(hidden)]
282 #[repr(transparent)]
283 pub struct IDisplayEnhancementOverrideCapabilitiesChangedEventArgs(::windows::core::IUnknown);
284 unsafe impl ::windows::core::Interface for IDisplayEnhancementOverrideCapabilitiesChangedEventArgs {
285 type Vtable = IDisplayEnhancementOverrideCapabilitiesChangedEventArgs_Vtbl;
286 }
287 impl ::core::clone::Clone for IDisplayEnhancementOverrideCapabilitiesChangedEventArgs {
288 fn clone(&self) -> Self {
289 Self(self.0.clone())
290 }
291 }
292 unsafe impl ::windows::core::ComInterface for IDisplayEnhancementOverrideCapabilitiesChangedEventArgs {
293 const IID: ::windows::core::GUID = ::windows::core::GUID::from_u128(0xdb61e664_15fa_49da_8b77_07dbd2af585d);
294 }
295 #[repr(C)]
296 #[doc(hidden)]
297 pub struct IDisplayEnhancementOverrideCapabilitiesChangedEventArgs_Vtbl {
298 pub base__: ::windows::core::IInspectable_Vtbl,
299 pub Capabilities: unsafe extern "system" fn(this: *mut ::core::ffi::c_void, result__: *mut *mut ::core::ffi::c_void) -> ::windows::core::HRESULT,
300 }
301 #[doc(hidden)]
302 #[repr(transparent)]
303 pub struct IDisplayEnhancementOverrideStatics(::windows::core::IUnknown);
304 unsafe impl ::windows::core::Interface for IDisplayEnhancementOverrideStatics {
305 type Vtable = IDisplayEnhancementOverrideStatics_Vtbl;
306 }
307 impl ::core::clone::Clone for IDisplayEnhancementOverrideStatics {
308 fn clone(&self) -> Self {
309 Self(self.0.clone())
310 }
311 }
312 unsafe impl ::windows::core::ComInterface for IDisplayEnhancementOverrideStatics {
313 const IID: ::windows::core::GUID = ::windows::core::GUID::from_u128(0xcf5b7ec1_9791_4453_b013_29b6f778e519);
314 }
315 #[repr(C)]
316 #[doc(hidden)]
317 pub struct IDisplayEnhancementOverrideStatics_Vtbl {
318 pub base__: ::windows::core::IInspectable_Vtbl,
319 pub GetForCurrentView: unsafe extern "system" fn(this: *mut ::core::ffi::c_void, result__: *mut *mut ::core::ffi::c_void) -> ::windows::core::HRESULT,
320 }
321 #[doc(hidden)]
322 #[repr(transparent)]
323 pub struct IDisplayInformation(::windows::core::IUnknown);
324 unsafe impl ::windows::core::Interface for IDisplayInformation {
325 type Vtable = IDisplayInformation_Vtbl;
326 }
327 impl ::core::clone::Clone for IDisplayInformation {
328 fn clone(&self) -> Self {
329 Self(self.0.clone())
330 }
331 }
332 unsafe impl ::windows::core::ComInterface for IDisplayInformation {
333 const IID: ::windows::core::GUID = ::windows::core::GUID::from_u128(0xbed112ae_adc3_4dc9_ae65_851f4d7d4799);
334 }
335 #[repr(C)]
336 #[doc(hidden)]
337 pub struct IDisplayInformation_Vtbl {
338 pub base__: ::windows::core::IInspectable_Vtbl,
339 pub CurrentOrientation: unsafe extern "system" fn(this: *mut ::core::ffi::c_void, result__: *mut DisplayOrientations) -> ::windows::core::HRESULT,
340 pub NativeOrientation: unsafe extern "system" fn(this: *mut ::core::ffi::c_void, result__: *mut DisplayOrientations) -> ::windows::core::HRESULT,
341 #[cfg(feature = "Foundation")]
342 pub OrientationChanged: unsafe extern "system" fn(this: *mut ::core::ffi::c_void, handler: *mut ::core::ffi::c_void, result__: *mut super::super::Foundation::EventRegistrationToken) -> ::windows::core::HRESULT,
343 #[cfg(not(feature = "Foundation"))]
344 OrientationChanged: usize,
345 #[cfg(feature = "Foundation")]
346 pub RemoveOrientationChanged: unsafe extern "system" fn(this: *mut ::core::ffi::c_void, token: super::super::Foundation::EventRegistrationToken) -> ::windows::core::HRESULT,
347 #[cfg(not(feature = "Foundation"))]
348 RemoveOrientationChanged: usize,
349 pub ResolutionScale: unsafe extern "system" fn(this: *mut ::core::ffi::c_void, result__: *mut ResolutionScale) -> ::windows::core::HRESULT,
350 pub LogicalDpi: unsafe extern "system" fn(this: *mut ::core::ffi::c_void, result__: *mut f32) -> ::windows::core::HRESULT,
351 pub RawDpiX: unsafe extern "system" fn(this: *mut ::core::ffi::c_void, result__: *mut f32) -> ::windows::core::HRESULT,
352 pub RawDpiY: unsafe extern "system" fn(this: *mut ::core::ffi::c_void, result__: *mut f32) -> ::windows::core::HRESULT,
353 #[cfg(feature = "Foundation")]
354 pub DpiChanged: unsafe extern "system" fn(this: *mut ::core::ffi::c_void, handler: *mut ::core::ffi::c_void, result__: *mut super::super::Foundation::EventRegistrationToken) -> ::windows::core::HRESULT,
355 #[cfg(not(feature = "Foundation"))]
356 DpiChanged: usize,
357 #[cfg(feature = "Foundation")]
358 pub RemoveDpiChanged: unsafe extern "system" fn(this: *mut ::core::ffi::c_void, token: super::super::Foundation::EventRegistrationToken) -> ::windows::core::HRESULT,
359 #[cfg(not(feature = "Foundation"))]
360 RemoveDpiChanged: usize,
361 pub StereoEnabled: unsafe extern "system" fn(this: *mut ::core::ffi::c_void, result__: *mut bool) -> ::windows::core::HRESULT,
362 #[cfg(feature = "Foundation")]
363 pub StereoEnabledChanged: unsafe extern "system" fn(this: *mut ::core::ffi::c_void, handler: *mut ::core::ffi::c_void, result__: *mut super::super::Foundation::EventRegistrationToken) -> ::windows::core::HRESULT,
364 #[cfg(not(feature = "Foundation"))]
365 StereoEnabledChanged: usize,
366 #[cfg(feature = "Foundation")]
367 pub RemoveStereoEnabledChanged: unsafe extern "system" fn(this: *mut ::core::ffi::c_void, token: super::super::Foundation::EventRegistrationToken) -> ::windows::core::HRESULT,
368 #[cfg(not(feature = "Foundation"))]
369 RemoveStereoEnabledChanged: usize,
370 #[cfg(all(feature = "Foundation", feature = "Storage_Streams"))]
371 pub GetColorProfileAsync: unsafe extern "system" fn(this: *mut ::core::ffi::c_void, result__: *mut *mut ::core::ffi::c_void) -> ::windows::core::HRESULT,
372 #[cfg(not(all(feature = "Foundation", feature = "Storage_Streams")))]
373 GetColorProfileAsync: usize,
374 #[cfg(feature = "Foundation")]
375 pub ColorProfileChanged: unsafe extern "system" fn(this: *mut ::core::ffi::c_void, handler: *mut ::core::ffi::c_void, result__: *mut super::super::Foundation::EventRegistrationToken) -> ::windows::core::HRESULT,
376 #[cfg(not(feature = "Foundation"))]
377 ColorProfileChanged: usize,
378 #[cfg(feature = "Foundation")]
379 pub RemoveColorProfileChanged: unsafe extern "system" fn(this: *mut ::core::ffi::c_void, token: super::super::Foundation::EventRegistrationToken) -> ::windows::core::HRESULT,
380 #[cfg(not(feature = "Foundation"))]
381 RemoveColorProfileChanged: usize,
382 }
383 #[doc(hidden)]
384 #[repr(transparent)]
385 pub struct IDisplayInformation2(::windows::core::IUnknown);
386 unsafe impl ::windows::core::Interface for IDisplayInformation2 {
387 type Vtable = IDisplayInformation2_Vtbl;
388 }
389 impl ::core::clone::Clone for IDisplayInformation2 {
390 fn clone(&self) -> Self {
391 Self(self.0.clone())
392 }
393 }
394 unsafe impl ::windows::core::ComInterface for IDisplayInformation2 {
395 const IID: ::windows::core::GUID = ::windows::core::GUID::from_u128(0x4dcd0021_fad1_4b8e_8edf_775887b8bf19);
396 }
397 #[repr(C)]
398 #[doc(hidden)]
399 pub struct IDisplayInformation2_Vtbl {
400 pub base__: ::windows::core::IInspectable_Vtbl,
401 pub RawPixelsPerViewPixel: unsafe extern "system" fn(this: *mut ::core::ffi::c_void, result__: *mut f64) -> ::windows::core::HRESULT,
402 }
403 #[doc(hidden)]
404 #[repr(transparent)]
405 pub struct IDisplayInformation3(::windows::core::IUnknown);
406 unsafe impl ::windows::core::Interface for IDisplayInformation3 {
407 type Vtable = IDisplayInformation3_Vtbl;
408 }
409 impl ::core::clone::Clone for IDisplayInformation3 {
410 fn clone(&self) -> Self {
411 Self(self.0.clone())
412 }
413 }
414 unsafe impl ::windows::core::ComInterface for IDisplayInformation3 {
415 const IID: ::windows::core::GUID = ::windows::core::GUID::from_u128(0xdb15011d_0f09_4466_8ff3_11de9a3c929a);
416 }
417 #[repr(C)]
418 #[doc(hidden)]
419 pub struct IDisplayInformation3_Vtbl {
420 pub base__: ::windows::core::IInspectable_Vtbl,
421 #[cfg(feature = "Foundation")]
422 pub DiagonalSizeInInches: unsafe extern "system" fn(this: *mut ::core::ffi::c_void, result__: *mut *mut ::core::ffi::c_void) -> ::windows::core::HRESULT,
423 #[cfg(not(feature = "Foundation"))]
424 DiagonalSizeInInches: usize,
425 }
426 #[doc(hidden)]
427 #[repr(transparent)]
428 pub struct IDisplayInformation4(::windows::core::IUnknown);
429 unsafe impl ::windows::core::Interface for IDisplayInformation4 {
430 type Vtable = IDisplayInformation4_Vtbl;
431 }
432 impl ::core::clone::Clone for IDisplayInformation4 {
433 fn clone(&self) -> Self {
434 Self(self.0.clone())
435 }
436 }
437 unsafe impl ::windows::core::ComInterface for IDisplayInformation4 {
438 const IID: ::windows::core::GUID = ::windows::core::GUID::from_u128(0xc972ce2f_1242_46be_b536_e1aafe9e7acf);
439 }
440 #[repr(C)]
441 #[doc(hidden)]
442 pub struct IDisplayInformation4_Vtbl {
443 pub base__: ::windows::core::IInspectable_Vtbl,
444 pub ScreenWidthInRawPixels: unsafe extern "system" fn(this: *mut ::core::ffi::c_void, result__: *mut u32) -> ::windows::core::HRESULT,
445 pub ScreenHeightInRawPixels: unsafe extern "system" fn(this: *mut ::core::ffi::c_void, result__: *mut u32) -> ::windows::core::HRESULT,
446 }
447 #[doc(hidden)]
448 #[repr(transparent)]
449 pub struct IDisplayInformation5(::windows::core::IUnknown);
450 unsafe impl ::windows::core::Interface for IDisplayInformation5 {
451 type Vtable = IDisplayInformation5_Vtbl;
452 }
453 impl ::core::clone::Clone for IDisplayInformation5 {
454 fn clone(&self) -> Self {
455 Self(self.0.clone())
456 }
457 }
458 unsafe impl ::windows::core::ComInterface for IDisplayInformation5 {
459 const IID: ::windows::core::GUID = ::windows::core::GUID::from_u128(0x3a5442dc_2cde_4a8d_80d1_21dc5adcc1aa);
460 }
461 #[repr(C)]
462 #[doc(hidden)]
463 pub struct IDisplayInformation5_Vtbl {
464 pub base__: ::windows::core::IInspectable_Vtbl,
465 pub GetAdvancedColorInfo: unsafe extern "system" fn(this: *mut ::core::ffi::c_void, result__: *mut *mut ::core::ffi::c_void) -> ::windows::core::HRESULT,
466 #[cfg(feature = "Foundation")]
467 pub AdvancedColorInfoChanged: unsafe extern "system" fn(this: *mut ::core::ffi::c_void, handler: *mut ::core::ffi::c_void, result__: *mut super::super::Foundation::EventRegistrationToken) -> ::windows::core::HRESULT,
468 #[cfg(not(feature = "Foundation"))]
469 AdvancedColorInfoChanged: usize,
470 #[cfg(feature = "Foundation")]
471 pub RemoveAdvancedColorInfoChanged: unsafe extern "system" fn(this: *mut ::core::ffi::c_void, token: super::super::Foundation::EventRegistrationToken) -> ::windows::core::HRESULT,
472 #[cfg(not(feature = "Foundation"))]
473 RemoveAdvancedColorInfoChanged: usize,
474 }
475 #[doc(hidden)]
476 #[repr(transparent)]
477 pub struct IDisplayInformationStatics(::windows::core::IUnknown);
478 unsafe impl ::windows::core::Interface for IDisplayInformationStatics {
479 type Vtable = IDisplayInformationStatics_Vtbl;
480 }
481 impl ::core::clone::Clone for IDisplayInformationStatics {
482 fn clone(&self) -> Self {
483 Self(self.0.clone())
484 }
485 }
486 unsafe impl ::windows::core::ComInterface for IDisplayInformationStatics {
487 const IID: ::windows::core::GUID = ::windows::core::GUID::from_u128(0xc6a02a6c_d452_44dc_ba07_96f3c6adf9d1);
488 }
489 #[repr(C)]
490 #[doc(hidden)]
491 pub struct IDisplayInformationStatics_Vtbl {
492 pub base__: ::windows::core::IInspectable_Vtbl,
493 pub GetForCurrentView: unsafe extern "system" fn(this: *mut ::core::ffi::c_void, result__: *mut *mut ::core::ffi::c_void) -> ::windows::core::HRESULT,
494 pub AutoRotationPreferences: unsafe extern "system" fn(this: *mut ::core::ffi::c_void, result__: *mut DisplayOrientations) -> ::windows::core::HRESULT,
495 pub SetAutoRotationPreferences: unsafe extern "system" fn(this: *mut ::core::ffi::c_void, value: DisplayOrientations) -> ::windows::core::HRESULT,
496 #[cfg(feature = "Foundation")]
497 pub DisplayContentsInvalidated: unsafe extern "system" fn(this: *mut ::core::ffi::c_void, handler: *mut ::core::ffi::c_void, result__: *mut super::super::Foundation::EventRegistrationToken) -> ::windows::core::HRESULT,
498 #[cfg(not(feature = "Foundation"))]
499 DisplayContentsInvalidated: usize,
500 #[cfg(feature = "Foundation")]
501 pub RemoveDisplayContentsInvalidated: unsafe extern "system" fn(this: *mut ::core::ffi::c_void, token: super::super::Foundation::EventRegistrationToken) -> ::windows::core::HRESULT,
502 #[cfg(not(feature = "Foundation"))]
503 RemoveDisplayContentsInvalidated: usize,
504 }
505 #[doc(hidden)]
506 #[cfg(feature = "deprecated")]
507 #[repr(transparent)]
508 pub struct IDisplayPropertiesStatics(::windows::core::IUnknown);
509 #[cfg(feature = "deprecated")]
510 unsafe impl ::windows::core::Interface for IDisplayPropertiesStatics {
511 type Vtable = IDisplayPropertiesStatics_Vtbl;
512 }
513 #[cfg(feature = "deprecated")]
514 impl ::core::clone::Clone for IDisplayPropertiesStatics {
515 fn clone(&self) -> Self {
516 Self(self.0.clone())
517 }
518 }
519 #[cfg(feature = "deprecated")]
520 unsafe impl ::windows::core::ComInterface for IDisplayPropertiesStatics {
521 const IID: ::windows::core::GUID = ::windows::core::GUID::from_u128(0x6937ed8d_30ea_4ded_8271_4553ff02f68a);
522 }
523 #[cfg(feature = "deprecated")]
524 #[repr(C)]
525 #[doc(hidden)]
526 pub struct IDisplayPropertiesStatics_Vtbl {
527 pub base__: ::windows::core::IInspectable_Vtbl,
528 #[cfg(feature = "deprecated")]
529 pub CurrentOrientation: unsafe extern "system" fn(this: *mut ::core::ffi::c_void, result__: *mut DisplayOrientations) -> ::windows::core::HRESULT,
530 #[cfg(not(feature = "deprecated"))]
531 CurrentOrientation: usize,
532 #[cfg(feature = "deprecated")]
533 pub NativeOrientation: unsafe extern "system" fn(this: *mut ::core::ffi::c_void, result__: *mut DisplayOrientations) -> ::windows::core::HRESULT,
534 #[cfg(not(feature = "deprecated"))]
535 NativeOrientation: usize,
536 #[cfg(feature = "deprecated")]
537 pub AutoRotationPreferences: unsafe extern "system" fn(this: *mut ::core::ffi::c_void, result__: *mut DisplayOrientations) -> ::windows::core::HRESULT,
538 #[cfg(not(feature = "deprecated"))]
539 AutoRotationPreferences: usize,
540 #[cfg(feature = "deprecated")]
541 pub SetAutoRotationPreferences: unsafe extern "system" fn(this: *mut ::core::ffi::c_void, value: DisplayOrientations) -> ::windows::core::HRESULT,
542 #[cfg(not(feature = "deprecated"))]
543 SetAutoRotationPreferences: usize,
544 #[cfg(all(feature = "Foundation", feature = "deprecated"))]
545 pub OrientationChanged: unsafe extern "system" fn(this: *mut ::core::ffi::c_void, handler: *mut ::core::ffi::c_void, result__: *mut super::super::Foundation::EventRegistrationToken) -> ::windows::core::HRESULT,
546 #[cfg(not(all(feature = "Foundation", feature = "deprecated")))]
547 OrientationChanged: usize,
548 #[cfg(all(feature = "Foundation", feature = "deprecated"))]
549 pub RemoveOrientationChanged: unsafe extern "system" fn(this: *mut ::core::ffi::c_void, token: super::super::Foundation::EventRegistrationToken) -> ::windows::core::HRESULT,
550 #[cfg(not(all(feature = "Foundation", feature = "deprecated")))]
551 RemoveOrientationChanged: usize,
552 #[cfg(feature = "deprecated")]
553 pub ResolutionScale: unsafe extern "system" fn(this: *mut ::core::ffi::c_void, result__: *mut ResolutionScale) -> ::windows::core::HRESULT,
554 #[cfg(not(feature = "deprecated"))]
555 ResolutionScale: usize,
556 #[cfg(feature = "deprecated")]
557 pub LogicalDpi: unsafe extern "system" fn(this: *mut ::core::ffi::c_void, result__: *mut f32) -> ::windows::core::HRESULT,
558 #[cfg(not(feature = "deprecated"))]
559 LogicalDpi: usize,
560 #[cfg(all(feature = "Foundation", feature = "deprecated"))]
561 pub LogicalDpiChanged: unsafe extern "system" fn(this: *mut ::core::ffi::c_void, handler: *mut ::core::ffi::c_void, result__: *mut super::super::Foundation::EventRegistrationToken) -> ::windows::core::HRESULT,
562 #[cfg(not(all(feature = "Foundation", feature = "deprecated")))]
563 LogicalDpiChanged: usize,
564 #[cfg(all(feature = "Foundation", feature = "deprecated"))]
565 pub RemoveLogicalDpiChanged: unsafe extern "system" fn(this: *mut ::core::ffi::c_void, token: super::super::Foundation::EventRegistrationToken) -> ::windows::core::HRESULT,
566 #[cfg(not(all(feature = "Foundation", feature = "deprecated")))]
567 RemoveLogicalDpiChanged: usize,
568 #[cfg(feature = "deprecated")]
569 pub StereoEnabled: unsafe extern "system" fn(this: *mut ::core::ffi::c_void, result__: *mut bool) -> ::windows::core::HRESULT,
570 #[cfg(not(feature = "deprecated"))]
571 StereoEnabled: usize,
572 #[cfg(all(feature = "Foundation", feature = "deprecated"))]
573 pub StereoEnabledChanged: unsafe extern "system" fn(this: *mut ::core::ffi::c_void, handler: *mut ::core::ffi::c_void, result__: *mut super::super::Foundation::EventRegistrationToken) -> ::windows::core::HRESULT,
574 #[cfg(not(all(feature = "Foundation", feature = "deprecated")))]
575 StereoEnabledChanged: usize,
576 #[cfg(all(feature = "Foundation", feature = "deprecated"))]
577 pub RemoveStereoEnabledChanged: unsafe extern "system" fn(this: *mut ::core::ffi::c_void, token: super::super::Foundation::EventRegistrationToken) -> ::windows::core::HRESULT,
578 #[cfg(not(all(feature = "Foundation", feature = "deprecated")))]
579 RemoveStereoEnabledChanged: usize,
580 #[cfg(all(feature = "Foundation", feature = "Storage_Streams", feature = "deprecated"))]
581 pub GetColorProfileAsync: unsafe extern "system" fn(this: *mut ::core::ffi::c_void, result__: *mut *mut ::core::ffi::c_void) -> ::windows::core::HRESULT,
582 #[cfg(not(all(feature = "Foundation", feature = "Storage_Streams", feature = "deprecated")))]
583 GetColorProfileAsync: usize,
584 #[cfg(all(feature = "Foundation", feature = "deprecated"))]
585 pub ColorProfileChanged: unsafe extern "system" fn(this: *mut ::core::ffi::c_void, handler: *mut ::core::ffi::c_void, result__: *mut super::super::Foundation::EventRegistrationToken) -> ::windows::core::HRESULT,
586 #[cfg(not(all(feature = "Foundation", feature = "deprecated")))]
587 ColorProfileChanged: usize,
588 #[cfg(all(feature = "Foundation", feature = "deprecated"))]
589 pub RemoveColorProfileChanged: unsafe extern "system" fn(this: *mut ::core::ffi::c_void, token: super::super::Foundation::EventRegistrationToken) -> ::windows::core::HRESULT,
590 #[cfg(not(all(feature = "Foundation", feature = "deprecated")))]
591 RemoveColorProfileChanged: usize,
592 #[cfg(all(feature = "Foundation", feature = "deprecated"))]
593 pub DisplayContentsInvalidated: unsafe extern "system" fn(this: *mut ::core::ffi::c_void, handler: *mut ::core::ffi::c_void, result__: *mut super::super::Foundation::EventRegistrationToken) -> ::windows::core::HRESULT,
594 #[cfg(not(all(feature = "Foundation", feature = "deprecated")))]
595 DisplayContentsInvalidated: usize,
596 #[cfg(all(feature = "Foundation", feature = "deprecated"))]
597 pub RemoveDisplayContentsInvalidated: unsafe extern "system" fn(this: *mut ::core::ffi::c_void, token: super::super::Foundation::EventRegistrationToken) -> ::windows::core::HRESULT,
598 #[cfg(not(all(feature = "Foundation", feature = "deprecated")))]
599 RemoveDisplayContentsInvalidated: usize,
600 }
601 #[doc(hidden)]
602 #[repr(transparent)]
603 pub struct IDisplayServices(::windows::core::IUnknown);
604 unsafe impl ::windows::core::Interface for IDisplayServices {
605 type Vtable = IDisplayServices_Vtbl;
606 }
607 impl ::core::clone::Clone for IDisplayServices {
608 fn clone(&self) -> Self {
609 Self(self.0.clone())
610 }
611 }
612 unsafe impl ::windows::core::ComInterface for IDisplayServices {
613 const IID: ::windows::core::GUID = ::windows::core::GUID::from_u128(0x1b54f32b_890d_5747_bd26_fdbdeb0c8a71);
614 }
615 #[repr(C)]
616 #[doc(hidden)]
617 pub struct IDisplayServices_Vtbl {
618 pub base__: ::windows::core::IInspectable_Vtbl,
619 }
620 #[doc(hidden)]
621 #[repr(transparent)]
622 pub struct IDisplayServicesStatics(::windows::core::IUnknown);
623 unsafe impl ::windows::core::Interface for IDisplayServicesStatics {
624 type Vtable = IDisplayServicesStatics_Vtbl;
625 }
626 impl ::core::clone::Clone for IDisplayServicesStatics {
627 fn clone(&self) -> Self {
628 Self(self.0.clone())
629 }
630 }
631 unsafe impl ::windows::core::ComInterface for IDisplayServicesStatics {
632 const IID: ::windows::core::GUID = ::windows::core::GUID::from_u128(0xdc2096bf_730a_5560_b461_91c13d692e0c);
633 }
634 #[repr(C)]
635 #[doc(hidden)]
636 pub struct IDisplayServicesStatics_Vtbl {
637 pub base__: ::windows::core::IInspectable_Vtbl,
638 pub FindAll: unsafe extern "system" fn(this: *mut ::core::ffi::c_void, result_size__: *mut u32, result__: *mut *mut super::DisplayId) -> ::windows::core::HRESULT,
639 }
640 #[doc = "*Required features: `\"Graphics_Display\"`*"]
641 #[repr(transparent)]
642 pub struct AdvancedColorInfo(::windows::core::IUnknown);
643 impl AdvancedColorInfo {
644 pub fn CurrentAdvancedColorKind(&self) -> ::windows::core::Result<AdvancedColorKind> {
645 let this = self;
646 unsafe {
647 let mut result__ = ::windows::core::zeroed::<AdvancedColorKind>();
648 (::windows::core::Interface::vtable(this).CurrentAdvancedColorKind)(::windows::core::Interface::as_raw(this), &mut result__).from_abi(result__)
649 }
650 }
651 #[doc = "*Required features: `\"Foundation\"`*"]
652 #[cfg(feature = "Foundation")]
653 pub fn RedPrimary(&self) -> ::windows::core::Result<super::super::Foundation::Point> {
654 let this = self;
655 unsafe {
656 let mut result__ = ::windows::core::zeroed::<super::super::Foundation::Point>();
657 (::windows::core::Interface::vtable(this).RedPrimary)(::windows::core::Interface::as_raw(this), &mut result__).from_abi(result__)
658 }
659 }
660 #[doc = "*Required features: `\"Foundation\"`*"]
661 #[cfg(feature = "Foundation")]
662 pub fn GreenPrimary(&self) -> ::windows::core::Result<super::super::Foundation::Point> {
663 let this = self;
664 unsafe {
665 let mut result__ = ::windows::core::zeroed::<super::super::Foundation::Point>();
666 (::windows::core::Interface::vtable(this).GreenPrimary)(::windows::core::Interface::as_raw(this), &mut result__).from_abi(result__)
667 }
668 }
669 #[doc = "*Required features: `\"Foundation\"`*"]
670 #[cfg(feature = "Foundation")]
671 pub fn BluePrimary(&self) -> ::windows::core::Result<super::super::Foundation::Point> {
672 let this = self;
673 unsafe {
674 let mut result__ = ::windows::core::zeroed::<super::super::Foundation::Point>();
675 (::windows::core::Interface::vtable(this).BluePrimary)(::windows::core::Interface::as_raw(this), &mut result__).from_abi(result__)
676 }
677 }
678 #[doc = "*Required features: `\"Foundation\"`*"]
679 #[cfg(feature = "Foundation")]
680 pub fn WhitePoint(&self) -> ::windows::core::Result<super::super::Foundation::Point> {
681 let this = self;
682 unsafe {
683 let mut result__ = ::windows::core::zeroed::<super::super::Foundation::Point>();
684 (::windows::core::Interface::vtable(this).WhitePoint)(::windows::core::Interface::as_raw(this), &mut result__).from_abi(result__)
685 }
686 }
687 pub fn MaxLuminanceInNits(&self) -> ::windows::core::Result<f32> {
688 let this = self;
689 unsafe {
690 let mut result__ = ::windows::core::zeroed::<f32>();
691 (::windows::core::Interface::vtable(this).MaxLuminanceInNits)(::windows::core::Interface::as_raw(this), &mut result__).from_abi(result__)
692 }
693 }
694 pub fn MinLuminanceInNits(&self) -> ::windows::core::Result<f32> {
695 let this = self;
696 unsafe {
697 let mut result__ = ::windows::core::zeroed::<f32>();
698 (::windows::core::Interface::vtable(this).MinLuminanceInNits)(::windows::core::Interface::as_raw(this), &mut result__).from_abi(result__)
699 }
700 }
701 pub fn MaxAverageFullFrameLuminanceInNits(&self) -> ::windows::core::Result<f32> {
702 let this = self;
703 unsafe {
704 let mut result__ = ::windows::core::zeroed::<f32>();
705 (::windows::core::Interface::vtable(this).MaxAverageFullFrameLuminanceInNits)(::windows::core::Interface::as_raw(this), &mut result__).from_abi(result__)
706 }
707 }
708 pub fn SdrWhiteLevelInNits(&self) -> ::windows::core::Result<f32> {
709 let this = self;
710 unsafe {
711 let mut result__ = ::windows::core::zeroed::<f32>();
712 (::windows::core::Interface::vtable(this).SdrWhiteLevelInNits)(::windows::core::Interface::as_raw(this), &mut result__).from_abi(result__)
713 }
714 }
715 pub fn IsHdrMetadataFormatCurrentlySupported(&self, format: HdrMetadataFormat) -> ::windows::core::Result<bool> {
716 let this = self;
717 unsafe {
718 let mut result__ = ::windows::core::zeroed::<bool>();
719 (::windows::core::Interface::vtable(this).IsHdrMetadataFormatCurrentlySupported)(::windows::core::Interface::as_raw(this), format, &mut result__).from_abi(result__)
720 }
721 }
722 pub fn IsAdvancedColorKindAvailable(&self, kind: AdvancedColorKind) -> ::windows::core::Result<bool> {
723 let this = self;
724 unsafe {
725 let mut result__ = ::windows::core::zeroed::<bool>();
726 (::windows::core::Interface::vtable(this).IsAdvancedColorKindAvailable)(::windows::core::Interface::as_raw(this), kind, &mut result__).from_abi(result__)
727 }
728 }
729 }
730 impl ::core::cmp::PartialEq for AdvancedColorInfo {
731 fn eq(&self, other: &Self) -> bool {
732 self.0 == other.0
733 }
734 }
735 impl ::core::cmp::Eq for AdvancedColorInfo {}
736 impl ::core::fmt::Debug for AdvancedColorInfo {
737 fn fmt(&self, f: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result {
738 f.debug_tuple("AdvancedColorInfo").field(&self.0).finish()
739 }
740 }
741 impl ::windows::core::RuntimeType for AdvancedColorInfo {
742 const SIGNATURE: ::windows::imp::ConstBuffer = ::windows::imp::ConstBuffer::from_slice(b"rc(Windows.Graphics.Display.AdvancedColorInfo;{8797dcfb-b229-4081-ae9a-2cc85e34ad6a})");
743 }
744 impl ::core::clone::Clone for AdvancedColorInfo {
745 fn clone(&self) -> Self {
746 Self(self.0.clone())
747 }
748 }
749 unsafe impl ::windows::core::Interface for AdvancedColorInfo {
750 type Vtable = IAdvancedColorInfo_Vtbl;
751 }
752 unsafe impl ::windows::core::ComInterface for AdvancedColorInfo {
753 const IID: ::windows::core::GUID = <IAdvancedColorInfo as ::windows::core::ComInterface>::IID;
754 }
755 impl ::windows::core::RuntimeName for AdvancedColorInfo {
756 const NAME: &'static str = "Windows.Graphics.Display.AdvancedColorInfo";
757 }
758 ::windows::imp::interface_hierarchy!(AdvancedColorInfo, ::windows::core::IUnknown, ::windows::core::IInspectable);
759 unsafe impl ::core::marker::Send for AdvancedColorInfo {}
760 unsafe impl ::core::marker::Sync for AdvancedColorInfo {}
761 #[doc = "*Required features: `\"Graphics_Display\"`*"]
762 #[repr(transparent)]
763 pub struct BrightnessOverride(::windows::core::IUnknown);
764 impl BrightnessOverride {
765 pub fn IsSupported(&self) -> ::windows::core::Result<bool> {
766 let this = self;
767 unsafe {
768 let mut result__ = ::windows::core::zeroed::<bool>();
769 (::windows::core::Interface::vtable(this).IsSupported)(::windows::core::Interface::as_raw(this), &mut result__).from_abi(result__)
770 }
771 }
772 pub fn IsOverrideActive(&self) -> ::windows::core::Result<bool> {
773 let this = self;
774 unsafe {
775 let mut result__ = ::windows::core::zeroed::<bool>();
776 (::windows::core::Interface::vtable(this).IsOverrideActive)(::windows::core::Interface::as_raw(this), &mut result__).from_abi(result__)
777 }
778 }
779 pub fn BrightnessLevel(&self) -> ::windows::core::Result<f64> {
780 let this = self;
781 unsafe {
782 let mut result__ = ::windows::core::zeroed::<f64>();
783 (::windows::core::Interface::vtable(this).BrightnessLevel)(::windows::core::Interface::as_raw(this), &mut result__).from_abi(result__)
784 }
785 }
786 pub fn SetBrightnessLevel(&self, brightnesslevel: f64, options: DisplayBrightnessOverrideOptions) -> ::windows::core::Result<()> {
787 let this = self;
788 unsafe { (::windows::core::Interface::vtable(this).SetBrightnessLevel)(::windows::core::Interface::as_raw(this), brightnesslevel, options).ok() }
789 }
790 pub fn SetBrightnessScenario(&self, scenario: DisplayBrightnessScenario, options: DisplayBrightnessOverrideOptions) -> ::windows::core::Result<()> {
791 let this = self;
792 unsafe { (::windows::core::Interface::vtable(this).SetBrightnessScenario)(::windows::core::Interface::as_raw(this), scenario, options).ok() }
793 }
794 pub fn GetLevelForScenario(&self, scenario: DisplayBrightnessScenario) -> ::windows::core::Result<f64> {
795 let this = self;
796 unsafe {
797 let mut result__ = ::windows::core::zeroed::<f64>();
798 (::windows::core::Interface::vtable(this).GetLevelForScenario)(::windows::core::Interface::as_raw(this), scenario, &mut result__).from_abi(result__)
799 }
800 }
801 pub fn StartOverride(&self) -> ::windows::core::Result<()> {
802 let this = self;
803 unsafe { (::windows::core::Interface::vtable(this).StartOverride)(::windows::core::Interface::as_raw(this)).ok() }
804 }
805 pub fn StopOverride(&self) -> ::windows::core::Result<()> {
806 let this = self;
807 unsafe { (::windows::core::Interface::vtable(this).StopOverride)(::windows::core::Interface::as_raw(this)).ok() }
808 }
809 #[doc = "*Required features: `\"Foundation\"`*"]
810 #[cfg(feature = "Foundation")]
811 pub fn IsSupportedChanged(&self, handler: &super::super::Foundation::TypedEventHandler<BrightnessOverride, ::windows::core::IInspectable>) -> ::windows::core::Result<super::super::Foundation::EventRegistrationToken> {
812 let this = self;
813 unsafe {
814 let mut result__ = ::windows::core::zeroed::<super::super::Foundation::EventRegistrationToken>();
815 (::windows::core::Interface::vtable(this).IsSupportedChanged)(::windows::core::Interface::as_raw(this), ::core::mem::transmute_copy(handler), &mut result__).from_abi(result__)
816 }
817 }
818 #[doc = "*Required features: `\"Foundation\"`*"]
819 #[cfg(feature = "Foundation")]
820 pub fn RemoveIsSupportedChanged(&self, token: super::super::Foundation::EventRegistrationToken) -> ::windows::core::Result<()> {
821 let this = self;
822 unsafe { (::windows::core::Interface::vtable(this).RemoveIsSupportedChanged)(::windows::core::Interface::as_raw(this), token).ok() }
823 }
824 #[doc = "*Required features: `\"Foundation\"`*"]
825 #[cfg(feature = "Foundation")]
826 pub fn IsOverrideActiveChanged(&self, handler: &super::super::Foundation::TypedEventHandler<BrightnessOverride, ::windows::core::IInspectable>) -> ::windows::core::Result<super::super::Foundation::EventRegistrationToken> {
827 let this = self;
828 unsafe {
829 let mut result__ = ::windows::core::zeroed::<super::super::Foundation::EventRegistrationToken>();
830 (::windows::core::Interface::vtable(this).IsOverrideActiveChanged)(::windows::core::Interface::as_raw(this), ::core::mem::transmute_copy(handler), &mut result__).from_abi(result__)
831 }
832 }
833 #[doc = "*Required features: `\"Foundation\"`*"]
834 #[cfg(feature = "Foundation")]
835 pub fn RemoveIsOverrideActiveChanged(&self, token: super::super::Foundation::EventRegistrationToken) -> ::windows::core::Result<()> {
836 let this = self;
837 unsafe { (::windows::core::Interface::vtable(this).RemoveIsOverrideActiveChanged)(::windows::core::Interface::as_raw(this), token).ok() }
838 }
839 #[doc = "*Required features: `\"Foundation\"`*"]
840 #[cfg(feature = "Foundation")]
841 pub fn BrightnessLevelChanged(&self, handler: &super::super::Foundation::TypedEventHandler<BrightnessOverride, ::windows::core::IInspectable>) -> ::windows::core::Result<super::super::Foundation::EventRegistrationToken> {
842 let this = self;
843 unsafe {
844 let mut result__ = ::windows::core::zeroed::<super::super::Foundation::EventRegistrationToken>();
845 (::windows::core::Interface::vtable(this).BrightnessLevelChanged)(::windows::core::Interface::as_raw(this), ::core::mem::transmute_copy(handler), &mut result__).from_abi(result__)
846 }
847 }
848 #[doc = "*Required features: `\"Foundation\"`*"]
849 #[cfg(feature = "Foundation")]
850 pub fn RemoveBrightnessLevelChanged(&self, token: super::super::Foundation::EventRegistrationToken) -> ::windows::core::Result<()> {
851 let this = self;
852 unsafe { (::windows::core::Interface::vtable(this).RemoveBrightnessLevelChanged)(::windows::core::Interface::as_raw(this), token).ok() }
853 }
854 pub fn GetDefaultForSystem() -> ::windows::core::Result<BrightnessOverride> {
855 Self::IBrightnessOverrideStatics(|this| unsafe {
856 let mut result__ = ::windows::core::zeroed::<BrightnessOverride>();
857 (::windows::core::Interface::vtable(this).GetDefaultForSystem)(::windows::core::Interface::as_raw(this), &mut result__).from_abi(result__)
858 })
859 }
860 pub fn GetForCurrentView() -> ::windows::core::Result<BrightnessOverride> {
861 Self::IBrightnessOverrideStatics(|this| unsafe {
862 let mut result__ = ::windows::core::zeroed::<BrightnessOverride>();
863 (::windows::core::Interface::vtable(this).GetForCurrentView)(::windows::core::Interface::as_raw(this), &mut result__).from_abi(result__)
864 })
865 }
866 #[doc = "*Required features: `\"Foundation\"`*"]
867 #[cfg(feature = "Foundation")]
868 pub fn SaveForSystemAsync(value: &BrightnessOverride) -> ::windows::core::Result<super::super::Foundation::IAsyncOperation<bool>> {
869 Self::IBrightnessOverrideStatics(|this| unsafe {
870 let mut result__ = ::windows::core::zeroed::<super::super::Foundation::IAsyncOperation<bool>>();
871 (::windows::core::Interface::vtable(this).SaveForSystemAsync)(::windows::core::Interface::as_raw(this), ::core::mem::transmute_copy(value), &mut result__).from_abi(result__)
872 })
873 }
874 #[doc(hidden)]
875 pub fn IBrightnessOverrideStatics<R, F: FnOnce(&IBrightnessOverrideStatics) -> ::windows::core::Result<R>>(callback: F) -> ::windows::core::Result<R> {
876 static SHARED: ::windows::imp::FactoryCache<BrightnessOverride, IBrightnessOverrideStatics> = ::windows::imp::FactoryCache::new();
877 SHARED.call(callback)
878 }
879 }
880 impl ::core::cmp::PartialEq for BrightnessOverride {
881 fn eq(&self, other: &Self) -> bool {
882 self.0 == other.0
883 }
884 }
885 impl ::core::cmp::Eq for BrightnessOverride {}
886 impl ::core::fmt::Debug for BrightnessOverride {
887 fn fmt(&self, f: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result {
888 f.debug_tuple("BrightnessOverride").field(&self.0).finish()
889 }
890 }
891 impl ::windows::core::RuntimeType for BrightnessOverride {
892 const SIGNATURE: ::windows::imp::ConstBuffer = ::windows::imp::ConstBuffer::from_slice(b"rc(Windows.Graphics.Display.BrightnessOverride;{96c9621a-c143-4392-bedd-4a7e9574c8fd})");
893 }
894 impl ::core::clone::Clone for BrightnessOverride {
895 fn clone(&self) -> Self {
896 Self(self.0.clone())
897 }
898 }
899 unsafe impl ::windows::core::Interface for BrightnessOverride {
900 type Vtable = IBrightnessOverride_Vtbl;
901 }
902 unsafe impl ::windows::core::ComInterface for BrightnessOverride {
903 const IID: ::windows::core::GUID = <IBrightnessOverride as ::windows::core::ComInterface>::IID;
904 }
905 impl ::windows::core::RuntimeName for BrightnessOverride {
906 const NAME: &'static str = "Windows.Graphics.Display.BrightnessOverride";
907 }
908 ::windows::imp::interface_hierarchy!(BrightnessOverride, ::windows::core::IUnknown, ::windows::core::IInspectable);
909 unsafe impl ::core::marker::Send for BrightnessOverride {}
910 unsafe impl ::core::marker::Sync for BrightnessOverride {}
911 #[doc = "*Required features: `\"Graphics_Display\"`*"]
912 #[repr(transparent)]
913 pub struct BrightnessOverrideSettings(::windows::core::IUnknown);
914 impl BrightnessOverrideSettings {
915 pub fn DesiredLevel(&self) -> ::windows::core::Result<f64> {
916 let this = self;
917 unsafe {
918 let mut result__ = ::windows::core::zeroed::<f64>();
919 (::windows::core::Interface::vtable(this).DesiredLevel)(::windows::core::Interface::as_raw(this), &mut result__).from_abi(result__)
920 }
921 }
922 pub fn DesiredNits(&self) -> ::windows::core::Result<f32> {
923 let this = self;
924 unsafe {
925 let mut result__ = ::windows::core::zeroed::<f32>();
926 (::windows::core::Interface::vtable(this).DesiredNits)(::windows::core::Interface::as_raw(this), &mut result__).from_abi(result__)
927 }
928 }
929 pub fn CreateFromLevel(level: f64) -> ::windows::core::Result<BrightnessOverrideSettings> {
930 Self::IBrightnessOverrideSettingsStatics(|this| unsafe {
931 let mut result__ = ::windows::core::zeroed::<BrightnessOverrideSettings>();
932 (::windows::core::Interface::vtable(this).CreateFromLevel)(::windows::core::Interface::as_raw(this), level, &mut result__).from_abi(result__)
933 })
934 }
935 pub fn CreateFromNits(nits: f32) -> ::windows::core::Result<BrightnessOverrideSettings> {
936 Self::IBrightnessOverrideSettingsStatics(|this| unsafe {
937 let mut result__ = ::windows::core::zeroed::<BrightnessOverrideSettings>();
938 (::windows::core::Interface::vtable(this).CreateFromNits)(::windows::core::Interface::as_raw(this), nits, &mut result__).from_abi(result__)
939 })
940 }
941 pub fn CreateFromDisplayBrightnessOverrideScenario(overridescenario: DisplayBrightnessOverrideScenario) -> ::windows::core::Result<BrightnessOverrideSettings> {
942 Self::IBrightnessOverrideSettingsStatics(|this| unsafe {
943 let mut result__ = ::windows::core::zeroed::<BrightnessOverrideSettings>();
944 (::windows::core::Interface::vtable(this).CreateFromDisplayBrightnessOverrideScenario)(::windows::core::Interface::as_raw(this), overridescenario, &mut result__).from_abi(result__)
945 })
946 }
947 #[doc(hidden)]
948 pub fn IBrightnessOverrideSettingsStatics<R, F: FnOnce(&IBrightnessOverrideSettingsStatics) -> ::windows::core::Result<R>>(callback: F) -> ::windows::core::Result<R> {
949 static SHARED: ::windows::imp::FactoryCache<BrightnessOverrideSettings, IBrightnessOverrideSettingsStatics> = ::windows::imp::FactoryCache::new();
950 SHARED.call(callback)
951 }
952 }
953 impl ::core::cmp::PartialEq for BrightnessOverrideSettings {
954 fn eq(&self, other: &Self) -> bool {
955 self.0 == other.0
956 }
957 }
958 impl ::core::cmp::Eq for BrightnessOverrideSettings {}
959 impl ::core::fmt::Debug for BrightnessOverrideSettings {
960 fn fmt(&self, f: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result {
961 f.debug_tuple("BrightnessOverrideSettings").field(&self.0).finish()
962 }
963 }
964 impl ::windows::core::RuntimeType for BrightnessOverrideSettings {
965 const SIGNATURE: ::windows::imp::ConstBuffer = ::windows::imp::ConstBuffer::from_slice(b"rc(Windows.Graphics.Display.BrightnessOverrideSettings;{d112ab2a-7604-4dba-bcf8-4b6f49502cb0})");
966 }
967 impl ::core::clone::Clone for BrightnessOverrideSettings {
968 fn clone(&self) -> Self {
969 Self(self.0.clone())
970 }
971 }
972 unsafe impl ::windows::core::Interface for BrightnessOverrideSettings {
973 type Vtable = IBrightnessOverrideSettings_Vtbl;
974 }
975 unsafe impl ::windows::core::ComInterface for BrightnessOverrideSettings {
976 const IID: ::windows::core::GUID = <IBrightnessOverrideSettings as ::windows::core::ComInterface>::IID;
977 }
978 impl ::windows::core::RuntimeName for BrightnessOverrideSettings {
979 const NAME: &'static str = "Windows.Graphics.Display.BrightnessOverrideSettings";
980 }
981 ::windows::imp::interface_hierarchy!(BrightnessOverrideSettings, ::windows::core::IUnknown, ::windows::core::IInspectable);
982 unsafe impl ::core::marker::Send for BrightnessOverrideSettings {}
983 unsafe impl ::core::marker::Sync for BrightnessOverrideSettings {}
984 #[doc = "*Required features: `\"Graphics_Display\"`*"]
985 #[repr(transparent)]
986 pub struct ColorOverrideSettings(::windows::core::IUnknown);
987 impl ColorOverrideSettings {
988 pub fn DesiredDisplayColorOverrideScenario(&self) -> ::windows::core::Result<DisplayColorOverrideScenario> {
989 let this = self;
990 unsafe {
991 let mut result__ = ::windows::core::zeroed::<DisplayColorOverrideScenario>();
992 (::windows::core::Interface::vtable(this).DesiredDisplayColorOverrideScenario)(::windows::core::Interface::as_raw(this), &mut result__).from_abi(result__)
993 }
994 }
995 pub fn CreateFromDisplayColorOverrideScenario(overridescenario: DisplayColorOverrideScenario) -> ::windows::core::Result<ColorOverrideSettings> {
996 Self::IColorOverrideSettingsStatics(|this| unsafe {
997 let mut result__ = ::windows::core::zeroed::<ColorOverrideSettings>();
998 (::windows::core::Interface::vtable(this).CreateFromDisplayColorOverrideScenario)(::windows::core::Interface::as_raw(this), overridescenario, &mut result__).from_abi(result__)
999 })
1000 }
1001 #[doc(hidden)]
1002 pub fn IColorOverrideSettingsStatics<R, F: FnOnce(&IColorOverrideSettingsStatics) -> ::windows::core::Result<R>>(callback: F) -> ::windows::core::Result<R> {
1003 static SHARED: ::windows::imp::FactoryCache<ColorOverrideSettings, IColorOverrideSettingsStatics> = ::windows::imp::FactoryCache::new();
1004 SHARED.call(callback)
1005 }
1006 }
1007 impl ::core::cmp::PartialEq for ColorOverrideSettings {
1008 fn eq(&self, other: &Self) -> bool {
1009 self.0 == other.0
1010 }
1011 }
1012 impl ::core::cmp::Eq for ColorOverrideSettings {}
1013 impl ::core::fmt::Debug for ColorOverrideSettings {
1014 fn fmt(&self, f: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result {
1015 f.debug_tuple("ColorOverrideSettings").field(&self.0).finish()
1016 }
1017 }
1018 impl ::windows::core::RuntimeType for ColorOverrideSettings {
1019 const SIGNATURE: ::windows::imp::ConstBuffer = ::windows::imp::ConstBuffer::from_slice(b"rc(Windows.Graphics.Display.ColorOverrideSettings;{fbefa134-4a81-4c4d-a5b6-7d1b5c4bd00b})");
1020 }
1021 impl ::core::clone::Clone for ColorOverrideSettings {
1022 fn clone(&self) -> Self {
1023 Self(self.0.clone())
1024 }
1025 }
1026 unsafe impl ::windows::core::Interface for ColorOverrideSettings {
1027 type Vtable = IColorOverrideSettings_Vtbl;
1028 }
1029 unsafe impl ::windows::core::ComInterface for ColorOverrideSettings {
1030 const IID: ::windows::core::GUID = <IColorOverrideSettings as ::windows::core::ComInterface>::IID;
1031 }
1032 impl ::windows::core::RuntimeName for ColorOverrideSettings {
1033 const NAME: &'static str = "Windows.Graphics.Display.ColorOverrideSettings";
1034 }
1035 ::windows::imp::interface_hierarchy!(ColorOverrideSettings, ::windows::core::IUnknown, ::windows::core::IInspectable);
1036 unsafe impl ::core::marker::Send for ColorOverrideSettings {}
1037 unsafe impl ::core::marker::Sync for ColorOverrideSettings {}
1038 #[doc = "*Required features: `\"Graphics_Display\"`*"]
1039 #[repr(transparent)]
1040 pub struct DisplayEnhancementOverride(::windows::core::IUnknown);
1041 impl DisplayEnhancementOverride {
1042 pub fn ColorOverrideSettings(&self) -> ::windows::core::Result<ColorOverrideSettings> {
1043 let this = self;
1044 unsafe {
1045 let mut result__ = ::windows::core::zeroed::<ColorOverrideSettings>();
1046 (::windows::core::Interface::vtable(this).ColorOverrideSettings)(::windows::core::Interface::as_raw(this), &mut result__).from_abi(result__)
1047 }
1048 }
1049 pub fn SetColorOverrideSettings(&self, value: &ColorOverrideSettings) -> ::windows::core::Result<()> {
1050 let this = self;
1051 unsafe { (::windows::core::Interface::vtable(this).SetColorOverrideSettings)(::windows::core::Interface::as_raw(this), ::core::mem::transmute_copy(value)).ok() }
1052 }
1053 pub fn BrightnessOverrideSettings(&self) -> ::windows::core::Result<BrightnessOverrideSettings> {
1054 let this = self;
1055 unsafe {
1056 let mut result__ = ::windows::core::zeroed::<BrightnessOverrideSettings>();
1057 (::windows::core::Interface::vtable(this).BrightnessOverrideSettings)(::windows::core::Interface::as_raw(this), &mut result__).from_abi(result__)
1058 }
1059 }
1060 pub fn SetBrightnessOverrideSettings(&self, value: &BrightnessOverrideSettings) -> ::windows::core::Result<()> {
1061 let this = self;
1062 unsafe { (::windows::core::Interface::vtable(this).SetBrightnessOverrideSettings)(::windows::core::Interface::as_raw(this), ::core::mem::transmute_copy(value)).ok() }
1063 }
1064 pub fn CanOverride(&self) -> ::windows::core::Result<bool> {
1065 let this = self;
1066 unsafe {
1067 let mut result__ = ::windows::core::zeroed::<bool>();
1068 (::windows::core::Interface::vtable(this).CanOverride)(::windows::core::Interface::as_raw(this), &mut result__).from_abi(result__)
1069 }
1070 }
1071 pub fn IsOverrideActive(&self) -> ::windows::core::Result<bool> {
1072 let this = self;
1073 unsafe {
1074 let mut result__ = ::windows::core::zeroed::<bool>();
1075 (::windows::core::Interface::vtable(this).IsOverrideActive)(::windows::core::Interface::as_raw(this), &mut result__).from_abi(result__)
1076 }
1077 }
1078 pub fn GetCurrentDisplayEnhancementOverrideCapabilities(&self) -> ::windows::core::Result<DisplayEnhancementOverrideCapabilities> {
1079 let this = self;
1080 unsafe {
1081 let mut result__ = ::windows::core::zeroed::<DisplayEnhancementOverrideCapabilities>();
1082 (::windows::core::Interface::vtable(this).GetCurrentDisplayEnhancementOverrideCapabilities)(::windows::core::Interface::as_raw(this), &mut result__).from_abi(result__)
1083 }
1084 }
1085 pub fn RequestOverride(&self) -> ::windows::core::Result<()> {
1086 let this = self;
1087 unsafe { (::windows::core::Interface::vtable(this).RequestOverride)(::windows::core::Interface::as_raw(this)).ok() }
1088 }
1089 pub fn StopOverride(&self) -> ::windows::core::Result<()> {
1090 let this = self;
1091 unsafe { (::windows::core::Interface::vtable(this).StopOverride)(::windows::core::Interface::as_raw(this)).ok() }
1092 }
1093 #[doc = "*Required features: `\"Foundation\"`*"]
1094 #[cfg(feature = "Foundation")]
1095 pub fn CanOverrideChanged(&self, handler: &super::super::Foundation::TypedEventHandler<DisplayEnhancementOverride, ::windows::core::IInspectable>) -> ::windows::core::Result<super::super::Foundation::EventRegistrationToken> {
1096 let this = self;
1097 unsafe {
1098 let mut result__ = ::windows::core::zeroed::<super::super::Foundation::EventRegistrationToken>();
1099 (::windows::core::Interface::vtable(this).CanOverrideChanged)(::windows::core::Interface::as_raw(this), ::core::mem::transmute_copy(handler), &mut result__).from_abi(result__)
1100 }
1101 }
1102 #[doc = "*Required features: `\"Foundation\"`*"]
1103 #[cfg(feature = "Foundation")]
1104 pub fn RemoveCanOverrideChanged(&self, token: super::super::Foundation::EventRegistrationToken) -> ::windows::core::Result<()> {
1105 let this = self;
1106 unsafe { (::windows::core::Interface::vtable(this).RemoveCanOverrideChanged)(::windows::core::Interface::as_raw(this), token).ok() }
1107 }
1108 #[doc = "*Required features: `\"Foundation\"`*"]
1109 #[cfg(feature = "Foundation")]
1110 pub fn IsOverrideActiveChanged(&self, handler: &super::super::Foundation::TypedEventHandler<DisplayEnhancementOverride, ::windows::core::IInspectable>) -> ::windows::core::Result<super::super::Foundation::EventRegistrationToken> {
1111 let this = self;
1112 unsafe {
1113 let mut result__ = ::windows::core::zeroed::<super::super::Foundation::EventRegistrationToken>();
1114 (::windows::core::Interface::vtable(this).IsOverrideActiveChanged)(::windows::core::Interface::as_raw(this), ::core::mem::transmute_copy(handler), &mut result__).from_abi(result__)
1115 }
1116 }
1117 #[doc = "*Required features: `\"Foundation\"`*"]
1118 #[cfg(feature = "Foundation")]
1119 pub fn RemoveIsOverrideActiveChanged(&self, token: super::super::Foundation::EventRegistrationToken) -> ::windows::core::Result<()> {
1120 let this = self;
1121 unsafe { (::windows::core::Interface::vtable(this).RemoveIsOverrideActiveChanged)(::windows::core::Interface::as_raw(this), token).ok() }
1122 }
1123 #[doc = "*Required features: `\"Foundation\"`*"]
1124 #[cfg(feature = "Foundation")]
1125 pub fn DisplayEnhancementOverrideCapabilitiesChanged(&self, handler: &super::super::Foundation::TypedEventHandler<DisplayEnhancementOverride, DisplayEnhancementOverrideCapabilitiesChangedEventArgs>) -> ::windows::core::Result<super::super::Foundation::EventRegistrationToken> {
1126 let this = self;
1127 unsafe {
1128 let mut result__ = ::windows::core::zeroed::<super::super::Foundation::EventRegistrationToken>();
1129 (::windows::core::Interface::vtable(this).DisplayEnhancementOverrideCapabilitiesChanged)(::windows::core::Interface::as_raw(this), ::core::mem::transmute_copy(handler), &mut result__).from_abi(result__)
1130 }
1131 }
1132 #[doc = "*Required features: `\"Foundation\"`*"]
1133 #[cfg(feature = "Foundation")]
1134 pub fn RemoveDisplayEnhancementOverrideCapabilitiesChanged(&self, token: super::super::Foundation::EventRegistrationToken) -> ::windows::core::Result<()> {
1135 let this = self;
1136 unsafe { (::windows::core::Interface::vtable(this).RemoveDisplayEnhancementOverrideCapabilitiesChanged)(::windows::core::Interface::as_raw(this), token).ok() }
1137 }
1138 pub fn GetForCurrentView() -> ::windows::core::Result<DisplayEnhancementOverride> {
1139 Self::IDisplayEnhancementOverrideStatics(|this| unsafe {
1140 let mut result__ = ::windows::core::zeroed::<DisplayEnhancementOverride>();
1141 (::windows::core::Interface::vtable(this).GetForCurrentView)(::windows::core::Interface::as_raw(this), &mut result__).from_abi(result__)
1142 })
1143 }
1144 #[doc(hidden)]
1145 pub fn IDisplayEnhancementOverrideStatics<R, F: FnOnce(&IDisplayEnhancementOverrideStatics) -> ::windows::core::Result<R>>(callback: F) -> ::windows::core::Result<R> {
1146 static SHARED: ::windows::imp::FactoryCache<DisplayEnhancementOverride, IDisplayEnhancementOverrideStatics> = ::windows::imp::FactoryCache::new();
1147 SHARED.call(callback)
1148 }
1149 }
1150 impl ::core::cmp::PartialEq for DisplayEnhancementOverride {
1151 fn eq(&self, other: &Self) -> bool {
1152 self.0 == other.0
1153 }
1154 }
1155 impl ::core::cmp::Eq for DisplayEnhancementOverride {}
1156 impl ::core::fmt::Debug for DisplayEnhancementOverride {
1157 fn fmt(&self, f: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result {
1158 f.debug_tuple("DisplayEnhancementOverride").field(&self.0).finish()
1159 }
1160 }
1161 impl ::windows::core::RuntimeType for DisplayEnhancementOverride {
1162 const SIGNATURE: ::windows::imp::ConstBuffer = ::windows::imp::ConstBuffer::from_slice(b"rc(Windows.Graphics.Display.DisplayEnhancementOverride;{429594cf-d97a-4b02-a428-5c4292f7f522})");
1163 }
1164 impl ::core::clone::Clone for DisplayEnhancementOverride {
1165 fn clone(&self) -> Self {
1166 Self(self.0.clone())
1167 }
1168 }
1169 unsafe impl ::windows::core::Interface for DisplayEnhancementOverride {
1170 type Vtable = IDisplayEnhancementOverride_Vtbl;
1171 }
1172 unsafe impl ::windows::core::ComInterface for DisplayEnhancementOverride {
1173 const IID: ::windows::core::GUID = <IDisplayEnhancementOverride as ::windows::core::ComInterface>::IID;
1174 }
1175 impl ::windows::core::RuntimeName for DisplayEnhancementOverride {
1176 const NAME: &'static str = "Windows.Graphics.Display.DisplayEnhancementOverride";
1177 }
1178 ::windows::imp::interface_hierarchy!(DisplayEnhancementOverride, ::windows::core::IUnknown, ::windows::core::IInspectable);
1179 unsafe impl ::core::marker::Send for DisplayEnhancementOverride {}
1180 unsafe impl ::core::marker::Sync for DisplayEnhancementOverride {}
1181 #[doc = "*Required features: `\"Graphics_Display\"`*"]
1182 #[repr(transparent)]
1183 pub struct DisplayEnhancementOverrideCapabilities(::windows::core::IUnknown);
1184 impl DisplayEnhancementOverrideCapabilities {
1185 pub fn IsBrightnessControlSupported(&self) -> ::windows::core::Result<bool> {
1186 let this = self;
1187 unsafe {
1188 let mut result__ = ::windows::core::zeroed::<bool>();
1189 (::windows::core::Interface::vtable(this).IsBrightnessControlSupported)(::windows::core::Interface::as_raw(this), &mut result__).from_abi(result__)
1190 }
1191 }
1192 pub fn IsBrightnessNitsControlSupported(&self) -> ::windows::core::Result<bool> {
1193 let this = self;
1194 unsafe {
1195 let mut result__ = ::windows::core::zeroed::<bool>();
1196 (::windows::core::Interface::vtable(this).IsBrightnessNitsControlSupported)(::windows::core::Interface::as_raw(this), &mut result__).from_abi(result__)
1197 }
1198 }
1199 #[doc = "*Required features: `\"Foundation_Collections\"`*"]
1200 #[cfg(feature = "Foundation_Collections")]
1201 pub fn GetSupportedNitRanges(&self) -> ::windows::core::Result<super::super::Foundation::Collections::IVectorView<NitRange>> {
1202 let this = self;
1203 unsafe {
1204 let mut result__ = ::windows::core::zeroed::<super::super::Foundation::Collections::IVectorView<NitRange>>();
1205 (::windows::core::Interface::vtable(this).GetSupportedNitRanges)(::windows::core::Interface::as_raw(this), &mut result__).from_abi(result__)
1206 }
1207 }
1208 }
1209 impl ::core::cmp::PartialEq for DisplayEnhancementOverrideCapabilities {
1210 fn eq(&self, other: &Self) -> bool {
1211 self.0 == other.0
1212 }
1213 }
1214 impl ::core::cmp::Eq for DisplayEnhancementOverrideCapabilities {}
1215 impl ::core::fmt::Debug for DisplayEnhancementOverrideCapabilities {
1216 fn fmt(&self, f: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result {
1217 f.debug_tuple("DisplayEnhancementOverrideCapabilities").field(&self.0).finish()
1218 }
1219 }
1220 impl ::windows::core::RuntimeType for DisplayEnhancementOverrideCapabilities {
1221 const SIGNATURE: ::windows::imp::ConstBuffer = ::windows::imp::ConstBuffer::from_slice(b"rc(Windows.Graphics.Display.DisplayEnhancementOverrideCapabilities;{457060de-ee5a-47b7-9918-1e51e812ccc8})");
1222 }
1223 impl ::core::clone::Clone for DisplayEnhancementOverrideCapabilities {
1224 fn clone(&self) -> Self {
1225 Self(self.0.clone())
1226 }
1227 }
1228 unsafe impl ::windows::core::Interface for DisplayEnhancementOverrideCapabilities {
1229 type Vtable = IDisplayEnhancementOverrideCapabilities_Vtbl;
1230 }
1231 unsafe impl ::windows::core::ComInterface for DisplayEnhancementOverrideCapabilities {
1232 const IID: ::windows::core::GUID = <IDisplayEnhancementOverrideCapabilities as ::windows::core::ComInterface>::IID;
1233 }
1234 impl ::windows::core::RuntimeName for DisplayEnhancementOverrideCapabilities {
1235 const NAME: &'static str = "Windows.Graphics.Display.DisplayEnhancementOverrideCapabilities";
1236 }
1237 ::windows::imp::interface_hierarchy!(DisplayEnhancementOverrideCapabilities, ::windows::core::IUnknown, ::windows::core::IInspectable);
1238 unsafe impl ::core::marker::Send for DisplayEnhancementOverrideCapabilities {}
1239 unsafe impl ::core::marker::Sync for DisplayEnhancementOverrideCapabilities {}
1240 #[doc = "*Required features: `\"Graphics_Display\"`*"]
1241 #[repr(transparent)]
1242 pub struct DisplayEnhancementOverrideCapabilitiesChangedEventArgs(::windows::core::IUnknown);
1243 impl DisplayEnhancementOverrideCapabilitiesChangedEventArgs {
1244 pub fn Capabilities(&self) -> ::windows::core::Result<DisplayEnhancementOverrideCapabilities> {
1245 let this = self;
1246 unsafe {
1247 let mut result__ = ::windows::core::zeroed::<DisplayEnhancementOverrideCapabilities>();
1248 (::windows::core::Interface::vtable(this).Capabilities)(::windows::core::Interface::as_raw(this), &mut result__).from_abi(result__)
1249 }
1250 }
1251 }
1252 impl ::core::cmp::PartialEq for DisplayEnhancementOverrideCapabilitiesChangedEventArgs {
1253 fn eq(&self, other: &Self) -> bool {
1254 self.0 == other.0
1255 }
1256 }
1257 impl ::core::cmp::Eq for DisplayEnhancementOverrideCapabilitiesChangedEventArgs {}
1258 impl ::core::fmt::Debug for DisplayEnhancementOverrideCapabilitiesChangedEventArgs {
1259 fn fmt(&self, f: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result {
1260 f.debug_tuple("DisplayEnhancementOverrideCapabilitiesChangedEventArgs").field(&self.0).finish()
1261 }
1262 }
1263 impl ::windows::core::RuntimeType for DisplayEnhancementOverrideCapabilitiesChangedEventArgs {
1264 const SIGNATURE: ::windows::imp::ConstBuffer = ::windows::imp::ConstBuffer::from_slice(b"rc(Windows.Graphics.Display.DisplayEnhancementOverrideCapabilitiesChangedEventArgs;{db61e664-15fa-49da-8b77-07dbd2af585d})");
1265 }
1266 impl ::core::clone::Clone for DisplayEnhancementOverrideCapabilitiesChangedEventArgs {
1267 fn clone(&self) -> Self {
1268 Self(self.0.clone())
1269 }
1270 }
1271 unsafe impl ::windows::core::Interface for DisplayEnhancementOverrideCapabilitiesChangedEventArgs {
1272 type Vtable = IDisplayEnhancementOverrideCapabilitiesChangedEventArgs_Vtbl;
1273 }
1274 unsafe impl ::windows::core::ComInterface for DisplayEnhancementOverrideCapabilitiesChangedEventArgs {
1275 const IID: ::windows::core::GUID = <IDisplayEnhancementOverrideCapabilitiesChangedEventArgs as ::windows::core::ComInterface>::IID;
1276 }
1277 impl ::windows::core::RuntimeName for DisplayEnhancementOverrideCapabilitiesChangedEventArgs {
1278 const NAME: &'static str = "Windows.Graphics.Display.DisplayEnhancementOverrideCapabilitiesChangedEventArgs";
1279 }
1280 ::windows::imp::interface_hierarchy!(DisplayEnhancementOverrideCapabilitiesChangedEventArgs, ::windows::core::IUnknown, ::windows::core::IInspectable);
1281 unsafe impl ::core::marker::Send for DisplayEnhancementOverrideCapabilitiesChangedEventArgs {}
1282 unsafe impl ::core::marker::Sync for DisplayEnhancementOverrideCapabilitiesChangedEventArgs {}
1283 #[doc = "*Required features: `\"Graphics_Display\"`*"]
1284 #[repr(transparent)]
1285 pub struct DisplayInformation(::windows::core::IUnknown);
1286 impl DisplayInformation {
1287 pub fn CurrentOrientation(&self) -> ::windows::core::Result<DisplayOrientations> {
1288 let this = self;
1289 unsafe {
1290 let mut result__ = ::windows::core::zeroed::<DisplayOrientations>();
1291 (::windows::core::Interface::vtable(this).CurrentOrientation)(::windows::core::Interface::as_raw(this), &mut result__).from_abi(result__)
1292 }
1293 }
1294 pub fn NativeOrientation(&self) -> ::windows::core::Result<DisplayOrientations> {
1295 let this = self;
1296 unsafe {
1297 let mut result__ = ::windows::core::zeroed::<DisplayOrientations>();
1298 (::windows::core::Interface::vtable(this).NativeOrientation)(::windows::core::Interface::as_raw(this), &mut result__).from_abi(result__)
1299 }
1300 }
1301 #[doc = "*Required features: `\"Foundation\"`*"]
1302 #[cfg(feature = "Foundation")]
1303 pub fn OrientationChanged(&self, handler: &super::super::Foundation::TypedEventHandler<DisplayInformation, ::windows::core::IInspectable>) -> ::windows::core::Result<super::super::Foundation::EventRegistrationToken> {
1304 let this = self;
1305 unsafe {
1306 let mut result__ = ::windows::core::zeroed::<super::super::Foundation::EventRegistrationToken>();
1307 (::windows::core::Interface::vtable(this).OrientationChanged)(::windows::core::Interface::as_raw(this), ::core::mem::transmute_copy(handler), &mut result__).from_abi(result__)
1308 }
1309 }
1310 #[doc = "*Required features: `\"Foundation\"`*"]
1311 #[cfg(feature = "Foundation")]
1312 pub fn RemoveOrientationChanged(&self, token: super::super::Foundation::EventRegistrationToken) -> ::windows::core::Result<()> {
1313 let this = self;
1314 unsafe { (::windows::core::Interface::vtable(this).RemoveOrientationChanged)(::windows::core::Interface::as_raw(this), token).ok() }
1315 }
1316 pub fn ResolutionScale(&self) -> ::windows::core::Result<ResolutionScale> {
1317 let this = self;
1318 unsafe {
1319 let mut result__ = ::windows::core::zeroed::<ResolutionScale>();
1320 (::windows::core::Interface::vtable(this).ResolutionScale)(::windows::core::Interface::as_raw(this), &mut result__).from_abi(result__)
1321 }
1322 }
1323 pub fn LogicalDpi(&self) -> ::windows::core::Result<f32> {
1324 let this = self;
1325 unsafe {
1326 let mut result__ = ::windows::core::zeroed::<f32>();
1327 (::windows::core::Interface::vtable(this).LogicalDpi)(::windows::core::Interface::as_raw(this), &mut result__).from_abi(result__)
1328 }
1329 }
1330 pub fn RawDpiX(&self) -> ::windows::core::Result<f32> {
1331 let this = self;
1332 unsafe {
1333 let mut result__ = ::windows::core::zeroed::<f32>();
1334 (::windows::core::Interface::vtable(this).RawDpiX)(::windows::core::Interface::as_raw(this), &mut result__).from_abi(result__)
1335 }
1336 }
1337 pub fn RawDpiY(&self) -> ::windows::core::Result<f32> {
1338 let this = self;
1339 unsafe {
1340 let mut result__ = ::windows::core::zeroed::<f32>();
1341 (::windows::core::Interface::vtable(this).RawDpiY)(::windows::core::Interface::as_raw(this), &mut result__).from_abi(result__)
1342 }
1343 }
1344 #[doc = "*Required features: `\"Foundation\"`*"]
1345 #[cfg(feature = "Foundation")]
1346 pub fn DpiChanged(&self, handler: &super::super::Foundation::TypedEventHandler<DisplayInformation, ::windows::core::IInspectable>) -> ::windows::core::Result<super::super::Foundation::EventRegistrationToken> {
1347 let this = self;
1348 unsafe {
1349 let mut result__ = ::windows::core::zeroed::<super::super::Foundation::EventRegistrationToken>();
1350 (::windows::core::Interface::vtable(this).DpiChanged)(::windows::core::Interface::as_raw(this), ::core::mem::transmute_copy(handler), &mut result__).from_abi(result__)
1351 }
1352 }
1353 #[doc = "*Required features: `\"Foundation\"`*"]
1354 #[cfg(feature = "Foundation")]
1355 pub fn RemoveDpiChanged(&self, token: super::super::Foundation::EventRegistrationToken) -> ::windows::core::Result<()> {
1356 let this = self;
1357 unsafe { (::windows::core::Interface::vtable(this).RemoveDpiChanged)(::windows::core::Interface::as_raw(this), token).ok() }
1358 }
1359 pub fn StereoEnabled(&self) -> ::windows::core::Result<bool> {
1360 let this = self;
1361 unsafe {
1362 let mut result__ = ::windows::core::zeroed::<bool>();
1363 (::windows::core::Interface::vtable(this).StereoEnabled)(::windows::core::Interface::as_raw(this), &mut result__).from_abi(result__)
1364 }
1365 }
1366 #[doc = "*Required features: `\"Foundation\"`*"]
1367 #[cfg(feature = "Foundation")]
1368 pub fn StereoEnabledChanged(&self, handler: &super::super::Foundation::TypedEventHandler<DisplayInformation, ::windows::core::IInspectable>) -> ::windows::core::Result<super::super::Foundation::EventRegistrationToken> {
1369 let this = self;
1370 unsafe {
1371 let mut result__ = ::windows::core::zeroed::<super::super::Foundation::EventRegistrationToken>();
1372 (::windows::core::Interface::vtable(this).StereoEnabledChanged)(::windows::core::Interface::as_raw(this), ::core::mem::transmute_copy(handler), &mut result__).from_abi(result__)
1373 }
1374 }
1375 #[doc = "*Required features: `\"Foundation\"`*"]
1376 #[cfg(feature = "Foundation")]
1377 pub fn RemoveStereoEnabledChanged(&self, token: super::super::Foundation::EventRegistrationToken) -> ::windows::core::Result<()> {
1378 let this = self;
1379 unsafe { (::windows::core::Interface::vtable(this).RemoveStereoEnabledChanged)(::windows::core::Interface::as_raw(this), token).ok() }
1380 }
1381 #[doc = "*Required features: `\"Foundation\"`, `\"Storage_Streams\"`*"]
1382 #[cfg(all(feature = "Foundation", feature = "Storage_Streams"))]
1383 pub fn GetColorProfileAsync(&self) -> ::windows::core::Result<super::super::Foundation::IAsyncOperation<super::super::Storage::Streams::IRandomAccessStream>> {
1384 let this = self;
1385 unsafe {
1386 let mut result__ = ::windows::core::zeroed::<super::super::Foundation::IAsyncOperation<super::super::Storage::Streams::IRandomAccessStream>>();
1387 (::windows::core::Interface::vtable(this).GetColorProfileAsync)(::windows::core::Interface::as_raw(this), &mut result__).from_abi(result__)
1388 }
1389 }
1390 #[doc = "*Required features: `\"Foundation\"`*"]
1391 #[cfg(feature = "Foundation")]
1392 pub fn ColorProfileChanged(&self, handler: &super::super::Foundation::TypedEventHandler<DisplayInformation, ::windows::core::IInspectable>) -> ::windows::core::Result<super::super::Foundation::EventRegistrationToken> {
1393 let this = self;
1394 unsafe {
1395 let mut result__ = ::windows::core::zeroed::<super::super::Foundation::EventRegistrationToken>();
1396 (::windows::core::Interface::vtable(this).ColorProfileChanged)(::windows::core::Interface::as_raw(this), ::core::mem::transmute_copy(handler), &mut result__).from_abi(result__)
1397 }
1398 }
1399 #[doc = "*Required features: `\"Foundation\"`*"]
1400 #[cfg(feature = "Foundation")]
1401 pub fn RemoveColorProfileChanged(&self, token: super::super::Foundation::EventRegistrationToken) -> ::windows::core::Result<()> {
1402 let this = self;
1403 unsafe { (::windows::core::Interface::vtable(this).RemoveColorProfileChanged)(::windows::core::Interface::as_raw(this), token).ok() }
1404 }
1405 pub fn RawPixelsPerViewPixel(&self) -> ::windows::core::Result<f64> {
1406 let this = &::windows::core::ComInterface::cast::<IDisplayInformation2>(self)?;
1407 unsafe {
1408 let mut result__ = ::windows::core::zeroed::<f64>();
1409 (::windows::core::Interface::vtable(this).RawPixelsPerViewPixel)(::windows::core::Interface::as_raw(this), &mut result__).from_abi(result__)
1410 }
1411 }
1412 #[doc = "*Required features: `\"Foundation\"`*"]
1413 #[cfg(feature = "Foundation")]
1414 pub fn DiagonalSizeInInches(&self) -> ::windows::core::Result<super::super::Foundation::IReference<f64>> {
1415 let this = &::windows::core::ComInterface::cast::<IDisplayInformation3>(self)?;
1416 unsafe {
1417 let mut result__ = ::windows::core::zeroed::<super::super::Foundation::IReference<f64>>();
1418 (::windows::core::Interface::vtable(this).DiagonalSizeInInches)(::windows::core::Interface::as_raw(this), &mut result__).from_abi(result__)
1419 }
1420 }
1421 pub fn ScreenWidthInRawPixels(&self) -> ::windows::core::Result<u32> {
1422 let this = &::windows::core::ComInterface::cast::<IDisplayInformation4>(self)?;
1423 unsafe {
1424 let mut result__ = ::windows::core::zeroed::<u32>();
1425 (::windows::core::Interface::vtable(this).ScreenWidthInRawPixels)(::windows::core::Interface::as_raw(this), &mut result__).from_abi(result__)
1426 }
1427 }
1428 pub fn ScreenHeightInRawPixels(&self) -> ::windows::core::Result<u32> {
1429 let this = &::windows::core::ComInterface::cast::<IDisplayInformation4>(self)?;
1430 unsafe {
1431 let mut result__ = ::windows::core::zeroed::<u32>();
1432 (::windows::core::Interface::vtable(this).ScreenHeightInRawPixels)(::windows::core::Interface::as_raw(this), &mut result__).from_abi(result__)
1433 }
1434 }
1435 pub fn GetAdvancedColorInfo(&self) -> ::windows::core::Result<AdvancedColorInfo> {
1436 let this = &::windows::core::ComInterface::cast::<IDisplayInformation5>(self)?;
1437 unsafe {
1438 let mut result__ = ::windows::core::zeroed::<AdvancedColorInfo>();
1439 (::windows::core::Interface::vtable(this).GetAdvancedColorInfo)(::windows::core::Interface::as_raw(this), &mut result__).from_abi(result__)
1440 }
1441 }
1442 #[doc = "*Required features: `\"Foundation\"`*"]
1443 #[cfg(feature = "Foundation")]
1444 pub fn AdvancedColorInfoChanged(&self, handler: &super::super::Foundation::TypedEventHandler<DisplayInformation, ::windows::core::IInspectable>) -> ::windows::core::Result<super::super::Foundation::EventRegistrationToken> {
1445 let this = &::windows::core::ComInterface::cast::<IDisplayInformation5>(self)?;
1446 unsafe {
1447 let mut result__ = ::windows::core::zeroed::<super::super::Foundation::EventRegistrationToken>();
1448 (::windows::core::Interface::vtable(this).AdvancedColorInfoChanged)(::windows::core::Interface::as_raw(this), ::core::mem::transmute_copy(handler), &mut result__).from_abi(result__)
1449 }
1450 }
1451 #[doc = "*Required features: `\"Foundation\"`*"]
1452 #[cfg(feature = "Foundation")]
1453 pub fn RemoveAdvancedColorInfoChanged(&self, token: super::super::Foundation::EventRegistrationToken) -> ::windows::core::Result<()> {
1454 let this = &::windows::core::ComInterface::cast::<IDisplayInformation5>(self)?;
1455 unsafe { (::windows::core::Interface::vtable(this).RemoveAdvancedColorInfoChanged)(::windows::core::Interface::as_raw(this), token).ok() }
1456 }
1457 pub fn GetForCurrentView() -> ::windows::core::Result<DisplayInformation> {
1458 Self::IDisplayInformationStatics(|this| unsafe {
1459 let mut result__ = ::windows::core::zeroed::<DisplayInformation>();
1460 (::windows::core::Interface::vtable(this).GetForCurrentView)(::windows::core::Interface::as_raw(this), &mut result__).from_abi(result__)
1461 })
1462 }
1463 pub fn AutoRotationPreferences() -> ::windows::core::Result<DisplayOrientations> {
1464 Self::IDisplayInformationStatics(|this| unsafe {
1465 let mut result__ = ::windows::core::zeroed::<DisplayOrientations>();
1466 (::windows::core::Interface::vtable(this).AutoRotationPreferences)(::windows::core::Interface::as_raw(this), &mut result__).from_abi(result__)
1467 })
1468 }
1469 pub fn SetAutoRotationPreferences(value: DisplayOrientations) -> ::windows::core::Result<()> {
1470 Self::IDisplayInformationStatics(|this| unsafe { (::windows::core::Interface::vtable(this).SetAutoRotationPreferences)(::windows::core::Interface::as_raw(this), value).ok() })
1471 }
1472 #[doc = "*Required features: `\"Foundation\"`*"]
1473 #[cfg(feature = "Foundation")]
1474 pub fn DisplayContentsInvalidated(handler: &super::super::Foundation::TypedEventHandler<DisplayInformation, ::windows::core::IInspectable>) -> ::windows::core::Result<super::super::Foundation::EventRegistrationToken> {
1475 Self::IDisplayInformationStatics(|this| unsafe {
1476 let mut result__ = ::windows::core::zeroed::<super::super::Foundation::EventRegistrationToken>();
1477 (::windows::core::Interface::vtable(this).DisplayContentsInvalidated)(::windows::core::Interface::as_raw(this), ::core::mem::transmute_copy(handler), &mut result__).from_abi(result__)
1478 })
1479 }
1480 #[doc = "*Required features: `\"Foundation\"`*"]
1481 #[cfg(feature = "Foundation")]
1482 pub fn RemoveDisplayContentsInvalidated(token: super::super::Foundation::EventRegistrationToken) -> ::windows::core::Result<()> {
1483 Self::IDisplayInformationStatics(|this| unsafe { (::windows::core::Interface::vtable(this).RemoveDisplayContentsInvalidated)(::windows::core::Interface::as_raw(this), token).ok() })
1484 }
1485 #[doc(hidden)]
1486 pub fn IDisplayInformationStatics<R, F: FnOnce(&IDisplayInformationStatics) -> ::windows::core::Result<R>>(callback: F) -> ::windows::core::Result<R> {
1487 static SHARED: ::windows::imp::FactoryCache<DisplayInformation, IDisplayInformationStatics> = ::windows::imp::FactoryCache::new();
1488 SHARED.call(callback)
1489 }
1490 }
1491 impl ::core::cmp::PartialEq for DisplayInformation {
1492 fn eq(&self, other: &Self) -> bool {
1493 self.0 == other.0
1494 }
1495 }
1496 impl ::core::cmp::Eq for DisplayInformation {}
1497 impl ::core::fmt::Debug for DisplayInformation {
1498 fn fmt(&self, f: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result {
1499 f.debug_tuple("DisplayInformation").field(&self.0).finish()
1500 }
1501 }
1502 impl ::windows::core::RuntimeType for DisplayInformation {
1503 const SIGNATURE: ::windows::imp::ConstBuffer = ::windows::imp::ConstBuffer::from_slice(b"rc(Windows.Graphics.Display.DisplayInformation;{bed112ae-adc3-4dc9-ae65-851f4d7d4799})");
1504 }
1505 impl ::core::clone::Clone for DisplayInformation {
1506 fn clone(&self) -> Self {
1507 Self(self.0.clone())
1508 }
1509 }
1510 unsafe impl ::windows::core::Interface for DisplayInformation {
1511 type Vtable = IDisplayInformation_Vtbl;
1512 }
1513 unsafe impl ::windows::core::ComInterface for DisplayInformation {
1514 const IID: ::windows::core::GUID = <IDisplayInformation as ::windows::core::ComInterface>::IID;
1515 }
1516 impl ::windows::core::RuntimeName for DisplayInformation {
1517 const NAME: &'static str = "Windows.Graphics.Display.DisplayInformation";
1518 }
1519 ::windows::imp::interface_hierarchy!(DisplayInformation, ::windows::core::IUnknown, ::windows::core::IInspectable);
1520 unsafe impl ::core::marker::Send for DisplayInformation {}
1521 unsafe impl ::core::marker::Sync for DisplayInformation {}
1522 #[doc = "*Required features: `\"Graphics_Display\"`, `\"deprecated\"`*"]
1523 #[cfg(feature = "deprecated")]
1524 pub struct DisplayProperties;
1525 #[cfg(feature = "deprecated")]
1526 impl DisplayProperties {
1527 #[doc = "*Required features: `\"deprecated\"`*"]
1528 #[cfg(feature = "deprecated")]
1529 pub fn CurrentOrientation() -> ::windows::core::Result<DisplayOrientations> {
1530 Self::IDisplayPropertiesStatics(|this| unsafe {
1531 let mut result__ = ::windows::core::zeroed::<DisplayOrientations>();
1532 (::windows::core::Interface::vtable(this).CurrentOrientation)(::windows::core::Interface::as_raw(this), &mut result__).from_abi(result__)
1533 })
1534 }
1535 #[doc = "*Required features: `\"deprecated\"`*"]
1536 #[cfg(feature = "deprecated")]
1537 pub fn NativeOrientation() -> ::windows::core::Result<DisplayOrientations> {
1538 Self::IDisplayPropertiesStatics(|this| unsafe {
1539 let mut result__ = ::windows::core::zeroed::<DisplayOrientations>();
1540 (::windows::core::Interface::vtable(this).NativeOrientation)(::windows::core::Interface::as_raw(this), &mut result__).from_abi(result__)
1541 })
1542 }
1543 #[doc = "*Required features: `\"deprecated\"`*"]
1544 #[cfg(feature = "deprecated")]
1545 pub fn AutoRotationPreferences() -> ::windows::core::Result<DisplayOrientations> {
1546 Self::IDisplayPropertiesStatics(|this| unsafe {
1547 let mut result__ = ::windows::core::zeroed::<DisplayOrientations>();
1548 (::windows::core::Interface::vtable(this).AutoRotationPreferences)(::windows::core::Interface::as_raw(this), &mut result__).from_abi(result__)
1549 })
1550 }
1551 #[doc = "*Required features: `\"deprecated\"`*"]
1552 #[cfg(feature = "deprecated")]
1553 pub fn SetAutoRotationPreferences(value: DisplayOrientations) -> ::windows::core::Result<()> {
1554 Self::IDisplayPropertiesStatics(|this| unsafe { (::windows::core::Interface::vtable(this).SetAutoRotationPreferences)(::windows::core::Interface::as_raw(this), value).ok() })
1555 }
1556 #[doc = "*Required features: `\"Foundation\"`, `\"deprecated\"`*"]
1557 #[cfg(all(feature = "Foundation", feature = "deprecated"))]
1558 pub fn OrientationChanged(handler: &DisplayPropertiesEventHandler) -> ::windows::core::Result<super::super::Foundation::EventRegistrationToken> {
1559 Self::IDisplayPropertiesStatics(|this| unsafe {
1560 let mut result__ = ::windows::core::zeroed::<super::super::Foundation::EventRegistrationToken>();
1561 (::windows::core::Interface::vtable(this).OrientationChanged)(::windows::core::Interface::as_raw(this), ::core::mem::transmute_copy(handler), &mut result__).from_abi(result__)
1562 })
1563 }
1564 #[doc = "*Required features: `\"Foundation\"`, `\"deprecated\"`*"]
1565 #[cfg(all(feature = "Foundation", feature = "deprecated"))]
1566 pub fn RemoveOrientationChanged(token: super::super::Foundation::EventRegistrationToken) -> ::windows::core::Result<()> {
1567 Self::IDisplayPropertiesStatics(|this| unsafe { (::windows::core::Interface::vtable(this).RemoveOrientationChanged)(::windows::core::Interface::as_raw(this), token).ok() })
1568 }
1569 #[doc = "*Required features: `\"deprecated\"`*"]
1570 #[cfg(feature = "deprecated")]
1571 pub fn ResolutionScale() -> ::windows::core::Result<ResolutionScale> {
1572 Self::IDisplayPropertiesStatics(|this| unsafe {
1573 let mut result__ = ::windows::core::zeroed::<ResolutionScale>();
1574 (::windows::core::Interface::vtable(this).ResolutionScale)(::windows::core::Interface::as_raw(this), &mut result__).from_abi(result__)
1575 })
1576 }
1577 #[doc = "*Required features: `\"deprecated\"`*"]
1578 #[cfg(feature = "deprecated")]
1579 pub fn LogicalDpi() -> ::windows::core::Result<f32> {
1580 Self::IDisplayPropertiesStatics(|this| unsafe {
1581 let mut result__ = ::windows::core::zeroed::<f32>();
1582 (::windows::core::Interface::vtable(this).LogicalDpi)(::windows::core::Interface::as_raw(this), &mut result__).from_abi(result__)
1583 })
1584 }
1585 #[doc = "*Required features: `\"Foundation\"`, `\"deprecated\"`*"]
1586 #[cfg(all(feature = "Foundation", feature = "deprecated"))]
1587 pub fn LogicalDpiChanged(handler: &DisplayPropertiesEventHandler) -> ::windows::core::Result<super::super::Foundation::EventRegistrationToken> {
1588 Self::IDisplayPropertiesStatics(|this| unsafe {
1589 let mut result__ = ::windows::core::zeroed::<super::super::Foundation::EventRegistrationToken>();
1590 (::windows::core::Interface::vtable(this).LogicalDpiChanged)(::windows::core::Interface::as_raw(this), ::core::mem::transmute_copy(handler), &mut result__).from_abi(result__)
1591 })
1592 }
1593 #[doc = "*Required features: `\"Foundation\"`, `\"deprecated\"`*"]
1594 #[cfg(all(feature = "Foundation", feature = "deprecated"))]
1595 pub fn RemoveLogicalDpiChanged(token: super::super::Foundation::EventRegistrationToken) -> ::windows::core::Result<()> {
1596 Self::IDisplayPropertiesStatics(|this| unsafe { (::windows::core::Interface::vtable(this).RemoveLogicalDpiChanged)(::windows::core::Interface::as_raw(this), token).ok() })
1597 }
1598 #[doc = "*Required features: `\"deprecated\"`*"]
1599 #[cfg(feature = "deprecated")]
1600 pub fn StereoEnabled() -> ::windows::core::Result<bool> {
1601 Self::IDisplayPropertiesStatics(|this| unsafe {
1602 let mut result__ = ::windows::core::zeroed::<bool>();
1603 (::windows::core::Interface::vtable(this).StereoEnabled)(::windows::core::Interface::as_raw(this), &mut result__).from_abi(result__)
1604 })
1605 }
1606 #[doc = "*Required features: `\"Foundation\"`, `\"deprecated\"`*"]
1607 #[cfg(all(feature = "Foundation", feature = "deprecated"))]
1608 pub fn StereoEnabledChanged(handler: &DisplayPropertiesEventHandler) -> ::windows::core::Result<super::super::Foundation::EventRegistrationToken> {
1609 Self::IDisplayPropertiesStatics(|this| unsafe {
1610 let mut result__ = ::windows::core::zeroed::<super::super::Foundation::EventRegistrationToken>();
1611 (::windows::core::Interface::vtable(this).StereoEnabledChanged)(::windows::core::Interface::as_raw(this), ::core::mem::transmute_copy(handler), &mut result__).from_abi(result__)
1612 })
1613 }
1614 #[doc = "*Required features: `\"Foundation\"`, `\"deprecated\"`*"]
1615 #[cfg(all(feature = "Foundation", feature = "deprecated"))]
1616 pub fn RemoveStereoEnabledChanged(token: super::super::Foundation::EventRegistrationToken) -> ::windows::core::Result<()> {
1617 Self::IDisplayPropertiesStatics(|this| unsafe { (::windows::core::Interface::vtable(this).RemoveStereoEnabledChanged)(::windows::core::Interface::as_raw(this), token).ok() })
1618 }
1619 #[doc = "*Required features: `\"Foundation\"`, `\"Storage_Streams\"`, `\"deprecated\"`*"]
1620 #[cfg(all(feature = "Foundation", feature = "Storage_Streams", feature = "deprecated"))]
1621 pub fn GetColorProfileAsync() -> ::windows::core::Result<super::super::Foundation::IAsyncOperation<super::super::Storage::Streams::IRandomAccessStream>> {
1622 Self::IDisplayPropertiesStatics(|this| unsafe {
1623 let mut result__ = ::windows::core::zeroed::<super::super::Foundation::IAsyncOperation<super::super::Storage::Streams::IRandomAccessStream>>();
1624 (::windows::core::Interface::vtable(this).GetColorProfileAsync)(::windows::core::Interface::as_raw(this), &mut result__).from_abi(result__)
1625 })
1626 }
1627 #[doc = "*Required features: `\"Foundation\"`, `\"deprecated\"`*"]
1628 #[cfg(all(feature = "Foundation", feature = "deprecated"))]
1629 pub fn ColorProfileChanged(handler: &DisplayPropertiesEventHandler) -> ::windows::core::Result<super::super::Foundation::EventRegistrationToken> {
1630 Self::IDisplayPropertiesStatics(|this| unsafe {
1631 let mut result__ = ::windows::core::zeroed::<super::super::Foundation::EventRegistrationToken>();
1632 (::windows::core::Interface::vtable(this).ColorProfileChanged)(::windows::core::Interface::as_raw(this), ::core::mem::transmute_copy(handler), &mut result__).from_abi(result__)
1633 })
1634 }
1635 #[doc = "*Required features: `\"Foundation\"`, `\"deprecated\"`*"]
1636 #[cfg(all(feature = "Foundation", feature = "deprecated"))]
1637 pub fn RemoveColorProfileChanged(token: super::super::Foundation::EventRegistrationToken) -> ::windows::core::Result<()> {
1638 Self::IDisplayPropertiesStatics(|this| unsafe { (::windows::core::Interface::vtable(this).RemoveColorProfileChanged)(::windows::core::Interface::as_raw(this), token).ok() })
1639 }
1640 #[doc = "*Required features: `\"Foundation\"`, `\"deprecated\"`*"]
1641 #[cfg(all(feature = "Foundation", feature = "deprecated"))]
1642 pub fn DisplayContentsInvalidated(handler: &DisplayPropertiesEventHandler) -> ::windows::core::Result<super::super::Foundation::EventRegistrationToken> {
1643 Self::IDisplayPropertiesStatics(|this| unsafe {
1644 let mut result__ = ::windows::core::zeroed::<super::super::Foundation::EventRegistrationToken>();
1645 (::windows::core::Interface::vtable(this).DisplayContentsInvalidated)(::windows::core::Interface::as_raw(this), ::core::mem::transmute_copy(handler), &mut result__).from_abi(result__)
1646 })
1647 }
1648 #[doc = "*Required features: `\"Foundation\"`, `\"deprecated\"`*"]
1649 #[cfg(all(feature = "Foundation", feature = "deprecated"))]
1650 pub fn RemoveDisplayContentsInvalidated(token: super::super::Foundation::EventRegistrationToken) -> ::windows::core::Result<()> {
1651 Self::IDisplayPropertiesStatics(|this| unsafe { (::windows::core::Interface::vtable(this).RemoveDisplayContentsInvalidated)(::windows::core::Interface::as_raw(this), token).ok() })
1652 }
1653 #[doc(hidden)]
1654 #[cfg(feature = "deprecated")]
1655 pub fn IDisplayPropertiesStatics<R, F: FnOnce(&IDisplayPropertiesStatics) -> ::windows::core::Result<R>>(callback: F) -> ::windows::core::Result<R> {
1656 static SHARED: ::windows::imp::FactoryCache<DisplayProperties, IDisplayPropertiesStatics> = ::windows::imp::FactoryCache::new();
1657 SHARED.call(callback)
1658 }
1659 }
1660 #[cfg(feature = "deprecated")]
1661 impl ::windows::core::RuntimeName for DisplayProperties {
1662 const NAME: &'static str = "Windows.Graphics.Display.DisplayProperties";
1663 }
1664 #[doc = "*Required features: `\"Graphics_Display\"`*"]
1665 #[repr(transparent)]
1666 pub struct DisplayServices(::windows::core::IUnknown);
1667 impl DisplayServices {
1668 pub fn FindAll() -> ::windows::core::Result<::windows::core::Array<super::DisplayId>> {
1669 Self::IDisplayServicesStatics(|this| unsafe {
1670 let mut result__ = ::core::mem::MaybeUninit::zeroed();
1671 (::windows::core::Interface::vtable(this).FindAll)(::windows::core::Interface::as_raw(this), ::windows::core::Array::<super::DisplayId>::set_abi_len(::std::mem::transmute(&mut result__)), result__.as_mut_ptr() as *mut _ as _).and_then(|| result__.assume_init())
1672 })
1673 }
1674 #[doc(hidden)]
1675 pub fn IDisplayServicesStatics<R, F: FnOnce(&IDisplayServicesStatics) -> ::windows::core::Result<R>>(callback: F) -> ::windows::core::Result<R> {
1676 static SHARED: ::windows::imp::FactoryCache<DisplayServices, IDisplayServicesStatics> = ::windows::imp::FactoryCache::new();
1677 SHARED.call(callback)
1678 }
1679 }
1680 impl ::core::cmp::PartialEq for DisplayServices {
1681 fn eq(&self, other: &Self) -> bool {
1682 self.0 == other.0
1683 }
1684 }
1685 impl ::core::cmp::Eq for DisplayServices {}
1686 impl ::core::fmt::Debug for DisplayServices {
1687 fn fmt(&self, f: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result {
1688 f.debug_tuple("DisplayServices").field(&self.0).finish()
1689 }
1690 }
1691 impl ::windows::core::RuntimeType for DisplayServices {
1692 const SIGNATURE: ::windows::imp::ConstBuffer = ::windows::imp::ConstBuffer::from_slice(b"rc(Windows.Graphics.Display.DisplayServices;{1b54f32b-890d-5747-bd26-fdbdeb0c8a71})");
1693 }
1694 impl ::core::clone::Clone for DisplayServices {
1695 fn clone(&self) -> Self {
1696 Self(self.0.clone())
1697 }
1698 }
1699 unsafe impl ::windows::core::Interface for DisplayServices {
1700 type Vtable = IDisplayServices_Vtbl;
1701 }
1702 unsafe impl ::windows::core::ComInterface for DisplayServices {
1703 const IID: ::windows::core::GUID = <IDisplayServices as ::windows::core::ComInterface>::IID;
1704 }
1705 impl ::windows::core::RuntimeName for DisplayServices {
1706 const NAME: &'static str = "Windows.Graphics.Display.DisplayServices";
1707 }
1708 ::windows::imp::interface_hierarchy!(DisplayServices, ::windows::core::IUnknown, ::windows::core::IInspectable);
1709 unsafe impl ::core::marker::Send for DisplayServices {}
1710 unsafe impl ::core::marker::Sync for DisplayServices {}
1711 #[doc = "*Required features: `\"Graphics_Display\"`*"]
1712 #[repr(transparent)]
1713 #[derive(::core::cmp::PartialEq, ::core::cmp::Eq)]
1714 pub struct AdvancedColorKind(pub i32);
1715 impl AdvancedColorKind {
1716 pub const StandardDynamicRange: Self = Self(0i32);
1717 pub const WideColorGamut: Self = Self(1i32);
1718 pub const HighDynamicRange: Self = Self(2i32);
1719 }
1720 impl ::core::marker::Copy for AdvancedColorKind {}
1721 impl ::core::clone::Clone for AdvancedColorKind {
1722 fn clone(&self) -> Self {
1723 *self
1724 }
1725 }
1726 impl ::core::default::Default for AdvancedColorKind {
1727 fn default() -> Self {
1728 Self(0)
1729 }
1730 }
1731 impl ::windows::core::TypeKind for AdvancedColorKind {
1732 type TypeKind = ::windows::core::CopyType;
1733 }
1734 impl ::core::fmt::Debug for AdvancedColorKind {
1735 fn fmt(&self, f: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result {
1736 f.debug_tuple("AdvancedColorKind").field(&self.0).finish()
1737 }
1738 }
1739 impl ::windows::core::RuntimeType for AdvancedColorKind {
1740 const SIGNATURE: ::windows::imp::ConstBuffer = ::windows::imp::ConstBuffer::from_slice(b"enum(Windows.Graphics.Display.AdvancedColorKind;i4)");
1741 }
1742 #[doc = "*Required features: `\"Graphics_Display\"`*"]
1743 #[repr(transparent)]
1744 #[derive(::core::cmp::PartialEq, ::core::cmp::Eq)]
1745 pub struct DisplayBrightnessOverrideOptions(pub u32);
1746 impl DisplayBrightnessOverrideOptions {
1747 pub const None: Self = Self(0u32);
1748 pub const UseDimmedPolicyWhenBatteryIsLow: Self = Self(1u32);
1749 }
1750 impl ::core::marker::Copy for DisplayBrightnessOverrideOptions {}
1751 impl ::core::clone::Clone for DisplayBrightnessOverrideOptions {
1752 fn clone(&self) -> Self {
1753 *self
1754 }
1755 }
1756 impl ::core::default::Default for DisplayBrightnessOverrideOptions {
1757 fn default() -> Self {
1758 Self(0)
1759 }
1760 }
1761 impl ::windows::core::TypeKind for DisplayBrightnessOverrideOptions {
1762 type TypeKind = ::windows::core::CopyType;
1763 }
1764 impl ::core::fmt::Debug for DisplayBrightnessOverrideOptions {
1765 fn fmt(&self, f: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result {
1766 f.debug_tuple("DisplayBrightnessOverrideOptions").field(&self.0).finish()
1767 }
1768 }
1769 impl DisplayBrightnessOverrideOptions {
1770 pub const fn contains(&self, other: Self) -> bool {
1771 self.0 & other.0 == other.0
1772 }
1773 }
1774 impl ::core::ops::BitOr for DisplayBrightnessOverrideOptions {
1775 type Output = Self;
1776 fn bitor(self, other: Self) -> Self {
1777 Self(self.0 | other.0)
1778 }
1779 }
1780 impl ::core::ops::BitAnd for DisplayBrightnessOverrideOptions {
1781 type Output = Self;
1782 fn bitand(self, other: Self) -> Self {
1783 Self(self.0 & other.0)
1784 }
1785 }
1786 impl ::core::ops::BitOrAssign for DisplayBrightnessOverrideOptions {
1787 fn bitor_assign(&mut self, other: Self) {
1788 self.0.bitor_assign(other.0)
1789 }
1790 }
1791 impl ::core::ops::BitAndAssign for DisplayBrightnessOverrideOptions {
1792 fn bitand_assign(&mut self, other: Self) {
1793 self.0.bitand_assign(other.0)
1794 }
1795 }
1796 impl ::core::ops::Not for DisplayBrightnessOverrideOptions {
1797 type Output = Self;
1798 fn not(self) -> Self {
1799 Self(self.0.not())
1800 }
1801 }
1802 impl ::windows::core::RuntimeType for DisplayBrightnessOverrideOptions {
1803 const SIGNATURE: ::windows::imp::ConstBuffer = ::windows::imp::ConstBuffer::from_slice(b"enum(Windows.Graphics.Display.DisplayBrightnessOverrideOptions;u4)");
1804 }
1805 #[doc = "*Required features: `\"Graphics_Display\"`*"]
1806 #[repr(transparent)]
1807 #[derive(::core::cmp::PartialEq, ::core::cmp::Eq)]
1808 pub struct DisplayBrightnessOverrideScenario(pub i32);
1809 impl DisplayBrightnessOverrideScenario {
1810 pub const IdleBrightness: Self = Self(0i32);
1811 pub const BarcodeReadingBrightness: Self = Self(1i32);
1812 pub const FullBrightness: Self = Self(2i32);
1813 }
1814 impl ::core::marker::Copy for DisplayBrightnessOverrideScenario {}
1815 impl ::core::clone::Clone for DisplayBrightnessOverrideScenario {
1816 fn clone(&self) -> Self {
1817 *self
1818 }
1819 }
1820 impl ::core::default::Default for DisplayBrightnessOverrideScenario {
1821 fn default() -> Self {
1822 Self(0)
1823 }
1824 }
1825 impl ::windows::core::TypeKind for DisplayBrightnessOverrideScenario {
1826 type TypeKind = ::windows::core::CopyType;
1827 }
1828 impl ::core::fmt::Debug for DisplayBrightnessOverrideScenario {
1829 fn fmt(&self, f: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result {
1830 f.debug_tuple("DisplayBrightnessOverrideScenario").field(&self.0).finish()
1831 }
1832 }
1833 impl ::windows::core::RuntimeType for DisplayBrightnessOverrideScenario {
1834 const SIGNATURE: ::windows::imp::ConstBuffer = ::windows::imp::ConstBuffer::from_slice(b"enum(Windows.Graphics.Display.DisplayBrightnessOverrideScenario;i4)");
1835 }
1836 #[doc = "*Required features: `\"Graphics_Display\"`*"]
1837 #[repr(transparent)]
1838 #[derive(::core::cmp::PartialEq, ::core::cmp::Eq)]
1839 pub struct DisplayBrightnessScenario(pub i32);
1840 impl DisplayBrightnessScenario {
1841 pub const DefaultBrightness: Self = Self(0i32);
1842 pub const IdleBrightness: Self = Self(1i32);
1843 pub const BarcodeReadingBrightness: Self = Self(2i32);
1844 pub const FullBrightness: Self = Self(3i32);
1845 }
1846 impl ::core::marker::Copy for DisplayBrightnessScenario {}
1847 impl ::core::clone::Clone for DisplayBrightnessScenario {
1848 fn clone(&self) -> Self {
1849 *self
1850 }
1851 }
1852 impl ::core::default::Default for DisplayBrightnessScenario {
1853 fn default() -> Self {
1854 Self(0)
1855 }
1856 }
1857 impl ::windows::core::TypeKind for DisplayBrightnessScenario {
1858 type TypeKind = ::windows::core::CopyType;
1859 }
1860 impl ::core::fmt::Debug for DisplayBrightnessScenario {
1861 fn fmt(&self, f: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result {
1862 f.debug_tuple("DisplayBrightnessScenario").field(&self.0).finish()
1863 }
1864 }
1865 impl ::windows::core::RuntimeType for DisplayBrightnessScenario {
1866 const SIGNATURE: ::windows::imp::ConstBuffer = ::windows::imp::ConstBuffer::from_slice(b"enum(Windows.Graphics.Display.DisplayBrightnessScenario;i4)");
1867 }
1868 #[doc = "*Required features: `\"Graphics_Display\"`*"]
1869 #[repr(transparent)]
1870 #[derive(::core::cmp::PartialEq, ::core::cmp::Eq)]
1871 pub struct DisplayColorOverrideScenario(pub i32);
1872 impl DisplayColorOverrideScenario {
1873 pub const Accurate: Self = Self(0i32);
1874 }
1875 impl ::core::marker::Copy for DisplayColorOverrideScenario {}
1876 impl ::core::clone::Clone for DisplayColorOverrideScenario {
1877 fn clone(&self) -> Self {
1878 *self
1879 }
1880 }
1881 impl ::core::default::Default for DisplayColorOverrideScenario {
1882 fn default() -> Self {
1883 Self(0)
1884 }
1885 }
1886 impl ::windows::core::TypeKind for DisplayColorOverrideScenario {
1887 type TypeKind = ::windows::core::CopyType;
1888 }
1889 impl ::core::fmt::Debug for DisplayColorOverrideScenario {
1890 fn fmt(&self, f: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result {
1891 f.debug_tuple("DisplayColorOverrideScenario").field(&self.0).finish()
1892 }
1893 }
1894 impl ::windows::core::RuntimeType for DisplayColorOverrideScenario {
1895 const SIGNATURE: ::windows::imp::ConstBuffer = ::windows::imp::ConstBuffer::from_slice(b"enum(Windows.Graphics.Display.DisplayColorOverrideScenario;i4)");
1896 }
1897 #[doc = "*Required features: `\"Graphics_Display\"`*"]
1898 #[repr(transparent)]
1899 #[derive(::core::cmp::PartialEq, ::core::cmp::Eq)]
1900 pub struct DisplayOrientations(pub u32);
1901 impl DisplayOrientations {
1902 pub const None: Self = Self(0u32);
1903 pub const Landscape: Self = Self(1u32);
1904 pub const Portrait: Self = Self(2u32);
1905 pub const LandscapeFlipped: Self = Self(4u32);
1906 pub const PortraitFlipped: Self = Self(8u32);
1907 }
1908 impl ::core::marker::Copy for DisplayOrientations {}
1909 impl ::core::clone::Clone for DisplayOrientations {
1910 fn clone(&self) -> Self {
1911 *self
1912 }
1913 }
1914 impl ::core::default::Default for DisplayOrientations {
1915 fn default() -> Self {
1916 Self(0)
1917 }
1918 }
1919 impl ::windows::core::TypeKind for DisplayOrientations {
1920 type TypeKind = ::windows::core::CopyType;
1921 }
1922 impl ::core::fmt::Debug for DisplayOrientations {
1923 fn fmt(&self, f: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result {
1924 f.debug_tuple("DisplayOrientations").field(&self.0).finish()
1925 }
1926 }
1927 impl DisplayOrientations {
1928 pub const fn contains(&self, other: Self) -> bool {
1929 self.0 & other.0 == other.0
1930 }
1931 }
1932 impl ::core::ops::BitOr for DisplayOrientations {
1933 type Output = Self;
1934 fn bitor(self, other: Self) -> Self {
1935 Self(self.0 | other.0)
1936 }
1937 }
1938 impl ::core::ops::BitAnd for DisplayOrientations {
1939 type Output = Self;
1940 fn bitand(self, other: Self) -> Self {
1941 Self(self.0 & other.0)
1942 }
1943 }
1944 impl ::core::ops::BitOrAssign for DisplayOrientations {
1945 fn bitor_assign(&mut self, other: Self) {
1946 self.0.bitor_assign(other.0)
1947 }
1948 }
1949 impl ::core::ops::BitAndAssign for DisplayOrientations {
1950 fn bitand_assign(&mut self, other: Self) {
1951 self.0.bitand_assign(other.0)
1952 }
1953 }
1954 impl ::core::ops::Not for DisplayOrientations {
1955 type Output = Self;
1956 fn not(self) -> Self {
1957 Self(self.0.not())
1958 }
1959 }
1960 impl ::windows::core::RuntimeType for DisplayOrientations {
1961 const SIGNATURE: ::windows::imp::ConstBuffer = ::windows::imp::ConstBuffer::from_slice(b"enum(Windows.Graphics.Display.DisplayOrientations;u4)");
1962 }
1963 #[doc = "*Required features: `\"Graphics_Display\"`*"]
1964 #[repr(transparent)]
1965 #[derive(::core::cmp::PartialEq, ::core::cmp::Eq)]
1966 pub struct HdrMetadataFormat(pub i32);
1967 impl HdrMetadataFormat {
1968 pub const Hdr10: Self = Self(0i32);
1969 pub const Hdr10Plus: Self = Self(1i32);
1970 }
1971 impl ::core::marker::Copy for HdrMetadataFormat {}
1972 impl ::core::clone::Clone for HdrMetadataFormat {
1973 fn clone(&self) -> Self {
1974 *self
1975 }
1976 }
1977 impl ::core::default::Default for HdrMetadataFormat {
1978 fn default() -> Self {
1979 Self(0)
1980 }
1981 }
1982 impl ::windows::core::TypeKind for HdrMetadataFormat {
1983 type TypeKind = ::windows::core::CopyType;
1984 }
1985 impl ::core::fmt::Debug for HdrMetadataFormat {
1986 fn fmt(&self, f: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result {
1987 f.debug_tuple("HdrMetadataFormat").field(&self.0).finish()
1988 }
1989 }
1990 impl ::windows::core::RuntimeType for HdrMetadataFormat {
1991 const SIGNATURE: ::windows::imp::ConstBuffer = ::windows::imp::ConstBuffer::from_slice(b"enum(Windows.Graphics.Display.HdrMetadataFormat;i4)");
1992 }
1993 #[doc = "*Required features: `\"Graphics_Display\"`*"]
1994 #[repr(transparent)]
1995 #[derive(::core::cmp::PartialEq, ::core::cmp::Eq)]
1996 pub struct ResolutionScale(pub i32);
1997 impl ResolutionScale {
1998 pub const Invalid: Self = Self(0i32);
1999 pub const Scale100Percent: Self = Self(100i32);
2000 pub const Scale120Percent: Self = Self(120i32);
2001 pub const Scale125Percent: Self = Self(125i32);
2002 pub const Scale140Percent: Self = Self(140i32);
2003 pub const Scale150Percent: Self = Self(150i32);
2004 pub const Scale160Percent: Self = Self(160i32);
2005 pub const Scale175Percent: Self = Self(175i32);
2006 pub const Scale180Percent: Self = Self(180i32);
2007 pub const Scale200Percent: Self = Self(200i32);
2008 pub const Scale225Percent: Self = Self(225i32);
2009 pub const Scale250Percent: Self = Self(250i32);
2010 pub const Scale300Percent: Self = Self(300i32);
2011 pub const Scale350Percent: Self = Self(350i32);
2012 pub const Scale400Percent: Self = Self(400i32);
2013 pub const Scale450Percent: Self = Self(450i32);
2014 pub const Scale500Percent: Self = Self(500i32);
2015 }
2016 impl ::core::marker::Copy for ResolutionScale {}
2017 impl ::core::clone::Clone for ResolutionScale {
2018 fn clone(&self) -> Self {
2019 *self
2020 }
2021 }
2022 impl ::core::default::Default for ResolutionScale {
2023 fn default() -> Self {
2024 Self(0)
2025 }
2026 }
2027 impl ::windows::core::TypeKind for ResolutionScale {
2028 type TypeKind = ::windows::core::CopyType;
2029 }
2030 impl ::core::fmt::Debug for ResolutionScale {
2031 fn fmt(&self, f: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result {
2032 f.debug_tuple("ResolutionScale").field(&self.0).finish()
2033 }
2034 }
2035 impl ::windows::core::RuntimeType for ResolutionScale {
2036 const SIGNATURE: ::windows::imp::ConstBuffer = ::windows::imp::ConstBuffer::from_slice(b"enum(Windows.Graphics.Display.ResolutionScale;i4)");
2037 }
2038 #[repr(C)]
2039 #[doc = "*Required features: `\"Graphics_Display\"`*"]
2040 pub struct NitRange {
2041 pub MinNits: f32,
2042 pub MaxNits: f32,
2043 pub StepSizeNits: f32,
2044 }
2045 impl ::core::marker::Copy for NitRange {}
2046 impl ::core::clone::Clone for NitRange {
2047 fn clone(&self) -> Self {
2048 *self
2049 }
2050 }
2051 impl ::core::fmt::Debug for NitRange {
2052 fn fmt(&self, f: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result {
2053 f.debug_struct("NitRange").field("MinNits", &self.MinNits).field("MaxNits", &self.MaxNits).field("StepSizeNits", &self.StepSizeNits).finish()
2054 }
2055 }
2056 impl ::windows::core::TypeKind for NitRange {
2057 type TypeKind = ::windows::core::CopyType;
2058 }
2059 impl ::windows::core::RuntimeType for NitRange {
2060 const SIGNATURE: ::windows::imp::ConstBuffer = ::windows::imp::ConstBuffer::from_slice(b"struct(Windows.Graphics.Display.NitRange;f4;f4;f4)");
2061 }
2062 impl ::core::cmp::PartialEq for NitRange {
2063 fn eq(&self, other: &Self) -> bool {
2064 self.MinNits == other.MinNits && self.MaxNits == other.MaxNits && self.StepSizeNits == other.StepSizeNits
2065 }
2066 }
2067 impl ::core::cmp::Eq for NitRange {}
2068 impl ::core::default::Default for NitRange {
2069 fn default() -> Self {
2070 unsafe { ::core::mem::zeroed() }
2071 }
2072 }
2073 #[doc = "*Required features: `\"Graphics_Display\"`, `\"deprecated\"`*"]
2074 #[cfg(feature = "deprecated")]
2075 #[repr(transparent)]
2076 pub struct DisplayPropertiesEventHandler(pub ::windows::core::IUnknown);
2077 #[cfg(feature = "deprecated")]
2078 impl DisplayPropertiesEventHandler {
2079 pub fn new<F: FnMut(::core::option::Option<&::windows::core::IInspectable>) -> ::windows::core::Result<()> + ::core::marker::Send + 'static>(invoke: F) -> Self {
2080 let com = DisplayPropertiesEventHandlerBox::<F> { vtable: &DisplayPropertiesEventHandlerBox::<F>::VTABLE, count: ::windows::imp::RefCount::new(1), invoke };
2081 unsafe { ::core::mem::transmute(::std::boxed::Box::new(com)) }
2082 }
2083 #[doc = "*Required features: `\"deprecated\"`*"]
2084 #[cfg(feature = "deprecated")]
2085 pub fn Invoke<P0>(&self, sender: P0) -> ::windows::core::Result<()>
2086 where
2087 P0: ::windows::core::IntoParam<::windows::core::IInspectable>,
2088 {
2089 let this = self;
2090 unsafe { (::windows::core::Interface::vtable(this).Invoke)(::windows::core::Interface::as_raw(this), sender.into_param().abi()).ok() }
2091 }
2092 }
2093 #[cfg(feature = "deprecated")]
2094 #[repr(C)]
2095 struct DisplayPropertiesEventHandlerBox<F: FnMut(::core::option::Option<&::windows::core::IInspectable>) -> ::windows::core::Result<()> + ::core::marker::Send + 'static> {
2096 vtable: *const DisplayPropertiesEventHandler_Vtbl,
2097 invoke: F,
2098 count: ::windows::imp::RefCount,
2099 }
2100 #[cfg(feature = "deprecated")]
2101 impl<F: FnMut(::core::option::Option<&::windows::core::IInspectable>) -> ::windows::core::Result<()> + ::core::marker::Send + 'static> DisplayPropertiesEventHandlerBox<F> {
2102 const VTABLE: DisplayPropertiesEventHandler_Vtbl = DisplayPropertiesEventHandler_Vtbl {
2103 base__: ::windows::core::IUnknown_Vtbl { QueryInterface: Self::QueryInterface, AddRef: Self::AddRef, Release: Self::Release },
2104 Invoke: Self::Invoke,
2105 };
2106 unsafe extern "system" fn QueryInterface(this: *mut ::core::ffi::c_void, iid: &::windows::core::GUID, interface: *mut *const ::core::ffi::c_void) -> ::windows::core::HRESULT {
2107 let this = this as *mut *mut ::core::ffi::c_void as *mut Self;
2108 *interface = if iid == &<DisplayPropertiesEventHandler as ::windows::core::ComInterface>::IID || iid == &<::windows::core::IUnknown as ::windows::core::ComInterface>::IID || iid == &<::windows::imp::IAgileObject as ::windows::core::ComInterface>::IID { &mut (*this).vtable as *mut _ as _ } else { ::core::ptr::null_mut() };
2109 if (*interface).is_null() {
2110 ::windows::core::HRESULT(-2147467262)
2111 } else {
2112 (*this).count.add_ref();
2113 ::windows::core::HRESULT(0)
2114 }
2115 }
2116 unsafe extern "system" fn AddRef(this: *mut ::core::ffi::c_void) -> u32 {
2117 let this = this as *mut *mut ::core::ffi::c_void as *mut Self;
2118 (*this).count.add_ref()
2119 }
2120 unsafe extern "system" fn Release(this: *mut ::core::ffi::c_void) -> u32 {
2121 let this = this as *mut *mut ::core::ffi::c_void as *mut Self;
2122 let remaining = (*this).count.release();
2123 if remaining == 0 {
2124 let _ = ::std::boxed::Box::from_raw(this);
2125 }
2126 remaining
2127 }
2128 unsafe extern "system" fn Invoke(this: *mut ::core::ffi::c_void, sender: *mut ::core::ffi::c_void) -> ::windows::core::HRESULT {
2129 let this = this as *mut *mut ::core::ffi::c_void as *mut Self;
2130 ((*this).invoke)(::windows::core::from_raw_borrowed(&sender)).into()
2131 }
2132 }
2133 #[cfg(feature = "deprecated")]
2134 impl ::core::cmp::PartialEq for DisplayPropertiesEventHandler {
2135 fn eq(&self, other: &Self) -> bool {
2136 self.0 == other.0
2137 }
2138 }
2139 #[cfg(feature = "deprecated")]
2140 impl ::core::cmp::Eq for DisplayPropertiesEventHandler {}
2141 #[cfg(feature = "deprecated")]
2142 impl ::core::fmt::Debug for DisplayPropertiesEventHandler {
2143 fn fmt(&self, f: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result {
2144 f.debug_tuple("DisplayPropertiesEventHandler").field(&self.0).finish()
2145 }
2146 }
2147 #[cfg(feature = "deprecated")]
2148 unsafe impl ::windows::core::Interface for DisplayPropertiesEventHandler {
2149 type Vtable = DisplayPropertiesEventHandler_Vtbl;
2150 }
2151 #[cfg(feature = "deprecated")]
2152 impl ::core::clone::Clone for DisplayPropertiesEventHandler {
2153 fn clone(&self) -> Self {
2154 Self(self.0.clone())
2155 }
2156 }
2157 #[cfg(feature = "deprecated")]
2158 unsafe impl ::windows::core::ComInterface for DisplayPropertiesEventHandler {
2159 const IID: ::windows::core::GUID = ::windows::core::GUID::from_u128(0xdbdd8b01_f1a1_46d1_9ee3_543bcc995980);
2160 }
2161 #[cfg(feature = "deprecated")]
2162 impl ::windows::core::RuntimeType for DisplayPropertiesEventHandler {
2163 const SIGNATURE: ::windows::imp::ConstBuffer = ::windows::imp::ConstBuffer::from_slice(b"{dbdd8b01-f1a1-46d1-9ee3-543bcc995980}");
2164 }
2165 #[cfg(feature = "deprecated")]
2166 #[repr(C)]
2167 #[doc(hidden)]
2168 pub struct DisplayPropertiesEventHandler_Vtbl {
2169 pub base__: ::windows::core::IUnknown_Vtbl,
2170 #[cfg(feature = "deprecated")]
2171 pub Invoke: unsafe extern "system" fn(this: *mut ::core::ffi::c_void, sender: *mut ::core::ffi::c_void) -> ::windows::core::HRESULT,
2172 #[cfg(not(feature = "deprecated"))]
2173 Invoke: usize,
2174 }
2175 #[cfg(feature = "implement")]
2176 ::core::include!("impl.rs");