1 #[cfg(feature = "Gaming_Input_Custom")]
3 #[cfg(feature = "Gaming_Input_ForceFeedback")]
5 #[cfg(feature = "Gaming_Input_Preview")]
9 pub struct IArcadeStick(::windows
::core
::IUnknown
);
10 unsafe impl ::windows
::core
::Interface
for IArcadeStick
{
11 type Vtable
= IArcadeStick_Vtbl
;
13 impl ::core
::clone
::Clone
for IArcadeStick
{
14 fn clone(&self) -> Self {
18 unsafe impl ::windows
::core
::ComInterface
for IArcadeStick
{
19 const IID
: ::windows
::core
::GUID
= ::windows
::core
::GUID
::from_u128(0xb14a539d_befb_4c81_8051_15ecf3b13036);
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
,
30 pub struct IArcadeStickStatics(::windows
::core
::IUnknown
);
31 unsafe impl ::windows
::core
::Interface
for IArcadeStickStatics
{
32 type Vtable
= IArcadeStickStatics_Vtbl
;
34 impl ::core
::clone
::Clone
for IArcadeStickStatics
{
35 fn clone(&self) -> Self {
39 unsafe impl ::windows
::core
::ComInterface
for IArcadeStickStatics
{
40 const IID
: ::windows
::core
::GUID
= ::windows
::core
::GUID
::from_u128(0x5c37b8c8_37b1_4ad8_9458_200f1a30018e);
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"))]
69 pub struct IArcadeStickStatics2(::windows
::core
::IUnknown
);
70 unsafe impl ::windows
::core
::Interface
for IArcadeStickStatics2
{
71 type Vtable
= IArcadeStickStatics2_Vtbl
;
73 impl ::core
::clone
::Clone
for IArcadeStickStatics2
{
74 fn clone(&self) -> Self {
78 unsafe impl ::windows
::core
::ComInterface
for IArcadeStickStatics2
{
79 const IID
: ::windows
::core
::GUID
= ::windows
::core
::GUID
::from_u128(0x52b5d744_bb86_445a_b59c_596f0e2a49df);
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
,
89 pub struct IFlightStick(::windows
::core
::IUnknown
);
90 unsafe impl ::windows
::core
::Interface
for IFlightStick
{
91 type Vtable
= IFlightStick_Vtbl
;
93 impl ::core
::clone
::Clone
for IFlightStick
{
94 fn clone(&self) -> Self {
98 unsafe impl ::windows
::core
::ComInterface
for IFlightStick
{
99 const IID
: ::windows
::core
::GUID
= ::windows
::core
::GUID
::from_u128(0xb4a2c01c_b83b_4459_a1a9_97b03c33da7c);
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
,
111 pub struct IFlightStickStatics(::windows
::core
::IUnknown
);
112 unsafe impl ::windows
::core
::Interface
for IFlightStickStatics
{
113 type Vtable
= IFlightStickStatics_Vtbl
;
115 impl ::core
::clone
::Clone
for IFlightStickStatics
{
116 fn clone(&self) -> Self {
120 unsafe impl ::windows
::core
::ComInterface
for IFlightStickStatics
{
121 const IID
: ::windows
::core
::GUID
= ::windows
::core
::GUID
::from_u128(0x5514924a_fecc_435e_83dc_5cec8a18a520);
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"))]
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
,
149 #[doc = "*Required features: `\"Gaming_Input\"`*"]
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
> {
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__
)
162 #[doc = "*Required features: `\"Foundation\"`*"]
163 #[cfg(feature = "Foundation")]
164 pub fn RemoveHeadsetConnected(&self, token
: super::super::Foundation
::EventRegistrationToken
) -> ::windows
::core
::Result
<()> {
166 unsafe { (::windows::core::Interface::vtable(this).RemoveHeadsetConnected)(::windows::core::Interface::as_raw(this), token).ok() }
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
> {
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__
)
177 #[doc = "*Required features: `\"Foundation\"`*"]
178 #[cfg(feature = "Foundation")]
179 pub fn RemoveHeadsetDisconnected(&self, token
: super::super::Foundation
::EventRegistrationToken
) -> ::windows
::core
::Result
<()> {
181 unsafe { (::windows::core::Interface::vtable(this).RemoveHeadsetDisconnected)(::windows::core::Interface::as_raw(this), token).ok() }
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
> {
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__
)
192 #[doc = "*Required features: `\"Foundation\"`*"]
193 #[cfg(feature = "Foundation")]
194 pub fn RemoveUserChanged(&self, token
: super::super::Foundation
::EventRegistrationToken
) -> ::windows
::core
::Result
<()> {
196 unsafe { (::windows::core::Interface::vtable(this).RemoveUserChanged)(::windows::core::Interface::as_raw(this), token).ok() }
198 pub fn Headset(&self) -> ::windows
::core
::Result
<Headset
> {
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__
)
205 pub fn IsWireless(&self) -> ::windows
::core
::Result
<bool
> {
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__
)
212 #[doc = "*Required features: `\"System\"`*"]
213 #[cfg(feature = "System")]
214 pub fn User(&self) -> ::windows
::core
::Result
<super::super::System
::User
> {
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__
)
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
{
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()
234 impl ::windows
::core
::RuntimeType
for IGameController
{
235 const SIGNATURE
: ::windows
::imp
::ConstBuffer
= ::windows
::imp
::ConstBuffer
::from_slice(b
"{1baf6522-5f64-42c5-8267-b9fe2215bfbd}");
237 unsafe impl ::windows
::core
::Interface
for IGameController
{
238 type Vtable
= IGameController_Vtbl
;
240 impl ::core
::clone
::Clone
for IGameController
{
241 fn clone(&self) -> Self {
245 unsafe impl ::windows
::core
::ComInterface
for IGameController
{
246 const IID
: ::windows
::core
::GUID
= ::windows
::core
::GUID
::from_u128(0x1baf6522_5f64_42c5_8267_b9fe2215bfbd);
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")))]
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"))]
283 #[doc = "*Required features: `\"Gaming_Input\"`*"]
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
> {
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__
)
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
{
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()
309 impl ::windows
::core
::RuntimeType
for IGameControllerBatteryInfo
{
310 const SIGNATURE
: ::windows
::imp
::ConstBuffer
= ::windows
::imp
::ConstBuffer
::from_slice(b
"{dcecc681-3963-4da6-955d-553f3b6f6161}");
312 unsafe impl ::windows
::core
::Interface
for IGameControllerBatteryInfo
{
313 type Vtable
= IGameControllerBatteryInfo_Vtbl
;
315 impl ::core
::clone
::Clone
for IGameControllerBatteryInfo
{
316 fn clone(&self) -> Self {
320 unsafe impl ::windows
::core
::ComInterface
for IGameControllerBatteryInfo
{
321 const IID
: ::windows
::core
::GUID
= ::windows
::core
::GUID
::from_u128(0xdcecc681_3963_4da6_955d_553f3b6f6161);
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,
334 pub struct IGamepad(::windows
::core
::IUnknown
);
335 unsafe impl ::windows
::core
::Interface
for IGamepad
{
336 type Vtable
= IGamepad_Vtbl
;
338 impl ::core
::clone
::Clone
for IGamepad
{
339 fn clone(&self) -> Self {
343 unsafe impl ::windows
::core
::ComInterface
for IGamepad
{
344 const IID
: ::windows
::core
::GUID
= ::windows
::core
::GUID
::from_u128(0xbc7bb43c_0a69_3903_9e9d_a50f86a45de5);
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
,
356 pub struct IGamepad2(::windows
::core
::IUnknown
);
357 unsafe impl ::windows
::core
::Interface
for IGamepad2
{
358 type Vtable
= IGamepad2_Vtbl
;
360 impl ::core
::clone
::Clone
for IGamepad2
{
361 fn clone(&self) -> Self {
365 unsafe impl ::windows
::core
::ComInterface
for IGamepad2
{
366 const IID
: ::windows
::core
::GUID
= ::windows
::core
::GUID
::from_u128(0x3c1689bd_5915_4245_b0c0_c89fae0308ff);
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
,
376 pub struct IGamepadStatics(::windows
::core
::IUnknown
);
377 unsafe impl ::windows
::core
::Interface
for IGamepadStatics
{
378 type Vtable
= IGamepadStatics_Vtbl
;
380 impl ::core
::clone
::Clone
for IGamepadStatics
{
381 fn clone(&self) -> Self {
385 unsafe impl ::windows
::core
::ComInterface
for IGamepadStatics
{
386 const IID
: ::windows
::core
::GUID
= ::windows
::core
::GUID
::from_u128(0x8bbce529_d49c_39e9_9560_e47dde96b7c8);
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"))]
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"))]
415 pub struct IGamepadStatics2(::windows
::core
::IUnknown
);
416 unsafe impl ::windows
::core
::Interface
for IGamepadStatics2
{
417 type Vtable
= IGamepadStatics2_Vtbl
;
419 impl ::core
::clone
::Clone
for IGamepadStatics2
{
420 fn clone(&self) -> Self {
424 unsafe impl ::windows
::core
::ComInterface
for IGamepadStatics2
{
425 const IID
: ::windows
::core
::GUID
= ::windows
::core
::GUID
::from_u128(0x42676dc5_0856_47c4_9213_b395504c3a3c);
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
,
435 pub struct IHeadset(::windows
::core
::IUnknown
);
436 unsafe impl ::windows
::core
::Interface
for IHeadset
{
437 type Vtable
= IHeadset_Vtbl
;
439 impl ::core
::clone
::Clone
for IHeadset
{
440 fn clone(&self) -> Self {
444 unsafe impl ::windows
::core
::ComInterface
for IHeadset
{
445 const IID
: ::windows
::core
::GUID
= ::windows
::core
::GUID
::from_u128(0x3fd156ef_6925_3fa8_9181_029c5223ae3b);
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
,
456 pub struct IRacingWheel(::windows
::core
::IUnknown
);
457 unsafe impl ::windows
::core
::Interface
for IRacingWheel
{
458 type Vtable
= IRacingWheel_Vtbl
;
460 impl ::core
::clone
::Clone
for IRacingWheel
{
461 fn clone(&self) -> Self {
465 unsafe impl ::windows
::core
::ComInterface
for IRacingWheel
{
466 const IID
: ::windows
::core
::GUID
= ::windows
::core
::GUID
::from_u128(0xf546656f_e106_4c82_a90f_554012904b85);
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"))]
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
,
486 pub struct IRacingWheelStatics(::windows
::core
::IUnknown
);
487 unsafe impl ::windows
::core
::Interface
for IRacingWheelStatics
{
488 type Vtable
= IRacingWheelStatics_Vtbl
;
490 impl ::core
::clone
::Clone
for IRacingWheelStatics
{
491 fn clone(&self) -> Self {
495 unsafe impl ::windows
::core
::ComInterface
for IRacingWheelStatics
{
496 const IID
: ::windows
::core
::GUID
= ::windows
::core
::GUID
::from_u128(0x3ac12cd5_581b_4936_9f94_69f1e6514c7d);
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"))]
525 pub struct IRacingWheelStatics2(::windows
::core
::IUnknown
);
526 unsafe impl ::windows
::core
::Interface
for IRacingWheelStatics2
{
527 type Vtable
= IRacingWheelStatics2_Vtbl
;
529 impl ::core
::clone
::Clone
for IRacingWheelStatics2
{
530 fn clone(&self) -> Self {
534 unsafe impl ::windows
::core
::ComInterface
for IRacingWheelStatics2
{
535 const IID
: ::windows
::core
::GUID
= ::windows
::core
::GUID
::from_u128(0xe666bcaa_edfd_4323_a9f6_3c384048d1ed);
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
,
545 pub struct IRawGameController(::windows
::core
::IUnknown
);
546 unsafe impl ::windows
::core
::Interface
for IRawGameController
{
547 type Vtable
= IRawGameController_Vtbl
;
549 impl ::core
::clone
::Clone
for IRawGameController
{
550 fn clone(&self) -> Self {
554 unsafe impl ::windows
::core
::ComInterface
for IRawGameController
{
555 const IID
: ::windows
::core
::GUID
= ::windows
::core
::GUID
::from_u128(0x7cad6d91_a7e1_4f71_9a78_33e9c5dfea62);
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
,
576 pub struct IRawGameController2(::windows
::core
::IUnknown
);
577 unsafe impl ::windows
::core
::Interface
for IRawGameController2
{
578 type Vtable
= IRawGameController2_Vtbl
;
580 impl ::core
::clone
::Clone
for IRawGameController2
{
581 fn clone(&self) -> Self {
585 unsafe impl ::windows
::core
::ComInterface
for IRawGameController2
{
586 const IID
: ::windows
::core
::GUID
= ::windows
::core
::GUID
::from_u128(0x43c0c035_bb73_4756_a787_3ed6bea617bd);
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
,
601 pub struct IRawGameControllerStatics(::windows
::core
::IUnknown
);
602 unsafe impl ::windows
::core
::Interface
for IRawGameControllerStatics
{
603 type Vtable
= IRawGameControllerStatics_Vtbl
;
605 impl ::core
::clone
::Clone
for IRawGameControllerStatics
{
606 fn clone(&self) -> Self {
610 unsafe impl ::windows
::core
::ComInterface
for IRawGameControllerStatics
{
611 const IID
: ::windows
::core
::GUID
= ::windows
::core
::GUID
::from_u128(0xeb8d0792_e95a_4b19_afc7_0a59f8bf759e);
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
,
641 pub struct IUINavigationController(::windows
::core
::IUnknown
);
642 unsafe impl ::windows
::core
::Interface
for IUINavigationController
{
643 type Vtable
= IUINavigationController_Vtbl
;
645 impl ::core
::clone
::Clone
for IUINavigationController
{
646 fn clone(&self) -> Self {
650 unsafe impl ::windows
::core
::ComInterface
for IUINavigationController
{
651 const IID
: ::windows
::core
::GUID
= ::windows
::core
::GUID
::from_u128(0xe5aeefdd_f50e_4a55_8cdc_d33229548175);
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
,
663 pub struct IUINavigationControllerStatics(::windows
::core
::IUnknown
);
664 unsafe impl ::windows
::core
::Interface
for IUINavigationControllerStatics
{
665 type Vtable
= IUINavigationControllerStatics_Vtbl
;
667 impl ::core
::clone
::Clone
for IUINavigationControllerStatics
{
668 fn clone(&self) -> Self {
672 unsafe impl ::windows
::core
::ComInterface
for IUINavigationControllerStatics
{
673 const IID
: ::windows
::core
::GUID
= ::windows
::core
::GUID
::from_u128(0x2f14930a_f6f8_4a48_8d89_94786cca0c2e);
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,
702 pub struct IUINavigationControllerStatics2(::windows
::core
::IUnknown
);
703 unsafe impl ::windows
::core
::Interface
for IUINavigationControllerStatics2
{
704 type Vtable
= IUINavigationControllerStatics2_Vtbl
;
706 impl ::core
::clone
::Clone
for IUINavigationControllerStatics2
{
707 fn clone(&self) -> Self {
711 unsafe impl ::windows
::core
::ComInterface
for IUINavigationControllerStatics2
{
712 const IID
: ::windows
::core
::GUID
= ::windows
::core
::GUID
::from_u128(0xe0cb28e3_b20b_4b0b_9ed4_f3d53cec0de4);
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
,
720 #[doc = "*Required features: `\"Gaming_Input\"`*"]
722 pub struct ArcadeStick(::windows
::core
::IUnknown
);
724 pub fn GetButtonLabel(&self, button
: ArcadeStickButtons
) -> ::windows
::core
::Result
<GameControllerButtonLabel
> {
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__
)
731 pub fn GetCurrentReading(&self) -> ::windows
::core
::Result
<ArcadeStickReading
> {
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__
)
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__
)
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() }
)
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__
)
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() }
)
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__
)
772 pub fn FromGameController
<P0
>(gamecontroller
: P0
) -> ::windows
::core
::Result
<ArcadeStick
>
774 P0
: ::windows
::core
::TryIntoParam
<IGameController
>,
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__
)
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)?
;
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__
)
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() }
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)?
;
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__
)
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() }
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)?
;
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__
)
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() }
826 pub fn Headset(&self) -> ::windows
::core
::Result
<Headset
> {
827 let this
= &::windows
::core
::ComInterface
::cast
::<IGameController
>(self)?
;
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__
)
833 pub fn IsWireless(&self) -> ::windows
::core
::Result
<bool
> {
834 let this
= &::windows
::core
::ComInterface
::cast
::<IGameController
>(self)?
;
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__
)
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)?
;
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__
)
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)?
;
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__
)
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
)
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
)
869 impl ::core
::cmp
::PartialEq
for ArcadeStick
{
870 fn eq(&self, other
: &Self) -> bool
{
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()
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})");
883 impl ::core
::clone
::Clone
for ArcadeStick
{
884 fn clone(&self) -> Self {
888 unsafe impl ::windows
::core
::Interface
for ArcadeStick
{
889 type Vtable
= IArcadeStick_Vtbl
;
891 unsafe impl ::windows
::core
::ComInterface
for ArcadeStick
{
892 const IID
: ::windows
::core
::GUID
= <IArcadeStick
as ::windows
::core
::ComInterface
>::IID
;
894 impl ::windows
::core
::RuntimeName
for ArcadeStick
{
895 const NAME
: &'
static str = "Windows.Gaming.Input.ArcadeStick";
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\"`*"]
904 pub struct FlightStick(::windows
::core
::IUnknown
);
906 pub fn HatSwitchKind(&self) -> ::windows
::core
::Result
<GameControllerSwitchKind
> {
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__
)
913 pub fn GetButtonLabel(&self, button
: FlightStickButtons
) -> ::windows
::core
::Result
<GameControllerButtonLabel
> {
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__
)
920 pub fn GetCurrentReading(&self) -> ::windows
::core
::Result
<FlightStickReading
> {
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__
)
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__
)
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() }
)
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__
)
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() }
)
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__
)
961 pub fn FromGameController
<P0
>(gamecontroller
: P0
) -> ::windows
::core
::Result
<FlightStick
>
963 P0
: ::windows
::core
::TryIntoParam
<IGameController
>,
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__
)
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)?
;
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__
)
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() }
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)?
;
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__
)
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() }
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)?
;
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__
)
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() }
1015 pub fn Headset(&self) -> ::windows
::core
::Result
<Headset
> {
1016 let this
= &::windows
::core
::ComInterface
::cast
::<IGameController
>(self)?
;
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__
)
1022 pub fn IsWireless(&self) -> ::windows
::core
::Result
<bool
> {
1023 let this
= &::windows
::core
::ComInterface
::cast
::<IGameController
>(self)?
;
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__
)
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)?
;
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__
)
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)?
;
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__
)
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
)
1053 impl ::core
::cmp
::PartialEq
for FlightStick
{
1054 fn eq(&self, other
: &Self) -> bool
{
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()
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})");
1067 impl ::core
::clone
::Clone
for FlightStick
{
1068 fn clone(&self) -> Self {
1069 Self(self.0.clone())
1072 unsafe impl ::windows
::core
::Interface
for FlightStick
{
1073 type Vtable
= IFlightStick_Vtbl
;
1075 unsafe impl ::windows
::core
::ComInterface
for FlightStick
{
1076 const IID
: ::windows
::core
::GUID
= <IFlightStick
as ::windows
::core
::ComInterface
>::IID
;
1078 impl ::windows
::core
::RuntimeName
for FlightStick
{
1079 const NAME
: &'
static str = "Windows.Gaming.Input.FlightStick";
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
);
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)?
;
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__
)
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() }
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)?
;
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__
)
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() }
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)?
;
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__
)
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() }
1135 pub fn Headset(&self) -> ::windows
::core
::Result
<Headset
> {
1136 let this
= &::windows
::core
::ComInterface
::cast
::<IGameController
>(self)?
;
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__
)
1142 pub fn IsWireless(&self) -> ::windows
::core
::Result
<bool
> {
1143 let this
= &::windows
::core
::ComInterface
::cast
::<IGameController
>(self)?
;
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__
)
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)?
;
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__
)
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)?
;
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__
)
1167 pub fn Vibration(&self) -> ::windows
::core
::Result
<GamepadVibration
> {
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__
)
1174 pub fn SetVibration(&self, value
: GamepadVibration
) -> ::windows
::core
::Result
<()> {
1176 unsafe { (::windows::core::Interface::vtable(this).SetVibration)(::windows::core::Interface::as_raw(this), value).ok() }
1178 pub fn GetCurrentReading(&self) -> ::windows
::core
::Result
<GamepadReading
> {
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__
)
1185 pub fn GetButtonLabel(&self, button
: GamepadButtons
) -> ::windows
::core
::Result
<GameControllerButtonLabel
> {
1186 let this
= &::windows
::core
::ComInterface
::cast
::<IGamepad2
>(self)?
;
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__
)
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__
)
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() }
)
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__
)
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() }
)
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__
)
1226 pub fn FromGameController
<P0
>(gamecontroller
: P0
) -> ::windows
::core
::Result
<Gamepad
>
1228 P0
: ::windows
::core
::TryIntoParam
<IGameController
>,
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__
)
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
)
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
)
1246 impl ::core
::cmp
::PartialEq
for Gamepad
{
1247 fn eq(&self, other
: &Self) -> bool
{
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()
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})");
1260 impl ::core
::clone
::Clone
for Gamepad
{
1261 fn clone(&self) -> Self {
1262 Self(self.0.clone())
1265 unsafe impl ::windows
::core
::Interface
for Gamepad
{
1266 type Vtable
= IGamepad_Vtbl
;
1268 unsafe impl ::windows
::core
::ComInterface
for Gamepad
{
1269 const IID
: ::windows
::core
::GUID
= <IGamepad
as ::windows
::core
::ComInterface
>::IID
;
1271 impl ::windows
::core
::RuntimeName
for Gamepad
{
1272 const NAME
: &'
static str = "Windows.Gaming.Input.Gamepad";
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
);
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)?
;
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__
)
1292 pub fn CaptureDeviceId(&self) -> ::windows
::core
::Result
<::windows
::core
::HSTRING
> {
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__
)
1299 pub fn RenderDeviceId(&self) -> ::windows
::core
::Result
<::windows
::core
::HSTRING
> {
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__
)
1307 impl ::core
::cmp
::PartialEq
for Headset
{
1308 fn eq(&self, other
: &Self) -> bool
{
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()
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})");
1321 impl ::core
::clone
::Clone
for Headset
{
1322 fn clone(&self) -> Self {
1323 Self(self.0.clone())
1326 unsafe impl ::windows
::core
::Interface
for Headset
{
1327 type Vtable
= IHeadset_Vtbl
;
1329 unsafe impl ::windows
::core
::ComInterface
for Headset
{
1330 const IID
: ::windows
::core
::GUID
= <IHeadset
as ::windows
::core
::ComInterface
>::IID
;
1332 impl ::windows
::core
::RuntimeName
for Headset
{
1333 const NAME
: &'
static str = "Windows.Gaming.Input.Headset";
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
);
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)?
;
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__
)
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() }
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)?
;
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__
)
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() }
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)?
;
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__
)
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() }
1388 pub fn Headset(&self) -> ::windows
::core
::Result
<Headset
> {
1389 let this
= &::windows
::core
::ComInterface
::cast
::<IGameController
>(self)?
;
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__
)
1395 pub fn IsWireless(&self) -> ::windows
::core
::Result
<bool
> {
1396 let this
= &::windows
::core
::ComInterface
::cast
::<IGameController
>(self)?
;
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__
)
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)?
;
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__
)
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)?
;
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__
)
1420 pub fn HasClutch(&self) -> ::windows
::core
::Result
<bool
> {
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__
)
1427 pub fn HasHandbrake(&self) -> ::windows
::core
::Result
<bool
> {
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__
)
1434 pub fn HasPatternShifter(&self) -> ::windows
::core
::Result
<bool
> {
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__
)
1441 pub fn MaxPatternShifterGear(&self) -> ::windows
::core
::Result
<i32> {
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__
)
1448 pub fn MaxWheelAngle(&self) -> ::windows
::core
::Result
<f64> {
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__
)
1455 #[doc = "*Required features: `\"Gaming_Input_ForceFeedback\"`*"]
1456 #[cfg(feature = "Gaming_Input_ForceFeedback")]
1457 pub fn WheelMotor(&self) -> ::windows
::core
::Result
<ForceFeedback
::ForceFeedbackMotor
> {
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__
)
1464 pub fn GetButtonLabel(&self, button
: RacingWheelButtons
) -> ::windows
::core
::Result
<GameControllerButtonLabel
> {
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__
)
1471 pub fn GetCurrentReading(&self) -> ::windows
::core
::Result
<RacingWheelReading
> {
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__
)
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__
)
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() }
)
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__
)
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() }
)
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__
)
1512 pub fn FromGameController
<P0
>(gamecontroller
: P0
) -> ::windows
::core
::Result
<RacingWheel
>
1514 P0
: ::windows
::core
::TryIntoParam
<IGameController
>,
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__
)
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
)
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
)
1532 impl ::core
::cmp
::PartialEq
for RacingWheel
{
1533 fn eq(&self, other
: &Self) -> bool
{
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()
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})");
1546 impl ::core
::clone
::Clone
for RacingWheel
{
1547 fn clone(&self) -> Self {
1548 Self(self.0.clone())
1551 unsafe impl ::windows
::core
::Interface
for RacingWheel
{
1552 type Vtable
= IRacingWheel_Vtbl
;
1554 unsafe impl ::windows
::core
::ComInterface
for RacingWheel
{
1555 const IID
: ::windows
::core
::GUID
= <IRacingWheel
as ::windows
::core
::ComInterface
>::IID
;
1557 impl ::windows
::core
::RuntimeName
for RacingWheel
{
1558 const NAME
: &'
static str = "Windows.Gaming.Input.RacingWheel";
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)?
;
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__
)
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() }
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)?
;
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__
)
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() }
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)?
;
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__
)
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() }
1614 pub fn Headset(&self) -> ::windows
::core
::Result
<Headset
> {
1615 let this
= &::windows
::core
::ComInterface
::cast
::<IGameController
>(self)?
;
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__
)
1621 pub fn IsWireless(&self) -> ::windows
::core
::Result
<bool
> {
1622 let this
= &::windows
::core
::ComInterface
::cast
::<IGameController
>(self)?
;
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__
)
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)?
;
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__
)
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)?
;
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__
)
1646 pub fn AxisCount(&self) -> ::windows
::core
::Result
<i32> {
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__
)
1653 pub fn ButtonCount(&self) -> ::windows
::core
::Result
<i32> {
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__
)
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
>> {
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__
)
1669 pub fn HardwareProductId(&self) -> ::windows
::core
::Result
<u16> {
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__
)
1676 pub fn HardwareVendorId(&self) -> ::windows
::core
::Result
<u16> {
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__
)
1683 pub fn SwitchCount(&self) -> ::windows
::core
::Result
<i32> {
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__
)
1690 pub fn GetButtonLabel(&self, buttonindex
: i32) -> ::windows
::core
::Result
<GameControllerButtonLabel
> {
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__
)
1697 pub fn GetCurrentReading(&self, buttonarray
: &mut [bool
], switcharray
: &mut [GameControllerSwitchPosition
], axisarray
: &mut [f64]) -> ::windows
::core
::Result
<u64> {
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__
)
1704 pub fn GetSwitchKind(&self, switchindex
: i32) -> ::windows
::core
::Result
<GameControllerSwitchKind
> {
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__
)
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)?
;
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__
)
1720 pub fn NonRoamableId(&self) -> ::windows
::core
::Result
<::windows
::core
::HSTRING
> {
1721 let this
= &::windows
::core
::ComInterface
::cast
::<IRawGameController2
>(self)?
;
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__
)
1727 pub fn DisplayName(&self) -> ::windows
::core
::Result
<::windows
::core
::HSTRING
> {
1728 let this
= &::windows
::core
::ComInterface
::cast
::<IRawGameController2
>(self)?
;
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__
)
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__
)
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() }
)
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__
)
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() }
)
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__
)
1768 pub fn FromGameController
<P0
>(gamecontroller
: P0
) -> ::windows
::core
::Result
<RawGameController
>
1770 P0
: ::windows
::core
::TryIntoParam
<IGameController
>,
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__
)
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
)
1783 impl ::core
::cmp
::PartialEq
for RawGameController
{
1784 fn eq(&self, other
: &Self) -> bool
{
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()
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})");
1797 impl ::core
::clone
::Clone
for RawGameController
{
1798 fn clone(&self) -> Self {
1799 Self(self.0.clone())
1802 unsafe impl ::windows
::core
::Interface
for RawGameController
{
1803 type Vtable
= IRawGameController_Vtbl
;
1805 unsafe impl ::windows
::core
::ComInterface
for RawGameController
{
1806 const IID
: ::windows
::core
::GUID
= <IRawGameController
as ::windows
::core
::ComInterface
>::IID
;
1808 impl ::windows
::core
::RuntimeName
for RawGameController
{
1809 const NAME
: &'
static str = "Windows.Gaming.Input.RawGameController";
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)?
;
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__
)
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() }
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)?
;
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__
)
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() }
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)?
;
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__
)
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() }
1865 pub fn Headset(&self) -> ::windows
::core
::Result
<Headset
> {
1866 let this
= &::windows
::core
::ComInterface
::cast
::<IGameController
>(self)?
;
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__
)
1872 pub fn IsWireless(&self) -> ::windows
::core
::Result
<bool
> {
1873 let this
= &::windows
::core
::ComInterface
::cast
::<IGameController
>(self)?
;
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__
)
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)?
;
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__
)
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)?
;
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__
)
1897 pub fn GetCurrentReading(&self) -> ::windows
::core
::Result
<UINavigationReading
> {
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__
)
1904 pub fn GetOptionalButtonLabel(&self, button
: OptionalUINavigationButtons
) -> ::windows
::core
::Result
<GameControllerButtonLabel
> {
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__
)
1911 pub fn GetRequiredButtonLabel(&self, button
: RequiredUINavigationButtons
) -> ::windows
::core
::Result
<GameControllerButtonLabel
> {
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__
)
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__
)
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() }
)
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__
)
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() }
)
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__
)
1952 pub fn FromGameController
<P0
>(gamecontroller
: P0
) -> ::windows
::core
::Result
<UINavigationController
>
1954 P0
: ::windows
::core
::TryIntoParam
<IGameController
>,
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__
)
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
)
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
)
1972 impl ::core
::cmp
::PartialEq
for UINavigationController
{
1973 fn eq(&self, other
: &Self) -> bool
{
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()
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})");
1986 impl ::core
::clone
::Clone
for UINavigationController
{
1987 fn clone(&self) -> Self {
1988 Self(self.0.clone())
1991 unsafe impl ::windows
::core
::Interface
for UINavigationController
{
1992 type Vtable
= IUINavigationController_Vtbl
;
1994 unsafe impl ::windows
::core
::ComInterface
for UINavigationController
{
1995 const IID
: ::windows
::core
::GUID
= <IUINavigationController
as ::windows
::core
::ComInterface
>::IID
;
1997 impl ::windows
::core
::RuntimeName
for UINavigationController
{
1998 const NAME
: &'
static str = "Windows.Gaming.Input.UINavigationController";
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);
2024 impl ::core
::marker
::Copy
for ArcadeStickButtons {}
2025 impl ::core
::clone
::Clone
for ArcadeStickButtons
{
2026 fn clone(&self) -> Self {
2030 impl ::core
::default::Default
for ArcadeStickButtons
{
2031 fn default() -> Self {
2035 impl ::windows
::core
::TypeKind
for ArcadeStickButtons
{
2036 type TypeKind
= ::windows
::core
::CopyType
;
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()
2043 impl ArcadeStickButtons
{
2044 pub const fn contains(&self, other
: Self) -> bool
{
2045 self.0 & other
.0 == other
.0
2048 impl ::core
::ops
::BitOr
for ArcadeStickButtons
{
2050 fn bitor(self, other
: Self) -> Self {
2051 Self(self.0 | other
.0)
2054 impl ::core
::ops
::BitAnd
for ArcadeStickButtons
{
2056 fn bitand(self, other
: Self) -> Self {
2057 Self(self.0 & other
.0)
2060 impl ::core
::ops
::BitOrAssign
for ArcadeStickButtons
{
2061 fn bitor_assign(&mut self, other
: Self) {
2062 self.0.bitor_assign(other
.0)
2065 impl ::core
::ops
::BitAndAssign
for ArcadeStickButtons
{
2066 fn bitand_assign(&mut self, other
: Self) {
2067 self.0.bitand_assign(other
.0)
2070 impl ::core
::ops
::Not
for ArcadeStickButtons
{
2072 fn not(self) -> Self {
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)");
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);
2088 impl ::core
::marker
::Copy
for FlightStickButtons {}
2089 impl ::core
::clone
::Clone
for FlightStickButtons
{
2090 fn clone(&self) -> Self {
2094 impl ::core
::default::Default
for FlightStickButtons
{
2095 fn default() -> Self {
2099 impl ::windows
::core
::TypeKind
for FlightStickButtons
{
2100 type TypeKind
= ::windows
::core
::CopyType
;
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()
2107 impl FlightStickButtons
{
2108 pub const fn contains(&self, other
: Self) -> bool
{
2109 self.0 & other
.0 == other
.0
2112 impl ::core
::ops
::BitOr
for FlightStickButtons
{
2114 fn bitor(self, other
: Self) -> Self {
2115 Self(self.0 | other
.0)
2118 impl ::core
::ops
::BitAnd
for FlightStickButtons
{
2120 fn bitand(self, other
: Self) -> Self {
2121 Self(self.0 & other
.0)
2124 impl ::core
::ops
::BitOrAssign
for FlightStickButtons
{
2125 fn bitor_assign(&mut self, other
: Self) {
2126 self.0.bitor_assign(other
.0)
2129 impl ::core
::ops
::BitAndAssign
for FlightStickButtons
{
2130 fn bitand_assign(&mut self, other
: Self) {
2131 self.0.bitand_assign(other
.0)
2134 impl ::core
::ops
::Not
for FlightStickButtons
{
2136 fn not(self) -> Self {
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)");
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);
2218 impl ::core
::marker
::Copy
for GameControllerButtonLabel {}
2219 impl ::core
::clone
::Clone
for GameControllerButtonLabel
{
2220 fn clone(&self) -> Self {
2224 impl ::core
::default::Default
for GameControllerButtonLabel
{
2225 fn default() -> Self {
2229 impl ::windows
::core
::TypeKind
for GameControllerButtonLabel
{
2230 type TypeKind
= ::windows
::core
::CopyType
;
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()
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)");
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);
2249 impl ::core
::marker
::Copy
for GameControllerSwitchKind {}
2250 impl ::core
::clone
::Clone
for GameControllerSwitchKind
{
2251 fn clone(&self) -> Self {
2255 impl ::core
::default::Default
for GameControllerSwitchKind
{
2256 fn default() -> Self {
2260 impl ::windows
::core
::TypeKind
for GameControllerSwitchKind
{
2261 type TypeKind
= ::windows
::core
::CopyType
;
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()
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)");
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);
2286 impl ::core
::marker
::Copy
for GameControllerSwitchPosition {}
2287 impl ::core
::clone
::Clone
for GameControllerSwitchPosition
{
2288 fn clone(&self) -> Self {
2292 impl ::core
::default::Default
for GameControllerSwitchPosition
{
2293 fn default() -> Self {
2297 impl ::windows
::core
::TypeKind
for GameControllerSwitchPosition
{
2298 type TypeKind
= ::windows
::core
::CopyType
;
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()
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)");
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);
2333 impl ::core
::marker
::Copy
for GamepadButtons {}
2334 impl ::core
::clone
::Clone
for GamepadButtons
{
2335 fn clone(&self) -> Self {
2339 impl ::core
::default::Default
for GamepadButtons
{
2340 fn default() -> Self {
2344 impl ::windows
::core
::TypeKind
for GamepadButtons
{
2345 type TypeKind
= ::windows
::core
::CopyType
;
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()
2352 impl GamepadButtons
{
2353 pub const fn contains(&self, other
: Self) -> bool
{
2354 self.0 & other
.0 == other
.0
2357 impl ::core
::ops
::BitOr
for GamepadButtons
{
2359 fn bitor(self, other
: Self) -> Self {
2360 Self(self.0 | other
.0)
2363 impl ::core
::ops
::BitAnd
for GamepadButtons
{
2365 fn bitand(self, other
: Self) -> Self {
2366 Self(self.0 & other
.0)
2369 impl ::core
::ops
::BitOrAssign
for GamepadButtons
{
2370 fn bitor_assign(&mut self, other
: Self) {
2371 self.0.bitor_assign(other
.0)
2374 impl ::core
::ops
::BitAndAssign
for GamepadButtons
{
2375 fn bitand_assign(&mut self, other
: Self) {
2376 self.0.bitand_assign(other
.0)
2379 impl ::core
::ops
::Not
for GamepadButtons
{
2381 fn not(self) -> Self {
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)");
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);
2407 impl ::core
::marker
::Copy
for OptionalUINavigationButtons {}
2408 impl ::core
::clone
::Clone
for OptionalUINavigationButtons
{
2409 fn clone(&self) -> Self {
2413 impl ::core
::default::Default
for OptionalUINavigationButtons
{
2414 fn default() -> Self {
2418 impl ::windows
::core
::TypeKind
for OptionalUINavigationButtons
{
2419 type TypeKind
= ::windows
::core
::CopyType
;
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()
2426 impl OptionalUINavigationButtons
{
2427 pub const fn contains(&self, other
: Self) -> bool
{
2428 self.0 & other
.0 == other
.0
2431 impl ::core
::ops
::BitOr
for OptionalUINavigationButtons
{
2433 fn bitor(self, other
: Self) -> Self {
2434 Self(self.0 | other
.0)
2437 impl ::core
::ops
::BitAnd
for OptionalUINavigationButtons
{
2439 fn bitand(self, other
: Self) -> Self {
2440 Self(self.0 & other
.0)
2443 impl ::core
::ops
::BitOrAssign
for OptionalUINavigationButtons
{
2444 fn bitor_assign(&mut self, other
: Self) {
2445 self.0.bitor_assign(other
.0)
2448 impl ::core
::ops
::BitAndAssign
for OptionalUINavigationButtons
{
2449 fn bitand_assign(&mut self, other
: Self) {
2450 self.0.bitand_assign(other
.0)
2453 impl ::core
::ops
::Not
for OptionalUINavigationButtons
{
2455 fn not(self) -> Self {
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)");
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);
2491 impl ::core
::marker
::Copy
for RacingWheelButtons {}
2492 impl ::core
::clone
::Clone
for RacingWheelButtons
{
2493 fn clone(&self) -> Self {
2497 impl ::core
::default::Default
for RacingWheelButtons
{
2498 fn default() -> Self {
2502 impl ::windows
::core
::TypeKind
for RacingWheelButtons
{
2503 type TypeKind
= ::windows
::core
::CopyType
;
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()
2510 impl RacingWheelButtons
{
2511 pub const fn contains(&self, other
: Self) -> bool
{
2512 self.0 & other
.0 == other
.0
2515 impl ::core
::ops
::BitOr
for RacingWheelButtons
{
2517 fn bitor(self, other
: Self) -> Self {
2518 Self(self.0 | other
.0)
2521 impl ::core
::ops
::BitAnd
for RacingWheelButtons
{
2523 fn bitand(self, other
: Self) -> Self {
2524 Self(self.0 & other
.0)
2527 impl ::core
::ops
::BitOrAssign
for RacingWheelButtons
{
2528 fn bitor_assign(&mut self, other
: Self) {
2529 self.0.bitor_assign(other
.0)
2532 impl ::core
::ops
::BitAndAssign
for RacingWheelButtons
{
2533 fn bitand_assign(&mut self, other
: Self) {
2534 self.0.bitand_assign(other
.0)
2537 impl ::core
::ops
::Not
for RacingWheelButtons
{
2539 fn not(self) -> Self {
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)");
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);
2561 impl ::core
::marker
::Copy
for RequiredUINavigationButtons {}
2562 impl ::core
::clone
::Clone
for RequiredUINavigationButtons
{
2563 fn clone(&self) -> Self {
2567 impl ::core
::default::Default
for RequiredUINavigationButtons
{
2568 fn default() -> Self {
2572 impl ::windows
::core
::TypeKind
for RequiredUINavigationButtons
{
2573 type TypeKind
= ::windows
::core
::CopyType
;
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()
2580 impl RequiredUINavigationButtons
{
2581 pub const fn contains(&self, other
: Self) -> bool
{
2582 self.0 & other
.0 == other
.0
2585 impl ::core
::ops
::BitOr
for RequiredUINavigationButtons
{
2587 fn bitor(self, other
: Self) -> Self {
2588 Self(self.0 | other
.0)
2591 impl ::core
::ops
::BitAnd
for RequiredUINavigationButtons
{
2593 fn bitand(self, other
: Self) -> Self {
2594 Self(self.0 & other
.0)
2597 impl ::core
::ops
::BitOrAssign
for RequiredUINavigationButtons
{
2598 fn bitor_assign(&mut self, other
: Self) {
2599 self.0.bitor_assign(other
.0)
2602 impl ::core
::ops
::BitAndAssign
for RequiredUINavigationButtons
{
2603 fn bitand_assign(&mut self, other
: Self) {
2604 self.0.bitand_assign(other
.0)
2607 impl ::core
::ops
::Not
for RequiredUINavigationButtons
{
2609 fn not(self) -> Self {
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)");
2617 #[doc = "*Required features: `\"Gaming_Input\"`*"]
2618 pub struct ArcadeStickReading
{
2620 pub Buttons
: ArcadeStickButtons
,
2622 impl ::core
::marker
::Copy
for ArcadeStickReading {}
2623 impl ::core
::clone
::Clone
for ArcadeStickReading
{
2624 fn clone(&self) -> Self {
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()
2633 impl ::windows
::core
::TypeKind
for ArcadeStickReading
{
2634 type TypeKind
= ::windows
::core
::CopyType
;
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))");
2639 impl ::core
::cmp
::PartialEq
for ArcadeStickReading
{
2640 fn eq(&self, other
: &Self) -> bool
{
2641 self.Timestamp
== other
.Timestamp
&& self.Buttons
== other
.Buttons
2644 impl ::core
::cmp
::Eq
for ArcadeStickReading {}
2645 impl ::core
::default::Default
for ArcadeStickReading
{
2646 fn default() -> Self {
2647 unsafe { ::core::mem::zeroed() }
2651 #[doc = "*Required features: `\"Gaming_Input\"`*"]
2652 pub struct FlightStickReading
{
2654 pub Buttons
: FlightStickButtons
,
2655 pub HatSwitch
: GameControllerSwitchPosition
,
2661 impl ::core
::marker
::Copy
for FlightStickReading {}
2662 impl ::core
::clone
::Clone
for FlightStickReading
{
2663 fn clone(&self) -> Self {
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()
2672 impl ::windows
::core
::TypeKind
for FlightStickReading
{
2673 type TypeKind
= ::windows
::core
::CopyType
;
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)");
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
2683 impl ::core
::cmp
::Eq
for FlightStickReading {}
2684 impl ::core
::default::Default
for FlightStickReading
{
2685 fn default() -> Self {
2686 unsafe { ::core::mem::zeroed() }
2690 #[doc = "*Required features: `\"Gaming_Input\"`*"]
2691 pub struct GamepadReading
{
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,
2701 impl ::core
::marker
::Copy
for GamepadReading {}
2702 impl ::core
::clone
::Clone
for GamepadReading
{
2703 fn clone(&self) -> Self {
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()
2712 impl ::windows
::core
::TypeKind
for GamepadReading
{
2713 type TypeKind
= ::windows
::core
::CopyType
;
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)");
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
2723 impl ::core
::cmp
::Eq
for GamepadReading {}
2724 impl ::core
::default::Default
for GamepadReading
{
2725 fn default() -> Self {
2726 unsafe { ::core::mem::zeroed() }
2730 #[doc = "*Required features: `\"Gaming_Input\"`*"]
2731 pub struct GamepadVibration
{
2733 pub RightMotor
: f64,
2734 pub LeftTrigger
: f64,
2735 pub RightTrigger
: f64,
2737 impl ::core
::marker
::Copy
for GamepadVibration {}
2738 impl ::core
::clone
::Clone
for GamepadVibration
{
2739 fn clone(&self) -> Self {
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()
2748 impl ::windows
::core
::TypeKind
for GamepadVibration
{
2749 type TypeKind
= ::windows
::core
::CopyType
;
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)");
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
2759 impl ::core
::cmp
::Eq
for GamepadVibration {}
2760 impl ::core
::default::Default
for GamepadVibration
{
2761 fn default() -> Self {
2762 unsafe { ::core::mem::zeroed() }
2766 #[doc = "*Required features: `\"Gaming_Input\"`*"]
2767 pub struct RacingWheelReading
{
2769 pub Buttons
: RacingWheelButtons
,
2770 pub PatternShifterGear
: i32,
2777 impl ::core
::marker
::Copy
for RacingWheelReading {}
2778 impl ::core
::clone
::Clone
for RacingWheelReading
{
2779 fn clone(&self) -> Self {
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()
2788 impl ::windows
::core
::TypeKind
for RacingWheelReading
{
2789 type TypeKind
= ::windows
::core
::CopyType
;
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)");
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
2799 impl ::core
::cmp
::Eq
for RacingWheelReading {}
2800 impl ::core
::default::Default
for RacingWheelReading
{
2801 fn default() -> Self {
2802 unsafe { ::core::mem::zeroed() }
2806 #[doc = "*Required features: `\"Gaming_Input\"`*"]
2807 pub struct UINavigationReading
{
2809 pub RequiredButtons
: RequiredUINavigationButtons
,
2810 pub OptionalButtons
: OptionalUINavigationButtons
,
2812 impl ::core
::marker
::Copy
for UINavigationReading {}
2813 impl ::core
::clone
::Clone
for UINavigationReading
{
2814 fn clone(&self) -> Self {
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()
2823 impl ::windows
::core
::TypeKind
for UINavigationReading
{
2824 type TypeKind
= ::windows
::core
::CopyType
;
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))");
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
2834 impl ::core
::cmp
::Eq
for UINavigationReading {}
2835 impl ::core
::default::Default
for UINavigationReading
{
2836 fn default() -> Self {
2837 unsafe { ::core::mem::zeroed() }
2840 #[cfg(feature = "implement")]
2841 ::core
::include
!("impl.rs");