]> git.proxmox.com Git - rustc.git/blob - vendor/windows/src/Windows/Gaming/Input/mod.rs
New upstream version 1.70.0+dfsg1
[rustc.git] / vendor / windows / src / Windows / Gaming / Input / mod.rs
1 #[cfg(feature = "Gaming_Input_Custom")]
2 pub mod Custom;
3 #[cfg(feature = "Gaming_Input_ForceFeedback")]
4 pub mod ForceFeedback;
5 #[cfg(feature = "Gaming_Input_Preview")]
6 pub mod Preview;
7 #[doc(hidden)]
8 #[repr(transparent)]
9 pub struct IArcadeStick(::windows::core::IUnknown);
10 unsafe impl ::windows::core::Interface for IArcadeStick {
11 type Vtable = IArcadeStick_Vtbl;
12 }
13 impl ::core::clone::Clone for IArcadeStick {
14 fn clone(&self) -> Self {
15 Self(self.0.clone())
16 }
17 }
18 unsafe impl ::windows::core::ComInterface for IArcadeStick {
19 const IID: ::windows::core::GUID = ::windows::core::GUID::from_u128(0xb14a539d_befb_4c81_8051_15ecf3b13036);
20 }
21 #[repr(C)]
22 #[doc(hidden)]
23 pub struct IArcadeStick_Vtbl {
24 pub base__: ::windows::core::IInspectable_Vtbl,
25 pub GetButtonLabel: unsafe extern "system" fn(this: *mut ::core::ffi::c_void, button: ArcadeStickButtons, result__: *mut GameControllerButtonLabel) -> ::windows::core::HRESULT,
26 pub GetCurrentReading: unsafe extern "system" fn(this: *mut ::core::ffi::c_void, result__: *mut ArcadeStickReading) -> ::windows::core::HRESULT,
27 }
28 #[doc(hidden)]
29 #[repr(transparent)]
30 pub struct IArcadeStickStatics(::windows::core::IUnknown);
31 unsafe impl ::windows::core::Interface for IArcadeStickStatics {
32 type Vtable = IArcadeStickStatics_Vtbl;
33 }
34 impl ::core::clone::Clone for IArcadeStickStatics {
35 fn clone(&self) -> Self {
36 Self(self.0.clone())
37 }
38 }
39 unsafe impl ::windows::core::ComInterface for IArcadeStickStatics {
40 const IID: ::windows::core::GUID = ::windows::core::GUID::from_u128(0x5c37b8c8_37b1_4ad8_9458_200f1a30018e);
41 }
42 #[repr(C)]
43 #[doc(hidden)]
44 pub struct IArcadeStickStatics_Vtbl {
45 pub base__: ::windows::core::IInspectable_Vtbl,
46 #[cfg(feature = "Foundation")]
47 pub ArcadeStickAdded: unsafe extern "system" fn(this: *mut ::core::ffi::c_void, value: *mut ::core::ffi::c_void, result__: *mut super::super::Foundation::EventRegistrationToken) -> ::windows::core::HRESULT,
48 #[cfg(not(feature = "Foundation"))]
49 ArcadeStickAdded: usize,
50 #[cfg(feature = "Foundation")]
51 pub RemoveArcadeStickAdded: unsafe extern "system" fn(this: *mut ::core::ffi::c_void, token: super::super::Foundation::EventRegistrationToken) -> ::windows::core::HRESULT,
52 #[cfg(not(feature = "Foundation"))]
53 RemoveArcadeStickAdded: usize,
54 #[cfg(feature = "Foundation")]
55 pub ArcadeStickRemoved: unsafe extern "system" fn(this: *mut ::core::ffi::c_void, value: *mut ::core::ffi::c_void, result__: *mut super::super::Foundation::EventRegistrationToken) -> ::windows::core::HRESULT,
56 #[cfg(not(feature = "Foundation"))]
57 ArcadeStickRemoved: usize,
58 #[cfg(feature = "Foundation")]
59 pub RemoveArcadeStickRemoved: unsafe extern "system" fn(this: *mut ::core::ffi::c_void, token: super::super::Foundation::EventRegistrationToken) -> ::windows::core::HRESULT,
60 #[cfg(not(feature = "Foundation"))]
61 RemoveArcadeStickRemoved: usize,
62 #[cfg(feature = "Foundation_Collections")]
63 pub ArcadeSticks: unsafe extern "system" fn(this: *mut ::core::ffi::c_void, result__: *mut *mut ::core::ffi::c_void) -> ::windows::core::HRESULT,
64 #[cfg(not(feature = "Foundation_Collections"))]
65 ArcadeSticks: usize,
66 }
67 #[doc(hidden)]
68 #[repr(transparent)]
69 pub struct IArcadeStickStatics2(::windows::core::IUnknown);
70 unsafe impl ::windows::core::Interface for IArcadeStickStatics2 {
71 type Vtable = IArcadeStickStatics2_Vtbl;
72 }
73 impl ::core::clone::Clone for IArcadeStickStatics2 {
74 fn clone(&self) -> Self {
75 Self(self.0.clone())
76 }
77 }
78 unsafe impl ::windows::core::ComInterface for IArcadeStickStatics2 {
79 const IID: ::windows::core::GUID = ::windows::core::GUID::from_u128(0x52b5d744_bb86_445a_b59c_596f0e2a49df);
80 }
81 #[repr(C)]
82 #[doc(hidden)]
83 pub struct IArcadeStickStatics2_Vtbl {
84 pub base__: ::windows::core::IInspectable_Vtbl,
85 pub FromGameController: unsafe extern "system" fn(this: *mut ::core::ffi::c_void, gamecontroller: *mut ::core::ffi::c_void, result__: *mut *mut ::core::ffi::c_void) -> ::windows::core::HRESULT,
86 }
87 #[doc(hidden)]
88 #[repr(transparent)]
89 pub struct IFlightStick(::windows::core::IUnknown);
90 unsafe impl ::windows::core::Interface for IFlightStick {
91 type Vtable = IFlightStick_Vtbl;
92 }
93 impl ::core::clone::Clone for IFlightStick {
94 fn clone(&self) -> Self {
95 Self(self.0.clone())
96 }
97 }
98 unsafe impl ::windows::core::ComInterface for IFlightStick {
99 const IID: ::windows::core::GUID = ::windows::core::GUID::from_u128(0xb4a2c01c_b83b_4459_a1a9_97b03c33da7c);
100 }
101 #[repr(C)]
102 #[doc(hidden)]
103 pub struct IFlightStick_Vtbl {
104 pub base__: ::windows::core::IInspectable_Vtbl,
105 pub HatSwitchKind: unsafe extern "system" fn(this: *mut ::core::ffi::c_void, result__: *mut GameControllerSwitchKind) -> ::windows::core::HRESULT,
106 pub GetButtonLabel: unsafe extern "system" fn(this: *mut ::core::ffi::c_void, button: FlightStickButtons, result__: *mut GameControllerButtonLabel) -> ::windows::core::HRESULT,
107 pub GetCurrentReading: unsafe extern "system" fn(this: *mut ::core::ffi::c_void, result__: *mut FlightStickReading) -> ::windows::core::HRESULT,
108 }
109 #[doc(hidden)]
110 #[repr(transparent)]
111 pub struct IFlightStickStatics(::windows::core::IUnknown);
112 unsafe impl ::windows::core::Interface for IFlightStickStatics {
113 type Vtable = IFlightStickStatics_Vtbl;
114 }
115 impl ::core::clone::Clone for IFlightStickStatics {
116 fn clone(&self) -> Self {
117 Self(self.0.clone())
118 }
119 }
120 unsafe impl ::windows::core::ComInterface for IFlightStickStatics {
121 const IID: ::windows::core::GUID = ::windows::core::GUID::from_u128(0x5514924a_fecc_435e_83dc_5cec8a18a520);
122 }
123 #[repr(C)]
124 #[doc(hidden)]
125 pub struct IFlightStickStatics_Vtbl {
126 pub base__: ::windows::core::IInspectable_Vtbl,
127 #[cfg(feature = "Foundation")]
128 pub FlightStickAdded: unsafe extern "system" fn(this: *mut ::core::ffi::c_void, value: *mut ::core::ffi::c_void, result__: *mut super::super::Foundation::EventRegistrationToken) -> ::windows::core::HRESULT,
129 #[cfg(not(feature = "Foundation"))]
130 FlightStickAdded: usize,
131 #[cfg(feature = "Foundation")]
132 pub RemoveFlightStickAdded: unsafe extern "system" fn(this: *mut ::core::ffi::c_void, token: super::super::Foundation::EventRegistrationToken) -> ::windows::core::HRESULT,
133 #[cfg(not(feature = "Foundation"))]
134 RemoveFlightStickAdded: usize,
135 #[cfg(feature = "Foundation")]
136 pub FlightStickRemoved: unsafe extern "system" fn(this: *mut ::core::ffi::c_void, value: *mut ::core::ffi::c_void, result__: *mut super::super::Foundation::EventRegistrationToken) -> ::windows::core::HRESULT,
137 #[cfg(not(feature = "Foundation"))]
138 FlightStickRemoved: usize,
139 #[cfg(feature = "Foundation")]
140 pub RemoveFlightStickRemoved: unsafe extern "system" fn(this: *mut ::core::ffi::c_void, token: super::super::Foundation::EventRegistrationToken) -> ::windows::core::HRESULT,
141 #[cfg(not(feature = "Foundation"))]
142 RemoveFlightStickRemoved: usize,
143 #[cfg(feature = "Foundation_Collections")]
144 pub FlightSticks: unsafe extern "system" fn(this: *mut ::core::ffi::c_void, result__: *mut *mut ::core::ffi::c_void) -> ::windows::core::HRESULT,
145 #[cfg(not(feature = "Foundation_Collections"))]
146 FlightSticks: usize,
147 pub FromGameController: unsafe extern "system" fn(this: *mut ::core::ffi::c_void, gamecontroller: *mut ::core::ffi::c_void, result__: *mut *mut ::core::ffi::c_void) -> ::windows::core::HRESULT,
148 }
149 #[doc = "*Required features: `\"Gaming_Input\"`*"]
150 #[repr(transparent)]
151 pub struct IGameController(::windows::core::IUnknown);
152 impl IGameController {
153 #[doc = "*Required features: `\"Foundation\"`*"]
154 #[cfg(feature = "Foundation")]
155 pub fn HeadsetConnected(&self, value: &super::super::Foundation::TypedEventHandler<IGameController, Headset>) -> ::windows::core::Result<super::super::Foundation::EventRegistrationToken> {
156 let this = self;
157 unsafe {
158 let mut result__ = ::windows::core::zeroed::<super::super::Foundation::EventRegistrationToken>();
159 (::windows::core::Interface::vtable(this).HeadsetConnected)(::windows::core::Interface::as_raw(this), ::core::mem::transmute_copy(value), &mut result__).from_abi(result__)
160 }
161 }
162 #[doc = "*Required features: `\"Foundation\"`*"]
163 #[cfg(feature = "Foundation")]
164 pub fn RemoveHeadsetConnected(&self, token: super::super::Foundation::EventRegistrationToken) -> ::windows::core::Result<()> {
165 let this = self;
166 unsafe { (::windows::core::Interface::vtable(this).RemoveHeadsetConnected)(::windows::core::Interface::as_raw(this), token).ok() }
167 }
168 #[doc = "*Required features: `\"Foundation\"`*"]
169 #[cfg(feature = "Foundation")]
170 pub fn HeadsetDisconnected(&self, value: &super::super::Foundation::TypedEventHandler<IGameController, Headset>) -> ::windows::core::Result<super::super::Foundation::EventRegistrationToken> {
171 let this = self;
172 unsafe {
173 let mut result__ = ::windows::core::zeroed::<super::super::Foundation::EventRegistrationToken>();
174 (::windows::core::Interface::vtable(this).HeadsetDisconnected)(::windows::core::Interface::as_raw(this), ::core::mem::transmute_copy(value), &mut result__).from_abi(result__)
175 }
176 }
177 #[doc = "*Required features: `\"Foundation\"`*"]
178 #[cfg(feature = "Foundation")]
179 pub fn RemoveHeadsetDisconnected(&self, token: super::super::Foundation::EventRegistrationToken) -> ::windows::core::Result<()> {
180 let this = self;
181 unsafe { (::windows::core::Interface::vtable(this).RemoveHeadsetDisconnected)(::windows::core::Interface::as_raw(this), token).ok() }
182 }
183 #[doc = "*Required features: `\"Foundation\"`, `\"System\"`*"]
184 #[cfg(all(feature = "Foundation", feature = "System"))]
185 pub fn UserChanged(&self, value: &super::super::Foundation::TypedEventHandler<IGameController, super::super::System::UserChangedEventArgs>) -> ::windows::core::Result<super::super::Foundation::EventRegistrationToken> {
186 let this = self;
187 unsafe {
188 let mut result__ = ::windows::core::zeroed::<super::super::Foundation::EventRegistrationToken>();
189 (::windows::core::Interface::vtable(this).UserChanged)(::windows::core::Interface::as_raw(this), ::core::mem::transmute_copy(value), &mut result__).from_abi(result__)
190 }
191 }
192 #[doc = "*Required features: `\"Foundation\"`*"]
193 #[cfg(feature = "Foundation")]
194 pub fn RemoveUserChanged(&self, token: super::super::Foundation::EventRegistrationToken) -> ::windows::core::Result<()> {
195 let this = self;
196 unsafe { (::windows::core::Interface::vtable(this).RemoveUserChanged)(::windows::core::Interface::as_raw(this), token).ok() }
197 }
198 pub fn Headset(&self) -> ::windows::core::Result<Headset> {
199 let this = self;
200 unsafe {
201 let mut result__ = ::windows::core::zeroed::<Headset>();
202 (::windows::core::Interface::vtable(this).Headset)(::windows::core::Interface::as_raw(this), &mut result__).from_abi(result__)
203 }
204 }
205 pub fn IsWireless(&self) -> ::windows::core::Result<bool> {
206 let this = self;
207 unsafe {
208 let mut result__ = ::windows::core::zeroed::<bool>();
209 (::windows::core::Interface::vtable(this).IsWireless)(::windows::core::Interface::as_raw(this), &mut result__).from_abi(result__)
210 }
211 }
212 #[doc = "*Required features: `\"System\"`*"]
213 #[cfg(feature = "System")]
214 pub fn User(&self) -> ::windows::core::Result<super::super::System::User> {
215 let this = self;
216 unsafe {
217 let mut result__ = ::windows::core::zeroed::<super::super::System::User>();
218 (::windows::core::Interface::vtable(this).User)(::windows::core::Interface::as_raw(this), &mut result__).from_abi(result__)
219 }
220 }
221 }
222 ::windows::imp::interface_hierarchy!(IGameController, ::windows::core::IUnknown, ::windows::core::IInspectable);
223 impl ::core::cmp::PartialEq for IGameController {
224 fn eq(&self, other: &Self) -> bool {
225 self.0 == other.0
226 }
227 }
228 impl ::core::cmp::Eq for IGameController {}
229 impl ::core::fmt::Debug for IGameController {
230 fn fmt(&self, f: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result {
231 f.debug_tuple("IGameController").field(&self.0).finish()
232 }
233 }
234 impl ::windows::core::RuntimeType for IGameController {
235 const SIGNATURE: ::windows::imp::ConstBuffer = ::windows::imp::ConstBuffer::from_slice(b"{1baf6522-5f64-42c5-8267-b9fe2215bfbd}");
236 }
237 unsafe impl ::windows::core::Interface for IGameController {
238 type Vtable = IGameController_Vtbl;
239 }
240 impl ::core::clone::Clone for IGameController {
241 fn clone(&self) -> Self {
242 Self(self.0.clone())
243 }
244 }
245 unsafe impl ::windows::core::ComInterface for IGameController {
246 const IID: ::windows::core::GUID = ::windows::core::GUID::from_u128(0x1baf6522_5f64_42c5_8267_b9fe2215bfbd);
247 }
248 #[repr(C)]
249 #[doc(hidden)]
250 pub struct IGameController_Vtbl {
251 pub base__: ::windows::core::IInspectable_Vtbl,
252 #[cfg(feature = "Foundation")]
253 pub HeadsetConnected: unsafe extern "system" fn(this: *mut ::core::ffi::c_void, value: *mut ::core::ffi::c_void, result__: *mut super::super::Foundation::EventRegistrationToken) -> ::windows::core::HRESULT,
254 #[cfg(not(feature = "Foundation"))]
255 HeadsetConnected: usize,
256 #[cfg(feature = "Foundation")]
257 pub RemoveHeadsetConnected: unsafe extern "system" fn(this: *mut ::core::ffi::c_void, token: super::super::Foundation::EventRegistrationToken) -> ::windows::core::HRESULT,
258 #[cfg(not(feature = "Foundation"))]
259 RemoveHeadsetConnected: usize,
260 #[cfg(feature = "Foundation")]
261 pub HeadsetDisconnected: unsafe extern "system" fn(this: *mut ::core::ffi::c_void, value: *mut ::core::ffi::c_void, result__: *mut super::super::Foundation::EventRegistrationToken) -> ::windows::core::HRESULT,
262 #[cfg(not(feature = "Foundation"))]
263 HeadsetDisconnected: usize,
264 #[cfg(feature = "Foundation")]
265 pub RemoveHeadsetDisconnected: unsafe extern "system" fn(this: *mut ::core::ffi::c_void, token: super::super::Foundation::EventRegistrationToken) -> ::windows::core::HRESULT,
266 #[cfg(not(feature = "Foundation"))]
267 RemoveHeadsetDisconnected: usize,
268 #[cfg(all(feature = "Foundation", feature = "System"))]
269 pub UserChanged: unsafe extern "system" fn(this: *mut ::core::ffi::c_void, value: *mut ::core::ffi::c_void, result__: *mut super::super::Foundation::EventRegistrationToken) -> ::windows::core::HRESULT,
270 #[cfg(not(all(feature = "Foundation", feature = "System")))]
271 UserChanged: usize,
272 #[cfg(feature = "Foundation")]
273 pub RemoveUserChanged: unsafe extern "system" fn(this: *mut ::core::ffi::c_void, token: super::super::Foundation::EventRegistrationToken) -> ::windows::core::HRESULT,
274 #[cfg(not(feature = "Foundation"))]
275 RemoveUserChanged: usize,
276 pub Headset: unsafe extern "system" fn(this: *mut ::core::ffi::c_void, result__: *mut *mut ::core::ffi::c_void) -> ::windows::core::HRESULT,
277 pub IsWireless: unsafe extern "system" fn(this: *mut ::core::ffi::c_void, result__: *mut bool) -> ::windows::core::HRESULT,
278 #[cfg(feature = "System")]
279 pub User: unsafe extern "system" fn(this: *mut ::core::ffi::c_void, result__: *mut *mut ::core::ffi::c_void) -> ::windows::core::HRESULT,
280 #[cfg(not(feature = "System"))]
281 User: usize,
282 }
283 #[doc = "*Required features: `\"Gaming_Input\"`*"]
284 #[repr(transparent)]
285 pub struct IGameControllerBatteryInfo(::windows::core::IUnknown);
286 impl IGameControllerBatteryInfo {
287 #[doc = "*Required features: `\"Devices_Power\"`*"]
288 #[cfg(feature = "Devices_Power")]
289 pub fn TryGetBatteryReport(&self) -> ::windows::core::Result<super::super::Devices::Power::BatteryReport> {
290 let this = self;
291 unsafe {
292 let mut result__ = ::windows::core::zeroed::<super::super::Devices::Power::BatteryReport>();
293 (::windows::core::Interface::vtable(this).TryGetBatteryReport)(::windows::core::Interface::as_raw(this), &mut result__).from_abi(result__)
294 }
295 }
296 }
297 ::windows::imp::interface_hierarchy!(IGameControllerBatteryInfo, ::windows::core::IUnknown, ::windows::core::IInspectable);
298 impl ::core::cmp::PartialEq for IGameControllerBatteryInfo {
299 fn eq(&self, other: &Self) -> bool {
300 self.0 == other.0
301 }
302 }
303 impl ::core::cmp::Eq for IGameControllerBatteryInfo {}
304 impl ::core::fmt::Debug for IGameControllerBatteryInfo {
305 fn fmt(&self, f: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result {
306 f.debug_tuple("IGameControllerBatteryInfo").field(&self.0).finish()
307 }
308 }
309 impl ::windows::core::RuntimeType for IGameControllerBatteryInfo {
310 const SIGNATURE: ::windows::imp::ConstBuffer = ::windows::imp::ConstBuffer::from_slice(b"{dcecc681-3963-4da6-955d-553f3b6f6161}");
311 }
312 unsafe impl ::windows::core::Interface for IGameControllerBatteryInfo {
313 type Vtable = IGameControllerBatteryInfo_Vtbl;
314 }
315 impl ::core::clone::Clone for IGameControllerBatteryInfo {
316 fn clone(&self) -> Self {
317 Self(self.0.clone())
318 }
319 }
320 unsafe impl ::windows::core::ComInterface for IGameControllerBatteryInfo {
321 const IID: ::windows::core::GUID = ::windows::core::GUID::from_u128(0xdcecc681_3963_4da6_955d_553f3b6f6161);
322 }
323 #[repr(C)]
324 #[doc(hidden)]
325 pub struct IGameControllerBatteryInfo_Vtbl {
326 pub base__: ::windows::core::IInspectable_Vtbl,
327 #[cfg(feature = "Devices_Power")]
328 pub TryGetBatteryReport: unsafe extern "system" fn(this: *mut ::core::ffi::c_void, result__: *mut *mut ::core::ffi::c_void) -> ::windows::core::HRESULT,
329 #[cfg(not(feature = "Devices_Power"))]
330 TryGetBatteryReport: usize,
331 }
332 #[doc(hidden)]
333 #[repr(transparent)]
334 pub struct IGamepad(::windows::core::IUnknown);
335 unsafe impl ::windows::core::Interface for IGamepad {
336 type Vtable = IGamepad_Vtbl;
337 }
338 impl ::core::clone::Clone for IGamepad {
339 fn clone(&self) -> Self {
340 Self(self.0.clone())
341 }
342 }
343 unsafe impl ::windows::core::ComInterface for IGamepad {
344 const IID: ::windows::core::GUID = ::windows::core::GUID::from_u128(0xbc7bb43c_0a69_3903_9e9d_a50f86a45de5);
345 }
346 #[repr(C)]
347 #[doc(hidden)]
348 pub struct IGamepad_Vtbl {
349 pub base__: ::windows::core::IInspectable_Vtbl,
350 pub Vibration: unsafe extern "system" fn(this: *mut ::core::ffi::c_void, result__: *mut GamepadVibration) -> ::windows::core::HRESULT,
351 pub SetVibration: unsafe extern "system" fn(this: *mut ::core::ffi::c_void, value: GamepadVibration) -> ::windows::core::HRESULT,
352 pub GetCurrentReading: unsafe extern "system" fn(this: *mut ::core::ffi::c_void, result__: *mut GamepadReading) -> ::windows::core::HRESULT,
353 }
354 #[doc(hidden)]
355 #[repr(transparent)]
356 pub struct IGamepad2(::windows::core::IUnknown);
357 unsafe impl ::windows::core::Interface for IGamepad2 {
358 type Vtable = IGamepad2_Vtbl;
359 }
360 impl ::core::clone::Clone for IGamepad2 {
361 fn clone(&self) -> Self {
362 Self(self.0.clone())
363 }
364 }
365 unsafe impl ::windows::core::ComInterface for IGamepad2 {
366 const IID: ::windows::core::GUID = ::windows::core::GUID::from_u128(0x3c1689bd_5915_4245_b0c0_c89fae0308ff);
367 }
368 #[repr(C)]
369 #[doc(hidden)]
370 pub struct IGamepad2_Vtbl {
371 pub base__: ::windows::core::IInspectable_Vtbl,
372 pub GetButtonLabel: unsafe extern "system" fn(this: *mut ::core::ffi::c_void, button: GamepadButtons, result__: *mut GameControllerButtonLabel) -> ::windows::core::HRESULT,
373 }
374 #[doc(hidden)]
375 #[repr(transparent)]
376 pub struct IGamepadStatics(::windows::core::IUnknown);
377 unsafe impl ::windows::core::Interface for IGamepadStatics {
378 type Vtable = IGamepadStatics_Vtbl;
379 }
380 impl ::core::clone::Clone for IGamepadStatics {
381 fn clone(&self) -> Self {
382 Self(self.0.clone())
383 }
384 }
385 unsafe impl ::windows::core::ComInterface for IGamepadStatics {
386 const IID: ::windows::core::GUID = ::windows::core::GUID::from_u128(0x8bbce529_d49c_39e9_9560_e47dde96b7c8);
387 }
388 #[repr(C)]
389 #[doc(hidden)]
390 pub struct IGamepadStatics_Vtbl {
391 pub base__: ::windows::core::IInspectable_Vtbl,
392 #[cfg(feature = "Foundation")]
393 pub GamepadAdded: unsafe extern "system" fn(this: *mut ::core::ffi::c_void, value: *mut ::core::ffi::c_void, result__: *mut super::super::Foundation::EventRegistrationToken) -> ::windows::core::HRESULT,
394 #[cfg(not(feature = "Foundation"))]
395 GamepadAdded: usize,
396 #[cfg(feature = "Foundation")]
397 pub RemoveGamepadAdded: unsafe extern "system" fn(this: *mut ::core::ffi::c_void, token: super::super::Foundation::EventRegistrationToken) -> ::windows::core::HRESULT,
398 #[cfg(not(feature = "Foundation"))]
399 RemoveGamepadAdded: usize,
400 #[cfg(feature = "Foundation")]
401 pub GamepadRemoved: unsafe extern "system" fn(this: *mut ::core::ffi::c_void, value: *mut ::core::ffi::c_void, result__: *mut super::super::Foundation::EventRegistrationToken) -> ::windows::core::HRESULT,
402 #[cfg(not(feature = "Foundation"))]
403 GamepadRemoved: usize,
404 #[cfg(feature = "Foundation")]
405 pub RemoveGamepadRemoved: unsafe extern "system" fn(this: *mut ::core::ffi::c_void, token: super::super::Foundation::EventRegistrationToken) -> ::windows::core::HRESULT,
406 #[cfg(not(feature = "Foundation"))]
407 RemoveGamepadRemoved: usize,
408 #[cfg(feature = "Foundation_Collections")]
409 pub Gamepads: unsafe extern "system" fn(this: *mut ::core::ffi::c_void, result__: *mut *mut ::core::ffi::c_void) -> ::windows::core::HRESULT,
410 #[cfg(not(feature = "Foundation_Collections"))]
411 Gamepads: usize,
412 }
413 #[doc(hidden)]
414 #[repr(transparent)]
415 pub struct IGamepadStatics2(::windows::core::IUnknown);
416 unsafe impl ::windows::core::Interface for IGamepadStatics2 {
417 type Vtable = IGamepadStatics2_Vtbl;
418 }
419 impl ::core::clone::Clone for IGamepadStatics2 {
420 fn clone(&self) -> Self {
421 Self(self.0.clone())
422 }
423 }
424 unsafe impl ::windows::core::ComInterface for IGamepadStatics2 {
425 const IID: ::windows::core::GUID = ::windows::core::GUID::from_u128(0x42676dc5_0856_47c4_9213_b395504c3a3c);
426 }
427 #[repr(C)]
428 #[doc(hidden)]
429 pub struct IGamepadStatics2_Vtbl {
430 pub base__: ::windows::core::IInspectable_Vtbl,
431 pub FromGameController: unsafe extern "system" fn(this: *mut ::core::ffi::c_void, gamecontroller: *mut ::core::ffi::c_void, result__: *mut *mut ::core::ffi::c_void) -> ::windows::core::HRESULT,
432 }
433 #[doc(hidden)]
434 #[repr(transparent)]
435 pub struct IHeadset(::windows::core::IUnknown);
436 unsafe impl ::windows::core::Interface for IHeadset {
437 type Vtable = IHeadset_Vtbl;
438 }
439 impl ::core::clone::Clone for IHeadset {
440 fn clone(&self) -> Self {
441 Self(self.0.clone())
442 }
443 }
444 unsafe impl ::windows::core::ComInterface for IHeadset {
445 const IID: ::windows::core::GUID = ::windows::core::GUID::from_u128(0x3fd156ef_6925_3fa8_9181_029c5223ae3b);
446 }
447 #[repr(C)]
448 #[doc(hidden)]
449 pub struct IHeadset_Vtbl {
450 pub base__: ::windows::core::IInspectable_Vtbl,
451 pub CaptureDeviceId: unsafe extern "system" fn(this: *mut ::core::ffi::c_void, result__: *mut ::std::mem::MaybeUninit<::windows::core::HSTRING>) -> ::windows::core::HRESULT,
452 pub RenderDeviceId: unsafe extern "system" fn(this: *mut ::core::ffi::c_void, result__: *mut ::std::mem::MaybeUninit<::windows::core::HSTRING>) -> ::windows::core::HRESULT,
453 }
454 #[doc(hidden)]
455 #[repr(transparent)]
456 pub struct IRacingWheel(::windows::core::IUnknown);
457 unsafe impl ::windows::core::Interface for IRacingWheel {
458 type Vtable = IRacingWheel_Vtbl;
459 }
460 impl ::core::clone::Clone for IRacingWheel {
461 fn clone(&self) -> Self {
462 Self(self.0.clone())
463 }
464 }
465 unsafe impl ::windows::core::ComInterface for IRacingWheel {
466 const IID: ::windows::core::GUID = ::windows::core::GUID::from_u128(0xf546656f_e106_4c82_a90f_554012904b85);
467 }
468 #[repr(C)]
469 #[doc(hidden)]
470 pub struct IRacingWheel_Vtbl {
471 pub base__: ::windows::core::IInspectable_Vtbl,
472 pub HasClutch: unsafe extern "system" fn(this: *mut ::core::ffi::c_void, result__: *mut bool) -> ::windows::core::HRESULT,
473 pub HasHandbrake: unsafe extern "system" fn(this: *mut ::core::ffi::c_void, result__: *mut bool) -> ::windows::core::HRESULT,
474 pub HasPatternShifter: unsafe extern "system" fn(this: *mut ::core::ffi::c_void, result__: *mut bool) -> ::windows::core::HRESULT,
475 pub MaxPatternShifterGear: unsafe extern "system" fn(this: *mut ::core::ffi::c_void, result__: *mut i32) -> ::windows::core::HRESULT,
476 pub MaxWheelAngle: unsafe extern "system" fn(this: *mut ::core::ffi::c_void, result__: *mut f64) -> ::windows::core::HRESULT,
477 #[cfg(feature = "Gaming_Input_ForceFeedback")]
478 pub WheelMotor: unsafe extern "system" fn(this: *mut ::core::ffi::c_void, result__: *mut *mut ::core::ffi::c_void) -> ::windows::core::HRESULT,
479 #[cfg(not(feature = "Gaming_Input_ForceFeedback"))]
480 WheelMotor: usize,
481 pub GetButtonLabel: unsafe extern "system" fn(this: *mut ::core::ffi::c_void, button: RacingWheelButtons, result__: *mut GameControllerButtonLabel) -> ::windows::core::HRESULT,
482 pub GetCurrentReading: unsafe extern "system" fn(this: *mut ::core::ffi::c_void, result__: *mut RacingWheelReading) -> ::windows::core::HRESULT,
483 }
484 #[doc(hidden)]
485 #[repr(transparent)]
486 pub struct IRacingWheelStatics(::windows::core::IUnknown);
487 unsafe impl ::windows::core::Interface for IRacingWheelStatics {
488 type Vtable = IRacingWheelStatics_Vtbl;
489 }
490 impl ::core::clone::Clone for IRacingWheelStatics {
491 fn clone(&self) -> Self {
492 Self(self.0.clone())
493 }
494 }
495 unsafe impl ::windows::core::ComInterface for IRacingWheelStatics {
496 const IID: ::windows::core::GUID = ::windows::core::GUID::from_u128(0x3ac12cd5_581b_4936_9f94_69f1e6514c7d);
497 }
498 #[repr(C)]
499 #[doc(hidden)]
500 pub struct IRacingWheelStatics_Vtbl {
501 pub base__: ::windows::core::IInspectable_Vtbl,
502 #[cfg(feature = "Foundation")]
503 pub RacingWheelAdded: unsafe extern "system" fn(this: *mut ::core::ffi::c_void, value: *mut ::core::ffi::c_void, result__: *mut super::super::Foundation::EventRegistrationToken) -> ::windows::core::HRESULT,
504 #[cfg(not(feature = "Foundation"))]
505 RacingWheelAdded: usize,
506 #[cfg(feature = "Foundation")]
507 pub RemoveRacingWheelAdded: unsafe extern "system" fn(this: *mut ::core::ffi::c_void, token: super::super::Foundation::EventRegistrationToken) -> ::windows::core::HRESULT,
508 #[cfg(not(feature = "Foundation"))]
509 RemoveRacingWheelAdded: usize,
510 #[cfg(feature = "Foundation")]
511 pub RacingWheelRemoved: unsafe extern "system" fn(this: *mut ::core::ffi::c_void, value: *mut ::core::ffi::c_void, result__: *mut super::super::Foundation::EventRegistrationToken) -> ::windows::core::HRESULT,
512 #[cfg(not(feature = "Foundation"))]
513 RacingWheelRemoved: usize,
514 #[cfg(feature = "Foundation")]
515 pub RemoveRacingWheelRemoved: unsafe extern "system" fn(this: *mut ::core::ffi::c_void, token: super::super::Foundation::EventRegistrationToken) -> ::windows::core::HRESULT,
516 #[cfg(not(feature = "Foundation"))]
517 RemoveRacingWheelRemoved: usize,
518 #[cfg(feature = "Foundation_Collections")]
519 pub RacingWheels: unsafe extern "system" fn(this: *mut ::core::ffi::c_void, result__: *mut *mut ::core::ffi::c_void) -> ::windows::core::HRESULT,
520 #[cfg(not(feature = "Foundation_Collections"))]
521 RacingWheels: usize,
522 }
523 #[doc(hidden)]
524 #[repr(transparent)]
525 pub struct IRacingWheelStatics2(::windows::core::IUnknown);
526 unsafe impl ::windows::core::Interface for IRacingWheelStatics2 {
527 type Vtable = IRacingWheelStatics2_Vtbl;
528 }
529 impl ::core::clone::Clone for IRacingWheelStatics2 {
530 fn clone(&self) -> Self {
531 Self(self.0.clone())
532 }
533 }
534 unsafe impl ::windows::core::ComInterface for IRacingWheelStatics2 {
535 const IID: ::windows::core::GUID = ::windows::core::GUID::from_u128(0xe666bcaa_edfd_4323_a9f6_3c384048d1ed);
536 }
537 #[repr(C)]
538 #[doc(hidden)]
539 pub struct IRacingWheelStatics2_Vtbl {
540 pub base__: ::windows::core::IInspectable_Vtbl,
541 pub FromGameController: unsafe extern "system" fn(this: *mut ::core::ffi::c_void, gamecontroller: *mut ::core::ffi::c_void, result__: *mut *mut ::core::ffi::c_void) -> ::windows::core::HRESULT,
542 }
543 #[doc(hidden)]
544 #[repr(transparent)]
545 pub struct IRawGameController(::windows::core::IUnknown);
546 unsafe impl ::windows::core::Interface for IRawGameController {
547 type Vtable = IRawGameController_Vtbl;
548 }
549 impl ::core::clone::Clone for IRawGameController {
550 fn clone(&self) -> Self {
551 Self(self.0.clone())
552 }
553 }
554 unsafe impl ::windows::core::ComInterface for IRawGameController {
555 const IID: ::windows::core::GUID = ::windows::core::GUID::from_u128(0x7cad6d91_a7e1_4f71_9a78_33e9c5dfea62);
556 }
557 #[repr(C)]
558 #[doc(hidden)]
559 pub struct IRawGameController_Vtbl {
560 pub base__: ::windows::core::IInspectable_Vtbl,
561 pub AxisCount: unsafe extern "system" fn(this: *mut ::core::ffi::c_void, result__: *mut i32) -> ::windows::core::HRESULT,
562 pub ButtonCount: unsafe extern "system" fn(this: *mut ::core::ffi::c_void, result__: *mut i32) -> ::windows::core::HRESULT,
563 #[cfg(all(feature = "Foundation_Collections", feature = "Gaming_Input_ForceFeedback"))]
564 pub ForceFeedbackMotors: unsafe extern "system" fn(this: *mut ::core::ffi::c_void, result__: *mut *mut ::core::ffi::c_void) -> ::windows::core::HRESULT,
565 #[cfg(not(all(feature = "Foundation_Collections", feature = "Gaming_Input_ForceFeedback")))]
566 ForceFeedbackMotors: usize,
567 pub HardwareProductId: unsafe extern "system" fn(this: *mut ::core::ffi::c_void, result__: *mut u16) -> ::windows::core::HRESULT,
568 pub HardwareVendorId: unsafe extern "system" fn(this: *mut ::core::ffi::c_void, result__: *mut u16) -> ::windows::core::HRESULT,
569 pub SwitchCount: unsafe extern "system" fn(this: *mut ::core::ffi::c_void, result__: *mut i32) -> ::windows::core::HRESULT,
570 pub GetButtonLabel: unsafe extern "system" fn(this: *mut ::core::ffi::c_void, buttonindex: i32, result__: *mut GameControllerButtonLabel) -> ::windows::core::HRESULT,
571 pub GetCurrentReading: unsafe extern "system" fn(this: *mut ::core::ffi::c_void, buttonArray_array_size: u32, buttonarray: *mut bool, switchArray_array_size: u32, switcharray: *mut GameControllerSwitchPosition, axisArray_array_size: u32, axisarray: *mut f64, result__: *mut u64) -> ::windows::core::HRESULT,
572 pub GetSwitchKind: unsafe extern "system" fn(this: *mut ::core::ffi::c_void, switchindex: i32, result__: *mut GameControllerSwitchKind) -> ::windows::core::HRESULT,
573 }
574 #[doc(hidden)]
575 #[repr(transparent)]
576 pub struct IRawGameController2(::windows::core::IUnknown);
577 unsafe impl ::windows::core::Interface for IRawGameController2 {
578 type Vtable = IRawGameController2_Vtbl;
579 }
580 impl ::core::clone::Clone for IRawGameController2 {
581 fn clone(&self) -> Self {
582 Self(self.0.clone())
583 }
584 }
585 unsafe impl ::windows::core::ComInterface for IRawGameController2 {
586 const IID: ::windows::core::GUID = ::windows::core::GUID::from_u128(0x43c0c035_bb73_4756_a787_3ed6bea617bd);
587 }
588 #[repr(C)]
589 #[doc(hidden)]
590 pub struct IRawGameController2_Vtbl {
591 pub base__: ::windows::core::IInspectable_Vtbl,
592 #[cfg(all(feature = "Devices_Haptics", feature = "Foundation_Collections"))]
593 pub SimpleHapticsControllers: unsafe extern "system" fn(this: *mut ::core::ffi::c_void, result__: *mut *mut ::core::ffi::c_void) -> ::windows::core::HRESULT,
594 #[cfg(not(all(feature = "Devices_Haptics", feature = "Foundation_Collections")))]
595 SimpleHapticsControllers: usize,
596 pub NonRoamableId: unsafe extern "system" fn(this: *mut ::core::ffi::c_void, result__: *mut ::std::mem::MaybeUninit<::windows::core::HSTRING>) -> ::windows::core::HRESULT,
597 pub DisplayName: unsafe extern "system" fn(this: *mut ::core::ffi::c_void, result__: *mut ::std::mem::MaybeUninit<::windows::core::HSTRING>) -> ::windows::core::HRESULT,
598 }
599 #[doc(hidden)]
600 #[repr(transparent)]
601 pub struct IRawGameControllerStatics(::windows::core::IUnknown);
602 unsafe impl ::windows::core::Interface for IRawGameControllerStatics {
603 type Vtable = IRawGameControllerStatics_Vtbl;
604 }
605 impl ::core::clone::Clone for IRawGameControllerStatics {
606 fn clone(&self) -> Self {
607 Self(self.0.clone())
608 }
609 }
610 unsafe impl ::windows::core::ComInterface for IRawGameControllerStatics {
611 const IID: ::windows::core::GUID = ::windows::core::GUID::from_u128(0xeb8d0792_e95a_4b19_afc7_0a59f8bf759e);
612 }
613 #[repr(C)]
614 #[doc(hidden)]
615 pub struct IRawGameControllerStatics_Vtbl {
616 pub base__: ::windows::core::IInspectable_Vtbl,
617 #[cfg(feature = "Foundation")]
618 pub RawGameControllerAdded: unsafe extern "system" fn(this: *mut ::core::ffi::c_void, value: *mut ::core::ffi::c_void, result__: *mut super::super::Foundation::EventRegistrationToken) -> ::windows::core::HRESULT,
619 #[cfg(not(feature = "Foundation"))]
620 RawGameControllerAdded: usize,
621 #[cfg(feature = "Foundation")]
622 pub RemoveRawGameControllerAdded: unsafe extern "system" fn(this: *mut ::core::ffi::c_void, token: super::super::Foundation::EventRegistrationToken) -> ::windows::core::HRESULT,
623 #[cfg(not(feature = "Foundation"))]
624 RemoveRawGameControllerAdded: usize,
625 #[cfg(feature = "Foundation")]
626 pub RawGameControllerRemoved: unsafe extern "system" fn(this: *mut ::core::ffi::c_void, value: *mut ::core::ffi::c_void, result__: *mut super::super::Foundation::EventRegistrationToken) -> ::windows::core::HRESULT,
627 #[cfg(not(feature = "Foundation"))]
628 RawGameControllerRemoved: usize,
629 #[cfg(feature = "Foundation")]
630 pub RemoveRawGameControllerRemoved: unsafe extern "system" fn(this: *mut ::core::ffi::c_void, token: super::super::Foundation::EventRegistrationToken) -> ::windows::core::HRESULT,
631 #[cfg(not(feature = "Foundation"))]
632 RemoveRawGameControllerRemoved: usize,
633 #[cfg(feature = "Foundation_Collections")]
634 pub RawGameControllers: unsafe extern "system" fn(this: *mut ::core::ffi::c_void, result__: *mut *mut ::core::ffi::c_void) -> ::windows::core::HRESULT,
635 #[cfg(not(feature = "Foundation_Collections"))]
636 RawGameControllers: usize,
637 pub FromGameController: unsafe extern "system" fn(this: *mut ::core::ffi::c_void, gamecontroller: *mut ::core::ffi::c_void, result__: *mut *mut ::core::ffi::c_void) -> ::windows::core::HRESULT,
638 }
639 #[doc(hidden)]
640 #[repr(transparent)]
641 pub struct IUINavigationController(::windows::core::IUnknown);
642 unsafe impl ::windows::core::Interface for IUINavigationController {
643 type Vtable = IUINavigationController_Vtbl;
644 }
645 impl ::core::clone::Clone for IUINavigationController {
646 fn clone(&self) -> Self {
647 Self(self.0.clone())
648 }
649 }
650 unsafe impl ::windows::core::ComInterface for IUINavigationController {
651 const IID: ::windows::core::GUID = ::windows::core::GUID::from_u128(0xe5aeefdd_f50e_4a55_8cdc_d33229548175);
652 }
653 #[repr(C)]
654 #[doc(hidden)]
655 pub struct IUINavigationController_Vtbl {
656 pub base__: ::windows::core::IInspectable_Vtbl,
657 pub GetCurrentReading: unsafe extern "system" fn(this: *mut ::core::ffi::c_void, result__: *mut UINavigationReading) -> ::windows::core::HRESULT,
658 pub GetOptionalButtonLabel: unsafe extern "system" fn(this: *mut ::core::ffi::c_void, button: OptionalUINavigationButtons, result__: *mut GameControllerButtonLabel) -> ::windows::core::HRESULT,
659 pub GetRequiredButtonLabel: unsafe extern "system" fn(this: *mut ::core::ffi::c_void, button: RequiredUINavigationButtons, result__: *mut GameControllerButtonLabel) -> ::windows::core::HRESULT,
660 }
661 #[doc(hidden)]
662 #[repr(transparent)]
663 pub struct IUINavigationControllerStatics(::windows::core::IUnknown);
664 unsafe impl ::windows::core::Interface for IUINavigationControllerStatics {
665 type Vtable = IUINavigationControllerStatics_Vtbl;
666 }
667 impl ::core::clone::Clone for IUINavigationControllerStatics {
668 fn clone(&self) -> Self {
669 Self(self.0.clone())
670 }
671 }
672 unsafe impl ::windows::core::ComInterface for IUINavigationControllerStatics {
673 const IID: ::windows::core::GUID = ::windows::core::GUID::from_u128(0x2f14930a_f6f8_4a48_8d89_94786cca0c2e);
674 }
675 #[repr(C)]
676 #[doc(hidden)]
677 pub struct IUINavigationControllerStatics_Vtbl {
678 pub base__: ::windows::core::IInspectable_Vtbl,
679 #[cfg(feature = "Foundation")]
680 pub UINavigationControllerAdded: unsafe extern "system" fn(this: *mut ::core::ffi::c_void, value: *mut ::core::ffi::c_void, result__: *mut super::super::Foundation::EventRegistrationToken) -> ::windows::core::HRESULT,
681 #[cfg(not(feature = "Foundation"))]
682 UINavigationControllerAdded: usize,
683 #[cfg(feature = "Foundation")]
684 pub RemoveUINavigationControllerAdded: unsafe extern "system" fn(this: *mut ::core::ffi::c_void, token: super::super::Foundation::EventRegistrationToken) -> ::windows::core::HRESULT,
685 #[cfg(not(feature = "Foundation"))]
686 RemoveUINavigationControllerAdded: usize,
687 #[cfg(feature = "Foundation")]
688 pub UINavigationControllerRemoved: unsafe extern "system" fn(this: *mut ::core::ffi::c_void, value: *mut ::core::ffi::c_void, result__: *mut super::super::Foundation::EventRegistrationToken) -> ::windows::core::HRESULT,
689 #[cfg(not(feature = "Foundation"))]
690 UINavigationControllerRemoved: usize,
691 #[cfg(feature = "Foundation")]
692 pub RemoveUINavigationControllerRemoved: unsafe extern "system" fn(this: *mut ::core::ffi::c_void, token: super::super::Foundation::EventRegistrationToken) -> ::windows::core::HRESULT,
693 #[cfg(not(feature = "Foundation"))]
694 RemoveUINavigationControllerRemoved: usize,
695 #[cfg(feature = "Foundation_Collections")]
696 pub UINavigationControllers: unsafe extern "system" fn(this: *mut ::core::ffi::c_void, result__: *mut *mut ::core::ffi::c_void) -> ::windows::core::HRESULT,
697 #[cfg(not(feature = "Foundation_Collections"))]
698 UINavigationControllers: usize,
699 }
700 #[doc(hidden)]
701 #[repr(transparent)]
702 pub struct IUINavigationControllerStatics2(::windows::core::IUnknown);
703 unsafe impl ::windows::core::Interface for IUINavigationControllerStatics2 {
704 type Vtable = IUINavigationControllerStatics2_Vtbl;
705 }
706 impl ::core::clone::Clone for IUINavigationControllerStatics2 {
707 fn clone(&self) -> Self {
708 Self(self.0.clone())
709 }
710 }
711 unsafe impl ::windows::core::ComInterface for IUINavigationControllerStatics2 {
712 const IID: ::windows::core::GUID = ::windows::core::GUID::from_u128(0xe0cb28e3_b20b_4b0b_9ed4_f3d53cec0de4);
713 }
714 #[repr(C)]
715 #[doc(hidden)]
716 pub struct IUINavigationControllerStatics2_Vtbl {
717 pub base__: ::windows::core::IInspectable_Vtbl,
718 pub FromGameController: unsafe extern "system" fn(this: *mut ::core::ffi::c_void, gamecontroller: *mut ::core::ffi::c_void, result__: *mut *mut ::core::ffi::c_void) -> ::windows::core::HRESULT,
719 }
720 #[doc = "*Required features: `\"Gaming_Input\"`*"]
721 #[repr(transparent)]
722 pub struct ArcadeStick(::windows::core::IUnknown);
723 impl ArcadeStick {
724 pub fn GetButtonLabel(&self, button: ArcadeStickButtons) -> ::windows::core::Result<GameControllerButtonLabel> {
725 let this = self;
726 unsafe {
727 let mut result__ = ::windows::core::zeroed::<GameControllerButtonLabel>();
728 (::windows::core::Interface::vtable(this).GetButtonLabel)(::windows::core::Interface::as_raw(this), button, &mut result__).from_abi(result__)
729 }
730 }
731 pub fn GetCurrentReading(&self) -> ::windows::core::Result<ArcadeStickReading> {
732 let this = self;
733 unsafe {
734 let mut result__ = ::windows::core::zeroed::<ArcadeStickReading>();
735 (::windows::core::Interface::vtable(this).GetCurrentReading)(::windows::core::Interface::as_raw(this), &mut result__).from_abi(result__)
736 }
737 }
738 #[doc = "*Required features: `\"Foundation\"`*"]
739 #[cfg(feature = "Foundation")]
740 pub fn ArcadeStickAdded(value: &super::super::Foundation::EventHandler<ArcadeStick>) -> ::windows::core::Result<super::super::Foundation::EventRegistrationToken> {
741 Self::IArcadeStickStatics(|this| unsafe {
742 let mut result__ = ::windows::core::zeroed::<super::super::Foundation::EventRegistrationToken>();
743 (::windows::core::Interface::vtable(this).ArcadeStickAdded)(::windows::core::Interface::as_raw(this), ::core::mem::transmute_copy(value), &mut result__).from_abi(result__)
744 })
745 }
746 #[doc = "*Required features: `\"Foundation\"`*"]
747 #[cfg(feature = "Foundation")]
748 pub fn RemoveArcadeStickAdded(token: super::super::Foundation::EventRegistrationToken) -> ::windows::core::Result<()> {
749 Self::IArcadeStickStatics(|this| unsafe { (::windows::core::Interface::vtable(this).RemoveArcadeStickAdded)(::windows::core::Interface::as_raw(this), token).ok() })
750 }
751 #[doc = "*Required features: `\"Foundation\"`*"]
752 #[cfg(feature = "Foundation")]
753 pub fn ArcadeStickRemoved(value: &super::super::Foundation::EventHandler<ArcadeStick>) -> ::windows::core::Result<super::super::Foundation::EventRegistrationToken> {
754 Self::IArcadeStickStatics(|this| unsafe {
755 let mut result__ = ::windows::core::zeroed::<super::super::Foundation::EventRegistrationToken>();
756 (::windows::core::Interface::vtable(this).ArcadeStickRemoved)(::windows::core::Interface::as_raw(this), ::core::mem::transmute_copy(value), &mut result__).from_abi(result__)
757 })
758 }
759 #[doc = "*Required features: `\"Foundation\"`*"]
760 #[cfg(feature = "Foundation")]
761 pub fn RemoveArcadeStickRemoved(token: super::super::Foundation::EventRegistrationToken) -> ::windows::core::Result<()> {
762 Self::IArcadeStickStatics(|this| unsafe { (::windows::core::Interface::vtable(this).RemoveArcadeStickRemoved)(::windows::core::Interface::as_raw(this), token).ok() })
763 }
764 #[doc = "*Required features: `\"Foundation_Collections\"`*"]
765 #[cfg(feature = "Foundation_Collections")]
766 pub fn ArcadeSticks() -> ::windows::core::Result<super::super::Foundation::Collections::IVectorView<ArcadeStick>> {
767 Self::IArcadeStickStatics(|this| unsafe {
768 let mut result__ = ::windows::core::zeroed::<super::super::Foundation::Collections::IVectorView<ArcadeStick>>();
769 (::windows::core::Interface::vtable(this).ArcadeSticks)(::windows::core::Interface::as_raw(this), &mut result__).from_abi(result__)
770 })
771 }
772 pub fn FromGameController<P0>(gamecontroller: P0) -> ::windows::core::Result<ArcadeStick>
773 where
774 P0: ::windows::core::TryIntoParam<IGameController>,
775 {
776 Self::IArcadeStickStatics2(|this| unsafe {
777 let mut result__ = ::windows::core::zeroed::<ArcadeStick>();
778 (::windows::core::Interface::vtable(this).FromGameController)(::windows::core::Interface::as_raw(this), gamecontroller.try_into_param()?.abi(), &mut result__).from_abi(result__)
779 })
780 }
781 #[doc = "*Required features: `\"Foundation\"`*"]
782 #[cfg(feature = "Foundation")]
783 pub fn HeadsetConnected(&self, value: &super::super::Foundation::TypedEventHandler<IGameController, Headset>) -> ::windows::core::Result<super::super::Foundation::EventRegistrationToken> {
784 let this = &::windows::core::ComInterface::cast::<IGameController>(self)?;
785 unsafe {
786 let mut result__ = ::windows::core::zeroed::<super::super::Foundation::EventRegistrationToken>();
787 (::windows::core::Interface::vtable(this).HeadsetConnected)(::windows::core::Interface::as_raw(this), ::core::mem::transmute_copy(value), &mut result__).from_abi(result__)
788 }
789 }
790 #[doc = "*Required features: `\"Foundation\"`*"]
791 #[cfg(feature = "Foundation")]
792 pub fn RemoveHeadsetConnected(&self, token: super::super::Foundation::EventRegistrationToken) -> ::windows::core::Result<()> {
793 let this = &::windows::core::ComInterface::cast::<IGameController>(self)?;
794 unsafe { (::windows::core::Interface::vtable(this).RemoveHeadsetConnected)(::windows::core::Interface::as_raw(this), token).ok() }
795 }
796 #[doc = "*Required features: `\"Foundation\"`*"]
797 #[cfg(feature = "Foundation")]
798 pub fn HeadsetDisconnected(&self, value: &super::super::Foundation::TypedEventHandler<IGameController, Headset>) -> ::windows::core::Result<super::super::Foundation::EventRegistrationToken> {
799 let this = &::windows::core::ComInterface::cast::<IGameController>(self)?;
800 unsafe {
801 let mut result__ = ::windows::core::zeroed::<super::super::Foundation::EventRegistrationToken>();
802 (::windows::core::Interface::vtable(this).HeadsetDisconnected)(::windows::core::Interface::as_raw(this), ::core::mem::transmute_copy(value), &mut result__).from_abi(result__)
803 }
804 }
805 #[doc = "*Required features: `\"Foundation\"`*"]
806 #[cfg(feature = "Foundation")]
807 pub fn RemoveHeadsetDisconnected(&self, token: super::super::Foundation::EventRegistrationToken) -> ::windows::core::Result<()> {
808 let this = &::windows::core::ComInterface::cast::<IGameController>(self)?;
809 unsafe { (::windows::core::Interface::vtable(this).RemoveHeadsetDisconnected)(::windows::core::Interface::as_raw(this), token).ok() }
810 }
811 #[doc = "*Required features: `\"Foundation\"`, `\"System\"`*"]
812 #[cfg(all(feature = "Foundation", feature = "System"))]
813 pub fn UserChanged(&self, value: &super::super::Foundation::TypedEventHandler<IGameController, super::super::System::UserChangedEventArgs>) -> ::windows::core::Result<super::super::Foundation::EventRegistrationToken> {
814 let this = &::windows::core::ComInterface::cast::<IGameController>(self)?;
815 unsafe {
816 let mut result__ = ::windows::core::zeroed::<super::super::Foundation::EventRegistrationToken>();
817 (::windows::core::Interface::vtable(this).UserChanged)(::windows::core::Interface::as_raw(this), ::core::mem::transmute_copy(value), &mut result__).from_abi(result__)
818 }
819 }
820 #[doc = "*Required features: `\"Foundation\"`*"]
821 #[cfg(feature = "Foundation")]
822 pub fn RemoveUserChanged(&self, token: super::super::Foundation::EventRegistrationToken) -> ::windows::core::Result<()> {
823 let this = &::windows::core::ComInterface::cast::<IGameController>(self)?;
824 unsafe { (::windows::core::Interface::vtable(this).RemoveUserChanged)(::windows::core::Interface::as_raw(this), token).ok() }
825 }
826 pub fn Headset(&self) -> ::windows::core::Result<Headset> {
827 let this = &::windows::core::ComInterface::cast::<IGameController>(self)?;
828 unsafe {
829 let mut result__ = ::windows::core::zeroed::<Headset>();
830 (::windows::core::Interface::vtable(this).Headset)(::windows::core::Interface::as_raw(this), &mut result__).from_abi(result__)
831 }
832 }
833 pub fn IsWireless(&self) -> ::windows::core::Result<bool> {
834 let this = &::windows::core::ComInterface::cast::<IGameController>(self)?;
835 unsafe {
836 let mut result__ = ::windows::core::zeroed::<bool>();
837 (::windows::core::Interface::vtable(this).IsWireless)(::windows::core::Interface::as_raw(this), &mut result__).from_abi(result__)
838 }
839 }
840 #[doc = "*Required features: `\"System\"`*"]
841 #[cfg(feature = "System")]
842 pub fn User(&self) -> ::windows::core::Result<super::super::System::User> {
843 let this = &::windows::core::ComInterface::cast::<IGameController>(self)?;
844 unsafe {
845 let mut result__ = ::windows::core::zeroed::<super::super::System::User>();
846 (::windows::core::Interface::vtable(this).User)(::windows::core::Interface::as_raw(this), &mut result__).from_abi(result__)
847 }
848 }
849 #[doc = "*Required features: `\"Devices_Power\"`*"]
850 #[cfg(feature = "Devices_Power")]
851 pub fn TryGetBatteryReport(&self) -> ::windows::core::Result<super::super::Devices::Power::BatteryReport> {
852 let this = &::windows::core::ComInterface::cast::<IGameControllerBatteryInfo>(self)?;
853 unsafe {
854 let mut result__ = ::windows::core::zeroed::<super::super::Devices::Power::BatteryReport>();
855 (::windows::core::Interface::vtable(this).TryGetBatteryReport)(::windows::core::Interface::as_raw(this), &mut result__).from_abi(result__)
856 }
857 }
858 #[doc(hidden)]
859 pub fn IArcadeStickStatics<R, F: FnOnce(&IArcadeStickStatics) -> ::windows::core::Result<R>>(callback: F) -> ::windows::core::Result<R> {
860 static SHARED: ::windows::imp::FactoryCache<ArcadeStick, IArcadeStickStatics> = ::windows::imp::FactoryCache::new();
861 SHARED.call(callback)
862 }
863 #[doc(hidden)]
864 pub fn IArcadeStickStatics2<R, F: FnOnce(&IArcadeStickStatics2) -> ::windows::core::Result<R>>(callback: F) -> ::windows::core::Result<R> {
865 static SHARED: ::windows::imp::FactoryCache<ArcadeStick, IArcadeStickStatics2> = ::windows::imp::FactoryCache::new();
866 SHARED.call(callback)
867 }
868 }
869 impl ::core::cmp::PartialEq for ArcadeStick {
870 fn eq(&self, other: &Self) -> bool {
871 self.0 == other.0
872 }
873 }
874 impl ::core::cmp::Eq for ArcadeStick {}
875 impl ::core::fmt::Debug for ArcadeStick {
876 fn fmt(&self, f: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result {
877 f.debug_tuple("ArcadeStick").field(&self.0).finish()
878 }
879 }
880 impl ::windows::core::RuntimeType for ArcadeStick {
881 const SIGNATURE: ::windows::imp::ConstBuffer = ::windows::imp::ConstBuffer::from_slice(b"rc(Windows.Gaming.Input.ArcadeStick;{b14a539d-befb-4c81-8051-15ecf3b13036})");
882 }
883 impl ::core::clone::Clone for ArcadeStick {
884 fn clone(&self) -> Self {
885 Self(self.0.clone())
886 }
887 }
888 unsafe impl ::windows::core::Interface for ArcadeStick {
889 type Vtable = IArcadeStick_Vtbl;
890 }
891 unsafe impl ::windows::core::ComInterface for ArcadeStick {
892 const IID: ::windows::core::GUID = <IArcadeStick as ::windows::core::ComInterface>::IID;
893 }
894 impl ::windows::core::RuntimeName for ArcadeStick {
895 const NAME: &'static str = "Windows.Gaming.Input.ArcadeStick";
896 }
897 ::windows::imp::interface_hierarchy!(ArcadeStick, ::windows::core::IUnknown, ::windows::core::IInspectable);
898 impl ::windows::core::CanTryInto<IGameController> for ArcadeStick {}
899 impl ::windows::core::CanTryInto<IGameControllerBatteryInfo> for ArcadeStick {}
900 unsafe impl ::core::marker::Send for ArcadeStick {}
901 unsafe impl ::core::marker::Sync for ArcadeStick {}
902 #[doc = "*Required features: `\"Gaming_Input\"`*"]
903 #[repr(transparent)]
904 pub struct FlightStick(::windows::core::IUnknown);
905 impl FlightStick {
906 pub fn HatSwitchKind(&self) -> ::windows::core::Result<GameControllerSwitchKind> {
907 let this = self;
908 unsafe {
909 let mut result__ = ::windows::core::zeroed::<GameControllerSwitchKind>();
910 (::windows::core::Interface::vtable(this).HatSwitchKind)(::windows::core::Interface::as_raw(this), &mut result__).from_abi(result__)
911 }
912 }
913 pub fn GetButtonLabel(&self, button: FlightStickButtons) -> ::windows::core::Result<GameControllerButtonLabel> {
914 let this = self;
915 unsafe {
916 let mut result__ = ::windows::core::zeroed::<GameControllerButtonLabel>();
917 (::windows::core::Interface::vtable(this).GetButtonLabel)(::windows::core::Interface::as_raw(this), button, &mut result__).from_abi(result__)
918 }
919 }
920 pub fn GetCurrentReading(&self) -> ::windows::core::Result<FlightStickReading> {
921 let this = self;
922 unsafe {
923 let mut result__ = ::windows::core::zeroed::<FlightStickReading>();
924 (::windows::core::Interface::vtable(this).GetCurrentReading)(::windows::core::Interface::as_raw(this), &mut result__).from_abi(result__)
925 }
926 }
927 #[doc = "*Required features: `\"Foundation\"`*"]
928 #[cfg(feature = "Foundation")]
929 pub fn FlightStickAdded(value: &super::super::Foundation::EventHandler<FlightStick>) -> ::windows::core::Result<super::super::Foundation::EventRegistrationToken> {
930 Self::IFlightStickStatics(|this| unsafe {
931 let mut result__ = ::windows::core::zeroed::<super::super::Foundation::EventRegistrationToken>();
932 (::windows::core::Interface::vtable(this).FlightStickAdded)(::windows::core::Interface::as_raw(this), ::core::mem::transmute_copy(value), &mut result__).from_abi(result__)
933 })
934 }
935 #[doc = "*Required features: `\"Foundation\"`*"]
936 #[cfg(feature = "Foundation")]
937 pub fn RemoveFlightStickAdded(token: super::super::Foundation::EventRegistrationToken) -> ::windows::core::Result<()> {
938 Self::IFlightStickStatics(|this| unsafe { (::windows::core::Interface::vtable(this).RemoveFlightStickAdded)(::windows::core::Interface::as_raw(this), token).ok() })
939 }
940 #[doc = "*Required features: `\"Foundation\"`*"]
941 #[cfg(feature = "Foundation")]
942 pub fn FlightStickRemoved(value: &super::super::Foundation::EventHandler<FlightStick>) -> ::windows::core::Result<super::super::Foundation::EventRegistrationToken> {
943 Self::IFlightStickStatics(|this| unsafe {
944 let mut result__ = ::windows::core::zeroed::<super::super::Foundation::EventRegistrationToken>();
945 (::windows::core::Interface::vtable(this).FlightStickRemoved)(::windows::core::Interface::as_raw(this), ::core::mem::transmute_copy(value), &mut result__).from_abi(result__)
946 })
947 }
948 #[doc = "*Required features: `\"Foundation\"`*"]
949 #[cfg(feature = "Foundation")]
950 pub fn RemoveFlightStickRemoved(token: super::super::Foundation::EventRegistrationToken) -> ::windows::core::Result<()> {
951 Self::IFlightStickStatics(|this| unsafe { (::windows::core::Interface::vtable(this).RemoveFlightStickRemoved)(::windows::core::Interface::as_raw(this), token).ok() })
952 }
953 #[doc = "*Required features: `\"Foundation_Collections\"`*"]
954 #[cfg(feature = "Foundation_Collections")]
955 pub fn FlightSticks() -> ::windows::core::Result<super::super::Foundation::Collections::IVectorView<FlightStick>> {
956 Self::IFlightStickStatics(|this| unsafe {
957 let mut result__ = ::windows::core::zeroed::<super::super::Foundation::Collections::IVectorView<FlightStick>>();
958 (::windows::core::Interface::vtable(this).FlightSticks)(::windows::core::Interface::as_raw(this), &mut result__).from_abi(result__)
959 })
960 }
961 pub fn FromGameController<P0>(gamecontroller: P0) -> ::windows::core::Result<FlightStick>
962 where
963 P0: ::windows::core::TryIntoParam<IGameController>,
964 {
965 Self::IFlightStickStatics(|this| unsafe {
966 let mut result__ = ::windows::core::zeroed::<FlightStick>();
967 (::windows::core::Interface::vtable(this).FromGameController)(::windows::core::Interface::as_raw(this), gamecontroller.try_into_param()?.abi(), &mut result__).from_abi(result__)
968 })
969 }
970 #[doc = "*Required features: `\"Foundation\"`*"]
971 #[cfg(feature = "Foundation")]
972 pub fn HeadsetConnected(&self, value: &super::super::Foundation::TypedEventHandler<IGameController, Headset>) -> ::windows::core::Result<super::super::Foundation::EventRegistrationToken> {
973 let this = &::windows::core::ComInterface::cast::<IGameController>(self)?;
974 unsafe {
975 let mut result__ = ::windows::core::zeroed::<super::super::Foundation::EventRegistrationToken>();
976 (::windows::core::Interface::vtable(this).HeadsetConnected)(::windows::core::Interface::as_raw(this), ::core::mem::transmute_copy(value), &mut result__).from_abi(result__)
977 }
978 }
979 #[doc = "*Required features: `\"Foundation\"`*"]
980 #[cfg(feature = "Foundation")]
981 pub fn RemoveHeadsetConnected(&self, token: super::super::Foundation::EventRegistrationToken) -> ::windows::core::Result<()> {
982 let this = &::windows::core::ComInterface::cast::<IGameController>(self)?;
983 unsafe { (::windows::core::Interface::vtable(this).RemoveHeadsetConnected)(::windows::core::Interface::as_raw(this), token).ok() }
984 }
985 #[doc = "*Required features: `\"Foundation\"`*"]
986 #[cfg(feature = "Foundation")]
987 pub fn HeadsetDisconnected(&self, value: &super::super::Foundation::TypedEventHandler<IGameController, Headset>) -> ::windows::core::Result<super::super::Foundation::EventRegistrationToken> {
988 let this = &::windows::core::ComInterface::cast::<IGameController>(self)?;
989 unsafe {
990 let mut result__ = ::windows::core::zeroed::<super::super::Foundation::EventRegistrationToken>();
991 (::windows::core::Interface::vtable(this).HeadsetDisconnected)(::windows::core::Interface::as_raw(this), ::core::mem::transmute_copy(value), &mut result__).from_abi(result__)
992 }
993 }
994 #[doc = "*Required features: `\"Foundation\"`*"]
995 #[cfg(feature = "Foundation")]
996 pub fn RemoveHeadsetDisconnected(&self, token: super::super::Foundation::EventRegistrationToken) -> ::windows::core::Result<()> {
997 let this = &::windows::core::ComInterface::cast::<IGameController>(self)?;
998 unsafe { (::windows::core::Interface::vtable(this).RemoveHeadsetDisconnected)(::windows::core::Interface::as_raw(this), token).ok() }
999 }
1000 #[doc = "*Required features: `\"Foundation\"`, `\"System\"`*"]
1001 #[cfg(all(feature = "Foundation", feature = "System"))]
1002 pub fn UserChanged(&self, value: &super::super::Foundation::TypedEventHandler<IGameController, super::super::System::UserChangedEventArgs>) -> ::windows::core::Result<super::super::Foundation::EventRegistrationToken> {
1003 let this = &::windows::core::ComInterface::cast::<IGameController>(self)?;
1004 unsafe {
1005 let mut result__ = ::windows::core::zeroed::<super::super::Foundation::EventRegistrationToken>();
1006 (::windows::core::Interface::vtable(this).UserChanged)(::windows::core::Interface::as_raw(this), ::core::mem::transmute_copy(value), &mut result__).from_abi(result__)
1007 }
1008 }
1009 #[doc = "*Required features: `\"Foundation\"`*"]
1010 #[cfg(feature = "Foundation")]
1011 pub fn RemoveUserChanged(&self, token: super::super::Foundation::EventRegistrationToken) -> ::windows::core::Result<()> {
1012 let this = &::windows::core::ComInterface::cast::<IGameController>(self)?;
1013 unsafe { (::windows::core::Interface::vtable(this).RemoveUserChanged)(::windows::core::Interface::as_raw(this), token).ok() }
1014 }
1015 pub fn Headset(&self) -> ::windows::core::Result<Headset> {
1016 let this = &::windows::core::ComInterface::cast::<IGameController>(self)?;
1017 unsafe {
1018 let mut result__ = ::windows::core::zeroed::<Headset>();
1019 (::windows::core::Interface::vtable(this).Headset)(::windows::core::Interface::as_raw(this), &mut result__).from_abi(result__)
1020 }
1021 }
1022 pub fn IsWireless(&self) -> ::windows::core::Result<bool> {
1023 let this = &::windows::core::ComInterface::cast::<IGameController>(self)?;
1024 unsafe {
1025 let mut result__ = ::windows::core::zeroed::<bool>();
1026 (::windows::core::Interface::vtable(this).IsWireless)(::windows::core::Interface::as_raw(this), &mut result__).from_abi(result__)
1027 }
1028 }
1029 #[doc = "*Required features: `\"System\"`*"]
1030 #[cfg(feature = "System")]
1031 pub fn User(&self) -> ::windows::core::Result<super::super::System::User> {
1032 let this = &::windows::core::ComInterface::cast::<IGameController>(self)?;
1033 unsafe {
1034 let mut result__ = ::windows::core::zeroed::<super::super::System::User>();
1035 (::windows::core::Interface::vtable(this).User)(::windows::core::Interface::as_raw(this), &mut result__).from_abi(result__)
1036 }
1037 }
1038 #[doc = "*Required features: `\"Devices_Power\"`*"]
1039 #[cfg(feature = "Devices_Power")]
1040 pub fn TryGetBatteryReport(&self) -> ::windows::core::Result<super::super::Devices::Power::BatteryReport> {
1041 let this = &::windows::core::ComInterface::cast::<IGameControllerBatteryInfo>(self)?;
1042 unsafe {
1043 let mut result__ = ::windows::core::zeroed::<super::super::Devices::Power::BatteryReport>();
1044 (::windows::core::Interface::vtable(this).TryGetBatteryReport)(::windows::core::Interface::as_raw(this), &mut result__).from_abi(result__)
1045 }
1046 }
1047 #[doc(hidden)]
1048 pub fn IFlightStickStatics<R, F: FnOnce(&IFlightStickStatics) -> ::windows::core::Result<R>>(callback: F) -> ::windows::core::Result<R> {
1049 static SHARED: ::windows::imp::FactoryCache<FlightStick, IFlightStickStatics> = ::windows::imp::FactoryCache::new();
1050 SHARED.call(callback)
1051 }
1052 }
1053 impl ::core::cmp::PartialEq for FlightStick {
1054 fn eq(&self, other: &Self) -> bool {
1055 self.0 == other.0
1056 }
1057 }
1058 impl ::core::cmp::Eq for FlightStick {}
1059 impl ::core::fmt::Debug for FlightStick {
1060 fn fmt(&self, f: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result {
1061 f.debug_tuple("FlightStick").field(&self.0).finish()
1062 }
1063 }
1064 impl ::windows::core::RuntimeType for FlightStick {
1065 const SIGNATURE: ::windows::imp::ConstBuffer = ::windows::imp::ConstBuffer::from_slice(b"rc(Windows.Gaming.Input.FlightStick;{b4a2c01c-b83b-4459-a1a9-97b03c33da7c})");
1066 }
1067 impl ::core::clone::Clone for FlightStick {
1068 fn clone(&self) -> Self {
1069 Self(self.0.clone())
1070 }
1071 }
1072 unsafe impl ::windows::core::Interface for FlightStick {
1073 type Vtable = IFlightStick_Vtbl;
1074 }
1075 unsafe impl ::windows::core::ComInterface for FlightStick {
1076 const IID: ::windows::core::GUID = <IFlightStick as ::windows::core::ComInterface>::IID;
1077 }
1078 impl ::windows::core::RuntimeName for FlightStick {
1079 const NAME: &'static str = "Windows.Gaming.Input.FlightStick";
1080 }
1081 ::windows::imp::interface_hierarchy!(FlightStick, ::windows::core::IUnknown, ::windows::core::IInspectable);
1082 impl ::windows::core::CanTryInto<IGameController> for FlightStick {}
1083 impl ::windows::core::CanTryInto<IGameControllerBatteryInfo> for FlightStick {}
1084 unsafe impl ::core::marker::Send for FlightStick {}
1085 unsafe impl ::core::marker::Sync for FlightStick {}
1086 #[doc = "*Required features: `\"Gaming_Input\"`*"]
1087 #[repr(transparent)]
1088 pub struct Gamepad(::windows::core::IUnknown);
1089 impl Gamepad {
1090 #[doc = "*Required features: `\"Foundation\"`*"]
1091 #[cfg(feature = "Foundation")]
1092 pub fn HeadsetConnected(&self, value: &super::super::Foundation::TypedEventHandler<IGameController, Headset>) -> ::windows::core::Result<super::super::Foundation::EventRegistrationToken> {
1093 let this = &::windows::core::ComInterface::cast::<IGameController>(self)?;
1094 unsafe {
1095 let mut result__ = ::windows::core::zeroed::<super::super::Foundation::EventRegistrationToken>();
1096 (::windows::core::Interface::vtable(this).HeadsetConnected)(::windows::core::Interface::as_raw(this), ::core::mem::transmute_copy(value), &mut result__).from_abi(result__)
1097 }
1098 }
1099 #[doc = "*Required features: `\"Foundation\"`*"]
1100 #[cfg(feature = "Foundation")]
1101 pub fn RemoveHeadsetConnected(&self, token: super::super::Foundation::EventRegistrationToken) -> ::windows::core::Result<()> {
1102 let this = &::windows::core::ComInterface::cast::<IGameController>(self)?;
1103 unsafe { (::windows::core::Interface::vtable(this).RemoveHeadsetConnected)(::windows::core::Interface::as_raw(this), token).ok() }
1104 }
1105 #[doc = "*Required features: `\"Foundation\"`*"]
1106 #[cfg(feature = "Foundation")]
1107 pub fn HeadsetDisconnected(&self, value: &super::super::Foundation::TypedEventHandler<IGameController, Headset>) -> ::windows::core::Result<super::super::Foundation::EventRegistrationToken> {
1108 let this = &::windows::core::ComInterface::cast::<IGameController>(self)?;
1109 unsafe {
1110 let mut result__ = ::windows::core::zeroed::<super::super::Foundation::EventRegistrationToken>();
1111 (::windows::core::Interface::vtable(this).HeadsetDisconnected)(::windows::core::Interface::as_raw(this), ::core::mem::transmute_copy(value), &mut result__).from_abi(result__)
1112 }
1113 }
1114 #[doc = "*Required features: `\"Foundation\"`*"]
1115 #[cfg(feature = "Foundation")]
1116 pub fn RemoveHeadsetDisconnected(&self, token: super::super::Foundation::EventRegistrationToken) -> ::windows::core::Result<()> {
1117 let this = &::windows::core::ComInterface::cast::<IGameController>(self)?;
1118 unsafe { (::windows::core::Interface::vtable(this).RemoveHeadsetDisconnected)(::windows::core::Interface::as_raw(this), token).ok() }
1119 }
1120 #[doc = "*Required features: `\"Foundation\"`, `\"System\"`*"]
1121 #[cfg(all(feature = "Foundation", feature = "System"))]
1122 pub fn UserChanged(&self, value: &super::super::Foundation::TypedEventHandler<IGameController, super::super::System::UserChangedEventArgs>) -> ::windows::core::Result<super::super::Foundation::EventRegistrationToken> {
1123 let this = &::windows::core::ComInterface::cast::<IGameController>(self)?;
1124 unsafe {
1125 let mut result__ = ::windows::core::zeroed::<super::super::Foundation::EventRegistrationToken>();
1126 (::windows::core::Interface::vtable(this).UserChanged)(::windows::core::Interface::as_raw(this), ::core::mem::transmute_copy(value), &mut result__).from_abi(result__)
1127 }
1128 }
1129 #[doc = "*Required features: `\"Foundation\"`*"]
1130 #[cfg(feature = "Foundation")]
1131 pub fn RemoveUserChanged(&self, token: super::super::Foundation::EventRegistrationToken) -> ::windows::core::Result<()> {
1132 let this = &::windows::core::ComInterface::cast::<IGameController>(self)?;
1133 unsafe { (::windows::core::Interface::vtable(this).RemoveUserChanged)(::windows::core::Interface::as_raw(this), token).ok() }
1134 }
1135 pub fn Headset(&self) -> ::windows::core::Result<Headset> {
1136 let this = &::windows::core::ComInterface::cast::<IGameController>(self)?;
1137 unsafe {
1138 let mut result__ = ::windows::core::zeroed::<Headset>();
1139 (::windows::core::Interface::vtable(this).Headset)(::windows::core::Interface::as_raw(this), &mut result__).from_abi(result__)
1140 }
1141 }
1142 pub fn IsWireless(&self) -> ::windows::core::Result<bool> {
1143 let this = &::windows::core::ComInterface::cast::<IGameController>(self)?;
1144 unsafe {
1145 let mut result__ = ::windows::core::zeroed::<bool>();
1146 (::windows::core::Interface::vtable(this).IsWireless)(::windows::core::Interface::as_raw(this), &mut result__).from_abi(result__)
1147 }
1148 }
1149 #[doc = "*Required features: `\"System\"`*"]
1150 #[cfg(feature = "System")]
1151 pub fn User(&self) -> ::windows::core::Result<super::super::System::User> {
1152 let this = &::windows::core::ComInterface::cast::<IGameController>(self)?;
1153 unsafe {
1154 let mut result__ = ::windows::core::zeroed::<super::super::System::User>();
1155 (::windows::core::Interface::vtable(this).User)(::windows::core::Interface::as_raw(this), &mut result__).from_abi(result__)
1156 }
1157 }
1158 #[doc = "*Required features: `\"Devices_Power\"`*"]
1159 #[cfg(feature = "Devices_Power")]
1160 pub fn TryGetBatteryReport(&self) -> ::windows::core::Result<super::super::Devices::Power::BatteryReport> {
1161 let this = &::windows::core::ComInterface::cast::<IGameControllerBatteryInfo>(self)?;
1162 unsafe {
1163 let mut result__ = ::windows::core::zeroed::<super::super::Devices::Power::BatteryReport>();
1164 (::windows::core::Interface::vtable(this).TryGetBatteryReport)(::windows::core::Interface::as_raw(this), &mut result__).from_abi(result__)
1165 }
1166 }
1167 pub fn Vibration(&self) -> ::windows::core::Result<GamepadVibration> {
1168 let this = self;
1169 unsafe {
1170 let mut result__ = ::windows::core::zeroed::<GamepadVibration>();
1171 (::windows::core::Interface::vtable(this).Vibration)(::windows::core::Interface::as_raw(this), &mut result__).from_abi(result__)
1172 }
1173 }
1174 pub fn SetVibration(&self, value: GamepadVibration) -> ::windows::core::Result<()> {
1175 let this = self;
1176 unsafe { (::windows::core::Interface::vtable(this).SetVibration)(::windows::core::Interface::as_raw(this), value).ok() }
1177 }
1178 pub fn GetCurrentReading(&self) -> ::windows::core::Result<GamepadReading> {
1179 let this = self;
1180 unsafe {
1181 let mut result__ = ::windows::core::zeroed::<GamepadReading>();
1182 (::windows::core::Interface::vtable(this).GetCurrentReading)(::windows::core::Interface::as_raw(this), &mut result__).from_abi(result__)
1183 }
1184 }
1185 pub fn GetButtonLabel(&self, button: GamepadButtons) -> ::windows::core::Result<GameControllerButtonLabel> {
1186 let this = &::windows::core::ComInterface::cast::<IGamepad2>(self)?;
1187 unsafe {
1188 let mut result__ = ::windows::core::zeroed::<GameControllerButtonLabel>();
1189 (::windows::core::Interface::vtable(this).GetButtonLabel)(::windows::core::Interface::as_raw(this), button, &mut result__).from_abi(result__)
1190 }
1191 }
1192 #[doc = "*Required features: `\"Foundation\"`*"]
1193 #[cfg(feature = "Foundation")]
1194 pub fn GamepadAdded(value: &super::super::Foundation::EventHandler<Gamepad>) -> ::windows::core::Result<super::super::Foundation::EventRegistrationToken> {
1195 Self::IGamepadStatics(|this| unsafe {
1196 let mut result__ = ::windows::core::zeroed::<super::super::Foundation::EventRegistrationToken>();
1197 (::windows::core::Interface::vtable(this).GamepadAdded)(::windows::core::Interface::as_raw(this), ::core::mem::transmute_copy(value), &mut result__).from_abi(result__)
1198 })
1199 }
1200 #[doc = "*Required features: `\"Foundation\"`*"]
1201 #[cfg(feature = "Foundation")]
1202 pub fn RemoveGamepadAdded(token: super::super::Foundation::EventRegistrationToken) -> ::windows::core::Result<()> {
1203 Self::IGamepadStatics(|this| unsafe { (::windows::core::Interface::vtable(this).RemoveGamepadAdded)(::windows::core::Interface::as_raw(this), token).ok() })
1204 }
1205 #[doc = "*Required features: `\"Foundation\"`*"]
1206 #[cfg(feature = "Foundation")]
1207 pub fn GamepadRemoved(value: &super::super::Foundation::EventHandler<Gamepad>) -> ::windows::core::Result<super::super::Foundation::EventRegistrationToken> {
1208 Self::IGamepadStatics(|this| unsafe {
1209 let mut result__ = ::windows::core::zeroed::<super::super::Foundation::EventRegistrationToken>();
1210 (::windows::core::Interface::vtable(this).GamepadRemoved)(::windows::core::Interface::as_raw(this), ::core::mem::transmute_copy(value), &mut result__).from_abi(result__)
1211 })
1212 }
1213 #[doc = "*Required features: `\"Foundation\"`*"]
1214 #[cfg(feature = "Foundation")]
1215 pub fn RemoveGamepadRemoved(token: super::super::Foundation::EventRegistrationToken) -> ::windows::core::Result<()> {
1216 Self::IGamepadStatics(|this| unsafe { (::windows::core::Interface::vtable(this).RemoveGamepadRemoved)(::windows::core::Interface::as_raw(this), token).ok() })
1217 }
1218 #[doc = "*Required features: `\"Foundation_Collections\"`*"]
1219 #[cfg(feature = "Foundation_Collections")]
1220 pub fn Gamepads() -> ::windows::core::Result<super::super::Foundation::Collections::IVectorView<Gamepad>> {
1221 Self::IGamepadStatics(|this| unsafe {
1222 let mut result__ = ::windows::core::zeroed::<super::super::Foundation::Collections::IVectorView<Gamepad>>();
1223 (::windows::core::Interface::vtable(this).Gamepads)(::windows::core::Interface::as_raw(this), &mut result__).from_abi(result__)
1224 })
1225 }
1226 pub fn FromGameController<P0>(gamecontroller: P0) -> ::windows::core::Result<Gamepad>
1227 where
1228 P0: ::windows::core::TryIntoParam<IGameController>,
1229 {
1230 Self::IGamepadStatics2(|this| unsafe {
1231 let mut result__ = ::windows::core::zeroed::<Gamepad>();
1232 (::windows::core::Interface::vtable(this).FromGameController)(::windows::core::Interface::as_raw(this), gamecontroller.try_into_param()?.abi(), &mut result__).from_abi(result__)
1233 })
1234 }
1235 #[doc(hidden)]
1236 pub fn IGamepadStatics<R, F: FnOnce(&IGamepadStatics) -> ::windows::core::Result<R>>(callback: F) -> ::windows::core::Result<R> {
1237 static SHARED: ::windows::imp::FactoryCache<Gamepad, IGamepadStatics> = ::windows::imp::FactoryCache::new();
1238 SHARED.call(callback)
1239 }
1240 #[doc(hidden)]
1241 pub fn IGamepadStatics2<R, F: FnOnce(&IGamepadStatics2) -> ::windows::core::Result<R>>(callback: F) -> ::windows::core::Result<R> {
1242 static SHARED: ::windows::imp::FactoryCache<Gamepad, IGamepadStatics2> = ::windows::imp::FactoryCache::new();
1243 SHARED.call(callback)
1244 }
1245 }
1246 impl ::core::cmp::PartialEq for Gamepad {
1247 fn eq(&self, other: &Self) -> bool {
1248 self.0 == other.0
1249 }
1250 }
1251 impl ::core::cmp::Eq for Gamepad {}
1252 impl ::core::fmt::Debug for Gamepad {
1253 fn fmt(&self, f: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result {
1254 f.debug_tuple("Gamepad").field(&self.0).finish()
1255 }
1256 }
1257 impl ::windows::core::RuntimeType for Gamepad {
1258 const SIGNATURE: ::windows::imp::ConstBuffer = ::windows::imp::ConstBuffer::from_slice(b"rc(Windows.Gaming.Input.Gamepad;{bc7bb43c-0a69-3903-9e9d-a50f86a45de5})");
1259 }
1260 impl ::core::clone::Clone for Gamepad {
1261 fn clone(&self) -> Self {
1262 Self(self.0.clone())
1263 }
1264 }
1265 unsafe impl ::windows::core::Interface for Gamepad {
1266 type Vtable = IGamepad_Vtbl;
1267 }
1268 unsafe impl ::windows::core::ComInterface for Gamepad {
1269 const IID: ::windows::core::GUID = <IGamepad as ::windows::core::ComInterface>::IID;
1270 }
1271 impl ::windows::core::RuntimeName for Gamepad {
1272 const NAME: &'static str = "Windows.Gaming.Input.Gamepad";
1273 }
1274 ::windows::imp::interface_hierarchy!(Gamepad, ::windows::core::IUnknown, ::windows::core::IInspectable);
1275 impl ::windows::core::CanTryInto<IGameController> for Gamepad {}
1276 impl ::windows::core::CanTryInto<IGameControllerBatteryInfo> for Gamepad {}
1277 unsafe impl ::core::marker::Send for Gamepad {}
1278 unsafe impl ::core::marker::Sync for Gamepad {}
1279 #[doc = "*Required features: `\"Gaming_Input\"`*"]
1280 #[repr(transparent)]
1281 pub struct Headset(::windows::core::IUnknown);
1282 impl Headset {
1283 #[doc = "*Required features: `\"Devices_Power\"`*"]
1284 #[cfg(feature = "Devices_Power")]
1285 pub fn TryGetBatteryReport(&self) -> ::windows::core::Result<super::super::Devices::Power::BatteryReport> {
1286 let this = &::windows::core::ComInterface::cast::<IGameControllerBatteryInfo>(self)?;
1287 unsafe {
1288 let mut result__ = ::windows::core::zeroed::<super::super::Devices::Power::BatteryReport>();
1289 (::windows::core::Interface::vtable(this).TryGetBatteryReport)(::windows::core::Interface::as_raw(this), &mut result__).from_abi(result__)
1290 }
1291 }
1292 pub fn CaptureDeviceId(&self) -> ::windows::core::Result<::windows::core::HSTRING> {
1293 let this = self;
1294 unsafe {
1295 let mut result__ = ::windows::core::zeroed::<::windows::core::HSTRING>();
1296 (::windows::core::Interface::vtable(this).CaptureDeviceId)(::windows::core::Interface::as_raw(this), &mut result__).from_abi(result__)
1297 }
1298 }
1299 pub fn RenderDeviceId(&self) -> ::windows::core::Result<::windows::core::HSTRING> {
1300 let this = self;
1301 unsafe {
1302 let mut result__ = ::windows::core::zeroed::<::windows::core::HSTRING>();
1303 (::windows::core::Interface::vtable(this).RenderDeviceId)(::windows::core::Interface::as_raw(this), &mut result__).from_abi(result__)
1304 }
1305 }
1306 }
1307 impl ::core::cmp::PartialEq for Headset {
1308 fn eq(&self, other: &Self) -> bool {
1309 self.0 == other.0
1310 }
1311 }
1312 impl ::core::cmp::Eq for Headset {}
1313 impl ::core::fmt::Debug for Headset {
1314 fn fmt(&self, f: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result {
1315 f.debug_tuple("Headset").field(&self.0).finish()
1316 }
1317 }
1318 impl ::windows::core::RuntimeType for Headset {
1319 const SIGNATURE: ::windows::imp::ConstBuffer = ::windows::imp::ConstBuffer::from_slice(b"rc(Windows.Gaming.Input.Headset;{3fd156ef-6925-3fa8-9181-029c5223ae3b})");
1320 }
1321 impl ::core::clone::Clone for Headset {
1322 fn clone(&self) -> Self {
1323 Self(self.0.clone())
1324 }
1325 }
1326 unsafe impl ::windows::core::Interface for Headset {
1327 type Vtable = IHeadset_Vtbl;
1328 }
1329 unsafe impl ::windows::core::ComInterface for Headset {
1330 const IID: ::windows::core::GUID = <IHeadset as ::windows::core::ComInterface>::IID;
1331 }
1332 impl ::windows::core::RuntimeName for Headset {
1333 const NAME: &'static str = "Windows.Gaming.Input.Headset";
1334 }
1335 ::windows::imp::interface_hierarchy!(Headset, ::windows::core::IUnknown, ::windows::core::IInspectable);
1336 impl ::windows::core::CanTryInto<IGameControllerBatteryInfo> for Headset {}
1337 unsafe impl ::core::marker::Send for Headset {}
1338 unsafe impl ::core::marker::Sync for Headset {}
1339 #[doc = "*Required features: `\"Gaming_Input\"`*"]
1340 #[repr(transparent)]
1341 pub struct RacingWheel(::windows::core::IUnknown);
1342 impl RacingWheel {
1343 #[doc = "*Required features: `\"Foundation\"`*"]
1344 #[cfg(feature = "Foundation")]
1345 pub fn HeadsetConnected(&self, value: &super::super::Foundation::TypedEventHandler<IGameController, Headset>) -> ::windows::core::Result<super::super::Foundation::EventRegistrationToken> {
1346 let this = &::windows::core::ComInterface::cast::<IGameController>(self)?;
1347 unsafe {
1348 let mut result__ = ::windows::core::zeroed::<super::super::Foundation::EventRegistrationToken>();
1349 (::windows::core::Interface::vtable(this).HeadsetConnected)(::windows::core::Interface::as_raw(this), ::core::mem::transmute_copy(value), &mut result__).from_abi(result__)
1350 }
1351 }
1352 #[doc = "*Required features: `\"Foundation\"`*"]
1353 #[cfg(feature = "Foundation")]
1354 pub fn RemoveHeadsetConnected(&self, token: super::super::Foundation::EventRegistrationToken) -> ::windows::core::Result<()> {
1355 let this = &::windows::core::ComInterface::cast::<IGameController>(self)?;
1356 unsafe { (::windows::core::Interface::vtable(this).RemoveHeadsetConnected)(::windows::core::Interface::as_raw(this), token).ok() }
1357 }
1358 #[doc = "*Required features: `\"Foundation\"`*"]
1359 #[cfg(feature = "Foundation")]
1360 pub fn HeadsetDisconnected(&self, value: &super::super::Foundation::TypedEventHandler<IGameController, Headset>) -> ::windows::core::Result<super::super::Foundation::EventRegistrationToken> {
1361 let this = &::windows::core::ComInterface::cast::<IGameController>(self)?;
1362 unsafe {
1363 let mut result__ = ::windows::core::zeroed::<super::super::Foundation::EventRegistrationToken>();
1364 (::windows::core::Interface::vtable(this).HeadsetDisconnected)(::windows::core::Interface::as_raw(this), ::core::mem::transmute_copy(value), &mut result__).from_abi(result__)
1365 }
1366 }
1367 #[doc = "*Required features: `\"Foundation\"`*"]
1368 #[cfg(feature = "Foundation")]
1369 pub fn RemoveHeadsetDisconnected(&self, token: super::super::Foundation::EventRegistrationToken) -> ::windows::core::Result<()> {
1370 let this = &::windows::core::ComInterface::cast::<IGameController>(self)?;
1371 unsafe { (::windows::core::Interface::vtable(this).RemoveHeadsetDisconnected)(::windows::core::Interface::as_raw(this), token).ok() }
1372 }
1373 #[doc = "*Required features: `\"Foundation\"`, `\"System\"`*"]
1374 #[cfg(all(feature = "Foundation", feature = "System"))]
1375 pub fn UserChanged(&self, value: &super::super::Foundation::TypedEventHandler<IGameController, super::super::System::UserChangedEventArgs>) -> ::windows::core::Result<super::super::Foundation::EventRegistrationToken> {
1376 let this = &::windows::core::ComInterface::cast::<IGameController>(self)?;
1377 unsafe {
1378 let mut result__ = ::windows::core::zeroed::<super::super::Foundation::EventRegistrationToken>();
1379 (::windows::core::Interface::vtable(this).UserChanged)(::windows::core::Interface::as_raw(this), ::core::mem::transmute_copy(value), &mut result__).from_abi(result__)
1380 }
1381 }
1382 #[doc = "*Required features: `\"Foundation\"`*"]
1383 #[cfg(feature = "Foundation")]
1384 pub fn RemoveUserChanged(&self, token: super::super::Foundation::EventRegistrationToken) -> ::windows::core::Result<()> {
1385 let this = &::windows::core::ComInterface::cast::<IGameController>(self)?;
1386 unsafe { (::windows::core::Interface::vtable(this).RemoveUserChanged)(::windows::core::Interface::as_raw(this), token).ok() }
1387 }
1388 pub fn Headset(&self) -> ::windows::core::Result<Headset> {
1389 let this = &::windows::core::ComInterface::cast::<IGameController>(self)?;
1390 unsafe {
1391 let mut result__ = ::windows::core::zeroed::<Headset>();
1392 (::windows::core::Interface::vtable(this).Headset)(::windows::core::Interface::as_raw(this), &mut result__).from_abi(result__)
1393 }
1394 }
1395 pub fn IsWireless(&self) -> ::windows::core::Result<bool> {
1396 let this = &::windows::core::ComInterface::cast::<IGameController>(self)?;
1397 unsafe {
1398 let mut result__ = ::windows::core::zeroed::<bool>();
1399 (::windows::core::Interface::vtable(this).IsWireless)(::windows::core::Interface::as_raw(this), &mut result__).from_abi(result__)
1400 }
1401 }
1402 #[doc = "*Required features: `\"System\"`*"]
1403 #[cfg(feature = "System")]
1404 pub fn User(&self) -> ::windows::core::Result<super::super::System::User> {
1405 let this = &::windows::core::ComInterface::cast::<IGameController>(self)?;
1406 unsafe {
1407 let mut result__ = ::windows::core::zeroed::<super::super::System::User>();
1408 (::windows::core::Interface::vtable(this).User)(::windows::core::Interface::as_raw(this), &mut result__).from_abi(result__)
1409 }
1410 }
1411 #[doc = "*Required features: `\"Devices_Power\"`*"]
1412 #[cfg(feature = "Devices_Power")]
1413 pub fn TryGetBatteryReport(&self) -> ::windows::core::Result<super::super::Devices::Power::BatteryReport> {
1414 let this = &::windows::core::ComInterface::cast::<IGameControllerBatteryInfo>(self)?;
1415 unsafe {
1416 let mut result__ = ::windows::core::zeroed::<super::super::Devices::Power::BatteryReport>();
1417 (::windows::core::Interface::vtable(this).TryGetBatteryReport)(::windows::core::Interface::as_raw(this), &mut result__).from_abi(result__)
1418 }
1419 }
1420 pub fn HasClutch(&self) -> ::windows::core::Result<bool> {
1421 let this = self;
1422 unsafe {
1423 let mut result__ = ::windows::core::zeroed::<bool>();
1424 (::windows::core::Interface::vtable(this).HasClutch)(::windows::core::Interface::as_raw(this), &mut result__).from_abi(result__)
1425 }
1426 }
1427 pub fn HasHandbrake(&self) -> ::windows::core::Result<bool> {
1428 let this = self;
1429 unsafe {
1430 let mut result__ = ::windows::core::zeroed::<bool>();
1431 (::windows::core::Interface::vtable(this).HasHandbrake)(::windows::core::Interface::as_raw(this), &mut result__).from_abi(result__)
1432 }
1433 }
1434 pub fn HasPatternShifter(&self) -> ::windows::core::Result<bool> {
1435 let this = self;
1436 unsafe {
1437 let mut result__ = ::windows::core::zeroed::<bool>();
1438 (::windows::core::Interface::vtable(this).HasPatternShifter)(::windows::core::Interface::as_raw(this), &mut result__).from_abi(result__)
1439 }
1440 }
1441 pub fn MaxPatternShifterGear(&self) -> ::windows::core::Result<i32> {
1442 let this = self;
1443 unsafe {
1444 let mut result__ = ::windows::core::zeroed::<i32>();
1445 (::windows::core::Interface::vtable(this).MaxPatternShifterGear)(::windows::core::Interface::as_raw(this), &mut result__).from_abi(result__)
1446 }
1447 }
1448 pub fn MaxWheelAngle(&self) -> ::windows::core::Result<f64> {
1449 let this = self;
1450 unsafe {
1451 let mut result__ = ::windows::core::zeroed::<f64>();
1452 (::windows::core::Interface::vtable(this).MaxWheelAngle)(::windows::core::Interface::as_raw(this), &mut result__).from_abi(result__)
1453 }
1454 }
1455 #[doc = "*Required features: `\"Gaming_Input_ForceFeedback\"`*"]
1456 #[cfg(feature = "Gaming_Input_ForceFeedback")]
1457 pub fn WheelMotor(&self) -> ::windows::core::Result<ForceFeedback::ForceFeedbackMotor> {
1458 let this = self;
1459 unsafe {
1460 let mut result__ = ::windows::core::zeroed::<ForceFeedback::ForceFeedbackMotor>();
1461 (::windows::core::Interface::vtable(this).WheelMotor)(::windows::core::Interface::as_raw(this), &mut result__).from_abi(result__)
1462 }
1463 }
1464 pub fn GetButtonLabel(&self, button: RacingWheelButtons) -> ::windows::core::Result<GameControllerButtonLabel> {
1465 let this = self;
1466 unsafe {
1467 let mut result__ = ::windows::core::zeroed::<GameControllerButtonLabel>();
1468 (::windows::core::Interface::vtable(this).GetButtonLabel)(::windows::core::Interface::as_raw(this), button, &mut result__).from_abi(result__)
1469 }
1470 }
1471 pub fn GetCurrentReading(&self) -> ::windows::core::Result<RacingWheelReading> {
1472 let this = self;
1473 unsafe {
1474 let mut result__ = ::windows::core::zeroed::<RacingWheelReading>();
1475 (::windows::core::Interface::vtable(this).GetCurrentReading)(::windows::core::Interface::as_raw(this), &mut result__).from_abi(result__)
1476 }
1477 }
1478 #[doc = "*Required features: `\"Foundation\"`*"]
1479 #[cfg(feature = "Foundation")]
1480 pub fn RacingWheelAdded(value: &super::super::Foundation::EventHandler<RacingWheel>) -> ::windows::core::Result<super::super::Foundation::EventRegistrationToken> {
1481 Self::IRacingWheelStatics(|this| unsafe {
1482 let mut result__ = ::windows::core::zeroed::<super::super::Foundation::EventRegistrationToken>();
1483 (::windows::core::Interface::vtable(this).RacingWheelAdded)(::windows::core::Interface::as_raw(this), ::core::mem::transmute_copy(value), &mut result__).from_abi(result__)
1484 })
1485 }
1486 #[doc = "*Required features: `\"Foundation\"`*"]
1487 #[cfg(feature = "Foundation")]
1488 pub fn RemoveRacingWheelAdded(token: super::super::Foundation::EventRegistrationToken) -> ::windows::core::Result<()> {
1489 Self::IRacingWheelStatics(|this| unsafe { (::windows::core::Interface::vtable(this).RemoveRacingWheelAdded)(::windows::core::Interface::as_raw(this), token).ok() })
1490 }
1491 #[doc = "*Required features: `\"Foundation\"`*"]
1492 #[cfg(feature = "Foundation")]
1493 pub fn RacingWheelRemoved(value: &super::super::Foundation::EventHandler<RacingWheel>) -> ::windows::core::Result<super::super::Foundation::EventRegistrationToken> {
1494 Self::IRacingWheelStatics(|this| unsafe {
1495 let mut result__ = ::windows::core::zeroed::<super::super::Foundation::EventRegistrationToken>();
1496 (::windows::core::Interface::vtable(this).RacingWheelRemoved)(::windows::core::Interface::as_raw(this), ::core::mem::transmute_copy(value), &mut result__).from_abi(result__)
1497 })
1498 }
1499 #[doc = "*Required features: `\"Foundation\"`*"]
1500 #[cfg(feature = "Foundation")]
1501 pub fn RemoveRacingWheelRemoved(token: super::super::Foundation::EventRegistrationToken) -> ::windows::core::Result<()> {
1502 Self::IRacingWheelStatics(|this| unsafe { (::windows::core::Interface::vtable(this).RemoveRacingWheelRemoved)(::windows::core::Interface::as_raw(this), token).ok() })
1503 }
1504 #[doc = "*Required features: `\"Foundation_Collections\"`*"]
1505 #[cfg(feature = "Foundation_Collections")]
1506 pub fn RacingWheels() -> ::windows::core::Result<super::super::Foundation::Collections::IVectorView<RacingWheel>> {
1507 Self::IRacingWheelStatics(|this| unsafe {
1508 let mut result__ = ::windows::core::zeroed::<super::super::Foundation::Collections::IVectorView<RacingWheel>>();
1509 (::windows::core::Interface::vtable(this).RacingWheels)(::windows::core::Interface::as_raw(this), &mut result__).from_abi(result__)
1510 })
1511 }
1512 pub fn FromGameController<P0>(gamecontroller: P0) -> ::windows::core::Result<RacingWheel>
1513 where
1514 P0: ::windows::core::TryIntoParam<IGameController>,
1515 {
1516 Self::IRacingWheelStatics2(|this| unsafe {
1517 let mut result__ = ::windows::core::zeroed::<RacingWheel>();
1518 (::windows::core::Interface::vtable(this).FromGameController)(::windows::core::Interface::as_raw(this), gamecontroller.try_into_param()?.abi(), &mut result__).from_abi(result__)
1519 })
1520 }
1521 #[doc(hidden)]
1522 pub fn IRacingWheelStatics<R, F: FnOnce(&IRacingWheelStatics) -> ::windows::core::Result<R>>(callback: F) -> ::windows::core::Result<R> {
1523 static SHARED: ::windows::imp::FactoryCache<RacingWheel, IRacingWheelStatics> = ::windows::imp::FactoryCache::new();
1524 SHARED.call(callback)
1525 }
1526 #[doc(hidden)]
1527 pub fn IRacingWheelStatics2<R, F: FnOnce(&IRacingWheelStatics2) -> ::windows::core::Result<R>>(callback: F) -> ::windows::core::Result<R> {
1528 static SHARED: ::windows::imp::FactoryCache<RacingWheel, IRacingWheelStatics2> = ::windows::imp::FactoryCache::new();
1529 SHARED.call(callback)
1530 }
1531 }
1532 impl ::core::cmp::PartialEq for RacingWheel {
1533 fn eq(&self, other: &Self) -> bool {
1534 self.0 == other.0
1535 }
1536 }
1537 impl ::core::cmp::Eq for RacingWheel {}
1538 impl ::core::fmt::Debug for RacingWheel {
1539 fn fmt(&self, f: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result {
1540 f.debug_tuple("RacingWheel").field(&self.0).finish()
1541 }
1542 }
1543 impl ::windows::core::RuntimeType for RacingWheel {
1544 const SIGNATURE: ::windows::imp::ConstBuffer = ::windows::imp::ConstBuffer::from_slice(b"rc(Windows.Gaming.Input.RacingWheel;{f546656f-e106-4c82-a90f-554012904b85})");
1545 }
1546 impl ::core::clone::Clone for RacingWheel {
1547 fn clone(&self) -> Self {
1548 Self(self.0.clone())
1549 }
1550 }
1551 unsafe impl ::windows::core::Interface for RacingWheel {
1552 type Vtable = IRacingWheel_Vtbl;
1553 }
1554 unsafe impl ::windows::core::ComInterface for RacingWheel {
1555 const IID: ::windows::core::GUID = <IRacingWheel as ::windows::core::ComInterface>::IID;
1556 }
1557 impl ::windows::core::RuntimeName for RacingWheel {
1558 const NAME: &'static str = "Windows.Gaming.Input.RacingWheel";
1559 }
1560 ::windows::imp::interface_hierarchy!(RacingWheel, ::windows::core::IUnknown, ::windows::core::IInspectable);
1561 impl ::windows::core::CanTryInto<IGameController> for RacingWheel {}
1562 impl ::windows::core::CanTryInto<IGameControllerBatteryInfo> for RacingWheel {}
1563 unsafe impl ::core::marker::Send for RacingWheel {}
1564 unsafe impl ::core::marker::Sync for RacingWheel {}
1565 #[doc = "*Required features: `\"Gaming_Input\"`*"]
1566 #[repr(transparent)]
1567 pub struct RawGameController(::windows::core::IUnknown);
1568 impl RawGameController {
1569 #[doc = "*Required features: `\"Foundation\"`*"]
1570 #[cfg(feature = "Foundation")]
1571 pub fn HeadsetConnected(&self, value: &super::super::Foundation::TypedEventHandler<IGameController, Headset>) -> ::windows::core::Result<super::super::Foundation::EventRegistrationToken> {
1572 let this = &::windows::core::ComInterface::cast::<IGameController>(self)?;
1573 unsafe {
1574 let mut result__ = ::windows::core::zeroed::<super::super::Foundation::EventRegistrationToken>();
1575 (::windows::core::Interface::vtable(this).HeadsetConnected)(::windows::core::Interface::as_raw(this), ::core::mem::transmute_copy(value), &mut result__).from_abi(result__)
1576 }
1577 }
1578 #[doc = "*Required features: `\"Foundation\"`*"]
1579 #[cfg(feature = "Foundation")]
1580 pub fn RemoveHeadsetConnected(&self, token: super::super::Foundation::EventRegistrationToken) -> ::windows::core::Result<()> {
1581 let this = &::windows::core::ComInterface::cast::<IGameController>(self)?;
1582 unsafe { (::windows::core::Interface::vtable(this).RemoveHeadsetConnected)(::windows::core::Interface::as_raw(this), token).ok() }
1583 }
1584 #[doc = "*Required features: `\"Foundation\"`*"]
1585 #[cfg(feature = "Foundation")]
1586 pub fn HeadsetDisconnected(&self, value: &super::super::Foundation::TypedEventHandler<IGameController, Headset>) -> ::windows::core::Result<super::super::Foundation::EventRegistrationToken> {
1587 let this = &::windows::core::ComInterface::cast::<IGameController>(self)?;
1588 unsafe {
1589 let mut result__ = ::windows::core::zeroed::<super::super::Foundation::EventRegistrationToken>();
1590 (::windows::core::Interface::vtable(this).HeadsetDisconnected)(::windows::core::Interface::as_raw(this), ::core::mem::transmute_copy(value), &mut result__).from_abi(result__)
1591 }
1592 }
1593 #[doc = "*Required features: `\"Foundation\"`*"]
1594 #[cfg(feature = "Foundation")]
1595 pub fn RemoveHeadsetDisconnected(&self, token: super::super::Foundation::EventRegistrationToken) -> ::windows::core::Result<()> {
1596 let this = &::windows::core::ComInterface::cast::<IGameController>(self)?;
1597 unsafe { (::windows::core::Interface::vtable(this).RemoveHeadsetDisconnected)(::windows::core::Interface::as_raw(this), token).ok() }
1598 }
1599 #[doc = "*Required features: `\"Foundation\"`, `\"System\"`*"]
1600 #[cfg(all(feature = "Foundation", feature = "System"))]
1601 pub fn UserChanged(&self, value: &super::super::Foundation::TypedEventHandler<IGameController, super::super::System::UserChangedEventArgs>) -> ::windows::core::Result<super::super::Foundation::EventRegistrationToken> {
1602 let this = &::windows::core::ComInterface::cast::<IGameController>(self)?;
1603 unsafe {
1604 let mut result__ = ::windows::core::zeroed::<super::super::Foundation::EventRegistrationToken>();
1605 (::windows::core::Interface::vtable(this).UserChanged)(::windows::core::Interface::as_raw(this), ::core::mem::transmute_copy(value), &mut result__).from_abi(result__)
1606 }
1607 }
1608 #[doc = "*Required features: `\"Foundation\"`*"]
1609 #[cfg(feature = "Foundation")]
1610 pub fn RemoveUserChanged(&self, token: super::super::Foundation::EventRegistrationToken) -> ::windows::core::Result<()> {
1611 let this = &::windows::core::ComInterface::cast::<IGameController>(self)?;
1612 unsafe { (::windows::core::Interface::vtable(this).RemoveUserChanged)(::windows::core::Interface::as_raw(this), token).ok() }
1613 }
1614 pub fn Headset(&self) -> ::windows::core::Result<Headset> {
1615 let this = &::windows::core::ComInterface::cast::<IGameController>(self)?;
1616 unsafe {
1617 let mut result__ = ::windows::core::zeroed::<Headset>();
1618 (::windows::core::Interface::vtable(this).Headset)(::windows::core::Interface::as_raw(this), &mut result__).from_abi(result__)
1619 }
1620 }
1621 pub fn IsWireless(&self) -> ::windows::core::Result<bool> {
1622 let this = &::windows::core::ComInterface::cast::<IGameController>(self)?;
1623 unsafe {
1624 let mut result__ = ::windows::core::zeroed::<bool>();
1625 (::windows::core::Interface::vtable(this).IsWireless)(::windows::core::Interface::as_raw(this), &mut result__).from_abi(result__)
1626 }
1627 }
1628 #[doc = "*Required features: `\"System\"`*"]
1629 #[cfg(feature = "System")]
1630 pub fn User(&self) -> ::windows::core::Result<super::super::System::User> {
1631 let this = &::windows::core::ComInterface::cast::<IGameController>(self)?;
1632 unsafe {
1633 let mut result__ = ::windows::core::zeroed::<super::super::System::User>();
1634 (::windows::core::Interface::vtable(this).User)(::windows::core::Interface::as_raw(this), &mut result__).from_abi(result__)
1635 }
1636 }
1637 #[doc = "*Required features: `\"Devices_Power\"`*"]
1638 #[cfg(feature = "Devices_Power")]
1639 pub fn TryGetBatteryReport(&self) -> ::windows::core::Result<super::super::Devices::Power::BatteryReport> {
1640 let this = &::windows::core::ComInterface::cast::<IGameControllerBatteryInfo>(self)?;
1641 unsafe {
1642 let mut result__ = ::windows::core::zeroed::<super::super::Devices::Power::BatteryReport>();
1643 (::windows::core::Interface::vtable(this).TryGetBatteryReport)(::windows::core::Interface::as_raw(this), &mut result__).from_abi(result__)
1644 }
1645 }
1646 pub fn AxisCount(&self) -> ::windows::core::Result<i32> {
1647 let this = self;
1648 unsafe {
1649 let mut result__ = ::windows::core::zeroed::<i32>();
1650 (::windows::core::Interface::vtable(this).AxisCount)(::windows::core::Interface::as_raw(this), &mut result__).from_abi(result__)
1651 }
1652 }
1653 pub fn ButtonCount(&self) -> ::windows::core::Result<i32> {
1654 let this = self;
1655 unsafe {
1656 let mut result__ = ::windows::core::zeroed::<i32>();
1657 (::windows::core::Interface::vtable(this).ButtonCount)(::windows::core::Interface::as_raw(this), &mut result__).from_abi(result__)
1658 }
1659 }
1660 #[doc = "*Required features: `\"Foundation_Collections\"`, `\"Gaming_Input_ForceFeedback\"`*"]
1661 #[cfg(all(feature = "Foundation_Collections", feature = "Gaming_Input_ForceFeedback"))]
1662 pub fn ForceFeedbackMotors(&self) -> ::windows::core::Result<super::super::Foundation::Collections::IVectorView<ForceFeedback::ForceFeedbackMotor>> {
1663 let this = self;
1664 unsafe {
1665 let mut result__ = ::windows::core::zeroed::<super::super::Foundation::Collections::IVectorView<ForceFeedback::ForceFeedbackMotor>>();
1666 (::windows::core::Interface::vtable(this).ForceFeedbackMotors)(::windows::core::Interface::as_raw(this), &mut result__).from_abi(result__)
1667 }
1668 }
1669 pub fn HardwareProductId(&self) -> ::windows::core::Result<u16> {
1670 let this = self;
1671 unsafe {
1672 let mut result__ = ::windows::core::zeroed::<u16>();
1673 (::windows::core::Interface::vtable(this).HardwareProductId)(::windows::core::Interface::as_raw(this), &mut result__).from_abi(result__)
1674 }
1675 }
1676 pub fn HardwareVendorId(&self) -> ::windows::core::Result<u16> {
1677 let this = self;
1678 unsafe {
1679 let mut result__ = ::windows::core::zeroed::<u16>();
1680 (::windows::core::Interface::vtable(this).HardwareVendorId)(::windows::core::Interface::as_raw(this), &mut result__).from_abi(result__)
1681 }
1682 }
1683 pub fn SwitchCount(&self) -> ::windows::core::Result<i32> {
1684 let this = self;
1685 unsafe {
1686 let mut result__ = ::windows::core::zeroed::<i32>();
1687 (::windows::core::Interface::vtable(this).SwitchCount)(::windows::core::Interface::as_raw(this), &mut result__).from_abi(result__)
1688 }
1689 }
1690 pub fn GetButtonLabel(&self, buttonindex: i32) -> ::windows::core::Result<GameControllerButtonLabel> {
1691 let this = self;
1692 unsafe {
1693 let mut result__ = ::windows::core::zeroed::<GameControllerButtonLabel>();
1694 (::windows::core::Interface::vtable(this).GetButtonLabel)(::windows::core::Interface::as_raw(this), buttonindex, &mut result__).from_abi(result__)
1695 }
1696 }
1697 pub fn GetCurrentReading(&self, buttonarray: &mut [bool], switcharray: &mut [GameControllerSwitchPosition], axisarray: &mut [f64]) -> ::windows::core::Result<u64> {
1698 let this = self;
1699 unsafe {
1700 let mut result__ = ::windows::core::zeroed::<u64>();
1701 (::windows::core::Interface::vtable(this).GetCurrentReading)(::windows::core::Interface::as_raw(this), buttonarray.len() as u32, buttonarray.as_mut_ptr(), switcharray.len() as u32, switcharray.as_mut_ptr(), axisarray.len() as u32, axisarray.as_mut_ptr(), &mut result__).from_abi(result__)
1702 }
1703 }
1704 pub fn GetSwitchKind(&self, switchindex: i32) -> ::windows::core::Result<GameControllerSwitchKind> {
1705 let this = self;
1706 unsafe {
1707 let mut result__ = ::windows::core::zeroed::<GameControllerSwitchKind>();
1708 (::windows::core::Interface::vtable(this).GetSwitchKind)(::windows::core::Interface::as_raw(this), switchindex, &mut result__).from_abi(result__)
1709 }
1710 }
1711 #[doc = "*Required features: `\"Devices_Haptics\"`, `\"Foundation_Collections\"`*"]
1712 #[cfg(all(feature = "Devices_Haptics", feature = "Foundation_Collections"))]
1713 pub fn SimpleHapticsControllers(&self) -> ::windows::core::Result<super::super::Foundation::Collections::IVectorView<super::super::Devices::Haptics::SimpleHapticsController>> {
1714 let this = &::windows::core::ComInterface::cast::<IRawGameController2>(self)?;
1715 unsafe {
1716 let mut result__ = ::windows::core::zeroed::<super::super::Foundation::Collections::IVectorView<super::super::Devices::Haptics::SimpleHapticsController>>();
1717 (::windows::core::Interface::vtable(this).SimpleHapticsControllers)(::windows::core::Interface::as_raw(this), &mut result__).from_abi(result__)
1718 }
1719 }
1720 pub fn NonRoamableId(&self) -> ::windows::core::Result<::windows::core::HSTRING> {
1721 let this = &::windows::core::ComInterface::cast::<IRawGameController2>(self)?;
1722 unsafe {
1723 let mut result__ = ::windows::core::zeroed::<::windows::core::HSTRING>();
1724 (::windows::core::Interface::vtable(this).NonRoamableId)(::windows::core::Interface::as_raw(this), &mut result__).from_abi(result__)
1725 }
1726 }
1727 pub fn DisplayName(&self) -> ::windows::core::Result<::windows::core::HSTRING> {
1728 let this = &::windows::core::ComInterface::cast::<IRawGameController2>(self)?;
1729 unsafe {
1730 let mut result__ = ::windows::core::zeroed::<::windows::core::HSTRING>();
1731 (::windows::core::Interface::vtable(this).DisplayName)(::windows::core::Interface::as_raw(this), &mut result__).from_abi(result__)
1732 }
1733 }
1734 #[doc = "*Required features: `\"Foundation\"`*"]
1735 #[cfg(feature = "Foundation")]
1736 pub fn RawGameControllerAdded(value: &super::super::Foundation::EventHandler<RawGameController>) -> ::windows::core::Result<super::super::Foundation::EventRegistrationToken> {
1737 Self::IRawGameControllerStatics(|this| unsafe {
1738 let mut result__ = ::windows::core::zeroed::<super::super::Foundation::EventRegistrationToken>();
1739 (::windows::core::Interface::vtable(this).RawGameControllerAdded)(::windows::core::Interface::as_raw(this), ::core::mem::transmute_copy(value), &mut result__).from_abi(result__)
1740 })
1741 }
1742 #[doc = "*Required features: `\"Foundation\"`*"]
1743 #[cfg(feature = "Foundation")]
1744 pub fn RemoveRawGameControllerAdded(token: super::super::Foundation::EventRegistrationToken) -> ::windows::core::Result<()> {
1745 Self::IRawGameControllerStatics(|this| unsafe { (::windows::core::Interface::vtable(this).RemoveRawGameControllerAdded)(::windows::core::Interface::as_raw(this), token).ok() })
1746 }
1747 #[doc = "*Required features: `\"Foundation\"`*"]
1748 #[cfg(feature = "Foundation")]
1749 pub fn RawGameControllerRemoved(value: &super::super::Foundation::EventHandler<RawGameController>) -> ::windows::core::Result<super::super::Foundation::EventRegistrationToken> {
1750 Self::IRawGameControllerStatics(|this| unsafe {
1751 let mut result__ = ::windows::core::zeroed::<super::super::Foundation::EventRegistrationToken>();
1752 (::windows::core::Interface::vtable(this).RawGameControllerRemoved)(::windows::core::Interface::as_raw(this), ::core::mem::transmute_copy(value), &mut result__).from_abi(result__)
1753 })
1754 }
1755 #[doc = "*Required features: `\"Foundation\"`*"]
1756 #[cfg(feature = "Foundation")]
1757 pub fn RemoveRawGameControllerRemoved(token: super::super::Foundation::EventRegistrationToken) -> ::windows::core::Result<()> {
1758 Self::IRawGameControllerStatics(|this| unsafe { (::windows::core::Interface::vtable(this).RemoveRawGameControllerRemoved)(::windows::core::Interface::as_raw(this), token).ok() })
1759 }
1760 #[doc = "*Required features: `\"Foundation_Collections\"`*"]
1761 #[cfg(feature = "Foundation_Collections")]
1762 pub fn RawGameControllers() -> ::windows::core::Result<super::super::Foundation::Collections::IVectorView<RawGameController>> {
1763 Self::IRawGameControllerStatics(|this| unsafe {
1764 let mut result__ = ::windows::core::zeroed::<super::super::Foundation::Collections::IVectorView<RawGameController>>();
1765 (::windows::core::Interface::vtable(this).RawGameControllers)(::windows::core::Interface::as_raw(this), &mut result__).from_abi(result__)
1766 })
1767 }
1768 pub fn FromGameController<P0>(gamecontroller: P0) -> ::windows::core::Result<RawGameController>
1769 where
1770 P0: ::windows::core::TryIntoParam<IGameController>,
1771 {
1772 Self::IRawGameControllerStatics(|this| unsafe {
1773 let mut result__ = ::windows::core::zeroed::<RawGameController>();
1774 (::windows::core::Interface::vtable(this).FromGameController)(::windows::core::Interface::as_raw(this), gamecontroller.try_into_param()?.abi(), &mut result__).from_abi(result__)
1775 })
1776 }
1777 #[doc(hidden)]
1778 pub fn IRawGameControllerStatics<R, F: FnOnce(&IRawGameControllerStatics) -> ::windows::core::Result<R>>(callback: F) -> ::windows::core::Result<R> {
1779 static SHARED: ::windows::imp::FactoryCache<RawGameController, IRawGameControllerStatics> = ::windows::imp::FactoryCache::new();
1780 SHARED.call(callback)
1781 }
1782 }
1783 impl ::core::cmp::PartialEq for RawGameController {
1784 fn eq(&self, other: &Self) -> bool {
1785 self.0 == other.0
1786 }
1787 }
1788 impl ::core::cmp::Eq for RawGameController {}
1789 impl ::core::fmt::Debug for RawGameController {
1790 fn fmt(&self, f: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result {
1791 f.debug_tuple("RawGameController").field(&self.0).finish()
1792 }
1793 }
1794 impl ::windows::core::RuntimeType for RawGameController {
1795 const SIGNATURE: ::windows::imp::ConstBuffer = ::windows::imp::ConstBuffer::from_slice(b"rc(Windows.Gaming.Input.RawGameController;{7cad6d91-a7e1-4f71-9a78-33e9c5dfea62})");
1796 }
1797 impl ::core::clone::Clone for RawGameController {
1798 fn clone(&self) -> Self {
1799 Self(self.0.clone())
1800 }
1801 }
1802 unsafe impl ::windows::core::Interface for RawGameController {
1803 type Vtable = IRawGameController_Vtbl;
1804 }
1805 unsafe impl ::windows::core::ComInterface for RawGameController {
1806 const IID: ::windows::core::GUID = <IRawGameController as ::windows::core::ComInterface>::IID;
1807 }
1808 impl ::windows::core::RuntimeName for RawGameController {
1809 const NAME: &'static str = "Windows.Gaming.Input.RawGameController";
1810 }
1811 ::windows::imp::interface_hierarchy!(RawGameController, ::windows::core::IUnknown, ::windows::core::IInspectable);
1812 impl ::windows::core::CanTryInto<IGameController> for RawGameController {}
1813 impl ::windows::core::CanTryInto<IGameControllerBatteryInfo> for RawGameController {}
1814 unsafe impl ::core::marker::Send for RawGameController {}
1815 unsafe impl ::core::marker::Sync for RawGameController {}
1816 #[doc = "*Required features: `\"Gaming_Input\"`*"]
1817 #[repr(transparent)]
1818 pub struct UINavigationController(::windows::core::IUnknown);
1819 impl UINavigationController {
1820 #[doc = "*Required features: `\"Foundation\"`*"]
1821 #[cfg(feature = "Foundation")]
1822 pub fn HeadsetConnected(&self, value: &super::super::Foundation::TypedEventHandler<IGameController, Headset>) -> ::windows::core::Result<super::super::Foundation::EventRegistrationToken> {
1823 let this = &::windows::core::ComInterface::cast::<IGameController>(self)?;
1824 unsafe {
1825 let mut result__ = ::windows::core::zeroed::<super::super::Foundation::EventRegistrationToken>();
1826 (::windows::core::Interface::vtable(this).HeadsetConnected)(::windows::core::Interface::as_raw(this), ::core::mem::transmute_copy(value), &mut result__).from_abi(result__)
1827 }
1828 }
1829 #[doc = "*Required features: `\"Foundation\"`*"]
1830 #[cfg(feature = "Foundation")]
1831 pub fn RemoveHeadsetConnected(&self, token: super::super::Foundation::EventRegistrationToken) -> ::windows::core::Result<()> {
1832 let this = &::windows::core::ComInterface::cast::<IGameController>(self)?;
1833 unsafe { (::windows::core::Interface::vtable(this).RemoveHeadsetConnected)(::windows::core::Interface::as_raw(this), token).ok() }
1834 }
1835 #[doc = "*Required features: `\"Foundation\"`*"]
1836 #[cfg(feature = "Foundation")]
1837 pub fn HeadsetDisconnected(&self, value: &super::super::Foundation::TypedEventHandler<IGameController, Headset>) -> ::windows::core::Result<super::super::Foundation::EventRegistrationToken> {
1838 let this = &::windows::core::ComInterface::cast::<IGameController>(self)?;
1839 unsafe {
1840 let mut result__ = ::windows::core::zeroed::<super::super::Foundation::EventRegistrationToken>();
1841 (::windows::core::Interface::vtable(this).HeadsetDisconnected)(::windows::core::Interface::as_raw(this), ::core::mem::transmute_copy(value), &mut result__).from_abi(result__)
1842 }
1843 }
1844 #[doc = "*Required features: `\"Foundation\"`*"]
1845 #[cfg(feature = "Foundation")]
1846 pub fn RemoveHeadsetDisconnected(&self, token: super::super::Foundation::EventRegistrationToken) -> ::windows::core::Result<()> {
1847 let this = &::windows::core::ComInterface::cast::<IGameController>(self)?;
1848 unsafe { (::windows::core::Interface::vtable(this).RemoveHeadsetDisconnected)(::windows::core::Interface::as_raw(this), token).ok() }
1849 }
1850 #[doc = "*Required features: `\"Foundation\"`, `\"System\"`*"]
1851 #[cfg(all(feature = "Foundation", feature = "System"))]
1852 pub fn UserChanged(&self, value: &super::super::Foundation::TypedEventHandler<IGameController, super::super::System::UserChangedEventArgs>) -> ::windows::core::Result<super::super::Foundation::EventRegistrationToken> {
1853 let this = &::windows::core::ComInterface::cast::<IGameController>(self)?;
1854 unsafe {
1855 let mut result__ = ::windows::core::zeroed::<super::super::Foundation::EventRegistrationToken>();
1856 (::windows::core::Interface::vtable(this).UserChanged)(::windows::core::Interface::as_raw(this), ::core::mem::transmute_copy(value), &mut result__).from_abi(result__)
1857 }
1858 }
1859 #[doc = "*Required features: `\"Foundation\"`*"]
1860 #[cfg(feature = "Foundation")]
1861 pub fn RemoveUserChanged(&self, token: super::super::Foundation::EventRegistrationToken) -> ::windows::core::Result<()> {
1862 let this = &::windows::core::ComInterface::cast::<IGameController>(self)?;
1863 unsafe { (::windows::core::Interface::vtable(this).RemoveUserChanged)(::windows::core::Interface::as_raw(this), token).ok() }
1864 }
1865 pub fn Headset(&self) -> ::windows::core::Result<Headset> {
1866 let this = &::windows::core::ComInterface::cast::<IGameController>(self)?;
1867 unsafe {
1868 let mut result__ = ::windows::core::zeroed::<Headset>();
1869 (::windows::core::Interface::vtable(this).Headset)(::windows::core::Interface::as_raw(this), &mut result__).from_abi(result__)
1870 }
1871 }
1872 pub fn IsWireless(&self) -> ::windows::core::Result<bool> {
1873 let this = &::windows::core::ComInterface::cast::<IGameController>(self)?;
1874 unsafe {
1875 let mut result__ = ::windows::core::zeroed::<bool>();
1876 (::windows::core::Interface::vtable(this).IsWireless)(::windows::core::Interface::as_raw(this), &mut result__).from_abi(result__)
1877 }
1878 }
1879 #[doc = "*Required features: `\"System\"`*"]
1880 #[cfg(feature = "System")]
1881 pub fn User(&self) -> ::windows::core::Result<super::super::System::User> {
1882 let this = &::windows::core::ComInterface::cast::<IGameController>(self)?;
1883 unsafe {
1884 let mut result__ = ::windows::core::zeroed::<super::super::System::User>();
1885 (::windows::core::Interface::vtable(this).User)(::windows::core::Interface::as_raw(this), &mut result__).from_abi(result__)
1886 }
1887 }
1888 #[doc = "*Required features: `\"Devices_Power\"`*"]
1889 #[cfg(feature = "Devices_Power")]
1890 pub fn TryGetBatteryReport(&self) -> ::windows::core::Result<super::super::Devices::Power::BatteryReport> {
1891 let this = &::windows::core::ComInterface::cast::<IGameControllerBatteryInfo>(self)?;
1892 unsafe {
1893 let mut result__ = ::windows::core::zeroed::<super::super::Devices::Power::BatteryReport>();
1894 (::windows::core::Interface::vtable(this).TryGetBatteryReport)(::windows::core::Interface::as_raw(this), &mut result__).from_abi(result__)
1895 }
1896 }
1897 pub fn GetCurrentReading(&self) -> ::windows::core::Result<UINavigationReading> {
1898 let this = self;
1899 unsafe {
1900 let mut result__ = ::windows::core::zeroed::<UINavigationReading>();
1901 (::windows::core::Interface::vtable(this).GetCurrentReading)(::windows::core::Interface::as_raw(this), &mut result__).from_abi(result__)
1902 }
1903 }
1904 pub fn GetOptionalButtonLabel(&self, button: OptionalUINavigationButtons) -> ::windows::core::Result<GameControllerButtonLabel> {
1905 let this = self;
1906 unsafe {
1907 let mut result__ = ::windows::core::zeroed::<GameControllerButtonLabel>();
1908 (::windows::core::Interface::vtable(this).GetOptionalButtonLabel)(::windows::core::Interface::as_raw(this), button, &mut result__).from_abi(result__)
1909 }
1910 }
1911 pub fn GetRequiredButtonLabel(&self, button: RequiredUINavigationButtons) -> ::windows::core::Result<GameControllerButtonLabel> {
1912 let this = self;
1913 unsafe {
1914 let mut result__ = ::windows::core::zeroed::<GameControllerButtonLabel>();
1915 (::windows::core::Interface::vtable(this).GetRequiredButtonLabel)(::windows::core::Interface::as_raw(this), button, &mut result__).from_abi(result__)
1916 }
1917 }
1918 #[doc = "*Required features: `\"Foundation\"`*"]
1919 #[cfg(feature = "Foundation")]
1920 pub fn UINavigationControllerAdded(value: &super::super::Foundation::EventHandler<UINavigationController>) -> ::windows::core::Result<super::super::Foundation::EventRegistrationToken> {
1921 Self::IUINavigationControllerStatics(|this| unsafe {
1922 let mut result__ = ::windows::core::zeroed::<super::super::Foundation::EventRegistrationToken>();
1923 (::windows::core::Interface::vtable(this).UINavigationControllerAdded)(::windows::core::Interface::as_raw(this), ::core::mem::transmute_copy(value), &mut result__).from_abi(result__)
1924 })
1925 }
1926 #[doc = "*Required features: `\"Foundation\"`*"]
1927 #[cfg(feature = "Foundation")]
1928 pub fn RemoveUINavigationControllerAdded(token: super::super::Foundation::EventRegistrationToken) -> ::windows::core::Result<()> {
1929 Self::IUINavigationControllerStatics(|this| unsafe { (::windows::core::Interface::vtable(this).RemoveUINavigationControllerAdded)(::windows::core::Interface::as_raw(this), token).ok() })
1930 }
1931 #[doc = "*Required features: `\"Foundation\"`*"]
1932 #[cfg(feature = "Foundation")]
1933 pub fn UINavigationControllerRemoved(value: &super::super::Foundation::EventHandler<UINavigationController>) -> ::windows::core::Result<super::super::Foundation::EventRegistrationToken> {
1934 Self::IUINavigationControllerStatics(|this| unsafe {
1935 let mut result__ = ::windows::core::zeroed::<super::super::Foundation::EventRegistrationToken>();
1936 (::windows::core::Interface::vtable(this).UINavigationControllerRemoved)(::windows::core::Interface::as_raw(this), ::core::mem::transmute_copy(value), &mut result__).from_abi(result__)
1937 })
1938 }
1939 #[doc = "*Required features: `\"Foundation\"`*"]
1940 #[cfg(feature = "Foundation")]
1941 pub fn RemoveUINavigationControllerRemoved(token: super::super::Foundation::EventRegistrationToken) -> ::windows::core::Result<()> {
1942 Self::IUINavigationControllerStatics(|this| unsafe { (::windows::core::Interface::vtable(this).RemoveUINavigationControllerRemoved)(::windows::core::Interface::as_raw(this), token).ok() })
1943 }
1944 #[doc = "*Required features: `\"Foundation_Collections\"`*"]
1945 #[cfg(feature = "Foundation_Collections")]
1946 pub fn UINavigationControllers() -> ::windows::core::Result<super::super::Foundation::Collections::IVectorView<UINavigationController>> {
1947 Self::IUINavigationControllerStatics(|this| unsafe {
1948 let mut result__ = ::windows::core::zeroed::<super::super::Foundation::Collections::IVectorView<UINavigationController>>();
1949 (::windows::core::Interface::vtable(this).UINavigationControllers)(::windows::core::Interface::as_raw(this), &mut result__).from_abi(result__)
1950 })
1951 }
1952 pub fn FromGameController<P0>(gamecontroller: P0) -> ::windows::core::Result<UINavigationController>
1953 where
1954 P0: ::windows::core::TryIntoParam<IGameController>,
1955 {
1956 Self::IUINavigationControllerStatics2(|this| unsafe {
1957 let mut result__ = ::windows::core::zeroed::<UINavigationController>();
1958 (::windows::core::Interface::vtable(this).FromGameController)(::windows::core::Interface::as_raw(this), gamecontroller.try_into_param()?.abi(), &mut result__).from_abi(result__)
1959 })
1960 }
1961 #[doc(hidden)]
1962 pub fn IUINavigationControllerStatics<R, F: FnOnce(&IUINavigationControllerStatics) -> ::windows::core::Result<R>>(callback: F) -> ::windows::core::Result<R> {
1963 static SHARED: ::windows::imp::FactoryCache<UINavigationController, IUINavigationControllerStatics> = ::windows::imp::FactoryCache::new();
1964 SHARED.call(callback)
1965 }
1966 #[doc(hidden)]
1967 pub fn IUINavigationControllerStatics2<R, F: FnOnce(&IUINavigationControllerStatics2) -> ::windows::core::Result<R>>(callback: F) -> ::windows::core::Result<R> {
1968 static SHARED: ::windows::imp::FactoryCache<UINavigationController, IUINavigationControllerStatics2> = ::windows::imp::FactoryCache::new();
1969 SHARED.call(callback)
1970 }
1971 }
1972 impl ::core::cmp::PartialEq for UINavigationController {
1973 fn eq(&self, other: &Self) -> bool {
1974 self.0 == other.0
1975 }
1976 }
1977 impl ::core::cmp::Eq for UINavigationController {}
1978 impl ::core::fmt::Debug for UINavigationController {
1979 fn fmt(&self, f: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result {
1980 f.debug_tuple("UINavigationController").field(&self.0).finish()
1981 }
1982 }
1983 impl ::windows::core::RuntimeType for UINavigationController {
1984 const SIGNATURE: ::windows::imp::ConstBuffer = ::windows::imp::ConstBuffer::from_slice(b"rc(Windows.Gaming.Input.UINavigationController;{e5aeefdd-f50e-4a55-8cdc-d33229548175})");
1985 }
1986 impl ::core::clone::Clone for UINavigationController {
1987 fn clone(&self) -> Self {
1988 Self(self.0.clone())
1989 }
1990 }
1991 unsafe impl ::windows::core::Interface for UINavigationController {
1992 type Vtable = IUINavigationController_Vtbl;
1993 }
1994 unsafe impl ::windows::core::ComInterface for UINavigationController {
1995 const IID: ::windows::core::GUID = <IUINavigationController as ::windows::core::ComInterface>::IID;
1996 }
1997 impl ::windows::core::RuntimeName for UINavigationController {
1998 const NAME: &'static str = "Windows.Gaming.Input.UINavigationController";
1999 }
2000 ::windows::imp::interface_hierarchy!(UINavigationController, ::windows::core::IUnknown, ::windows::core::IInspectable);
2001 impl ::windows::core::CanTryInto<IGameController> for UINavigationController {}
2002 impl ::windows::core::CanTryInto<IGameControllerBatteryInfo> for UINavigationController {}
2003 unsafe impl ::core::marker::Send for UINavigationController {}
2004 unsafe impl ::core::marker::Sync for UINavigationController {}
2005 #[doc = "*Required features: `\"Gaming_Input\"`*"]
2006 #[repr(transparent)]
2007 #[derive(::core::cmp::PartialEq, ::core::cmp::Eq)]
2008 pub struct ArcadeStickButtons(pub u32);
2009 impl ArcadeStickButtons {
2010 pub const None: Self = Self(0u32);
2011 pub const StickUp: Self = Self(1u32);
2012 pub const StickDown: Self = Self(2u32);
2013 pub const StickLeft: Self = Self(4u32);
2014 pub const StickRight: Self = Self(8u32);
2015 pub const Action1: Self = Self(16u32);
2016 pub const Action2: Self = Self(32u32);
2017 pub const Action3: Self = Self(64u32);
2018 pub const Action4: Self = Self(128u32);
2019 pub const Action5: Self = Self(256u32);
2020 pub const Action6: Self = Self(512u32);
2021 pub const Special1: Self = Self(1024u32);
2022 pub const Special2: Self = Self(2048u32);
2023 }
2024 impl ::core::marker::Copy for ArcadeStickButtons {}
2025 impl ::core::clone::Clone for ArcadeStickButtons {
2026 fn clone(&self) -> Self {
2027 *self
2028 }
2029 }
2030 impl ::core::default::Default for ArcadeStickButtons {
2031 fn default() -> Self {
2032 Self(0)
2033 }
2034 }
2035 impl ::windows::core::TypeKind for ArcadeStickButtons {
2036 type TypeKind = ::windows::core::CopyType;
2037 }
2038 impl ::core::fmt::Debug for ArcadeStickButtons {
2039 fn fmt(&self, f: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result {
2040 f.debug_tuple("ArcadeStickButtons").field(&self.0).finish()
2041 }
2042 }
2043 impl ArcadeStickButtons {
2044 pub const fn contains(&self, other: Self) -> bool {
2045 self.0 & other.0 == other.0
2046 }
2047 }
2048 impl ::core::ops::BitOr for ArcadeStickButtons {
2049 type Output = Self;
2050 fn bitor(self, other: Self) -> Self {
2051 Self(self.0 | other.0)
2052 }
2053 }
2054 impl ::core::ops::BitAnd for ArcadeStickButtons {
2055 type Output = Self;
2056 fn bitand(self, other: Self) -> Self {
2057 Self(self.0 & other.0)
2058 }
2059 }
2060 impl ::core::ops::BitOrAssign for ArcadeStickButtons {
2061 fn bitor_assign(&mut self, other: Self) {
2062 self.0.bitor_assign(other.0)
2063 }
2064 }
2065 impl ::core::ops::BitAndAssign for ArcadeStickButtons {
2066 fn bitand_assign(&mut self, other: Self) {
2067 self.0.bitand_assign(other.0)
2068 }
2069 }
2070 impl ::core::ops::Not for ArcadeStickButtons {
2071 type Output = Self;
2072 fn not(self) -> Self {
2073 Self(self.0.not())
2074 }
2075 }
2076 impl ::windows::core::RuntimeType for ArcadeStickButtons {
2077 const SIGNATURE: ::windows::imp::ConstBuffer = ::windows::imp::ConstBuffer::from_slice(b"enum(Windows.Gaming.Input.ArcadeStickButtons;u4)");
2078 }
2079 #[doc = "*Required features: `\"Gaming_Input\"`*"]
2080 #[repr(transparent)]
2081 #[derive(::core::cmp::PartialEq, ::core::cmp::Eq)]
2082 pub struct FlightStickButtons(pub u32);
2083 impl FlightStickButtons {
2084 pub const None: Self = Self(0u32);
2085 pub const FirePrimary: Self = Self(1u32);
2086 pub const FireSecondary: Self = Self(2u32);
2087 }
2088 impl ::core::marker::Copy for FlightStickButtons {}
2089 impl ::core::clone::Clone for FlightStickButtons {
2090 fn clone(&self) -> Self {
2091 *self
2092 }
2093 }
2094 impl ::core::default::Default for FlightStickButtons {
2095 fn default() -> Self {
2096 Self(0)
2097 }
2098 }
2099 impl ::windows::core::TypeKind for FlightStickButtons {
2100 type TypeKind = ::windows::core::CopyType;
2101 }
2102 impl ::core::fmt::Debug for FlightStickButtons {
2103 fn fmt(&self, f: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result {
2104 f.debug_tuple("FlightStickButtons").field(&self.0).finish()
2105 }
2106 }
2107 impl FlightStickButtons {
2108 pub const fn contains(&self, other: Self) -> bool {
2109 self.0 & other.0 == other.0
2110 }
2111 }
2112 impl ::core::ops::BitOr for FlightStickButtons {
2113 type Output = Self;
2114 fn bitor(self, other: Self) -> Self {
2115 Self(self.0 | other.0)
2116 }
2117 }
2118 impl ::core::ops::BitAnd for FlightStickButtons {
2119 type Output = Self;
2120 fn bitand(self, other: Self) -> Self {
2121 Self(self.0 & other.0)
2122 }
2123 }
2124 impl ::core::ops::BitOrAssign for FlightStickButtons {
2125 fn bitor_assign(&mut self, other: Self) {
2126 self.0.bitor_assign(other.0)
2127 }
2128 }
2129 impl ::core::ops::BitAndAssign for FlightStickButtons {
2130 fn bitand_assign(&mut self, other: Self) {
2131 self.0.bitand_assign(other.0)
2132 }
2133 }
2134 impl ::core::ops::Not for FlightStickButtons {
2135 type Output = Self;
2136 fn not(self) -> Self {
2137 Self(self.0.not())
2138 }
2139 }
2140 impl ::windows::core::RuntimeType for FlightStickButtons {
2141 const SIGNATURE: ::windows::imp::ConstBuffer = ::windows::imp::ConstBuffer::from_slice(b"enum(Windows.Gaming.Input.FlightStickButtons;u4)");
2142 }
2143 #[doc = "*Required features: `\"Gaming_Input\"`*"]
2144 #[repr(transparent)]
2145 #[derive(::core::cmp::PartialEq, ::core::cmp::Eq)]
2146 pub struct GameControllerButtonLabel(pub i32);
2147 impl GameControllerButtonLabel {
2148 pub const None: Self = Self(0i32);
2149 pub const XboxBack: Self = Self(1i32);
2150 pub const XboxStart: Self = Self(2i32);
2151 pub const XboxMenu: Self = Self(3i32);
2152 pub const XboxView: Self = Self(4i32);
2153 pub const XboxUp: Self = Self(5i32);
2154 pub const XboxDown: Self = Self(6i32);
2155 pub const XboxLeft: Self = Self(7i32);
2156 pub const XboxRight: Self = Self(8i32);
2157 pub const XboxA: Self = Self(9i32);
2158 pub const XboxB: Self = Self(10i32);
2159 pub const XboxX: Self = Self(11i32);
2160 pub const XboxY: Self = Self(12i32);
2161 pub const XboxLeftBumper: Self = Self(13i32);
2162 pub const XboxLeftTrigger: Self = Self(14i32);
2163 pub const XboxLeftStickButton: Self = Self(15i32);
2164 pub const XboxRightBumper: Self = Self(16i32);
2165 pub const XboxRightTrigger: Self = Self(17i32);
2166 pub const XboxRightStickButton: Self = Self(18i32);
2167 pub const XboxPaddle1: Self = Self(19i32);
2168 pub const XboxPaddle2: Self = Self(20i32);
2169 pub const XboxPaddle3: Self = Self(21i32);
2170 pub const XboxPaddle4: Self = Self(22i32);
2171 pub const Mode: Self = Self(23i32);
2172 pub const Select: Self = Self(24i32);
2173 pub const Menu: Self = Self(25i32);
2174 pub const View: Self = Self(26i32);
2175 pub const Back: Self = Self(27i32);
2176 pub const Start: Self = Self(28i32);
2177 pub const Options: Self = Self(29i32);
2178 pub const Share: Self = Self(30i32);
2179 pub const Up: Self = Self(31i32);
2180 pub const Down: Self = Self(32i32);
2181 pub const Left: Self = Self(33i32);
2182 pub const Right: Self = Self(34i32);
2183 pub const LetterA: Self = Self(35i32);
2184 pub const LetterB: Self = Self(36i32);
2185 pub const LetterC: Self = Self(37i32);
2186 pub const LetterL: Self = Self(38i32);
2187 pub const LetterR: Self = Self(39i32);
2188 pub const LetterX: Self = Self(40i32);
2189 pub const LetterY: Self = Self(41i32);
2190 pub const LetterZ: Self = Self(42i32);
2191 pub const Cross: Self = Self(43i32);
2192 pub const Circle: Self = Self(44i32);
2193 pub const Square: Self = Self(45i32);
2194 pub const Triangle: Self = Self(46i32);
2195 pub const LeftBumper: Self = Self(47i32);
2196 pub const LeftTrigger: Self = Self(48i32);
2197 pub const LeftStickButton: Self = Self(49i32);
2198 pub const Left1: Self = Self(50i32);
2199 pub const Left2: Self = Self(51i32);
2200 pub const Left3: Self = Self(52i32);
2201 pub const RightBumper: Self = Self(53i32);
2202 pub const RightTrigger: Self = Self(54i32);
2203 pub const RightStickButton: Self = Self(55i32);
2204 pub const Right1: Self = Self(56i32);
2205 pub const Right2: Self = Self(57i32);
2206 pub const Right3: Self = Self(58i32);
2207 pub const Paddle1: Self = Self(59i32);
2208 pub const Paddle2: Self = Self(60i32);
2209 pub const Paddle3: Self = Self(61i32);
2210 pub const Paddle4: Self = Self(62i32);
2211 pub const Plus: Self = Self(63i32);
2212 pub const Minus: Self = Self(64i32);
2213 pub const DownLeftArrow: Self = Self(65i32);
2214 pub const DialLeft: Self = Self(66i32);
2215 pub const DialRight: Self = Self(67i32);
2216 pub const Suspension: Self = Self(68i32);
2217 }
2218 impl ::core::marker::Copy for GameControllerButtonLabel {}
2219 impl ::core::clone::Clone for GameControllerButtonLabel {
2220 fn clone(&self) -> Self {
2221 *self
2222 }
2223 }
2224 impl ::core::default::Default for GameControllerButtonLabel {
2225 fn default() -> Self {
2226 Self(0)
2227 }
2228 }
2229 impl ::windows::core::TypeKind for GameControllerButtonLabel {
2230 type TypeKind = ::windows::core::CopyType;
2231 }
2232 impl ::core::fmt::Debug for GameControllerButtonLabel {
2233 fn fmt(&self, f: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result {
2234 f.debug_tuple("GameControllerButtonLabel").field(&self.0).finish()
2235 }
2236 }
2237 impl ::windows::core::RuntimeType for GameControllerButtonLabel {
2238 const SIGNATURE: ::windows::imp::ConstBuffer = ::windows::imp::ConstBuffer::from_slice(b"enum(Windows.Gaming.Input.GameControllerButtonLabel;i4)");
2239 }
2240 #[doc = "*Required features: `\"Gaming_Input\"`*"]
2241 #[repr(transparent)]
2242 #[derive(::core::cmp::PartialEq, ::core::cmp::Eq)]
2243 pub struct GameControllerSwitchKind(pub i32);
2244 impl GameControllerSwitchKind {
2245 pub const TwoWay: Self = Self(0i32);
2246 pub const FourWay: Self = Self(1i32);
2247 pub const EightWay: Self = Self(2i32);
2248 }
2249 impl ::core::marker::Copy for GameControllerSwitchKind {}
2250 impl ::core::clone::Clone for GameControllerSwitchKind {
2251 fn clone(&self) -> Self {
2252 *self
2253 }
2254 }
2255 impl ::core::default::Default for GameControllerSwitchKind {
2256 fn default() -> Self {
2257 Self(0)
2258 }
2259 }
2260 impl ::windows::core::TypeKind for GameControllerSwitchKind {
2261 type TypeKind = ::windows::core::CopyType;
2262 }
2263 impl ::core::fmt::Debug for GameControllerSwitchKind {
2264 fn fmt(&self, f: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result {
2265 f.debug_tuple("GameControllerSwitchKind").field(&self.0).finish()
2266 }
2267 }
2268 impl ::windows::core::RuntimeType for GameControllerSwitchKind {
2269 const SIGNATURE: ::windows::imp::ConstBuffer = ::windows::imp::ConstBuffer::from_slice(b"enum(Windows.Gaming.Input.GameControllerSwitchKind;i4)");
2270 }
2271 #[doc = "*Required features: `\"Gaming_Input\"`*"]
2272 #[repr(transparent)]
2273 #[derive(::core::cmp::PartialEq, ::core::cmp::Eq)]
2274 pub struct GameControllerSwitchPosition(pub i32);
2275 impl GameControllerSwitchPosition {
2276 pub const Center: Self = Self(0i32);
2277 pub const Up: Self = Self(1i32);
2278 pub const UpRight: Self = Self(2i32);
2279 pub const Right: Self = Self(3i32);
2280 pub const DownRight: Self = Self(4i32);
2281 pub const Down: Self = Self(5i32);
2282 pub const DownLeft: Self = Self(6i32);
2283 pub const Left: Self = Self(7i32);
2284 pub const UpLeft: Self = Self(8i32);
2285 }
2286 impl ::core::marker::Copy for GameControllerSwitchPosition {}
2287 impl ::core::clone::Clone for GameControllerSwitchPosition {
2288 fn clone(&self) -> Self {
2289 *self
2290 }
2291 }
2292 impl ::core::default::Default for GameControllerSwitchPosition {
2293 fn default() -> Self {
2294 Self(0)
2295 }
2296 }
2297 impl ::windows::core::TypeKind for GameControllerSwitchPosition {
2298 type TypeKind = ::windows::core::CopyType;
2299 }
2300 impl ::core::fmt::Debug for GameControllerSwitchPosition {
2301 fn fmt(&self, f: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result {
2302 f.debug_tuple("GameControllerSwitchPosition").field(&self.0).finish()
2303 }
2304 }
2305 impl ::windows::core::RuntimeType for GameControllerSwitchPosition {
2306 const SIGNATURE: ::windows::imp::ConstBuffer = ::windows::imp::ConstBuffer::from_slice(b"enum(Windows.Gaming.Input.GameControllerSwitchPosition;i4)");
2307 }
2308 #[doc = "*Required features: `\"Gaming_Input\"`*"]
2309 #[repr(transparent)]
2310 #[derive(::core::cmp::PartialEq, ::core::cmp::Eq)]
2311 pub struct GamepadButtons(pub u32);
2312 impl GamepadButtons {
2313 pub const None: Self = Self(0u32);
2314 pub const Menu: Self = Self(1u32);
2315 pub const View: Self = Self(2u32);
2316 pub const A: Self = Self(4u32);
2317 pub const B: Self = Self(8u32);
2318 pub const X: Self = Self(16u32);
2319 pub const Y: Self = Self(32u32);
2320 pub const DPadUp: Self = Self(64u32);
2321 pub const DPadDown: Self = Self(128u32);
2322 pub const DPadLeft: Self = Self(256u32);
2323 pub const DPadRight: Self = Self(512u32);
2324 pub const LeftShoulder: Self = Self(1024u32);
2325 pub const RightShoulder: Self = Self(2048u32);
2326 pub const LeftThumbstick: Self = Self(4096u32);
2327 pub const RightThumbstick: Self = Self(8192u32);
2328 pub const Paddle1: Self = Self(16384u32);
2329 pub const Paddle2: Self = Self(32768u32);
2330 pub const Paddle3: Self = Self(65536u32);
2331 pub const Paddle4: Self = Self(131072u32);
2332 }
2333 impl ::core::marker::Copy for GamepadButtons {}
2334 impl ::core::clone::Clone for GamepadButtons {
2335 fn clone(&self) -> Self {
2336 *self
2337 }
2338 }
2339 impl ::core::default::Default for GamepadButtons {
2340 fn default() -> Self {
2341 Self(0)
2342 }
2343 }
2344 impl ::windows::core::TypeKind for GamepadButtons {
2345 type TypeKind = ::windows::core::CopyType;
2346 }
2347 impl ::core::fmt::Debug for GamepadButtons {
2348 fn fmt(&self, f: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result {
2349 f.debug_tuple("GamepadButtons").field(&self.0).finish()
2350 }
2351 }
2352 impl GamepadButtons {
2353 pub const fn contains(&self, other: Self) -> bool {
2354 self.0 & other.0 == other.0
2355 }
2356 }
2357 impl ::core::ops::BitOr for GamepadButtons {
2358 type Output = Self;
2359 fn bitor(self, other: Self) -> Self {
2360 Self(self.0 | other.0)
2361 }
2362 }
2363 impl ::core::ops::BitAnd for GamepadButtons {
2364 type Output = Self;
2365 fn bitand(self, other: Self) -> Self {
2366 Self(self.0 & other.0)
2367 }
2368 }
2369 impl ::core::ops::BitOrAssign for GamepadButtons {
2370 fn bitor_assign(&mut self, other: Self) {
2371 self.0.bitor_assign(other.0)
2372 }
2373 }
2374 impl ::core::ops::BitAndAssign for GamepadButtons {
2375 fn bitand_assign(&mut self, other: Self) {
2376 self.0.bitand_assign(other.0)
2377 }
2378 }
2379 impl ::core::ops::Not for GamepadButtons {
2380 type Output = Self;
2381 fn not(self) -> Self {
2382 Self(self.0.not())
2383 }
2384 }
2385 impl ::windows::core::RuntimeType for GamepadButtons {
2386 const SIGNATURE: ::windows::imp::ConstBuffer = ::windows::imp::ConstBuffer::from_slice(b"enum(Windows.Gaming.Input.GamepadButtons;u4)");
2387 }
2388 #[doc = "*Required features: `\"Gaming_Input\"`*"]
2389 #[repr(transparent)]
2390 #[derive(::core::cmp::PartialEq, ::core::cmp::Eq)]
2391 pub struct OptionalUINavigationButtons(pub u32);
2392 impl OptionalUINavigationButtons {
2393 pub const None: Self = Self(0u32);
2394 pub const Context1: Self = Self(1u32);
2395 pub const Context2: Self = Self(2u32);
2396 pub const Context3: Self = Self(4u32);
2397 pub const Context4: Self = Self(8u32);
2398 pub const PageUp: Self = Self(16u32);
2399 pub const PageDown: Self = Self(32u32);
2400 pub const PageLeft: Self = Self(64u32);
2401 pub const PageRight: Self = Self(128u32);
2402 pub const ScrollUp: Self = Self(256u32);
2403 pub const ScrollDown: Self = Self(512u32);
2404 pub const ScrollLeft: Self = Self(1024u32);
2405 pub const ScrollRight: Self = Self(2048u32);
2406 }
2407 impl ::core::marker::Copy for OptionalUINavigationButtons {}
2408 impl ::core::clone::Clone for OptionalUINavigationButtons {
2409 fn clone(&self) -> Self {
2410 *self
2411 }
2412 }
2413 impl ::core::default::Default for OptionalUINavigationButtons {
2414 fn default() -> Self {
2415 Self(0)
2416 }
2417 }
2418 impl ::windows::core::TypeKind for OptionalUINavigationButtons {
2419 type TypeKind = ::windows::core::CopyType;
2420 }
2421 impl ::core::fmt::Debug for OptionalUINavigationButtons {
2422 fn fmt(&self, f: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result {
2423 f.debug_tuple("OptionalUINavigationButtons").field(&self.0).finish()
2424 }
2425 }
2426 impl OptionalUINavigationButtons {
2427 pub const fn contains(&self, other: Self) -> bool {
2428 self.0 & other.0 == other.0
2429 }
2430 }
2431 impl ::core::ops::BitOr for OptionalUINavigationButtons {
2432 type Output = Self;
2433 fn bitor(self, other: Self) -> Self {
2434 Self(self.0 | other.0)
2435 }
2436 }
2437 impl ::core::ops::BitAnd for OptionalUINavigationButtons {
2438 type Output = Self;
2439 fn bitand(self, other: Self) -> Self {
2440 Self(self.0 & other.0)
2441 }
2442 }
2443 impl ::core::ops::BitOrAssign for OptionalUINavigationButtons {
2444 fn bitor_assign(&mut self, other: Self) {
2445 self.0.bitor_assign(other.0)
2446 }
2447 }
2448 impl ::core::ops::BitAndAssign for OptionalUINavigationButtons {
2449 fn bitand_assign(&mut self, other: Self) {
2450 self.0.bitand_assign(other.0)
2451 }
2452 }
2453 impl ::core::ops::Not for OptionalUINavigationButtons {
2454 type Output = Self;
2455 fn not(self) -> Self {
2456 Self(self.0.not())
2457 }
2458 }
2459 impl ::windows::core::RuntimeType for OptionalUINavigationButtons {
2460 const SIGNATURE: ::windows::imp::ConstBuffer = ::windows::imp::ConstBuffer::from_slice(b"enum(Windows.Gaming.Input.OptionalUINavigationButtons;u4)");
2461 }
2462 #[doc = "*Required features: `\"Gaming_Input\"`*"]
2463 #[repr(transparent)]
2464 #[derive(::core::cmp::PartialEq, ::core::cmp::Eq)]
2465 pub struct RacingWheelButtons(pub u32);
2466 impl RacingWheelButtons {
2467 pub const None: Self = Self(0u32);
2468 pub const PreviousGear: Self = Self(1u32);
2469 pub const NextGear: Self = Self(2u32);
2470 pub const DPadUp: Self = Self(4u32);
2471 pub const DPadDown: Self = Self(8u32);
2472 pub const DPadLeft: Self = Self(16u32);
2473 pub const DPadRight: Self = Self(32u32);
2474 pub const Button1: Self = Self(64u32);
2475 pub const Button2: Self = Self(128u32);
2476 pub const Button3: Self = Self(256u32);
2477 pub const Button4: Self = Self(512u32);
2478 pub const Button5: Self = Self(1024u32);
2479 pub const Button6: Self = Self(2048u32);
2480 pub const Button7: Self = Self(4096u32);
2481 pub const Button8: Self = Self(8192u32);
2482 pub const Button9: Self = Self(16384u32);
2483 pub const Button10: Self = Self(32768u32);
2484 pub const Button11: Self = Self(65536u32);
2485 pub const Button12: Self = Self(131072u32);
2486 pub const Button13: Self = Self(262144u32);
2487 pub const Button14: Self = Self(524288u32);
2488 pub const Button15: Self = Self(1048576u32);
2489 pub const Button16: Self = Self(2097152u32);
2490 }
2491 impl ::core::marker::Copy for RacingWheelButtons {}
2492 impl ::core::clone::Clone for RacingWheelButtons {
2493 fn clone(&self) -> Self {
2494 *self
2495 }
2496 }
2497 impl ::core::default::Default for RacingWheelButtons {
2498 fn default() -> Self {
2499 Self(0)
2500 }
2501 }
2502 impl ::windows::core::TypeKind for RacingWheelButtons {
2503 type TypeKind = ::windows::core::CopyType;
2504 }
2505 impl ::core::fmt::Debug for RacingWheelButtons {
2506 fn fmt(&self, f: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result {
2507 f.debug_tuple("RacingWheelButtons").field(&self.0).finish()
2508 }
2509 }
2510 impl RacingWheelButtons {
2511 pub const fn contains(&self, other: Self) -> bool {
2512 self.0 & other.0 == other.0
2513 }
2514 }
2515 impl ::core::ops::BitOr for RacingWheelButtons {
2516 type Output = Self;
2517 fn bitor(self, other: Self) -> Self {
2518 Self(self.0 | other.0)
2519 }
2520 }
2521 impl ::core::ops::BitAnd for RacingWheelButtons {
2522 type Output = Self;
2523 fn bitand(self, other: Self) -> Self {
2524 Self(self.0 & other.0)
2525 }
2526 }
2527 impl ::core::ops::BitOrAssign for RacingWheelButtons {
2528 fn bitor_assign(&mut self, other: Self) {
2529 self.0.bitor_assign(other.0)
2530 }
2531 }
2532 impl ::core::ops::BitAndAssign for RacingWheelButtons {
2533 fn bitand_assign(&mut self, other: Self) {
2534 self.0.bitand_assign(other.0)
2535 }
2536 }
2537 impl ::core::ops::Not for RacingWheelButtons {
2538 type Output = Self;
2539 fn not(self) -> Self {
2540 Self(self.0.not())
2541 }
2542 }
2543 impl ::windows::core::RuntimeType for RacingWheelButtons {
2544 const SIGNATURE: ::windows::imp::ConstBuffer = ::windows::imp::ConstBuffer::from_slice(b"enum(Windows.Gaming.Input.RacingWheelButtons;u4)");
2545 }
2546 #[doc = "*Required features: `\"Gaming_Input\"`*"]
2547 #[repr(transparent)]
2548 #[derive(::core::cmp::PartialEq, ::core::cmp::Eq)]
2549 pub struct RequiredUINavigationButtons(pub u32);
2550 impl RequiredUINavigationButtons {
2551 pub const None: Self = Self(0u32);
2552 pub const Menu: Self = Self(1u32);
2553 pub const View: Self = Self(2u32);
2554 pub const Accept: Self = Self(4u32);
2555 pub const Cancel: Self = Self(8u32);
2556 pub const Up: Self = Self(16u32);
2557 pub const Down: Self = Self(32u32);
2558 pub const Left: Self = Self(64u32);
2559 pub const Right: Self = Self(128u32);
2560 }
2561 impl ::core::marker::Copy for RequiredUINavigationButtons {}
2562 impl ::core::clone::Clone for RequiredUINavigationButtons {
2563 fn clone(&self) -> Self {
2564 *self
2565 }
2566 }
2567 impl ::core::default::Default for RequiredUINavigationButtons {
2568 fn default() -> Self {
2569 Self(0)
2570 }
2571 }
2572 impl ::windows::core::TypeKind for RequiredUINavigationButtons {
2573 type TypeKind = ::windows::core::CopyType;
2574 }
2575 impl ::core::fmt::Debug for RequiredUINavigationButtons {
2576 fn fmt(&self, f: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result {
2577 f.debug_tuple("RequiredUINavigationButtons").field(&self.0).finish()
2578 }
2579 }
2580 impl RequiredUINavigationButtons {
2581 pub const fn contains(&self, other: Self) -> bool {
2582 self.0 & other.0 == other.0
2583 }
2584 }
2585 impl ::core::ops::BitOr for RequiredUINavigationButtons {
2586 type Output = Self;
2587 fn bitor(self, other: Self) -> Self {
2588 Self(self.0 | other.0)
2589 }
2590 }
2591 impl ::core::ops::BitAnd for RequiredUINavigationButtons {
2592 type Output = Self;
2593 fn bitand(self, other: Self) -> Self {
2594 Self(self.0 & other.0)
2595 }
2596 }
2597 impl ::core::ops::BitOrAssign for RequiredUINavigationButtons {
2598 fn bitor_assign(&mut self, other: Self) {
2599 self.0.bitor_assign(other.0)
2600 }
2601 }
2602 impl ::core::ops::BitAndAssign for RequiredUINavigationButtons {
2603 fn bitand_assign(&mut self, other: Self) {
2604 self.0.bitand_assign(other.0)
2605 }
2606 }
2607 impl ::core::ops::Not for RequiredUINavigationButtons {
2608 type Output = Self;
2609 fn not(self) -> Self {
2610 Self(self.0.not())
2611 }
2612 }
2613 impl ::windows::core::RuntimeType for RequiredUINavigationButtons {
2614 const SIGNATURE: ::windows::imp::ConstBuffer = ::windows::imp::ConstBuffer::from_slice(b"enum(Windows.Gaming.Input.RequiredUINavigationButtons;u4)");
2615 }
2616 #[repr(C)]
2617 #[doc = "*Required features: `\"Gaming_Input\"`*"]
2618 pub struct ArcadeStickReading {
2619 pub Timestamp: u64,
2620 pub Buttons: ArcadeStickButtons,
2621 }
2622 impl ::core::marker::Copy for ArcadeStickReading {}
2623 impl ::core::clone::Clone for ArcadeStickReading {
2624 fn clone(&self) -> Self {
2625 *self
2626 }
2627 }
2628 impl ::core::fmt::Debug for ArcadeStickReading {
2629 fn fmt(&self, f: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result {
2630 f.debug_struct("ArcadeStickReading").field("Timestamp", &self.Timestamp).field("Buttons", &self.Buttons).finish()
2631 }
2632 }
2633 impl ::windows::core::TypeKind for ArcadeStickReading {
2634 type TypeKind = ::windows::core::CopyType;
2635 }
2636 impl ::windows::core::RuntimeType for ArcadeStickReading {
2637 const SIGNATURE: ::windows::imp::ConstBuffer = ::windows::imp::ConstBuffer::from_slice(b"struct(Windows.Gaming.Input.ArcadeStickReading;u8;enum(Windows.Gaming.Input.ArcadeStickButtons;u4))");
2638 }
2639 impl ::core::cmp::PartialEq for ArcadeStickReading {
2640 fn eq(&self, other: &Self) -> bool {
2641 self.Timestamp == other.Timestamp && self.Buttons == other.Buttons
2642 }
2643 }
2644 impl ::core::cmp::Eq for ArcadeStickReading {}
2645 impl ::core::default::Default for ArcadeStickReading {
2646 fn default() -> Self {
2647 unsafe { ::core::mem::zeroed() }
2648 }
2649 }
2650 #[repr(C)]
2651 #[doc = "*Required features: `\"Gaming_Input\"`*"]
2652 pub struct FlightStickReading {
2653 pub Timestamp: u64,
2654 pub Buttons: FlightStickButtons,
2655 pub HatSwitch: GameControllerSwitchPosition,
2656 pub Roll: f64,
2657 pub Pitch: f64,
2658 pub Yaw: f64,
2659 pub Throttle: f64,
2660 }
2661 impl ::core::marker::Copy for FlightStickReading {}
2662 impl ::core::clone::Clone for FlightStickReading {
2663 fn clone(&self) -> Self {
2664 *self
2665 }
2666 }
2667 impl ::core::fmt::Debug for FlightStickReading {
2668 fn fmt(&self, f: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result {
2669 f.debug_struct("FlightStickReading").field("Timestamp", &self.Timestamp).field("Buttons", &self.Buttons).field("HatSwitch", &self.HatSwitch).field("Roll", &self.Roll).field("Pitch", &self.Pitch).field("Yaw", &self.Yaw).field("Throttle", &self.Throttle).finish()
2670 }
2671 }
2672 impl ::windows::core::TypeKind for FlightStickReading {
2673 type TypeKind = ::windows::core::CopyType;
2674 }
2675 impl ::windows::core::RuntimeType for FlightStickReading {
2676 const SIGNATURE: ::windows::imp::ConstBuffer = ::windows::imp::ConstBuffer::from_slice(b"struct(Windows.Gaming.Input.FlightStickReading;u8;enum(Windows.Gaming.Input.FlightStickButtons;u4);enum(Windows.Gaming.Input.GameControllerSwitchPosition;i4);f8;f8;f8;f8)");
2677 }
2678 impl ::core::cmp::PartialEq for FlightStickReading {
2679 fn eq(&self, other: &Self) -> bool {
2680 self.Timestamp == other.Timestamp && self.Buttons == other.Buttons && self.HatSwitch == other.HatSwitch && self.Roll == other.Roll && self.Pitch == other.Pitch && self.Yaw == other.Yaw && self.Throttle == other.Throttle
2681 }
2682 }
2683 impl ::core::cmp::Eq for FlightStickReading {}
2684 impl ::core::default::Default for FlightStickReading {
2685 fn default() -> Self {
2686 unsafe { ::core::mem::zeroed() }
2687 }
2688 }
2689 #[repr(C)]
2690 #[doc = "*Required features: `\"Gaming_Input\"`*"]
2691 pub struct GamepadReading {
2692 pub Timestamp: u64,
2693 pub Buttons: GamepadButtons,
2694 pub LeftTrigger: f64,
2695 pub RightTrigger: f64,
2696 pub LeftThumbstickX: f64,
2697 pub LeftThumbstickY: f64,
2698 pub RightThumbstickX: f64,
2699 pub RightThumbstickY: f64,
2700 }
2701 impl ::core::marker::Copy for GamepadReading {}
2702 impl ::core::clone::Clone for GamepadReading {
2703 fn clone(&self) -> Self {
2704 *self
2705 }
2706 }
2707 impl ::core::fmt::Debug for GamepadReading {
2708 fn fmt(&self, f: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result {
2709 f.debug_struct("GamepadReading").field("Timestamp", &self.Timestamp).field("Buttons", &self.Buttons).field("LeftTrigger", &self.LeftTrigger).field("RightTrigger", &self.RightTrigger).field("LeftThumbstickX", &self.LeftThumbstickX).field("LeftThumbstickY", &self.LeftThumbstickY).field("RightThumbstickX", &self.RightThumbstickX).field("RightThumbstickY", &self.RightThumbstickY).finish()
2710 }
2711 }
2712 impl ::windows::core::TypeKind for GamepadReading {
2713 type TypeKind = ::windows::core::CopyType;
2714 }
2715 impl ::windows::core::RuntimeType for GamepadReading {
2716 const SIGNATURE: ::windows::imp::ConstBuffer = ::windows::imp::ConstBuffer::from_slice(b"struct(Windows.Gaming.Input.GamepadReading;u8;enum(Windows.Gaming.Input.GamepadButtons;u4);f8;f8;f8;f8;f8;f8)");
2717 }
2718 impl ::core::cmp::PartialEq for GamepadReading {
2719 fn eq(&self, other: &Self) -> bool {
2720 self.Timestamp == other.Timestamp && self.Buttons == other.Buttons && self.LeftTrigger == other.LeftTrigger && self.RightTrigger == other.RightTrigger && self.LeftThumbstickX == other.LeftThumbstickX && self.LeftThumbstickY == other.LeftThumbstickY && self.RightThumbstickX == other.RightThumbstickX && self.RightThumbstickY == other.RightThumbstickY
2721 }
2722 }
2723 impl ::core::cmp::Eq for GamepadReading {}
2724 impl ::core::default::Default for GamepadReading {
2725 fn default() -> Self {
2726 unsafe { ::core::mem::zeroed() }
2727 }
2728 }
2729 #[repr(C)]
2730 #[doc = "*Required features: `\"Gaming_Input\"`*"]
2731 pub struct GamepadVibration {
2732 pub LeftMotor: f64,
2733 pub RightMotor: f64,
2734 pub LeftTrigger: f64,
2735 pub RightTrigger: f64,
2736 }
2737 impl ::core::marker::Copy for GamepadVibration {}
2738 impl ::core::clone::Clone for GamepadVibration {
2739 fn clone(&self) -> Self {
2740 *self
2741 }
2742 }
2743 impl ::core::fmt::Debug for GamepadVibration {
2744 fn fmt(&self, f: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result {
2745 f.debug_struct("GamepadVibration").field("LeftMotor", &self.LeftMotor).field("RightMotor", &self.RightMotor).field("LeftTrigger", &self.LeftTrigger).field("RightTrigger", &self.RightTrigger).finish()
2746 }
2747 }
2748 impl ::windows::core::TypeKind for GamepadVibration {
2749 type TypeKind = ::windows::core::CopyType;
2750 }
2751 impl ::windows::core::RuntimeType for GamepadVibration {
2752 const SIGNATURE: ::windows::imp::ConstBuffer = ::windows::imp::ConstBuffer::from_slice(b"struct(Windows.Gaming.Input.GamepadVibration;f8;f8;f8;f8)");
2753 }
2754 impl ::core::cmp::PartialEq for GamepadVibration {
2755 fn eq(&self, other: &Self) -> bool {
2756 self.LeftMotor == other.LeftMotor && self.RightMotor == other.RightMotor && self.LeftTrigger == other.LeftTrigger && self.RightTrigger == other.RightTrigger
2757 }
2758 }
2759 impl ::core::cmp::Eq for GamepadVibration {}
2760 impl ::core::default::Default for GamepadVibration {
2761 fn default() -> Self {
2762 unsafe { ::core::mem::zeroed() }
2763 }
2764 }
2765 #[repr(C)]
2766 #[doc = "*Required features: `\"Gaming_Input\"`*"]
2767 pub struct RacingWheelReading {
2768 pub Timestamp: u64,
2769 pub Buttons: RacingWheelButtons,
2770 pub PatternShifterGear: i32,
2771 pub Wheel: f64,
2772 pub Throttle: f64,
2773 pub Brake: f64,
2774 pub Clutch: f64,
2775 pub Handbrake: f64,
2776 }
2777 impl ::core::marker::Copy for RacingWheelReading {}
2778 impl ::core::clone::Clone for RacingWheelReading {
2779 fn clone(&self) -> Self {
2780 *self
2781 }
2782 }
2783 impl ::core::fmt::Debug for RacingWheelReading {
2784 fn fmt(&self, f: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result {
2785 f.debug_struct("RacingWheelReading").field("Timestamp", &self.Timestamp).field("Buttons", &self.Buttons).field("PatternShifterGear", &self.PatternShifterGear).field("Wheel", &self.Wheel).field("Throttle", &self.Throttle).field("Brake", &self.Brake).field("Clutch", &self.Clutch).field("Handbrake", &self.Handbrake).finish()
2786 }
2787 }
2788 impl ::windows::core::TypeKind for RacingWheelReading {
2789 type TypeKind = ::windows::core::CopyType;
2790 }
2791 impl ::windows::core::RuntimeType for RacingWheelReading {
2792 const SIGNATURE: ::windows::imp::ConstBuffer = ::windows::imp::ConstBuffer::from_slice(b"struct(Windows.Gaming.Input.RacingWheelReading;u8;enum(Windows.Gaming.Input.RacingWheelButtons;u4);i4;f8;f8;f8;f8;f8)");
2793 }
2794 impl ::core::cmp::PartialEq for RacingWheelReading {
2795 fn eq(&self, other: &Self) -> bool {
2796 self.Timestamp == other.Timestamp && self.Buttons == other.Buttons && self.PatternShifterGear == other.PatternShifterGear && self.Wheel == other.Wheel && self.Throttle == other.Throttle && self.Brake == other.Brake && self.Clutch == other.Clutch && self.Handbrake == other.Handbrake
2797 }
2798 }
2799 impl ::core::cmp::Eq for RacingWheelReading {}
2800 impl ::core::default::Default for RacingWheelReading {
2801 fn default() -> Self {
2802 unsafe { ::core::mem::zeroed() }
2803 }
2804 }
2805 #[repr(C)]
2806 #[doc = "*Required features: `\"Gaming_Input\"`*"]
2807 pub struct UINavigationReading {
2808 pub Timestamp: u64,
2809 pub RequiredButtons: RequiredUINavigationButtons,
2810 pub OptionalButtons: OptionalUINavigationButtons,
2811 }
2812 impl ::core::marker::Copy for UINavigationReading {}
2813 impl ::core::clone::Clone for UINavigationReading {
2814 fn clone(&self) -> Self {
2815 *self
2816 }
2817 }
2818 impl ::core::fmt::Debug for UINavigationReading {
2819 fn fmt(&self, f: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result {
2820 f.debug_struct("UINavigationReading").field("Timestamp", &self.Timestamp).field("RequiredButtons", &self.RequiredButtons).field("OptionalButtons", &self.OptionalButtons).finish()
2821 }
2822 }
2823 impl ::windows::core::TypeKind for UINavigationReading {
2824 type TypeKind = ::windows::core::CopyType;
2825 }
2826 impl ::windows::core::RuntimeType for UINavigationReading {
2827 const SIGNATURE: ::windows::imp::ConstBuffer = ::windows::imp::ConstBuffer::from_slice(b"struct(Windows.Gaming.Input.UINavigationReading;u8;enum(Windows.Gaming.Input.RequiredUINavigationButtons;u4);enum(Windows.Gaming.Input.OptionalUINavigationButtons;u4))");
2828 }
2829 impl ::core::cmp::PartialEq for UINavigationReading {
2830 fn eq(&self, other: &Self) -> bool {
2831 self.Timestamp == other.Timestamp && self.RequiredButtons == other.RequiredButtons && self.OptionalButtons == other.OptionalButtons
2832 }
2833 }
2834 impl ::core::cmp::Eq for UINavigationReading {}
2835 impl ::core::default::Default for UINavigationReading {
2836 fn default() -> Self {
2837 unsafe { ::core::mem::zeroed() }
2838 }
2839 }
2840 #[cfg(feature = "implement")]
2841 ::core::include!("impl.rs");