1 #![allow(unused_variables, non_upper_case_globals, non_snake_case, unused_unsafe, non_camel_case_types, dead_code, clippy::all)] 2 #[repr(transparent)] 3 #[derive(:: std :: cmp :: PartialEq, :: std :: cmp :: Eq, :: std :: clone :: Clone, :: std :: fmt :: Debug)] 4 pub struct ConditionForceEffect(::windows::runtime::IInspectable); 5 impl ConditionForceEffect { Gain(&self) -> ::windows::runtime::Result<f64>6 pub fn Gain(&self) -> ::windows::runtime::Result<f64> { 7 let this = self; 8 unsafe { 9 let mut result__: f64 = ::std::mem::zeroed(); 10 (::windows::runtime::Interface::vtable(this).6)(::std::mem::transmute_copy(this), &mut result__).from_abi::<f64>(result__) 11 } 12 } SetGain(&self, value: f64) -> ::windows::runtime::Result<()>13 pub fn SetGain(&self, value: f64) -> ::windows::runtime::Result<()> { 14 let this = self; 15 unsafe { (::windows::runtime::Interface::vtable(this).7)(::std::mem::transmute_copy(this), value).ok() } 16 } State(&self) -> ::windows::runtime::Result<ForceFeedbackEffectState>17 pub fn State(&self) -> ::windows::runtime::Result<ForceFeedbackEffectState> { 18 let this = self; 19 unsafe { 20 let mut result__: ForceFeedbackEffectState = ::std::mem::zeroed(); 21 (::windows::runtime::Interface::vtable(this).8)(::std::mem::transmute_copy(this), &mut result__).from_abi::<ForceFeedbackEffectState>(result__) 22 } 23 } Start(&self) -> ::windows::runtime::Result<()>24 pub fn Start(&self) -> ::windows::runtime::Result<()> { 25 let this = self; 26 unsafe { (::windows::runtime::Interface::vtable(this).9)(::std::mem::transmute_copy(this)).ok() } 27 } Stop(&self) -> ::windows::runtime::Result<()>28 pub fn Stop(&self) -> ::windows::runtime::Result<()> { 29 let this = self; 30 unsafe { (::windows::runtime::Interface::vtable(this).10)(::std::mem::transmute_copy(this)).ok() } 31 } Kind(&self) -> ::windows::runtime::Result<ConditionForceEffectKind>32 pub fn Kind(&self) -> ::windows::runtime::Result<ConditionForceEffectKind> { 33 let this = &::windows::runtime::Interface::cast::<IConditionForceEffect>(self)?; 34 unsafe { 35 let mut result__: ConditionForceEffectKind = ::std::mem::zeroed(); 36 (::windows::runtime::Interface::vtable(this).6)(::std::mem::transmute_copy(this), &mut result__).from_abi::<ConditionForceEffectKind>(result__) 37 } 38 } 39 #[cfg(feature = "Foundation_Numerics")] SetParameters<'a, Param0: ::windows::runtime::IntoParam<'a, super::super::super::Foundation::Numerics::Vector3>>(&self, direction: Param0, positivecoefficient: f32, negativecoefficient: f32, maxpositivemagnitude: f32, maxnegativemagnitude: f32, deadzone: f32, bias: f32) -> ::windows::runtime::Result<()>40 pub fn SetParameters<'a, Param0: ::windows::runtime::IntoParam<'a, super::super::super::Foundation::Numerics::Vector3>>(&self, direction: Param0, positivecoefficient: f32, negativecoefficient: f32, maxpositivemagnitude: f32, maxnegativemagnitude: f32, deadzone: f32, bias: f32) -> ::windows::runtime::Result<()> { 41 let this = &::windows::runtime::Interface::cast::<IConditionForceEffect>(self)?; 42 unsafe { (::windows::runtime::Interface::vtable(this).7)(::std::mem::transmute_copy(this), direction.into_param().abi(), positivecoefficient, negativecoefficient, maxpositivemagnitude, maxnegativemagnitude, deadzone, bias).ok() } 43 } CreateInstance(effectkind: ConditionForceEffectKind) -> ::windows::runtime::Result<ConditionForceEffect>44 pub fn CreateInstance(effectkind: ConditionForceEffectKind) -> ::windows::runtime::Result<ConditionForceEffect> { 45 Self::IConditionForceEffectFactory(|this| unsafe { 46 let mut result__: ::windows::runtime::RawPtr = ::std::mem::zeroed(); 47 (::windows::runtime::Interface::vtable(this).6)(::std::mem::transmute_copy(this), effectkind, &mut result__).from_abi::<ConditionForceEffect>(result__) 48 }) 49 } IConditionForceEffectFactory<R, F: FnOnce(&IConditionForceEffectFactory) -> ::windows::runtime::Result<R>>(callback: F) -> ::windows::runtime::Result<R>50 pub fn IConditionForceEffectFactory<R, F: FnOnce(&IConditionForceEffectFactory) -> ::windows::runtime::Result<R>>(callback: F) -> ::windows::runtime::Result<R> { 51 static mut SHARED: ::windows::runtime::FactoryCache<ConditionForceEffect, IConditionForceEffectFactory> = ::windows::runtime::FactoryCache::new(); 52 unsafe { SHARED.call(callback) } 53 } 54 } 55 unsafe impl ::windows::runtime::RuntimeType for ConditionForceEffect { 56 const SIGNATURE: ::windows::runtime::ConstBuffer = ::windows::runtime::ConstBuffer::from_slice(b"rc(Windows.Gaming.Input.ForceFeedback.ConditionForceEffect;{a17fba0c-2ae4-48c2-8063-eabd0777cb89})"); 57 } 58 unsafe impl ::windows::runtime::Interface for ConditionForceEffect { 59 type Vtable = IForceFeedbackEffect_abi; 60 const IID: ::windows::runtime::GUID = ::windows::runtime::GUID::from_values(2709502476, 10980, 18626, [128, 99, 234, 189, 7, 119, 203, 137]); 61 } 62 impl ::windows::runtime::RuntimeName for ConditionForceEffect { 63 const NAME: &'static str = "Windows.Gaming.Input.ForceFeedback.ConditionForceEffect"; 64 } 65 impl ::std::convert::From<ConditionForceEffect> for ::windows::runtime::IUnknown { from(value: ConditionForceEffect) -> Self66 fn from(value: ConditionForceEffect) -> Self { 67 unsafe { ::std::mem::transmute(value) } 68 } 69 } 70 impl ::std::convert::From<&ConditionForceEffect> for ::windows::runtime::IUnknown { from(value: &ConditionForceEffect) -> Self71 fn from(value: &ConditionForceEffect) -> Self { 72 ::std::convert::From::from(::std::clone::Clone::clone(value)) 73 } 74 } 75 impl<'a> ::windows::runtime::IntoParam<'a, ::windows::runtime::IUnknown> for ConditionForceEffect { into_param(self) -> ::windows::runtime::Param<'a, ::windows::runtime::IUnknown>76 fn into_param(self) -> ::windows::runtime::Param<'a, ::windows::runtime::IUnknown> { 77 ::windows::runtime::Param::Owned(::std::convert::Into::<::windows::runtime::IUnknown>::into(self)) 78 } 79 } 80 impl<'a> ::windows::runtime::IntoParam<'a, ::windows::runtime::IUnknown> for &ConditionForceEffect { into_param(self) -> ::windows::runtime::Param<'a, ::windows::runtime::IUnknown>81 fn into_param(self) -> ::windows::runtime::Param<'a, ::windows::runtime::IUnknown> { 82 ::windows::runtime::Param::Owned(::std::convert::Into::<::windows::runtime::IUnknown>::into(::std::clone::Clone::clone(self))) 83 } 84 } 85 impl ::std::convert::From<ConditionForceEffect> for ::windows::runtime::IInspectable { from(value: ConditionForceEffect) -> Self86 fn from(value: ConditionForceEffect) -> Self { 87 value.0 88 } 89 } 90 impl ::std::convert::From<&ConditionForceEffect> for ::windows::runtime::IInspectable { from(value: &ConditionForceEffect) -> Self91 fn from(value: &ConditionForceEffect) -> Self { 92 value.0.clone() 93 } 94 } 95 impl<'a> ::windows::runtime::IntoParam<'a, ::windows::runtime::IInspectable> for ConditionForceEffect { into_param(self) -> ::windows::runtime::Param<'a, ::windows::runtime::IInspectable>96 fn into_param(self) -> ::windows::runtime::Param<'a, ::windows::runtime::IInspectable> { 97 ::windows::runtime::Param::Owned(self.0) 98 } 99 } 100 impl<'a> ::windows::runtime::IntoParam<'a, ::windows::runtime::IInspectable> for &'a ConditionForceEffect { into_param(self) -> ::windows::runtime::Param<'a, ::windows::runtime::IInspectable>101 fn into_param(self) -> ::windows::runtime::Param<'a, ::windows::runtime::IInspectable> { 102 ::windows::runtime::Param::Borrowed(&self.0) 103 } 104 } 105 impl ::std::convert::From<ConditionForceEffect> for IForceFeedbackEffect { from(value: ConditionForceEffect) -> Self106 fn from(value: ConditionForceEffect) -> Self { 107 unsafe { ::std::mem::transmute(value) } 108 } 109 } 110 impl ::std::convert::From<&ConditionForceEffect> for IForceFeedbackEffect { from(value: &ConditionForceEffect) -> Self111 fn from(value: &ConditionForceEffect) -> Self { 112 ::std::convert::From::from(::std::clone::Clone::clone(value)) 113 } 114 } 115 impl<'a> ::windows::runtime::IntoParam<'a, IForceFeedbackEffect> for ConditionForceEffect { into_param(self) -> ::windows::runtime::Param<'a, IForceFeedbackEffect>116 fn into_param(self) -> ::windows::runtime::Param<'a, IForceFeedbackEffect> { 117 ::windows::runtime::Param::Owned(::std::convert::Into::<IForceFeedbackEffect>::into(self)) 118 } 119 } 120 impl<'a> ::windows::runtime::IntoParam<'a, IForceFeedbackEffect> for &ConditionForceEffect { into_param(self) -> ::windows::runtime::Param<'a, IForceFeedbackEffect>121 fn into_param(self) -> ::windows::runtime::Param<'a, IForceFeedbackEffect> { 122 ::windows::runtime::Param::Owned(::std::convert::Into::<IForceFeedbackEffect>::into(::std::clone::Clone::clone(self))) 123 } 124 } 125 unsafe impl ::std::marker::Send for ConditionForceEffect {} 126 unsafe impl ::std::marker::Sync for ConditionForceEffect {} 127 #[derive(:: std :: cmp :: PartialEq, :: std :: cmp :: Eq, :: std :: marker :: Copy, :: std :: clone :: Clone, :: std :: default :: Default, :: std :: fmt :: Debug)] 128 #[repr(transparent)] 129 pub struct ConditionForceEffectKind(pub i32); 130 impl ConditionForceEffectKind { 131 pub const Spring: ConditionForceEffectKind = ConditionForceEffectKind(0i32); 132 pub const Damper: ConditionForceEffectKind = ConditionForceEffectKind(1i32); 133 pub const Inertia: ConditionForceEffectKind = ConditionForceEffectKind(2i32); 134 pub const Friction: ConditionForceEffectKind = ConditionForceEffectKind(3i32); 135 } 136 impl ::std::convert::From<i32> for ConditionForceEffectKind { from(value: i32) -> Self137 fn from(value: i32) -> Self { 138 Self(value) 139 } 140 } 141 unsafe impl ::windows::runtime::Abi for ConditionForceEffectKind { 142 type Abi = Self; 143 type DefaultType = Self; 144 } 145 unsafe impl ::windows::runtime::RuntimeType for ConditionForceEffectKind { 146 const SIGNATURE: ::windows::runtime::ConstBuffer = ::windows::runtime::ConstBuffer::from_slice(b"enum(Windows.Gaming.Input.ForceFeedback.ConditionForceEffectKind;i4)"); 147 } 148 #[repr(transparent)] 149 #[derive(:: std :: cmp :: PartialEq, :: std :: cmp :: Eq, :: std :: clone :: Clone, :: std :: fmt :: Debug)] 150 pub struct ConstantForceEffect(::windows::runtime::IInspectable); 151 impl ConstantForceEffect { new() -> ::windows::runtime::Result<Self>152 pub fn new() -> ::windows::runtime::Result<Self> { 153 Self::IActivationFactory(|f| f.activate_instance::<Self>()) 154 } IActivationFactory<R, F: FnOnce(&::windows::runtime::IActivationFactory) -> ::windows::runtime::Result<R>>(callback: F) -> ::windows::runtime::Result<R>155 fn IActivationFactory<R, F: FnOnce(&::windows::runtime::IActivationFactory) -> ::windows::runtime::Result<R>>(callback: F) -> ::windows::runtime::Result<R> { 156 static mut SHARED: ::windows::runtime::FactoryCache<ConstantForceEffect, ::windows::runtime::IActivationFactory> = ::windows::runtime::FactoryCache::new(); 157 unsafe { SHARED.call(callback) } 158 } Gain(&self) -> ::windows::runtime::Result<f64>159 pub fn Gain(&self) -> ::windows::runtime::Result<f64> { 160 let this = self; 161 unsafe { 162 let mut result__: f64 = ::std::mem::zeroed(); 163 (::windows::runtime::Interface::vtable(this).6)(::std::mem::transmute_copy(this), &mut result__).from_abi::<f64>(result__) 164 } 165 } SetGain(&self, value: f64) -> ::windows::runtime::Result<()>166 pub fn SetGain(&self, value: f64) -> ::windows::runtime::Result<()> { 167 let this = self; 168 unsafe { (::windows::runtime::Interface::vtable(this).7)(::std::mem::transmute_copy(this), value).ok() } 169 } State(&self) -> ::windows::runtime::Result<ForceFeedbackEffectState>170 pub fn State(&self) -> ::windows::runtime::Result<ForceFeedbackEffectState> { 171 let this = self; 172 unsafe { 173 let mut result__: ForceFeedbackEffectState = ::std::mem::zeroed(); 174 (::windows::runtime::Interface::vtable(this).8)(::std::mem::transmute_copy(this), &mut result__).from_abi::<ForceFeedbackEffectState>(result__) 175 } 176 } Start(&self) -> ::windows::runtime::Result<()>177 pub fn Start(&self) -> ::windows::runtime::Result<()> { 178 let this = self; 179 unsafe { (::windows::runtime::Interface::vtable(this).9)(::std::mem::transmute_copy(this)).ok() } 180 } Stop(&self) -> ::windows::runtime::Result<()>181 pub fn Stop(&self) -> ::windows::runtime::Result<()> { 182 let this = self; 183 unsafe { (::windows::runtime::Interface::vtable(this).10)(::std::mem::transmute_copy(this)).ok() } 184 } 185 #[cfg(all(feature = "Foundation", feature = "Foundation_Numerics"))] SetParameters<'a, Param0: ::windows::runtime::IntoParam<'a, super::super::super::Foundation::Numerics::Vector3>, Param1: ::windows::runtime::IntoParam<'a, super::super::super::Foundation::TimeSpan>>(&self, vector: Param0, duration: Param1) -> ::windows::runtime::Result<()>186 pub fn SetParameters<'a, Param0: ::windows::runtime::IntoParam<'a, super::super::super::Foundation::Numerics::Vector3>, Param1: ::windows::runtime::IntoParam<'a, super::super::super::Foundation::TimeSpan>>(&self, vector: Param0, duration: Param1) -> ::windows::runtime::Result<()> { 187 let this = &::windows::runtime::Interface::cast::<IConstantForceEffect>(self)?; 188 unsafe { (::windows::runtime::Interface::vtable(this).6)(::std::mem::transmute_copy(this), vector.into_param().abi(), duration.into_param().abi()).ok() } 189 } 190 #[cfg(all(feature = "Foundation", feature = "Foundation_Numerics"))] SetParametersWithEnvelope<'a, Param0: ::windows::runtime::IntoParam<'a, super::super::super::Foundation::Numerics::Vector3>, Param4: ::windows::runtime::IntoParam<'a, super::super::super::Foundation::TimeSpan>, Param5: ::windows::runtime::IntoParam<'a, super::super::super::Foundation::TimeSpan>, Param6: ::windows::runtime::IntoParam<'a, super::super::super::Foundation::TimeSpan>, Param7: ::windows::runtime::IntoParam<'a, super::super::super::Foundation::TimeSpan>>( &self, vector: Param0, attackgain: f32, sustaingain: f32, releasegain: f32, startdelay: Param4, attackduration: Param5, sustainduration: Param6, releaseduration: Param7, repeatcount: u32, ) -> ::windows::runtime::Result<()>191 pub fn SetParametersWithEnvelope<'a, Param0: ::windows::runtime::IntoParam<'a, super::super::super::Foundation::Numerics::Vector3>, Param4: ::windows::runtime::IntoParam<'a, super::super::super::Foundation::TimeSpan>, Param5: ::windows::runtime::IntoParam<'a, super::super::super::Foundation::TimeSpan>, Param6: ::windows::runtime::IntoParam<'a, super::super::super::Foundation::TimeSpan>, Param7: ::windows::runtime::IntoParam<'a, super::super::super::Foundation::TimeSpan>>( 192 &self, 193 vector: Param0, 194 attackgain: f32, 195 sustaingain: f32, 196 releasegain: f32, 197 startdelay: Param4, 198 attackduration: Param5, 199 sustainduration: Param6, 200 releaseduration: Param7, 201 repeatcount: u32, 202 ) -> ::windows::runtime::Result<()> { 203 let this = &::windows::runtime::Interface::cast::<IConstantForceEffect>(self)?; 204 unsafe { (::windows::runtime::Interface::vtable(this).7)(::std::mem::transmute_copy(this), vector.into_param().abi(), attackgain, sustaingain, releasegain, startdelay.into_param().abi(), attackduration.into_param().abi(), sustainduration.into_param().abi(), releaseduration.into_param().abi(), repeatcount).ok() } 205 } 206 } 207 unsafe impl ::windows::runtime::RuntimeType for ConstantForceEffect { 208 const SIGNATURE: ::windows::runtime::ConstBuffer = ::windows::runtime::ConstBuffer::from_slice(b"rc(Windows.Gaming.Input.ForceFeedback.ConstantForceEffect;{a17fba0c-2ae4-48c2-8063-eabd0777cb89})"); 209 } 210 unsafe impl ::windows::runtime::Interface for ConstantForceEffect { 211 type Vtable = IForceFeedbackEffect_abi; 212 const IID: ::windows::runtime::GUID = ::windows::runtime::GUID::from_values(2709502476, 10980, 18626, [128, 99, 234, 189, 7, 119, 203, 137]); 213 } 214 impl ::windows::runtime::RuntimeName for ConstantForceEffect { 215 const NAME: &'static str = "Windows.Gaming.Input.ForceFeedback.ConstantForceEffect"; 216 } 217 impl ::std::convert::From<ConstantForceEffect> for ::windows::runtime::IUnknown { from(value: ConstantForceEffect) -> Self218 fn from(value: ConstantForceEffect) -> Self { 219 unsafe { ::std::mem::transmute(value) } 220 } 221 } 222 impl ::std::convert::From<&ConstantForceEffect> for ::windows::runtime::IUnknown { from(value: &ConstantForceEffect) -> Self223 fn from(value: &ConstantForceEffect) -> Self { 224 ::std::convert::From::from(::std::clone::Clone::clone(value)) 225 } 226 } 227 impl<'a> ::windows::runtime::IntoParam<'a, ::windows::runtime::IUnknown> for ConstantForceEffect { into_param(self) -> ::windows::runtime::Param<'a, ::windows::runtime::IUnknown>228 fn into_param(self) -> ::windows::runtime::Param<'a, ::windows::runtime::IUnknown> { 229 ::windows::runtime::Param::Owned(::std::convert::Into::<::windows::runtime::IUnknown>::into(self)) 230 } 231 } 232 impl<'a> ::windows::runtime::IntoParam<'a, ::windows::runtime::IUnknown> for &ConstantForceEffect { into_param(self) -> ::windows::runtime::Param<'a, ::windows::runtime::IUnknown>233 fn into_param(self) -> ::windows::runtime::Param<'a, ::windows::runtime::IUnknown> { 234 ::windows::runtime::Param::Owned(::std::convert::Into::<::windows::runtime::IUnknown>::into(::std::clone::Clone::clone(self))) 235 } 236 } 237 impl ::std::convert::From<ConstantForceEffect> for ::windows::runtime::IInspectable { from(value: ConstantForceEffect) -> Self238 fn from(value: ConstantForceEffect) -> Self { 239 value.0 240 } 241 } 242 impl ::std::convert::From<&ConstantForceEffect> for ::windows::runtime::IInspectable { from(value: &ConstantForceEffect) -> Self243 fn from(value: &ConstantForceEffect) -> Self { 244 value.0.clone() 245 } 246 } 247 impl<'a> ::windows::runtime::IntoParam<'a, ::windows::runtime::IInspectable> for ConstantForceEffect { into_param(self) -> ::windows::runtime::Param<'a, ::windows::runtime::IInspectable>248 fn into_param(self) -> ::windows::runtime::Param<'a, ::windows::runtime::IInspectable> { 249 ::windows::runtime::Param::Owned(self.0) 250 } 251 } 252 impl<'a> ::windows::runtime::IntoParam<'a, ::windows::runtime::IInspectable> for &'a ConstantForceEffect { into_param(self) -> ::windows::runtime::Param<'a, ::windows::runtime::IInspectable>253 fn into_param(self) -> ::windows::runtime::Param<'a, ::windows::runtime::IInspectable> { 254 ::windows::runtime::Param::Borrowed(&self.0) 255 } 256 } 257 impl ::std::convert::From<ConstantForceEffect> for IForceFeedbackEffect { from(value: ConstantForceEffect) -> Self258 fn from(value: ConstantForceEffect) -> Self { 259 unsafe { ::std::mem::transmute(value) } 260 } 261 } 262 impl ::std::convert::From<&ConstantForceEffect> for IForceFeedbackEffect { from(value: &ConstantForceEffect) -> Self263 fn from(value: &ConstantForceEffect) -> Self { 264 ::std::convert::From::from(::std::clone::Clone::clone(value)) 265 } 266 } 267 impl<'a> ::windows::runtime::IntoParam<'a, IForceFeedbackEffect> for ConstantForceEffect { into_param(self) -> ::windows::runtime::Param<'a, IForceFeedbackEffect>268 fn into_param(self) -> ::windows::runtime::Param<'a, IForceFeedbackEffect> { 269 ::windows::runtime::Param::Owned(::std::convert::Into::<IForceFeedbackEffect>::into(self)) 270 } 271 } 272 impl<'a> ::windows::runtime::IntoParam<'a, IForceFeedbackEffect> for &ConstantForceEffect { into_param(self) -> ::windows::runtime::Param<'a, IForceFeedbackEffect>273 fn into_param(self) -> ::windows::runtime::Param<'a, IForceFeedbackEffect> { 274 ::windows::runtime::Param::Owned(::std::convert::Into::<IForceFeedbackEffect>::into(::std::clone::Clone::clone(self))) 275 } 276 } 277 unsafe impl ::std::marker::Send for ConstantForceEffect {} 278 unsafe impl ::std::marker::Sync for ConstantForceEffect {} 279 #[derive(:: std :: cmp :: PartialEq, :: std :: cmp :: Eq, :: std :: marker :: Copy, :: std :: clone :: Clone, :: std :: default :: Default, :: std :: fmt :: Debug)] 280 #[repr(transparent)] 281 pub struct ForceFeedbackEffectAxes(pub u32); 282 impl ForceFeedbackEffectAxes { 283 pub const None: ForceFeedbackEffectAxes = ForceFeedbackEffectAxes(0u32); 284 pub const X: ForceFeedbackEffectAxes = ForceFeedbackEffectAxes(1u32); 285 pub const Y: ForceFeedbackEffectAxes = ForceFeedbackEffectAxes(2u32); 286 pub const Z: ForceFeedbackEffectAxes = ForceFeedbackEffectAxes(4u32); 287 } 288 impl ::std::convert::From<u32> for ForceFeedbackEffectAxes { from(value: u32) -> Self289 fn from(value: u32) -> Self { 290 Self(value) 291 } 292 } 293 unsafe impl ::windows::runtime::Abi for ForceFeedbackEffectAxes { 294 type Abi = Self; 295 type DefaultType = Self; 296 } 297 unsafe impl ::windows::runtime::RuntimeType for ForceFeedbackEffectAxes { 298 const SIGNATURE: ::windows::runtime::ConstBuffer = ::windows::runtime::ConstBuffer::from_slice(b"enum(Windows.Gaming.Input.ForceFeedback.ForceFeedbackEffectAxes;u4)"); 299 } 300 impl ::std::ops::BitOr for ForceFeedbackEffectAxes { 301 type Output = Self; bitor(self, rhs: Self) -> Self302 fn bitor(self, rhs: Self) -> Self { 303 Self(self.0 | rhs.0) 304 } 305 } 306 impl ::std::ops::BitAnd for ForceFeedbackEffectAxes { 307 type Output = Self; bitand(self, rhs: Self) -> Self308 fn bitand(self, rhs: Self) -> Self { 309 Self(self.0 & rhs.0) 310 } 311 } 312 impl ::std::ops::BitOrAssign for ForceFeedbackEffectAxes { bitor_assign(&mut self, rhs: Self)313 fn bitor_assign(&mut self, rhs: Self) { 314 self.0.bitor_assign(rhs.0) 315 } 316 } 317 impl ::std::ops::BitAndAssign for ForceFeedbackEffectAxes { bitand_assign(&mut self, rhs: Self)318 fn bitand_assign(&mut self, rhs: Self) { 319 self.0.bitand_assign(rhs.0) 320 } 321 } 322 impl ::std::ops::Not for ForceFeedbackEffectAxes { 323 type Output = Self; not(self) -> Self324 fn not(self) -> Self { 325 Self(self.0.not()) 326 } 327 } 328 #[derive(:: std :: cmp :: PartialEq, :: std :: cmp :: Eq, :: std :: marker :: Copy, :: std :: clone :: Clone, :: std :: default :: Default, :: std :: fmt :: Debug)] 329 #[repr(transparent)] 330 pub struct ForceFeedbackEffectState(pub i32); 331 impl ForceFeedbackEffectState { 332 pub const Stopped: ForceFeedbackEffectState = ForceFeedbackEffectState(0i32); 333 pub const Running: ForceFeedbackEffectState = ForceFeedbackEffectState(1i32); 334 pub const Paused: ForceFeedbackEffectState = ForceFeedbackEffectState(2i32); 335 pub const Faulted: ForceFeedbackEffectState = ForceFeedbackEffectState(3i32); 336 } 337 impl ::std::convert::From<i32> for ForceFeedbackEffectState { from(value: i32) -> Self338 fn from(value: i32) -> Self { 339 Self(value) 340 } 341 } 342 unsafe impl ::windows::runtime::Abi for ForceFeedbackEffectState { 343 type Abi = Self; 344 type DefaultType = Self; 345 } 346 unsafe impl ::windows::runtime::RuntimeType for ForceFeedbackEffectState { 347 const SIGNATURE: ::windows::runtime::ConstBuffer = ::windows::runtime::ConstBuffer::from_slice(b"enum(Windows.Gaming.Input.ForceFeedback.ForceFeedbackEffectState;i4)"); 348 } 349 #[derive(:: std :: cmp :: PartialEq, :: std :: cmp :: Eq, :: std :: marker :: Copy, :: std :: clone :: Clone, :: std :: default :: Default, :: std :: fmt :: Debug)] 350 #[repr(transparent)] 351 pub struct ForceFeedbackLoadEffectResult(pub i32); 352 impl ForceFeedbackLoadEffectResult { 353 pub const Succeeded: ForceFeedbackLoadEffectResult = ForceFeedbackLoadEffectResult(0i32); 354 pub const EffectStorageFull: ForceFeedbackLoadEffectResult = ForceFeedbackLoadEffectResult(1i32); 355 pub const EffectNotSupported: ForceFeedbackLoadEffectResult = ForceFeedbackLoadEffectResult(2i32); 356 } 357 impl ::std::convert::From<i32> for ForceFeedbackLoadEffectResult { from(value: i32) -> Self358 fn from(value: i32) -> Self { 359 Self(value) 360 } 361 } 362 unsafe impl ::windows::runtime::Abi for ForceFeedbackLoadEffectResult { 363 type Abi = Self; 364 type DefaultType = Self; 365 } 366 unsafe impl ::windows::runtime::RuntimeType for ForceFeedbackLoadEffectResult { 367 const SIGNATURE: ::windows::runtime::ConstBuffer = ::windows::runtime::ConstBuffer::from_slice(b"enum(Windows.Gaming.Input.ForceFeedback.ForceFeedbackLoadEffectResult;i4)"); 368 } 369 #[repr(transparent)] 370 #[derive(:: std :: cmp :: PartialEq, :: std :: cmp :: Eq, :: std :: clone :: Clone, :: std :: fmt :: Debug)] 371 pub struct ForceFeedbackMotor(::windows::runtime::IInspectable); 372 impl ForceFeedbackMotor { AreEffectsPaused(&self) -> ::windows::runtime::Result<bool>373 pub fn AreEffectsPaused(&self) -> ::windows::runtime::Result<bool> { 374 let this = self; 375 unsafe { 376 let mut result__: bool = ::std::mem::zeroed(); 377 (::windows::runtime::Interface::vtable(this).6)(::std::mem::transmute_copy(this), &mut result__).from_abi::<bool>(result__) 378 } 379 } MasterGain(&self) -> ::windows::runtime::Result<f64>380 pub fn MasterGain(&self) -> ::windows::runtime::Result<f64> { 381 let this = self; 382 unsafe { 383 let mut result__: f64 = ::std::mem::zeroed(); 384 (::windows::runtime::Interface::vtable(this).7)(::std::mem::transmute_copy(this), &mut result__).from_abi::<f64>(result__) 385 } 386 } SetMasterGain(&self, value: f64) -> ::windows::runtime::Result<()>387 pub fn SetMasterGain(&self, value: f64) -> ::windows::runtime::Result<()> { 388 let this = self; 389 unsafe { (::windows::runtime::Interface::vtable(this).8)(::std::mem::transmute_copy(this), value).ok() } 390 } IsEnabled(&self) -> ::windows::runtime::Result<bool>391 pub fn IsEnabled(&self) -> ::windows::runtime::Result<bool> { 392 let this = self; 393 unsafe { 394 let mut result__: bool = ::std::mem::zeroed(); 395 (::windows::runtime::Interface::vtable(this).9)(::std::mem::transmute_copy(this), &mut result__).from_abi::<bool>(result__) 396 } 397 } SupportedAxes(&self) -> ::windows::runtime::Result<ForceFeedbackEffectAxes>398 pub fn SupportedAxes(&self) -> ::windows::runtime::Result<ForceFeedbackEffectAxes> { 399 let this = self; 400 unsafe { 401 let mut result__: ForceFeedbackEffectAxes = ::std::mem::zeroed(); 402 (::windows::runtime::Interface::vtable(this).10)(::std::mem::transmute_copy(this), &mut result__).from_abi::<ForceFeedbackEffectAxes>(result__) 403 } 404 } 405 #[cfg(feature = "Foundation")] LoadEffectAsync<'a, Param0: ::windows::runtime::IntoParam<'a, IForceFeedbackEffect>>(&self, effect: Param0) -> ::windows::runtime::Result<super::super::super::Foundation::IAsyncOperation<ForceFeedbackLoadEffectResult>>406 pub fn LoadEffectAsync<'a, Param0: ::windows::runtime::IntoParam<'a, IForceFeedbackEffect>>(&self, effect: Param0) -> ::windows::runtime::Result<super::super::super::Foundation::IAsyncOperation<ForceFeedbackLoadEffectResult>> { 407 let this = self; 408 unsafe { 409 let mut result__: ::windows::runtime::RawPtr = ::std::mem::zeroed(); 410 (::windows::runtime::Interface::vtable(this).11)(::std::mem::transmute_copy(this), effect.into_param().abi(), &mut result__).from_abi::<super::super::super::Foundation::IAsyncOperation<ForceFeedbackLoadEffectResult>>(result__) 411 } 412 } PauseAllEffects(&self) -> ::windows::runtime::Result<()>413 pub fn PauseAllEffects(&self) -> ::windows::runtime::Result<()> { 414 let this = self; 415 unsafe { (::windows::runtime::Interface::vtable(this).12)(::std::mem::transmute_copy(this)).ok() } 416 } ResumeAllEffects(&self) -> ::windows::runtime::Result<()>417 pub fn ResumeAllEffects(&self) -> ::windows::runtime::Result<()> { 418 let this = self; 419 unsafe { (::windows::runtime::Interface::vtable(this).13)(::std::mem::transmute_copy(this)).ok() } 420 } StopAllEffects(&self) -> ::windows::runtime::Result<()>421 pub fn StopAllEffects(&self) -> ::windows::runtime::Result<()> { 422 let this = self; 423 unsafe { (::windows::runtime::Interface::vtable(this).14)(::std::mem::transmute_copy(this)).ok() } 424 } 425 #[cfg(feature = "Foundation")] TryDisableAsync(&self) -> ::windows::runtime::Result<super::super::super::Foundation::IAsyncOperation<bool>>426 pub fn TryDisableAsync(&self) -> ::windows::runtime::Result<super::super::super::Foundation::IAsyncOperation<bool>> { 427 let this = self; 428 unsafe { 429 let mut result__: ::windows::runtime::RawPtr = ::std::mem::zeroed(); 430 (::windows::runtime::Interface::vtable(this).15)(::std::mem::transmute_copy(this), &mut result__).from_abi::<super::super::super::Foundation::IAsyncOperation<bool>>(result__) 431 } 432 } 433 #[cfg(feature = "Foundation")] TryEnableAsync(&self) -> ::windows::runtime::Result<super::super::super::Foundation::IAsyncOperation<bool>>434 pub fn TryEnableAsync(&self) -> ::windows::runtime::Result<super::super::super::Foundation::IAsyncOperation<bool>> { 435 let this = self; 436 unsafe { 437 let mut result__: ::windows::runtime::RawPtr = ::std::mem::zeroed(); 438 (::windows::runtime::Interface::vtable(this).16)(::std::mem::transmute_copy(this), &mut result__).from_abi::<super::super::super::Foundation::IAsyncOperation<bool>>(result__) 439 } 440 } 441 #[cfg(feature = "Foundation")] TryResetAsync(&self) -> ::windows::runtime::Result<super::super::super::Foundation::IAsyncOperation<bool>>442 pub fn TryResetAsync(&self) -> ::windows::runtime::Result<super::super::super::Foundation::IAsyncOperation<bool>> { 443 let this = self; 444 unsafe { 445 let mut result__: ::windows::runtime::RawPtr = ::std::mem::zeroed(); 446 (::windows::runtime::Interface::vtable(this).17)(::std::mem::transmute_copy(this), &mut result__).from_abi::<super::super::super::Foundation::IAsyncOperation<bool>>(result__) 447 } 448 } 449 #[cfg(feature = "Foundation")] TryUnloadEffectAsync<'a, Param0: ::windows::runtime::IntoParam<'a, IForceFeedbackEffect>>(&self, effect: Param0) -> ::windows::runtime::Result<super::super::super::Foundation::IAsyncOperation<bool>>450 pub fn TryUnloadEffectAsync<'a, Param0: ::windows::runtime::IntoParam<'a, IForceFeedbackEffect>>(&self, effect: Param0) -> ::windows::runtime::Result<super::super::super::Foundation::IAsyncOperation<bool>> { 451 let this = self; 452 unsafe { 453 let mut result__: ::windows::runtime::RawPtr = ::std::mem::zeroed(); 454 (::windows::runtime::Interface::vtable(this).18)(::std::mem::transmute_copy(this), effect.into_param().abi(), &mut result__).from_abi::<super::super::super::Foundation::IAsyncOperation<bool>>(result__) 455 } 456 } 457 } 458 unsafe impl ::windows::runtime::RuntimeType for ForceFeedbackMotor { 459 const SIGNATURE: ::windows::runtime::ConstBuffer = ::windows::runtime::ConstBuffer::from_slice(b"rc(Windows.Gaming.Input.ForceFeedback.ForceFeedbackMotor;{8d3d417c-a5ea-4516-8026-2b00f74ef6e5})"); 460 } 461 unsafe impl ::windows::runtime::Interface for ForceFeedbackMotor { 462 type Vtable = IForceFeedbackMotor_abi; 463 const IID: ::windows::runtime::GUID = ::windows::runtime::GUID::from_values(2369601916, 42474, 17686, [128, 38, 43, 0, 247, 78, 246, 229]); 464 } 465 impl ::windows::runtime::RuntimeName for ForceFeedbackMotor { 466 const NAME: &'static str = "Windows.Gaming.Input.ForceFeedback.ForceFeedbackMotor"; 467 } 468 impl ::std::convert::From<ForceFeedbackMotor> for ::windows::runtime::IUnknown { from(value: ForceFeedbackMotor) -> Self469 fn from(value: ForceFeedbackMotor) -> Self { 470 unsafe { ::std::mem::transmute(value) } 471 } 472 } 473 impl ::std::convert::From<&ForceFeedbackMotor> for ::windows::runtime::IUnknown { from(value: &ForceFeedbackMotor) -> Self474 fn from(value: &ForceFeedbackMotor) -> Self { 475 ::std::convert::From::from(::std::clone::Clone::clone(value)) 476 } 477 } 478 impl<'a> ::windows::runtime::IntoParam<'a, ::windows::runtime::IUnknown> for ForceFeedbackMotor { into_param(self) -> ::windows::runtime::Param<'a, ::windows::runtime::IUnknown>479 fn into_param(self) -> ::windows::runtime::Param<'a, ::windows::runtime::IUnknown> { 480 ::windows::runtime::Param::Owned(::std::convert::Into::<::windows::runtime::IUnknown>::into(self)) 481 } 482 } 483 impl<'a> ::windows::runtime::IntoParam<'a, ::windows::runtime::IUnknown> for &ForceFeedbackMotor { into_param(self) -> ::windows::runtime::Param<'a, ::windows::runtime::IUnknown>484 fn into_param(self) -> ::windows::runtime::Param<'a, ::windows::runtime::IUnknown> { 485 ::windows::runtime::Param::Owned(::std::convert::Into::<::windows::runtime::IUnknown>::into(::std::clone::Clone::clone(self))) 486 } 487 } 488 impl ::std::convert::From<ForceFeedbackMotor> for ::windows::runtime::IInspectable { from(value: ForceFeedbackMotor) -> Self489 fn from(value: ForceFeedbackMotor) -> Self { 490 value.0 491 } 492 } 493 impl ::std::convert::From<&ForceFeedbackMotor> for ::windows::runtime::IInspectable { from(value: &ForceFeedbackMotor) -> Self494 fn from(value: &ForceFeedbackMotor) -> Self { 495 value.0.clone() 496 } 497 } 498 impl<'a> ::windows::runtime::IntoParam<'a, ::windows::runtime::IInspectable> for ForceFeedbackMotor { into_param(self) -> ::windows::runtime::Param<'a, ::windows::runtime::IInspectable>499 fn into_param(self) -> ::windows::runtime::Param<'a, ::windows::runtime::IInspectable> { 500 ::windows::runtime::Param::Owned(self.0) 501 } 502 } 503 impl<'a> ::windows::runtime::IntoParam<'a, ::windows::runtime::IInspectable> for &'a ForceFeedbackMotor { into_param(self) -> ::windows::runtime::Param<'a, ::windows::runtime::IInspectable>504 fn into_param(self) -> ::windows::runtime::Param<'a, ::windows::runtime::IInspectable> { 505 ::windows::runtime::Param::Borrowed(&self.0) 506 } 507 } 508 unsafe impl ::std::marker::Send for ForceFeedbackMotor {} 509 unsafe impl ::std::marker::Sync for ForceFeedbackMotor {} 510 #[repr(transparent)] 511 #[derive(:: std :: cmp :: PartialEq, :: std :: cmp :: Eq, :: std :: clone :: Clone, :: std :: fmt :: Debug)] 512 #[doc(hidden)] 513 pub struct IConditionForceEffect(::windows::runtime::IInspectable); 514 unsafe impl ::windows::runtime::Interface for IConditionForceEffect { 515 type Vtable = IConditionForceEffect_abi; 516 const IID: ::windows::runtime::GUID = ::windows::runtime::GUID::from_values(852617832, 13973, 20073, [133, 192, 205, 25, 68, 24, 145, 64]); 517 } 518 #[repr(C)] 519 #[doc(hidden)] 520 pub struct IConditionForceEffect_abi( 521 pub unsafe extern "system" fn(this: ::windows::runtime::RawPtr, iid: &::windows::runtime::GUID, interface: *mut ::windows::runtime::RawPtr) -> ::windows::runtime::HRESULT, 522 pub unsafe extern "system" fn(this: ::windows::runtime::RawPtr) -> u32, 523 pub unsafe extern "system" fn(this: ::windows::runtime::RawPtr) -> u32, 524 pub unsafe extern "system" fn(this: ::windows::runtime::RawPtr, count: *mut u32, values: *mut *mut ::windows::runtime::GUID) -> ::windows::runtime::HRESULT, 525 pub unsafe extern "system" fn(this: ::windows::runtime::RawPtr, value: *mut ::windows::runtime::RawPtr) -> ::windows::runtime::HRESULT, 526 pub unsafe extern "system" fn(this: ::windows::runtime::RawPtr, value: *mut i32) -> ::windows::runtime::HRESULT, 527 pub unsafe extern "system" fn(this: ::windows::runtime::RawPtr, result__: *mut ConditionForceEffectKind) -> ::windows::runtime::HRESULT, 528 #[cfg(feature = "Foundation_Numerics")] pub unsafe extern "system" fn(this: ::windows::runtime::RawPtr, direction: super::super::super::Foundation::Numerics::Vector3, positivecoefficient: f32, negativecoefficient: f32, maxpositivemagnitude: f32, maxnegativemagnitude: f32, deadzone: f32, bias: f32) -> ::windows::runtime::HRESULT, 529 #[cfg(not(feature = "Foundation_Numerics"))] usize, 530 ); 531 #[repr(transparent)] 532 #[derive(:: std :: cmp :: PartialEq, :: std :: cmp :: Eq, :: std :: clone :: Clone, :: std :: fmt :: Debug)] 533 #[doc(hidden)] 534 pub struct IConditionForceEffectFactory(::windows::runtime::IInspectable); 535 unsafe impl ::windows::runtime::Interface for IConditionForceEffectFactory { 536 type Vtable = IConditionForceEffectFactory_abi; 537 const IID: ::windows::runtime::GUID = ::windows::runtime::GUID::from_values(2443809380, 6160, 20150, [167, 115, 191, 211, 184, 205, 219, 171]); 538 } 539 #[repr(C)] 540 #[doc(hidden)] 541 pub struct IConditionForceEffectFactory_abi( 542 pub unsafe extern "system" fn(this: ::windows::runtime::RawPtr, iid: &::windows::runtime::GUID, interface: *mut ::windows::runtime::RawPtr) -> ::windows::runtime::HRESULT, 543 pub unsafe extern "system" fn(this: ::windows::runtime::RawPtr) -> u32, 544 pub unsafe extern "system" fn(this: ::windows::runtime::RawPtr) -> u32, 545 pub unsafe extern "system" fn(this: ::windows::runtime::RawPtr, count: *mut u32, values: *mut *mut ::windows::runtime::GUID) -> ::windows::runtime::HRESULT, 546 pub unsafe extern "system" fn(this: ::windows::runtime::RawPtr, value: *mut ::windows::runtime::RawPtr) -> ::windows::runtime::HRESULT, 547 pub unsafe extern "system" fn(this: ::windows::runtime::RawPtr, value: *mut i32) -> ::windows::runtime::HRESULT, 548 pub unsafe extern "system" fn(this: ::windows::runtime::RawPtr, effectkind: ConditionForceEffectKind, result__: *mut ::windows::runtime::RawPtr) -> ::windows::runtime::HRESULT, 549 ); 550 #[repr(transparent)] 551 #[derive(:: std :: cmp :: PartialEq, :: std :: cmp :: Eq, :: std :: clone :: Clone, :: std :: fmt :: Debug)] 552 #[doc(hidden)] 553 pub struct IConstantForceEffect(::windows::runtime::IInspectable); 554 unsafe impl ::windows::runtime::Interface for IConstantForceEffect { 555 type Vtable = IConstantForceEffect_abi; 556 const IID: ::windows::runtime::GUID = ::windows::runtime::GUID::from_values(2616852800, 62407, 16732, [176, 104, 15, 6, 135, 52, 188, 224]); 557 } 558 #[repr(C)] 559 #[doc(hidden)] 560 pub struct IConstantForceEffect_abi( 561 pub unsafe extern "system" fn(this: ::windows::runtime::RawPtr, iid: &::windows::runtime::GUID, interface: *mut ::windows::runtime::RawPtr) -> ::windows::runtime::HRESULT, 562 pub unsafe extern "system" fn(this: ::windows::runtime::RawPtr) -> u32, 563 pub unsafe extern "system" fn(this: ::windows::runtime::RawPtr) -> u32, 564 pub unsafe extern "system" fn(this: ::windows::runtime::RawPtr, count: *mut u32, values: *mut *mut ::windows::runtime::GUID) -> ::windows::runtime::HRESULT, 565 pub unsafe extern "system" fn(this: ::windows::runtime::RawPtr, value: *mut ::windows::runtime::RawPtr) -> ::windows::runtime::HRESULT, 566 pub unsafe extern "system" fn(this: ::windows::runtime::RawPtr, value: *mut i32) -> ::windows::runtime::HRESULT, 567 #[cfg(all(feature = "Foundation", feature = "Foundation_Numerics"))] pub unsafe extern "system" fn(this: ::windows::runtime::RawPtr, vector: super::super::super::Foundation::Numerics::Vector3, duration: super::super::super::Foundation::TimeSpan) -> ::windows::runtime::HRESULT, 568 #[cfg(not(all(feature = "Foundation", feature = "Foundation_Numerics")))] usize, 569 #[cfg(all(feature = "Foundation", feature = "Foundation_Numerics"))] 570 pub unsafe extern "system" fn(this: ::windows::runtime::RawPtr, vector: super::super::super::Foundation::Numerics::Vector3, attackgain: f32, sustaingain: f32, releasegain: f32, startdelay: super::super::super::Foundation::TimeSpan, attackduration: super::super::super::Foundation::TimeSpan, sustainduration: super::super::super::Foundation::TimeSpan, releaseduration: super::super::super::Foundation::TimeSpan, repeatcount: u32) -> ::windows::runtime::HRESULT, 571 #[cfg(not(all(feature = "Foundation", feature = "Foundation_Numerics")))] usize, 572 ); 573 #[repr(transparent)] 574 #[derive(:: std :: cmp :: PartialEq, :: std :: cmp :: Eq, :: std :: clone :: Clone, :: std :: fmt :: Debug)] 575 pub struct IForceFeedbackEffect(::windows::runtime::IInspectable); 576 unsafe impl ::windows::runtime::Interface for IForceFeedbackEffect { 577 type Vtable = IForceFeedbackEffect_abi; 578 const IID: ::windows::runtime::GUID = ::windows::runtime::GUID::from_values(2709502476, 10980, 18626, [128, 99, 234, 189, 7, 119, 203, 137]); 579 } 580 impl IForceFeedbackEffect { Gain(&self) -> ::windows::runtime::Result<f64>581 pub fn Gain(&self) -> ::windows::runtime::Result<f64> { 582 let this = self; 583 unsafe { 584 let mut result__: f64 = ::std::mem::zeroed(); 585 (::windows::runtime::Interface::vtable(this).6)(::std::mem::transmute_copy(this), &mut result__).from_abi::<f64>(result__) 586 } 587 } SetGain(&self, value: f64) -> ::windows::runtime::Result<()>588 pub fn SetGain(&self, value: f64) -> ::windows::runtime::Result<()> { 589 let this = self; 590 unsafe { (::windows::runtime::Interface::vtable(this).7)(::std::mem::transmute_copy(this), value).ok() } 591 } State(&self) -> ::windows::runtime::Result<ForceFeedbackEffectState>592 pub fn State(&self) -> ::windows::runtime::Result<ForceFeedbackEffectState> { 593 let this = self; 594 unsafe { 595 let mut result__: ForceFeedbackEffectState = ::std::mem::zeroed(); 596 (::windows::runtime::Interface::vtable(this).8)(::std::mem::transmute_copy(this), &mut result__).from_abi::<ForceFeedbackEffectState>(result__) 597 } 598 } Start(&self) -> ::windows::runtime::Result<()>599 pub fn Start(&self) -> ::windows::runtime::Result<()> { 600 let this = self; 601 unsafe { (::windows::runtime::Interface::vtable(this).9)(::std::mem::transmute_copy(this)).ok() } 602 } Stop(&self) -> ::windows::runtime::Result<()>603 pub fn Stop(&self) -> ::windows::runtime::Result<()> { 604 let this = self; 605 unsafe { (::windows::runtime::Interface::vtable(this).10)(::std::mem::transmute_copy(this)).ok() } 606 } 607 } 608 unsafe impl ::windows::runtime::RuntimeType for IForceFeedbackEffect { 609 const SIGNATURE: ::windows::runtime::ConstBuffer = ::windows::runtime::ConstBuffer::from_slice(b"{a17fba0c-2ae4-48c2-8063-eabd0777cb89}"); 610 } 611 impl ::std::convert::From<IForceFeedbackEffect> for ::windows::runtime::IUnknown { from(value: IForceFeedbackEffect) -> Self612 fn from(value: IForceFeedbackEffect) -> Self { 613 unsafe { ::std::mem::transmute(value) } 614 } 615 } 616 impl ::std::convert::From<&IForceFeedbackEffect> for ::windows::runtime::IUnknown { from(value: &IForceFeedbackEffect) -> Self617 fn from(value: &IForceFeedbackEffect) -> Self { 618 ::std::convert::From::from(::std::clone::Clone::clone(value)) 619 } 620 } 621 impl<'a> ::windows::runtime::IntoParam<'a, ::windows::runtime::IUnknown> for IForceFeedbackEffect { into_param(self) -> ::windows::runtime::Param<'a, ::windows::runtime::IUnknown>622 fn into_param(self) -> ::windows::runtime::Param<'a, ::windows::runtime::IUnknown> { 623 ::windows::runtime::Param::Owned(::std::convert::Into::<::windows::runtime::IUnknown>::into(self)) 624 } 625 } 626 impl<'a> ::windows::runtime::IntoParam<'a, ::windows::runtime::IUnknown> for &IForceFeedbackEffect { into_param(self) -> ::windows::runtime::Param<'a, ::windows::runtime::IUnknown>627 fn into_param(self) -> ::windows::runtime::Param<'a, ::windows::runtime::IUnknown> { 628 ::windows::runtime::Param::Owned(::std::convert::Into::<::windows::runtime::IUnknown>::into(::std::clone::Clone::clone(self))) 629 } 630 } 631 impl ::std::convert::From<IForceFeedbackEffect> for ::windows::runtime::IInspectable { from(value: IForceFeedbackEffect) -> Self632 fn from(value: IForceFeedbackEffect) -> Self { 633 value.0 634 } 635 } 636 impl ::std::convert::From<&IForceFeedbackEffect> for ::windows::runtime::IInspectable { from(value: &IForceFeedbackEffect) -> Self637 fn from(value: &IForceFeedbackEffect) -> Self { 638 value.0.clone() 639 } 640 } 641 impl<'a> ::windows::runtime::IntoParam<'a, ::windows::runtime::IInspectable> for IForceFeedbackEffect { into_param(self) -> ::windows::runtime::Param<'a, ::windows::runtime::IInspectable>642 fn into_param(self) -> ::windows::runtime::Param<'a, ::windows::runtime::IInspectable> { 643 ::windows::runtime::Param::Owned(self.0) 644 } 645 } 646 impl<'a> ::windows::runtime::IntoParam<'a, ::windows::runtime::IInspectable> for &'a IForceFeedbackEffect { into_param(self) -> ::windows::runtime::Param<'a, ::windows::runtime::IInspectable>647 fn into_param(self) -> ::windows::runtime::Param<'a, ::windows::runtime::IInspectable> { 648 ::windows::runtime::Param::Borrowed(&self.0) 649 } 650 } 651 #[repr(C)] 652 #[doc(hidden)] 653 pub struct IForceFeedbackEffect_abi( 654 pub unsafe extern "system" fn(this: ::windows::runtime::RawPtr, iid: &::windows::runtime::GUID, interface: *mut ::windows::runtime::RawPtr) -> ::windows::runtime::HRESULT, 655 pub unsafe extern "system" fn(this: ::windows::runtime::RawPtr) -> u32, 656 pub unsafe extern "system" fn(this: ::windows::runtime::RawPtr) -> u32, 657 pub unsafe extern "system" fn(this: ::windows::runtime::RawPtr, count: *mut u32, values: *mut *mut ::windows::runtime::GUID) -> ::windows::runtime::HRESULT, 658 pub unsafe extern "system" fn(this: ::windows::runtime::RawPtr, value: *mut ::windows::runtime::RawPtr) -> ::windows::runtime::HRESULT, 659 pub unsafe extern "system" fn(this: ::windows::runtime::RawPtr, value: *mut i32) -> ::windows::runtime::HRESULT, 660 pub unsafe extern "system" fn(this: ::windows::runtime::RawPtr, result__: *mut f64) -> ::windows::runtime::HRESULT, 661 pub unsafe extern "system" fn(this: ::windows::runtime::RawPtr, value: f64) -> ::windows::runtime::HRESULT, 662 pub unsafe extern "system" fn(this: ::windows::runtime::RawPtr, result__: *mut ForceFeedbackEffectState) -> ::windows::runtime::HRESULT, 663 pub unsafe extern "system" fn(this: ::windows::runtime::RawPtr) -> ::windows::runtime::HRESULT, 664 pub unsafe extern "system" fn(this: ::windows::runtime::RawPtr) -> ::windows::runtime::HRESULT, 665 ); 666 #[repr(transparent)] 667 #[derive(:: std :: cmp :: PartialEq, :: std :: cmp :: Eq, :: std :: clone :: Clone, :: std :: fmt :: Debug)] 668 #[doc(hidden)] 669 pub struct IForceFeedbackMotor(::windows::runtime::IInspectable); 670 unsafe impl ::windows::runtime::Interface for IForceFeedbackMotor { 671 type Vtable = IForceFeedbackMotor_abi; 672 const IID: ::windows::runtime::GUID = ::windows::runtime::GUID::from_values(2369601916, 42474, 17686, [128, 38, 43, 0, 247, 78, 246, 229]); 673 } 674 #[repr(C)] 675 #[doc(hidden)] 676 pub struct IForceFeedbackMotor_abi( 677 pub unsafe extern "system" fn(this: ::windows::runtime::RawPtr, iid: &::windows::runtime::GUID, interface: *mut ::windows::runtime::RawPtr) -> ::windows::runtime::HRESULT, 678 pub unsafe extern "system" fn(this: ::windows::runtime::RawPtr) -> u32, 679 pub unsafe extern "system" fn(this: ::windows::runtime::RawPtr) -> u32, 680 pub unsafe extern "system" fn(this: ::windows::runtime::RawPtr, count: *mut u32, values: *mut *mut ::windows::runtime::GUID) -> ::windows::runtime::HRESULT, 681 pub unsafe extern "system" fn(this: ::windows::runtime::RawPtr, value: *mut ::windows::runtime::RawPtr) -> ::windows::runtime::HRESULT, 682 pub unsafe extern "system" fn(this: ::windows::runtime::RawPtr, value: *mut i32) -> ::windows::runtime::HRESULT, 683 pub unsafe extern "system" fn(this: ::windows::runtime::RawPtr, result__: *mut bool) -> ::windows::runtime::HRESULT, 684 pub unsafe extern "system" fn(this: ::windows::runtime::RawPtr, result__: *mut f64) -> ::windows::runtime::HRESULT, 685 pub unsafe extern "system" fn(this: ::windows::runtime::RawPtr, value: f64) -> ::windows::runtime::HRESULT, 686 pub unsafe extern "system" fn(this: ::windows::runtime::RawPtr, result__: *mut bool) -> ::windows::runtime::HRESULT, 687 pub unsafe extern "system" fn(this: ::windows::runtime::RawPtr, result__: *mut ForceFeedbackEffectAxes) -> ::windows::runtime::HRESULT, 688 #[cfg(feature = "Foundation")] pub unsafe extern "system" fn(this: ::windows::runtime::RawPtr, effect: ::windows::runtime::RawPtr, result__: *mut ::windows::runtime::RawPtr) -> ::windows::runtime::HRESULT, 689 #[cfg(not(feature = "Foundation"))] usize, 690 pub unsafe extern "system" fn(this: ::windows::runtime::RawPtr) -> ::windows::runtime::HRESULT, 691 pub unsafe extern "system" fn(this: ::windows::runtime::RawPtr) -> ::windows::runtime::HRESULT, 692 pub unsafe extern "system" fn(this: ::windows::runtime::RawPtr) -> ::windows::runtime::HRESULT, 693 #[cfg(feature = "Foundation")] pub unsafe extern "system" fn(this: ::windows::runtime::RawPtr, result__: *mut ::windows::runtime::RawPtr) -> ::windows::runtime::HRESULT, 694 #[cfg(not(feature = "Foundation"))] usize, 695 #[cfg(feature = "Foundation")] pub unsafe extern "system" fn(this: ::windows::runtime::RawPtr, result__: *mut ::windows::runtime::RawPtr) -> ::windows::runtime::HRESULT, 696 #[cfg(not(feature = "Foundation"))] usize, 697 #[cfg(feature = "Foundation")] pub unsafe extern "system" fn(this: ::windows::runtime::RawPtr, result__: *mut ::windows::runtime::RawPtr) -> ::windows::runtime::HRESULT, 698 #[cfg(not(feature = "Foundation"))] usize, 699 #[cfg(feature = "Foundation")] pub unsafe extern "system" fn(this: ::windows::runtime::RawPtr, effect: ::windows::runtime::RawPtr, result__: *mut ::windows::runtime::RawPtr) -> ::windows::runtime::HRESULT, 700 #[cfg(not(feature = "Foundation"))] usize, 701 ); 702 #[repr(transparent)] 703 #[derive(:: std :: cmp :: PartialEq, :: std :: cmp :: Eq, :: std :: clone :: Clone, :: std :: fmt :: Debug)] 704 #[doc(hidden)] 705 pub struct IPeriodicForceEffect(::windows::runtime::IInspectable); 706 unsafe impl ::windows::runtime::Interface for IPeriodicForceEffect { 707 type Vtable = IPeriodicForceEffect_abi; 708 const IID: ::windows::runtime::GUID = ::windows::runtime::GUID::from_values(1548826839, 64629, 19794, [154, 10, 239, 228, 202, 181, 254, 100]); 709 } 710 #[repr(C)] 711 #[doc(hidden)] 712 pub struct IPeriodicForceEffect_abi( 713 pub unsafe extern "system" fn(this: ::windows::runtime::RawPtr, iid: &::windows::runtime::GUID, interface: *mut ::windows::runtime::RawPtr) -> ::windows::runtime::HRESULT, 714 pub unsafe extern "system" fn(this: ::windows::runtime::RawPtr) -> u32, 715 pub unsafe extern "system" fn(this: ::windows::runtime::RawPtr) -> u32, 716 pub unsafe extern "system" fn(this: ::windows::runtime::RawPtr, count: *mut u32, values: *mut *mut ::windows::runtime::GUID) -> ::windows::runtime::HRESULT, 717 pub unsafe extern "system" fn(this: ::windows::runtime::RawPtr, value: *mut ::windows::runtime::RawPtr) -> ::windows::runtime::HRESULT, 718 pub unsafe extern "system" fn(this: ::windows::runtime::RawPtr, value: *mut i32) -> ::windows::runtime::HRESULT, 719 pub unsafe extern "system" fn(this: ::windows::runtime::RawPtr, result__: *mut PeriodicForceEffectKind) -> ::windows::runtime::HRESULT, 720 #[cfg(all(feature = "Foundation", feature = "Foundation_Numerics"))] pub unsafe extern "system" fn(this: ::windows::runtime::RawPtr, vector: super::super::super::Foundation::Numerics::Vector3, frequency: f32, phase: f32, bias: f32, duration: super::super::super::Foundation::TimeSpan) -> ::windows::runtime::HRESULT, 721 #[cfg(not(all(feature = "Foundation", feature = "Foundation_Numerics")))] usize, 722 #[cfg(all(feature = "Foundation", feature = "Foundation_Numerics"))] 723 pub unsafe extern "system" fn( 724 this: ::windows::runtime::RawPtr, 725 vector: super::super::super::Foundation::Numerics::Vector3, 726 frequency: f32, 727 phase: f32, 728 bias: f32, 729 attackgain: f32, 730 sustaingain: f32, 731 releasegain: f32, 732 startdelay: super::super::super::Foundation::TimeSpan, 733 attackduration: super::super::super::Foundation::TimeSpan, 734 sustainduration: super::super::super::Foundation::TimeSpan, 735 releaseduration: super::super::super::Foundation::TimeSpan, 736 repeatcount: u32, 737 ) -> ::windows::runtime::HRESULT, 738 #[cfg(not(all(feature = "Foundation", feature = "Foundation_Numerics")))] usize, 739 ); 740 #[repr(transparent)] 741 #[derive(:: std :: cmp :: PartialEq, :: std :: cmp :: Eq, :: std :: clone :: Clone, :: std :: fmt :: Debug)] 742 #[doc(hidden)] 743 pub struct IPeriodicForceEffectFactory(::windows::runtime::IInspectable); 744 unsafe impl ::windows::runtime::Interface for IPeriodicForceEffectFactory { 745 type Vtable = IPeriodicForceEffectFactory_abi; 746 const IID: ::windows::runtime::GUID = ::windows::runtime::GUID::from_values(1868753690, 38993, 18299, [179, 24, 53, 236, 170, 21, 7, 15]); 747 } 748 #[repr(C)] 749 #[doc(hidden)] 750 pub struct IPeriodicForceEffectFactory_abi( 751 pub unsafe extern "system" fn(this: ::windows::runtime::RawPtr, iid: &::windows::runtime::GUID, interface: *mut ::windows::runtime::RawPtr) -> ::windows::runtime::HRESULT, 752 pub unsafe extern "system" fn(this: ::windows::runtime::RawPtr) -> u32, 753 pub unsafe extern "system" fn(this: ::windows::runtime::RawPtr) -> u32, 754 pub unsafe extern "system" fn(this: ::windows::runtime::RawPtr, count: *mut u32, values: *mut *mut ::windows::runtime::GUID) -> ::windows::runtime::HRESULT, 755 pub unsafe extern "system" fn(this: ::windows::runtime::RawPtr, value: *mut ::windows::runtime::RawPtr) -> ::windows::runtime::HRESULT, 756 pub unsafe extern "system" fn(this: ::windows::runtime::RawPtr, value: *mut i32) -> ::windows::runtime::HRESULT, 757 pub unsafe extern "system" fn(this: ::windows::runtime::RawPtr, effectkind: PeriodicForceEffectKind, result__: *mut ::windows::runtime::RawPtr) -> ::windows::runtime::HRESULT, 758 ); 759 #[repr(transparent)] 760 #[derive(:: std :: cmp :: PartialEq, :: std :: cmp :: Eq, :: std :: clone :: Clone, :: std :: fmt :: Debug)] 761 #[doc(hidden)] 762 pub struct IRampForceEffect(::windows::runtime::IInspectable); 763 unsafe impl ::windows::runtime::Interface for IRampForceEffect { 764 type Vtable = IRampForceEffect_abi; 765 const IID: ::windows::runtime::GUID = ::windows::runtime::GUID::from_values(4059566681, 7334, 16512, [181, 109, 180, 63, 51, 84, 208, 82]); 766 } 767 #[repr(C)] 768 #[doc(hidden)] 769 pub struct IRampForceEffect_abi( 770 pub unsafe extern "system" fn(this: ::windows::runtime::RawPtr, iid: &::windows::runtime::GUID, interface: *mut ::windows::runtime::RawPtr) -> ::windows::runtime::HRESULT, 771 pub unsafe extern "system" fn(this: ::windows::runtime::RawPtr) -> u32, 772 pub unsafe extern "system" fn(this: ::windows::runtime::RawPtr) -> u32, 773 pub unsafe extern "system" fn(this: ::windows::runtime::RawPtr, count: *mut u32, values: *mut *mut ::windows::runtime::GUID) -> ::windows::runtime::HRESULT, 774 pub unsafe extern "system" fn(this: ::windows::runtime::RawPtr, value: *mut ::windows::runtime::RawPtr) -> ::windows::runtime::HRESULT, 775 pub unsafe extern "system" fn(this: ::windows::runtime::RawPtr, value: *mut i32) -> ::windows::runtime::HRESULT, 776 #[cfg(all(feature = "Foundation", feature = "Foundation_Numerics"))] pub unsafe extern "system" fn(this: ::windows::runtime::RawPtr, startvector: super::super::super::Foundation::Numerics::Vector3, endvector: super::super::super::Foundation::Numerics::Vector3, duration: super::super::super::Foundation::TimeSpan) -> ::windows::runtime::HRESULT, 777 #[cfg(not(all(feature = "Foundation", feature = "Foundation_Numerics")))] usize, 778 #[cfg(all(feature = "Foundation", feature = "Foundation_Numerics"))] 779 pub unsafe extern "system" fn( 780 this: ::windows::runtime::RawPtr, 781 startvector: super::super::super::Foundation::Numerics::Vector3, 782 endvector: super::super::super::Foundation::Numerics::Vector3, 783 attackgain: f32, 784 sustaingain: f32, 785 releasegain: f32, 786 startdelay: super::super::super::Foundation::TimeSpan, 787 attackduration: super::super::super::Foundation::TimeSpan, 788 sustainduration: super::super::super::Foundation::TimeSpan, 789 releaseduration: super::super::super::Foundation::TimeSpan, 790 repeatcount: u32, 791 ) -> ::windows::runtime::HRESULT, 792 #[cfg(not(all(feature = "Foundation", feature = "Foundation_Numerics")))] usize, 793 ); 794 #[repr(transparent)] 795 #[derive(:: std :: cmp :: PartialEq, :: std :: cmp :: Eq, :: std :: clone :: Clone, :: std :: fmt :: Debug)] 796 pub struct PeriodicForceEffect(::windows::runtime::IInspectable); 797 impl PeriodicForceEffect { Gain(&self) -> ::windows::runtime::Result<f64>798 pub fn Gain(&self) -> ::windows::runtime::Result<f64> { 799 let this = self; 800 unsafe { 801 let mut result__: f64 = ::std::mem::zeroed(); 802 (::windows::runtime::Interface::vtable(this).6)(::std::mem::transmute_copy(this), &mut result__).from_abi::<f64>(result__) 803 } 804 } SetGain(&self, value: f64) -> ::windows::runtime::Result<()>805 pub fn SetGain(&self, value: f64) -> ::windows::runtime::Result<()> { 806 let this = self; 807 unsafe { (::windows::runtime::Interface::vtable(this).7)(::std::mem::transmute_copy(this), value).ok() } 808 } State(&self) -> ::windows::runtime::Result<ForceFeedbackEffectState>809 pub fn State(&self) -> ::windows::runtime::Result<ForceFeedbackEffectState> { 810 let this = self; 811 unsafe { 812 let mut result__: ForceFeedbackEffectState = ::std::mem::zeroed(); 813 (::windows::runtime::Interface::vtable(this).8)(::std::mem::transmute_copy(this), &mut result__).from_abi::<ForceFeedbackEffectState>(result__) 814 } 815 } Start(&self) -> ::windows::runtime::Result<()>816 pub fn Start(&self) -> ::windows::runtime::Result<()> { 817 let this = self; 818 unsafe { (::windows::runtime::Interface::vtable(this).9)(::std::mem::transmute_copy(this)).ok() } 819 } Stop(&self) -> ::windows::runtime::Result<()>820 pub fn Stop(&self) -> ::windows::runtime::Result<()> { 821 let this = self; 822 unsafe { (::windows::runtime::Interface::vtable(this).10)(::std::mem::transmute_copy(this)).ok() } 823 } Kind(&self) -> ::windows::runtime::Result<PeriodicForceEffectKind>824 pub fn Kind(&self) -> ::windows::runtime::Result<PeriodicForceEffectKind> { 825 let this = &::windows::runtime::Interface::cast::<IPeriodicForceEffect>(self)?; 826 unsafe { 827 let mut result__: PeriodicForceEffectKind = ::std::mem::zeroed(); 828 (::windows::runtime::Interface::vtable(this).6)(::std::mem::transmute_copy(this), &mut result__).from_abi::<PeriodicForceEffectKind>(result__) 829 } 830 } 831 #[cfg(all(feature = "Foundation", feature = "Foundation_Numerics"))] SetParameters<'a, Param0: ::windows::runtime::IntoParam<'a, super::super::super::Foundation::Numerics::Vector3>, Param4: ::windows::runtime::IntoParam<'a, super::super::super::Foundation::TimeSpan>>(&self, vector: Param0, frequency: f32, phase: f32, bias: f32, duration: Param4) -> ::windows::runtime::Result<()>832 pub fn SetParameters<'a, Param0: ::windows::runtime::IntoParam<'a, super::super::super::Foundation::Numerics::Vector3>, Param4: ::windows::runtime::IntoParam<'a, super::super::super::Foundation::TimeSpan>>(&self, vector: Param0, frequency: f32, phase: f32, bias: f32, duration: Param4) -> ::windows::runtime::Result<()> { 833 let this = &::windows::runtime::Interface::cast::<IPeriodicForceEffect>(self)?; 834 unsafe { (::windows::runtime::Interface::vtable(this).7)(::std::mem::transmute_copy(this), vector.into_param().abi(), frequency, phase, bias, duration.into_param().abi()).ok() } 835 } 836 #[cfg(all(feature = "Foundation", feature = "Foundation_Numerics"))] SetParametersWithEnvelope<'a, Param0: ::windows::runtime::IntoParam<'a, super::super::super::Foundation::Numerics::Vector3>, Param7: ::windows::runtime::IntoParam<'a, super::super::super::Foundation::TimeSpan>, Param8: ::windows::runtime::IntoParam<'a, super::super::super::Foundation::TimeSpan>, Param9: ::windows::runtime::IntoParam<'a, super::super::super::Foundation::TimeSpan>, Param10: ::windows::runtime::IntoParam<'a, super::super::super::Foundation::TimeSpan>>( &self, vector: Param0, frequency: f32, phase: f32, bias: f32, attackgain: f32, sustaingain: f32, releasegain: f32, startdelay: Param7, attackduration: Param8, sustainduration: Param9, releaseduration: Param10, repeatcount: u32, ) -> ::windows::runtime::Result<()>837 pub fn SetParametersWithEnvelope<'a, Param0: ::windows::runtime::IntoParam<'a, super::super::super::Foundation::Numerics::Vector3>, Param7: ::windows::runtime::IntoParam<'a, super::super::super::Foundation::TimeSpan>, Param8: ::windows::runtime::IntoParam<'a, super::super::super::Foundation::TimeSpan>, Param9: ::windows::runtime::IntoParam<'a, super::super::super::Foundation::TimeSpan>, Param10: ::windows::runtime::IntoParam<'a, super::super::super::Foundation::TimeSpan>>( 838 &self, 839 vector: Param0, 840 frequency: f32, 841 phase: f32, 842 bias: f32, 843 attackgain: f32, 844 sustaingain: f32, 845 releasegain: f32, 846 startdelay: Param7, 847 attackduration: Param8, 848 sustainduration: Param9, 849 releaseduration: Param10, 850 repeatcount: u32, 851 ) -> ::windows::runtime::Result<()> { 852 let this = &::windows::runtime::Interface::cast::<IPeriodicForceEffect>(self)?; 853 unsafe { (::windows::runtime::Interface::vtable(this).8)(::std::mem::transmute_copy(this), vector.into_param().abi(), frequency, phase, bias, attackgain, sustaingain, releasegain, startdelay.into_param().abi(), attackduration.into_param().abi(), sustainduration.into_param().abi(), releaseduration.into_param().abi(), repeatcount).ok() } 854 } CreateInstance(effectkind: PeriodicForceEffectKind) -> ::windows::runtime::Result<PeriodicForceEffect>855 pub fn CreateInstance(effectkind: PeriodicForceEffectKind) -> ::windows::runtime::Result<PeriodicForceEffect> { 856 Self::IPeriodicForceEffectFactory(|this| unsafe { 857 let mut result__: ::windows::runtime::RawPtr = ::std::mem::zeroed(); 858 (::windows::runtime::Interface::vtable(this).6)(::std::mem::transmute_copy(this), effectkind, &mut result__).from_abi::<PeriodicForceEffect>(result__) 859 }) 860 } IPeriodicForceEffectFactory<R, F: FnOnce(&IPeriodicForceEffectFactory) -> ::windows::runtime::Result<R>>(callback: F) -> ::windows::runtime::Result<R>861 pub fn IPeriodicForceEffectFactory<R, F: FnOnce(&IPeriodicForceEffectFactory) -> ::windows::runtime::Result<R>>(callback: F) -> ::windows::runtime::Result<R> { 862 static mut SHARED: ::windows::runtime::FactoryCache<PeriodicForceEffect, IPeriodicForceEffectFactory> = ::windows::runtime::FactoryCache::new(); 863 unsafe { SHARED.call(callback) } 864 } 865 } 866 unsafe impl ::windows::runtime::RuntimeType for PeriodicForceEffect { 867 const SIGNATURE: ::windows::runtime::ConstBuffer = ::windows::runtime::ConstBuffer::from_slice(b"rc(Windows.Gaming.Input.ForceFeedback.PeriodicForceEffect;{a17fba0c-2ae4-48c2-8063-eabd0777cb89})"); 868 } 869 unsafe impl ::windows::runtime::Interface for PeriodicForceEffect { 870 type Vtable = IForceFeedbackEffect_abi; 871 const IID: ::windows::runtime::GUID = ::windows::runtime::GUID::from_values(2709502476, 10980, 18626, [128, 99, 234, 189, 7, 119, 203, 137]); 872 } 873 impl ::windows::runtime::RuntimeName for PeriodicForceEffect { 874 const NAME: &'static str = "Windows.Gaming.Input.ForceFeedback.PeriodicForceEffect"; 875 } 876 impl ::std::convert::From<PeriodicForceEffect> for ::windows::runtime::IUnknown { from(value: PeriodicForceEffect) -> Self877 fn from(value: PeriodicForceEffect) -> Self { 878 unsafe { ::std::mem::transmute(value) } 879 } 880 } 881 impl ::std::convert::From<&PeriodicForceEffect> for ::windows::runtime::IUnknown { from(value: &PeriodicForceEffect) -> Self882 fn from(value: &PeriodicForceEffect) -> Self { 883 ::std::convert::From::from(::std::clone::Clone::clone(value)) 884 } 885 } 886 impl<'a> ::windows::runtime::IntoParam<'a, ::windows::runtime::IUnknown> for PeriodicForceEffect { into_param(self) -> ::windows::runtime::Param<'a, ::windows::runtime::IUnknown>887 fn into_param(self) -> ::windows::runtime::Param<'a, ::windows::runtime::IUnknown> { 888 ::windows::runtime::Param::Owned(::std::convert::Into::<::windows::runtime::IUnknown>::into(self)) 889 } 890 } 891 impl<'a> ::windows::runtime::IntoParam<'a, ::windows::runtime::IUnknown> for &PeriodicForceEffect { into_param(self) -> ::windows::runtime::Param<'a, ::windows::runtime::IUnknown>892 fn into_param(self) -> ::windows::runtime::Param<'a, ::windows::runtime::IUnknown> { 893 ::windows::runtime::Param::Owned(::std::convert::Into::<::windows::runtime::IUnknown>::into(::std::clone::Clone::clone(self))) 894 } 895 } 896 impl ::std::convert::From<PeriodicForceEffect> for ::windows::runtime::IInspectable { from(value: PeriodicForceEffect) -> Self897 fn from(value: PeriodicForceEffect) -> Self { 898 value.0 899 } 900 } 901 impl ::std::convert::From<&PeriodicForceEffect> for ::windows::runtime::IInspectable { from(value: &PeriodicForceEffect) -> Self902 fn from(value: &PeriodicForceEffect) -> Self { 903 value.0.clone() 904 } 905 } 906 impl<'a> ::windows::runtime::IntoParam<'a, ::windows::runtime::IInspectable> for PeriodicForceEffect { into_param(self) -> ::windows::runtime::Param<'a, ::windows::runtime::IInspectable>907 fn into_param(self) -> ::windows::runtime::Param<'a, ::windows::runtime::IInspectable> { 908 ::windows::runtime::Param::Owned(self.0) 909 } 910 } 911 impl<'a> ::windows::runtime::IntoParam<'a, ::windows::runtime::IInspectable> for &'a PeriodicForceEffect { into_param(self) -> ::windows::runtime::Param<'a, ::windows::runtime::IInspectable>912 fn into_param(self) -> ::windows::runtime::Param<'a, ::windows::runtime::IInspectable> { 913 ::windows::runtime::Param::Borrowed(&self.0) 914 } 915 } 916 impl ::std::convert::From<PeriodicForceEffect> for IForceFeedbackEffect { from(value: PeriodicForceEffect) -> Self917 fn from(value: PeriodicForceEffect) -> Self { 918 unsafe { ::std::mem::transmute(value) } 919 } 920 } 921 impl ::std::convert::From<&PeriodicForceEffect> for IForceFeedbackEffect { from(value: &PeriodicForceEffect) -> Self922 fn from(value: &PeriodicForceEffect) -> Self { 923 ::std::convert::From::from(::std::clone::Clone::clone(value)) 924 } 925 } 926 impl<'a> ::windows::runtime::IntoParam<'a, IForceFeedbackEffect> for PeriodicForceEffect { into_param(self) -> ::windows::runtime::Param<'a, IForceFeedbackEffect>927 fn into_param(self) -> ::windows::runtime::Param<'a, IForceFeedbackEffect> { 928 ::windows::runtime::Param::Owned(::std::convert::Into::<IForceFeedbackEffect>::into(self)) 929 } 930 } 931 impl<'a> ::windows::runtime::IntoParam<'a, IForceFeedbackEffect> for &PeriodicForceEffect { into_param(self) -> ::windows::runtime::Param<'a, IForceFeedbackEffect>932 fn into_param(self) -> ::windows::runtime::Param<'a, IForceFeedbackEffect> { 933 ::windows::runtime::Param::Owned(::std::convert::Into::<IForceFeedbackEffect>::into(::std::clone::Clone::clone(self))) 934 } 935 } 936 unsafe impl ::std::marker::Send for PeriodicForceEffect {} 937 unsafe impl ::std::marker::Sync for PeriodicForceEffect {} 938 #[derive(:: std :: cmp :: PartialEq, :: std :: cmp :: Eq, :: std :: marker :: Copy, :: std :: clone :: Clone, :: std :: default :: Default, :: std :: fmt :: Debug)] 939 #[repr(transparent)] 940 pub struct PeriodicForceEffectKind(pub i32); 941 impl PeriodicForceEffectKind { 942 pub const SquareWave: PeriodicForceEffectKind = PeriodicForceEffectKind(0i32); 943 pub const SineWave: PeriodicForceEffectKind = PeriodicForceEffectKind(1i32); 944 pub const TriangleWave: PeriodicForceEffectKind = PeriodicForceEffectKind(2i32); 945 pub const SawtoothWaveUp: PeriodicForceEffectKind = PeriodicForceEffectKind(3i32); 946 pub const SawtoothWaveDown: PeriodicForceEffectKind = PeriodicForceEffectKind(4i32); 947 } 948 impl ::std::convert::From<i32> for PeriodicForceEffectKind { from(value: i32) -> Self949 fn from(value: i32) -> Self { 950 Self(value) 951 } 952 } 953 unsafe impl ::windows::runtime::Abi for PeriodicForceEffectKind { 954 type Abi = Self; 955 type DefaultType = Self; 956 } 957 unsafe impl ::windows::runtime::RuntimeType for PeriodicForceEffectKind { 958 const SIGNATURE: ::windows::runtime::ConstBuffer = ::windows::runtime::ConstBuffer::from_slice(b"enum(Windows.Gaming.Input.ForceFeedback.PeriodicForceEffectKind;i4)"); 959 } 960 #[repr(transparent)] 961 #[derive(:: std :: cmp :: PartialEq, :: std :: cmp :: Eq, :: std :: clone :: Clone, :: std :: fmt :: Debug)] 962 pub struct RampForceEffect(::windows::runtime::IInspectable); 963 impl RampForceEffect { new() -> ::windows::runtime::Result<Self>964 pub fn new() -> ::windows::runtime::Result<Self> { 965 Self::IActivationFactory(|f| f.activate_instance::<Self>()) 966 } IActivationFactory<R, F: FnOnce(&::windows::runtime::IActivationFactory) -> ::windows::runtime::Result<R>>(callback: F) -> ::windows::runtime::Result<R>967 fn IActivationFactory<R, F: FnOnce(&::windows::runtime::IActivationFactory) -> ::windows::runtime::Result<R>>(callback: F) -> ::windows::runtime::Result<R> { 968 static mut SHARED: ::windows::runtime::FactoryCache<RampForceEffect, ::windows::runtime::IActivationFactory> = ::windows::runtime::FactoryCache::new(); 969 unsafe { SHARED.call(callback) } 970 } Gain(&self) -> ::windows::runtime::Result<f64>971 pub fn Gain(&self) -> ::windows::runtime::Result<f64> { 972 let this = self; 973 unsafe { 974 let mut result__: f64 = ::std::mem::zeroed(); 975 (::windows::runtime::Interface::vtable(this).6)(::std::mem::transmute_copy(this), &mut result__).from_abi::<f64>(result__) 976 } 977 } SetGain(&self, value: f64) -> ::windows::runtime::Result<()>978 pub fn SetGain(&self, value: f64) -> ::windows::runtime::Result<()> { 979 let this = self; 980 unsafe { (::windows::runtime::Interface::vtable(this).7)(::std::mem::transmute_copy(this), value).ok() } 981 } State(&self) -> ::windows::runtime::Result<ForceFeedbackEffectState>982 pub fn State(&self) -> ::windows::runtime::Result<ForceFeedbackEffectState> { 983 let this = self; 984 unsafe { 985 let mut result__: ForceFeedbackEffectState = ::std::mem::zeroed(); 986 (::windows::runtime::Interface::vtable(this).8)(::std::mem::transmute_copy(this), &mut result__).from_abi::<ForceFeedbackEffectState>(result__) 987 } 988 } Start(&self) -> ::windows::runtime::Result<()>989 pub fn Start(&self) -> ::windows::runtime::Result<()> { 990 let this = self; 991 unsafe { (::windows::runtime::Interface::vtable(this).9)(::std::mem::transmute_copy(this)).ok() } 992 } Stop(&self) -> ::windows::runtime::Result<()>993 pub fn Stop(&self) -> ::windows::runtime::Result<()> { 994 let this = self; 995 unsafe { (::windows::runtime::Interface::vtable(this).10)(::std::mem::transmute_copy(this)).ok() } 996 } 997 #[cfg(all(feature = "Foundation", feature = "Foundation_Numerics"))] SetParameters<'a, Param0: ::windows::runtime::IntoParam<'a, super::super::super::Foundation::Numerics::Vector3>, Param1: ::windows::runtime::IntoParam<'a, super::super::super::Foundation::Numerics::Vector3>, Param2: ::windows::runtime::IntoParam<'a, super::super::super::Foundation::TimeSpan>>(&self, startvector: Param0, endvector: Param1, duration: Param2) -> ::windows::runtime::Result<()>998 pub fn SetParameters<'a, Param0: ::windows::runtime::IntoParam<'a, super::super::super::Foundation::Numerics::Vector3>, Param1: ::windows::runtime::IntoParam<'a, super::super::super::Foundation::Numerics::Vector3>, Param2: ::windows::runtime::IntoParam<'a, super::super::super::Foundation::TimeSpan>>(&self, startvector: Param0, endvector: Param1, duration: Param2) -> ::windows::runtime::Result<()> { 999 let this = &::windows::runtime::Interface::cast::<IRampForceEffect>(self)?; 1000 unsafe { (::windows::runtime::Interface::vtable(this).6)(::std::mem::transmute_copy(this), startvector.into_param().abi(), endvector.into_param().abi(), duration.into_param().abi()).ok() } 1001 } 1002 #[cfg(all(feature = "Foundation", feature = "Foundation_Numerics"))] SetParametersWithEnvelope< 'a, Param0: ::windows::runtime::IntoParam<'a, super::super::super::Foundation::Numerics::Vector3>, Param1: ::windows::runtime::IntoParam<'a, super::super::super::Foundation::Numerics::Vector3>, Param5: ::windows::runtime::IntoParam<'a, super::super::super::Foundation::TimeSpan>, Param6: ::windows::runtime::IntoParam<'a, super::super::super::Foundation::TimeSpan>, Param7: ::windows::runtime::IntoParam<'a, super::super::super::Foundation::TimeSpan>, Param8: ::windows::runtime::IntoParam<'a, super::super::super::Foundation::TimeSpan>, >( &self, startvector: Param0, endvector: Param1, attackgain: f32, sustaingain: f32, releasegain: f32, startdelay: Param5, attackduration: Param6, sustainduration: Param7, releaseduration: Param8, repeatcount: u32, ) -> ::windows::runtime::Result<()>1003 pub fn SetParametersWithEnvelope< 1004 'a, 1005 Param0: ::windows::runtime::IntoParam<'a, super::super::super::Foundation::Numerics::Vector3>, 1006 Param1: ::windows::runtime::IntoParam<'a, super::super::super::Foundation::Numerics::Vector3>, 1007 Param5: ::windows::runtime::IntoParam<'a, super::super::super::Foundation::TimeSpan>, 1008 Param6: ::windows::runtime::IntoParam<'a, super::super::super::Foundation::TimeSpan>, 1009 Param7: ::windows::runtime::IntoParam<'a, super::super::super::Foundation::TimeSpan>, 1010 Param8: ::windows::runtime::IntoParam<'a, super::super::super::Foundation::TimeSpan>, 1011 >( 1012 &self, 1013 startvector: Param0, 1014 endvector: Param1, 1015 attackgain: f32, 1016 sustaingain: f32, 1017 releasegain: f32, 1018 startdelay: Param5, 1019 attackduration: Param6, 1020 sustainduration: Param7, 1021 releaseduration: Param8, 1022 repeatcount: u32, 1023 ) -> ::windows::runtime::Result<()> { 1024 let this = &::windows::runtime::Interface::cast::<IRampForceEffect>(self)?; 1025 unsafe { (::windows::runtime::Interface::vtable(this).7)(::std::mem::transmute_copy(this), startvector.into_param().abi(), endvector.into_param().abi(), attackgain, sustaingain, releasegain, startdelay.into_param().abi(), attackduration.into_param().abi(), sustainduration.into_param().abi(), releaseduration.into_param().abi(), repeatcount).ok() } 1026 } 1027 } 1028 unsafe impl ::windows::runtime::RuntimeType for RampForceEffect { 1029 const SIGNATURE: ::windows::runtime::ConstBuffer = ::windows::runtime::ConstBuffer::from_slice(b"rc(Windows.Gaming.Input.ForceFeedback.RampForceEffect;{a17fba0c-2ae4-48c2-8063-eabd0777cb89})"); 1030 } 1031 unsafe impl ::windows::runtime::Interface for RampForceEffect { 1032 type Vtable = IForceFeedbackEffect_abi; 1033 const IID: ::windows::runtime::GUID = ::windows::runtime::GUID::from_values(2709502476, 10980, 18626, [128, 99, 234, 189, 7, 119, 203, 137]); 1034 } 1035 impl ::windows::runtime::RuntimeName for RampForceEffect { 1036 const NAME: &'static str = "Windows.Gaming.Input.ForceFeedback.RampForceEffect"; 1037 } 1038 impl ::std::convert::From<RampForceEffect> for ::windows::runtime::IUnknown { from(value: RampForceEffect) -> Self1039 fn from(value: RampForceEffect) -> Self { 1040 unsafe { ::std::mem::transmute(value) } 1041 } 1042 } 1043 impl ::std::convert::From<&RampForceEffect> for ::windows::runtime::IUnknown { from(value: &RampForceEffect) -> Self1044 fn from(value: &RampForceEffect) -> Self { 1045 ::std::convert::From::from(::std::clone::Clone::clone(value)) 1046 } 1047 } 1048 impl<'a> ::windows::runtime::IntoParam<'a, ::windows::runtime::IUnknown> for RampForceEffect { into_param(self) -> ::windows::runtime::Param<'a, ::windows::runtime::IUnknown>1049 fn into_param(self) -> ::windows::runtime::Param<'a, ::windows::runtime::IUnknown> { 1050 ::windows::runtime::Param::Owned(::std::convert::Into::<::windows::runtime::IUnknown>::into(self)) 1051 } 1052 } 1053 impl<'a> ::windows::runtime::IntoParam<'a, ::windows::runtime::IUnknown> for &RampForceEffect { into_param(self) -> ::windows::runtime::Param<'a, ::windows::runtime::IUnknown>1054 fn into_param(self) -> ::windows::runtime::Param<'a, ::windows::runtime::IUnknown> { 1055 ::windows::runtime::Param::Owned(::std::convert::Into::<::windows::runtime::IUnknown>::into(::std::clone::Clone::clone(self))) 1056 } 1057 } 1058 impl ::std::convert::From<RampForceEffect> for ::windows::runtime::IInspectable { from(value: RampForceEffect) -> Self1059 fn from(value: RampForceEffect) -> Self { 1060 value.0 1061 } 1062 } 1063 impl ::std::convert::From<&RampForceEffect> for ::windows::runtime::IInspectable { from(value: &RampForceEffect) -> Self1064 fn from(value: &RampForceEffect) -> Self { 1065 value.0.clone() 1066 } 1067 } 1068 impl<'a> ::windows::runtime::IntoParam<'a, ::windows::runtime::IInspectable> for RampForceEffect { into_param(self) -> ::windows::runtime::Param<'a, ::windows::runtime::IInspectable>1069 fn into_param(self) -> ::windows::runtime::Param<'a, ::windows::runtime::IInspectable> { 1070 ::windows::runtime::Param::Owned(self.0) 1071 } 1072 } 1073 impl<'a> ::windows::runtime::IntoParam<'a, ::windows::runtime::IInspectable> for &'a RampForceEffect { into_param(self) -> ::windows::runtime::Param<'a, ::windows::runtime::IInspectable>1074 fn into_param(self) -> ::windows::runtime::Param<'a, ::windows::runtime::IInspectable> { 1075 ::windows::runtime::Param::Borrowed(&self.0) 1076 } 1077 } 1078 impl ::std::convert::From<RampForceEffect> for IForceFeedbackEffect { from(value: RampForceEffect) -> Self1079 fn from(value: RampForceEffect) -> Self { 1080 unsafe { ::std::mem::transmute(value) } 1081 } 1082 } 1083 impl ::std::convert::From<&RampForceEffect> for IForceFeedbackEffect { from(value: &RampForceEffect) -> Self1084 fn from(value: &RampForceEffect) -> Self { 1085 ::std::convert::From::from(::std::clone::Clone::clone(value)) 1086 } 1087 } 1088 impl<'a> ::windows::runtime::IntoParam<'a, IForceFeedbackEffect> for RampForceEffect { into_param(self) -> ::windows::runtime::Param<'a, IForceFeedbackEffect>1089 fn into_param(self) -> ::windows::runtime::Param<'a, IForceFeedbackEffect> { 1090 ::windows::runtime::Param::Owned(::std::convert::Into::<IForceFeedbackEffect>::into(self)) 1091 } 1092 } 1093 impl<'a> ::windows::runtime::IntoParam<'a, IForceFeedbackEffect> for &RampForceEffect { into_param(self) -> ::windows::runtime::Param<'a, IForceFeedbackEffect>1094 fn into_param(self) -> ::windows::runtime::Param<'a, IForceFeedbackEffect> { 1095 ::windows::runtime::Param::Owned(::std::convert::Into::<IForceFeedbackEffect>::into(::std::clone::Clone::clone(self))) 1096 } 1097 } 1098 unsafe impl ::std::marker::Send for RampForceEffect {} 1099 unsafe impl ::std::marker::Sync for RampForceEffect {} 1100