#![allow(
unused_variables,
non_upper_case_globals,
non_snake_case,
unused_unsafe,
non_camel_case_types,
dead_code,
clippy::all
)]
pub mod Input {
pub mod Custom {
pub struct GameControllerFactoryManager {}
impl GameControllerFactoryManager {
pub fn RegisterCustomFactoryForGipInterface<
'a,
Param0: ::windows::IntoParam<'a, ICustomGameControllerFactory>,
Param1: ::windows::IntoParam<'a, ::windows::Guid>,
>(
factory: Param0,
interfaceid: Param1,
) -> ::windows::Result<()> {
Self::IGameControllerFactoryManagerStatics(|this| unsafe {
(::windows::Interface::vtable(this).6)(
::std::mem::transmute_copy(this),
factory.into_param().abi(),
interfaceid.into_param().abi(),
)
.ok()
})
}
pub fn RegisterCustomFactoryForHardwareId<
'a,
Param0: ::windows::IntoParam<'a, ICustomGameControllerFactory>,
>(
factory: Param0,
hardwarevendorid: u16,
hardwareproductid: u16,
) -> ::windows::Result<()> {
Self::IGameControllerFactoryManagerStatics(|this| unsafe {
(::windows::Interface::vtable(this).7)(
::std::mem::transmute_copy(this),
factory.into_param().abi(),
hardwarevendorid,
hardwareproductid,
)
.ok()
})
}
pub fn RegisterCustomFactoryForXusbType<
'a,
Param0: ::windows::IntoParam<'a, ICustomGameControllerFactory>,
>(
factory: Param0,
xusbtype: XusbDeviceType,
xusbsubtype: XusbDeviceSubtype,
) -> ::windows::Result<()> {
Self::IGameControllerFactoryManagerStatics(|this| unsafe {
(::windows::Interface::vtable(this).8)(
::std::mem::transmute_copy(this),
factory.into_param().abi(),
xusbtype,
xusbsubtype,
)
.ok()
})
}
pub fn TryGetFactoryControllerFromGameController<
'a,
Param0: ::windows::IntoParam<'a, ICustomGameControllerFactory>,
Param1: ::windows::IntoParam<'a, super::IGameController>,
>(
factory: Param0,
gamecontroller: Param1,
) -> ::windows::Result<super::IGameController> {
Self::IGameControllerFactoryManagerStatics2(|this| unsafe {
let mut result__: ::windows::RawPtr = ::std::mem::zeroed();
(::windows::Interface::vtable(this).6)(
::std::mem::transmute_copy(this),
factory.into_param().abi(),
gamecontroller.into_param().abi(),
&mut result__,
)
.from_abi::<super::IGameController>(result__)
})
}
pub fn IGameControllerFactoryManagerStatics<
R,
F: FnOnce(&IGameControllerFactoryManagerStatics) -> ::windows::Result<R>,
>(
callback: F,
) -> ::windows::Result<R> {
static mut SHARED: ::windows::FactoryCache<
GameControllerFactoryManager,
IGameControllerFactoryManagerStatics,
> = ::windows::FactoryCache::new();
unsafe { SHARED.call(callback) }
}
pub fn IGameControllerFactoryManagerStatics2<
R,
F: FnOnce(&IGameControllerFactoryManagerStatics2) -> ::windows::Result<R>,
>(
callback: F,
) -> ::windows::Result<R> {
static mut SHARED: ::windows::FactoryCache<
GameControllerFactoryManager,
IGameControllerFactoryManagerStatics2,
> = ::windows::FactoryCache::new();
unsafe { SHARED.call(callback) }
}
}
impl ::windows::RuntimeName for GameControllerFactoryManager {
const NAME: &'static str = "Windows.Gaming.Input.Custom.GameControllerFactoryManager";
}
#[derive(:: std :: clone :: Clone, :: std :: marker :: Copy)]
#[repr(C)]
pub struct GameControllerVersionInfo {
pub Major: u16,
pub Minor: u16,
pub Build: u16,
pub Revision: u16,
}
impl GameControllerVersionInfo {}
impl ::std::default::Default for GameControllerVersionInfo {
fn default() -> Self {
unsafe { ::std::mem::zeroed() }
}
}
impl ::std::fmt::Debug for GameControllerVersionInfo {
fn fmt(&self, fmt: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
fmt.debug_struct("GameControllerVersionInfo")
.field("Major", &self.Major)
.field("Minor", &self.Minor)
.field("Build", &self.Build)
.field("Revision", &self.Revision)
.finish()
}
}
impl ::std::cmp::PartialEq for GameControllerVersionInfo {
fn eq(&self, other: &Self) -> bool {
self.Major == other.Major
&& self.Minor == other.Minor
&& self.Build == other.Build
&& self.Revision == other.Revision
}
}
impl ::std::cmp::Eq for GameControllerVersionInfo {}
unsafe impl ::windows::Abi for GameControllerVersionInfo {
type Abi = Self;
type DefaultType = Self;
}
unsafe impl ::windows::RuntimeType for GameControllerVersionInfo {
const SIGNATURE: ::windows::ConstBuffer = ::windows::ConstBuffer::from_slice(
b"struct(Windows.Gaming.Input.Custom.GameControllerVersionInfo;u2;u2;u2;u2)",
);
}
#[derive(:: std :: clone :: Clone, :: std :: marker :: Copy)]
#[repr(C)]
pub struct GipFirmwareUpdateProgress {
pub PercentCompleted: f64,
pub CurrentComponentId: u32,
}
impl GipFirmwareUpdateProgress {}
impl ::std::default::Default for GipFirmwareUpdateProgress {
fn default() -> Self {
unsafe { ::std::mem::zeroed() }
}
}
impl ::std::fmt::Debug for GipFirmwareUpdateProgress {
fn fmt(&self, fmt: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
fmt.debug_struct("GipFirmwareUpdateProgress")
.field("PercentCompleted", &self.PercentCompleted)
.field("CurrentComponentId", &self.CurrentComponentId)
.finish()
}
}
impl ::std::cmp::PartialEq for GipFirmwareUpdateProgress {
fn eq(&self, other: &Self) -> bool {
self.PercentCompleted == other.PercentCompleted
&& self.CurrentComponentId == other.CurrentComponentId
}
}
impl ::std::cmp::Eq for GipFirmwareUpdateProgress {}
unsafe impl ::windows::Abi for GipFirmwareUpdateProgress {
type Abi = Self;
type DefaultType = Self;
}
unsafe impl ::windows::RuntimeType for GipFirmwareUpdateProgress {
const SIGNATURE: ::windows::ConstBuffer = ::windows::ConstBuffer::from_slice(
b"struct(Windows.Gaming.Input.Custom.GipFirmwareUpdateProgress;f8;u4)",
);
}
#[repr(transparent)]
#[derive(
:: std :: cmp :: PartialEq,
:: std :: cmp :: Eq,
:: std :: clone :: Clone,
:: std :: fmt :: Debug,
)]
pub struct GipFirmwareUpdateResult(::windows::IInspectable);
impl GipFirmwareUpdateResult {
pub fn ExtendedErrorCode(&self) -> ::windows::Result<u32> {
let this = self;
unsafe {
let mut result__: u32 = ::std::mem::zeroed();
(::windows::Interface::vtable(this).6)(
::std::mem::transmute_copy(this),
&mut result__,
)
.from_abi::<u32>(result__)
}
}
pub fn FinalComponentId(&self) -> ::windows::Result<u32> {
let this = self;
unsafe {
let mut result__: u32 = ::std::mem::zeroed();
(::windows::Interface::vtable(this).7)(
::std::mem::transmute_copy(this),
&mut result__,
)
.from_abi::<u32>(result__)
}
}
pub fn Status(&self) -> ::windows::Result<GipFirmwareUpdateStatus> {
let this = self;
unsafe {
let mut result__: GipFirmwareUpdateStatus = ::std::mem::zeroed();
(::windows::Interface::vtable(this).8)(
::std::mem::transmute_copy(this),
&mut result__,
)
.from_abi::<GipFirmwareUpdateStatus>(result__)
}
}
}
unsafe impl ::windows::RuntimeType for GipFirmwareUpdateResult {
const SIGNATURE : :: windows :: ConstBuffer = :: windows :: ConstBuffer :: from_slice ( b"rc(Windows.Gaming.Input.Custom.GipFirmwareUpdateResult;{6b794d32-8553-4292-8e03-e16651a2f8bc})" ) ;
}
unsafe impl ::windows::Interface for GipFirmwareUpdateResult {
type Vtable = IGipFirmwareUpdateResult_abi;
const IID: ::windows::Guid = ::windows::Guid::from_values(
1803111730,
34131,
17042,
[142, 3, 225, 102, 81, 162, 248, 188],
);
}
impl ::windows::RuntimeName for GipFirmwareUpdateResult {
const NAME: &'static str = "Windows.Gaming.Input.Custom.GipFirmwareUpdateResult";
}
impl ::std::convert::From<GipFirmwareUpdateResult> for ::windows::IUnknown {
fn from(value: GipFirmwareUpdateResult) -> Self {
unsafe { ::std::mem::transmute(value) }
}
}
impl ::std::convert::From<&GipFirmwareUpdateResult> for ::windows::IUnknown {
fn from(value: &GipFirmwareUpdateResult) -> Self {
::std::convert::From::from(::std::clone::Clone::clone(value))
}
}
impl<'a> ::windows::IntoParam<'a, ::windows::IUnknown> for GipFirmwareUpdateResult {
fn into_param(self) -> ::windows::Param<'a, ::windows::IUnknown> {
::windows::Param::Owned(::std::convert::Into::<::windows::IUnknown>::into(self))
}
}
impl<'a> ::windows::IntoParam<'a, ::windows::IUnknown> for &GipFirmwareUpdateResult {
fn into_param(self) -> ::windows::Param<'a, ::windows::IUnknown> {
::windows::Param::Owned(::std::convert::Into::<::windows::IUnknown>::into(
::std::clone::Clone::clone(self),
))
}
}
impl ::std::convert::From<GipFirmwareUpdateResult> for ::windows::IInspectable {
fn from(value: GipFirmwareUpdateResult) -> Self {
value.0
}
}
impl ::std::convert::From<&GipFirmwareUpdateResult> for ::windows::IInspectable {
fn from(value: &GipFirmwareUpdateResult) -> Self {
value.0.clone()
}
}
impl<'a> ::windows::IntoParam<'a, ::windows::IInspectable> for GipFirmwareUpdateResult {
fn into_param(self) -> ::windows::Param<'a, ::windows::IInspectable> {
::windows::Param::Owned(self.0)
}
}
impl<'a> ::windows::IntoParam<'a, ::windows::IInspectable> for &'a GipFirmwareUpdateResult {
fn into_param(self) -> ::windows::Param<'a, ::windows::IInspectable> {
::windows::Param::Borrowed(&self.0)
}
}
unsafe impl ::std::marker::Send for GipFirmwareUpdateResult {}
unsafe impl ::std::marker::Sync for GipFirmwareUpdateResult {}
#[derive(
:: std :: cmp :: PartialEq,
:: std :: cmp :: Eq,
:: std :: marker :: Copy,
:: std :: clone :: Clone,
:: std :: default :: Default,
:: std :: fmt :: Debug,
)]
#[repr(transparent)]
pub struct GipFirmwareUpdateStatus(pub i32);
impl GipFirmwareUpdateStatus {
pub const Completed: GipFirmwareUpdateStatus = GipFirmwareUpdateStatus(0i32);
pub const UpToDate: GipFirmwareUpdateStatus = GipFirmwareUpdateStatus(1i32);
pub const Failed: GipFirmwareUpdateStatus = GipFirmwareUpdateStatus(2i32);
}
impl ::std::convert::From<i32> for GipFirmwareUpdateStatus {
fn from(value: i32) -> Self {
Self(value)
}
}
unsafe impl ::windows::Abi for GipFirmwareUpdateStatus {
type Abi = Self;
type DefaultType = Self;
}
unsafe impl ::windows::RuntimeType for GipFirmwareUpdateStatus {
const SIGNATURE: ::windows::ConstBuffer = ::windows::ConstBuffer::from_slice(
b"enum(Windows.Gaming.Input.Custom.GipFirmwareUpdateStatus;i4)",
);
}
#[repr(transparent)]
#[derive(
:: std :: cmp :: PartialEq,
:: std :: cmp :: Eq,
:: std :: clone :: Clone,
:: std :: fmt :: Debug,
)]
pub struct GipGameControllerProvider(::windows::IInspectable);
impl GipGameControllerProvider {
pub fn SendMessage(
&self,
messageclass: GipMessageClass,
messageid: u8,
messagebuffer: &[<u8 as ::windows::Abi>::DefaultType],
) -> ::windows::Result<()> {
let this = self;
unsafe {
(::windows::Interface::vtable(this).6)(
::std::mem::transmute_copy(this),
messageclass,
messageid,
messagebuffer.len() as u32,
::std::mem::transmute(messagebuffer.as_ptr()),
)
.ok()
}
}
pub fn SendReceiveMessage(
&self,
messageclass: GipMessageClass,
messageid: u8,
requestmessagebuffer: &[<u8 as ::windows::Abi>::DefaultType],
responsemessagebuffer: &mut [<u8 as ::windows::Abi>::DefaultType],
) -> ::windows::Result<()> {
let this = self;
unsafe {
(::windows::Interface::vtable(this).7)(
::std::mem::transmute_copy(this),
messageclass,
messageid,
requestmessagebuffer.len() as u32,
::std::mem::transmute(requestmessagebuffer.as_ptr()),
responsemessagebuffer.len() as u32,
::std::mem::transmute_copy(&responsemessagebuffer),
)
.ok()
}
}
pub fn UpdateFirmwareAsync<
'a,
Param0: ::windows::IntoParam<'a, ::windows_storage::Streams::IInputStream>,
>(
&self,
firmwareimage: Param0,
) -> ::windows::Result<
::windows_foundation::IAsyncOperationWithProgress<
GipFirmwareUpdateResult,
GipFirmwareUpdateProgress,
>,
> {
let this = self;
unsafe {
let mut result__: ::windows::RawPtr = ::std::mem::zeroed();
(::windows::Interface::vtable(this).8)(
::std::mem::transmute_copy(this),
firmwareimage.into_param().abi(),
&mut result__,
)
.from_abi::<::windows_foundation::IAsyncOperationWithProgress<
GipFirmwareUpdateResult,
GipFirmwareUpdateProgress,
>>(result__)
}
}
pub fn FirmwareVersionInfo(&self) -> ::windows::Result<GameControllerVersionInfo> {
let this = &::windows::Interface::cast::<IGameControllerProvider>(self)?;
unsafe {
let mut result__: GameControllerVersionInfo = ::std::mem::zeroed();
(::windows::Interface::vtable(this).6)(
::std::mem::transmute_copy(this),
&mut result__,
)
.from_abi::<GameControllerVersionInfo>(result__)
}
}
pub fn HardwareProductId(&self) -> ::windows::Result<u16> {
let this = &::windows::Interface::cast::<IGameControllerProvider>(self)?;
unsafe {
let mut result__: u16 = ::std::mem::zeroed();
(::windows::Interface::vtable(this).7)(
::std::mem::transmute_copy(this),
&mut result__,
)
.from_abi::<u16>(result__)
}
}
pub fn HardwareVendorId(&self) -> ::windows::Result<u16> {
let this = &::windows::Interface::cast::<IGameControllerProvider>(self)?;
unsafe {
let mut result__: u16 = ::std::mem::zeroed();
(::windows::Interface::vtable(this).8)(
::std::mem::transmute_copy(this),
&mut result__,
)
.from_abi::<u16>(result__)
}
}
pub fn HardwareVersionInfo(&self) -> ::windows::Result<GameControllerVersionInfo> {
let this = &::windows::Interface::cast::<IGameControllerProvider>(self)?;
unsafe {
let mut result__: GameControllerVersionInfo = ::std::mem::zeroed();
(::windows::Interface::vtable(this).9)(
::std::mem::transmute_copy(this),
&mut result__,
)
.from_abi::<GameControllerVersionInfo>(result__)
}
}
pub fn IsConnected(&self) -> ::windows::Result<bool> {
let this = &::windows::Interface::cast::<IGameControllerProvider>(self)?;
unsafe {
let mut result__: bool = ::std::mem::zeroed();
(::windows::Interface::vtable(this).10)(
::std::mem::transmute_copy(this),
&mut result__,
)
.from_abi::<bool>(result__)
}
}
}
unsafe impl ::windows::RuntimeType for GipGameControllerProvider {
const SIGNATURE : :: windows :: ConstBuffer = :: windows :: ConstBuffer :: from_slice ( b"rc(Windows.Gaming.Input.Custom.GipGameControllerProvider;{dbcf1e19-1af5-45a8-bf02-a0ee50c823fc})" ) ;
}
unsafe impl ::windows::Interface for GipGameControllerProvider {
type Vtable = IGipGameControllerProvider_abi;
const IID: ::windows::Guid = ::windows::Guid::from_values(
3687783961,
6901,
17832,
[191, 2, 160, 238, 80, 200, 35, 252],
);
}
impl ::windows::RuntimeName for GipGameControllerProvider {
const NAME: &'static str = "Windows.Gaming.Input.Custom.GipGameControllerProvider";
}
impl ::std::convert::From<GipGameControllerProvider> for ::windows::IUnknown {
fn from(value: GipGameControllerProvider) -> Self {
unsafe { ::std::mem::transmute(value) }
}
}
impl ::std::convert::From<&GipGameControllerProvider> for ::windows::IUnknown {
fn from(value: &GipGameControllerProvider) -> Self {
::std::convert::From::from(::std::clone::Clone::clone(value))
}
}
impl<'a> ::windows::IntoParam<'a, ::windows::IUnknown> for GipGameControllerProvider {
fn into_param(self) -> ::windows::Param<'a, ::windows::IUnknown> {
::windows::Param::Owned(::std::convert::Into::<::windows::IUnknown>::into(self))
}
}
impl<'a> ::windows::IntoParam<'a, ::windows::IUnknown> for &GipGameControllerProvider {
fn into_param(self) -> ::windows::Param<'a, ::windows::IUnknown> {
::windows::Param::Owned(::std::convert::Into::<::windows::IUnknown>::into(
::std::clone::Clone::clone(self),
))
}
}
impl ::std::convert::From<GipGameControllerProvider> for ::windows::IInspectable {
fn from(value: GipGameControllerProvider) -> Self {
value.0
}
}
impl ::std::convert::From<&GipGameControllerProvider> for ::windows::IInspectable {
fn from(value: &GipGameControllerProvider) -> Self {
value.0.clone()
}
}
impl<'a> ::windows::IntoParam<'a, ::windows::IInspectable> for GipGameControllerProvider {
fn into_param(self) -> ::windows::Param<'a, ::windows::IInspectable> {
::windows::Param::Owned(self.0)
}
}
impl<'a> ::windows::IntoParam<'a, ::windows::IInspectable> for &'a GipGameControllerProvider {
fn into_param(self) -> ::windows::Param<'a, ::windows::IInspectable> {
::windows::Param::Borrowed(&self.0)
}
}
impl ::std::convert::TryFrom<GipGameControllerProvider> for IGameControllerProvider {
type Error = ::windows::Error;
fn try_from(value: GipGameControllerProvider) -> ::windows::Result<Self> {
::std::convert::TryFrom::try_from(&value)
}
}
impl ::std::convert::TryFrom<&GipGameControllerProvider> for IGameControllerProvider {
type Error = ::windows::Error;
fn try_from(value: &GipGameControllerProvider) -> ::windows::Result<Self> {
::windows::Interface::cast(value)
}
}
impl<'a> ::windows::IntoParam<'a, IGameControllerProvider> for GipGameControllerProvider {
fn into_param(self) -> ::windows::Param<'a, IGameControllerProvider> {
::windows::IntoParam::into_param(&self)
}
}
impl<'a> ::windows::IntoParam<'a, IGameControllerProvider> for &GipGameControllerProvider {
fn into_param(self) -> ::windows::Param<'a, IGameControllerProvider> {
::std::convert::TryInto::<IGameControllerProvider>::try_into(self)
.map(::windows::Param::Owned)
.unwrap_or(::windows::Param::None)
}
}
unsafe impl ::std::marker::Send for GipGameControllerProvider {}
unsafe impl ::std::marker::Sync for GipGameControllerProvider {}
#[derive(
:: std :: cmp :: PartialEq,
:: std :: cmp :: Eq,
:: std :: marker :: Copy,
:: std :: clone :: Clone,
:: std :: default :: Default,
:: std :: fmt :: Debug,
)]
#[repr(transparent)]
pub struct GipMessageClass(pub i32);
impl GipMessageClass {
pub const Command: GipMessageClass = GipMessageClass(0i32);
pub const LowLatency: GipMessageClass = GipMessageClass(1i32);
pub const StandardLatency: GipMessageClass = GipMessageClass(2i32);
}
impl ::std::convert::From<i32> for GipMessageClass {
fn from(value: i32) -> Self {
Self(value)
}
}
unsafe impl ::windows::Abi for GipMessageClass {
type Abi = Self;
type DefaultType = Self;
}
unsafe impl ::windows::RuntimeType for GipMessageClass {
const SIGNATURE: ::windows::ConstBuffer = ::windows::ConstBuffer::from_slice(
b"enum(Windows.Gaming.Input.Custom.GipMessageClass;i4)",
);
}
#[repr(transparent)]
#[derive(
:: std :: cmp :: PartialEq,
:: std :: cmp :: Eq,
:: std :: clone :: Clone,
:: std :: fmt :: Debug,
)]
pub struct HidGameControllerProvider(::windows::IInspectable);
impl HidGameControllerProvider {
pub fn FirmwareVersionInfo(&self) -> ::windows::Result<GameControllerVersionInfo> {
let this = &::windows::Interface::cast::<IGameControllerProvider>(self)?;
unsafe {
let mut result__: GameControllerVersionInfo = ::std::mem::zeroed();
(::windows::Interface::vtable(this).6)(
::std::mem::transmute_copy(this),
&mut result__,
)
.from_abi::<GameControllerVersionInfo>(result__)
}
}
pub fn HardwareProductId(&self) -> ::windows::Result<u16> {
let this = &::windows::Interface::cast::<IGameControllerProvider>(self)?;
unsafe {
let mut result__: u16 = ::std::mem::zeroed();
(::windows::Interface::vtable(this).7)(
::std::mem::transmute_copy(this),
&mut result__,
)
.from_abi::<u16>(result__)
}
}
pub fn HardwareVendorId(&self) -> ::windows::Result<u16> {
let this = &::windows::Interface::cast::<IGameControllerProvider>(self)?;
unsafe {
let mut result__: u16 = ::std::mem::zeroed();
(::windows::Interface::vtable(this).8)(
::std::mem::transmute_copy(this),
&mut result__,
)
.from_abi::<u16>(result__)
}
}
pub fn HardwareVersionInfo(&self) -> ::windows::Result<GameControllerVersionInfo> {
let this = &::windows::Interface::cast::<IGameControllerProvider>(self)?;
unsafe {
let mut result__: GameControllerVersionInfo = ::std::mem::zeroed();
(::windows::Interface::vtable(this).9)(
::std::mem::transmute_copy(this),
&mut result__,
)
.from_abi::<GameControllerVersionInfo>(result__)
}
}
pub fn IsConnected(&self) -> ::windows::Result<bool> {
let this = &::windows::Interface::cast::<IGameControllerProvider>(self)?;
unsafe {
let mut result__: bool = ::std::mem::zeroed();
(::windows::Interface::vtable(this).10)(
::std::mem::transmute_copy(this),
&mut result__,
)
.from_abi::<bool>(result__)
}
}
pub fn UsageId(&self) -> ::windows::Result<u16> {
let this = self;
unsafe {
let mut result__: u16 = ::std::mem::zeroed();
(::windows::Interface::vtable(this).6)(
::std::mem::transmute_copy(this),
&mut result__,
)
.from_abi::<u16>(result__)
}
}
pub fn UsagePage(&self) -> ::windows::Result<u16> {
let this = self;
unsafe {
let mut result__: u16 = ::std::mem::zeroed();
(::windows::Interface::vtable(this).7)(
::std::mem::transmute_copy(this),
&mut result__,
)
.from_abi::<u16>(result__)
}
}
pub fn GetFeatureReport(
&self,
reportid: u8,
reportbuffer: &mut [<u8 as ::windows::Abi>::DefaultType],
) -> ::windows::Result<()> {
let this = self;
unsafe {
(::windows::Interface::vtable(this).8)(
::std::mem::transmute_copy(this),
reportid,
reportbuffer.len() as u32,
::std::mem::transmute_copy(&reportbuffer),
)
.ok()
}
}
pub fn SendFeatureReport(
&self,
reportid: u8,
reportbuffer: &[<u8 as ::windows::Abi>::DefaultType],
) -> ::windows::Result<()> {
let this = self;
unsafe {
(::windows::Interface::vtable(this).9)(
::std::mem::transmute_copy(this),
reportid,
reportbuffer.len() as u32,
::std::mem::transmute(reportbuffer.as_ptr()),
)
.ok()
}
}
pub fn SendOutputReport(
&self,
reportid: u8,
reportbuffer: &[<u8 as ::windows::Abi>::DefaultType],
) -> ::windows::Result<()> {
let this = self;
unsafe {
(::windows::Interface::vtable(this).10)(
::std::mem::transmute_copy(this),
reportid,
reportbuffer.len() as u32,
::std::mem::transmute(reportbuffer.as_ptr()),
)
.ok()
}
}
}
unsafe impl ::windows::RuntimeType for HidGameControllerProvider {
const SIGNATURE : :: windows :: ConstBuffer = :: windows :: ConstBuffer :: from_slice ( b"rc(Windows.Gaming.Input.Custom.HidGameControllerProvider;{95ce3af4-abf0-4b68-a081-3b7de73ff0e7})" ) ;
}
unsafe impl ::windows::Interface for HidGameControllerProvider {
type Vtable = IHidGameControllerProvider_abi;
const IID: ::windows::Guid = ::windows::Guid::from_values(
2513320692,
44016,
19304,
[160, 129, 59, 125, 231, 63, 240, 231],
);
}
impl ::windows::RuntimeName for HidGameControllerProvider {
const NAME: &'static str = "Windows.Gaming.Input.Custom.HidGameControllerProvider";
}
impl ::std::convert::From<HidGameControllerProvider> for ::windows::IUnknown {
fn from(value: HidGameControllerProvider) -> Self {
unsafe { ::std::mem::transmute(value) }
}
}
impl ::std::convert::From<&HidGameControllerProvider> for ::windows::IUnknown {
fn from(value: &HidGameControllerProvider) -> Self {
::std::convert::From::from(::std::clone::Clone::clone(value))
}
}
impl<'a> ::windows::IntoParam<'a, ::windows::IUnknown> for HidGameControllerProvider {
fn into_param(self) -> ::windows::Param<'a, ::windows::IUnknown> {
::windows::Param::Owned(::std::convert::Into::<::windows::IUnknown>::into(self))
}
}
impl<'a> ::windows::IntoParam<'a, ::windows::IUnknown> for &HidGameControllerProvider {
fn into_param(self) -> ::windows::Param<'a, ::windows::IUnknown> {
::windows::Param::Owned(::std::convert::Into::<::windows::IUnknown>::into(
::std::clone::Clone::clone(self),
))
}
}
impl ::std::convert::From<HidGameControllerProvider> for ::windows::IInspectable {
fn from(value: HidGameControllerProvider) -> Self {
value.0
}
}
impl ::std::convert::From<&HidGameControllerProvider> for ::windows::IInspectable {
fn from(value: &HidGameControllerProvider) -> Self {
value.0.clone()
}
}
impl<'a> ::windows::IntoParam<'a, ::windows::IInspectable> for HidGameControllerProvider {
fn into_param(self) -> ::windows::Param<'a, ::windows::IInspectable> {
::windows::Param::Owned(self.0)
}
}
impl<'a> ::windows::IntoParam<'a, ::windows::IInspectable> for &'a HidGameControllerProvider {
fn into_param(self) -> ::windows::Param<'a, ::windows::IInspectable> {
::windows::Param::Borrowed(&self.0)
}
}
impl ::std::convert::TryFrom<HidGameControllerProvider> for IGameControllerProvider {
type Error = ::windows::Error;
fn try_from(value: HidGameControllerProvider) -> ::windows::Result<Self> {
::std::convert::TryFrom::try_from(&value)
}
}
impl ::std::convert::TryFrom<&HidGameControllerProvider> for IGameControllerProvider {
type Error = ::windows::Error;
fn try_from(value: &HidGameControllerProvider) -> ::windows::Result<Self> {
::windows::Interface::cast(value)
}
}
impl<'a> ::windows::IntoParam<'a, IGameControllerProvider> for HidGameControllerProvider {
fn into_param(self) -> ::windows::Param<'a, IGameControllerProvider> {
::windows::IntoParam::into_param(&self)
}
}
impl<'a> ::windows::IntoParam<'a, IGameControllerProvider> for &HidGameControllerProvider {
fn into_param(self) -> ::windows::Param<'a, IGameControllerProvider> {
::std::convert::TryInto::<IGameControllerProvider>::try_into(self)
.map(::windows::Param::Owned)
.unwrap_or(::windows::Param::None)
}
}
unsafe impl ::std::marker::Send for HidGameControllerProvider {}
unsafe impl ::std::marker::Sync for HidGameControllerProvider {}
#[repr(transparent)]
#[derive(
:: std :: cmp :: PartialEq,
:: std :: cmp :: Eq,
:: std :: clone :: Clone,
:: std :: fmt :: Debug,
)]
pub struct ICustomGameControllerFactory(::windows::IInspectable);
unsafe impl ::windows::Interface for ICustomGameControllerFactory {
type Vtable = ICustomGameControllerFactory_abi;
const IID: ::windows::Guid = ::windows::Guid::from_values(
1772138078,
30094,
19646,
[172, 230, 98, 21, 95, 233, 18, 111],
);
}
impl ICustomGameControllerFactory {
pub fn CreateGameController<
'a,
Param0: ::windows::IntoParam<'a, IGameControllerProvider>,
>(
&self,
provider: Param0,
) -> ::windows::Result<::windows::IInspectable> {
let this = self;
unsafe {
let mut result__: ::windows::RawPtr = ::std::mem::zeroed();
(::windows::Interface::vtable(this).6)(
::std::mem::transmute_copy(this),
provider.into_param().abi(),
&mut result__,
)
.from_abi::<::windows::IInspectable>(result__)
}
}
pub fn OnGameControllerAdded<
'a,
Param0: ::windows::IntoParam<'a, super::IGameController>,
>(
&self,
value: Param0,
) -> ::windows::Result<()> {
let this = self;
unsafe {
(::windows::Interface::vtable(this).7)(
::std::mem::transmute_copy(this),
value.into_param().abi(),
)
.ok()
}
}
pub fn OnGameControllerRemoved<
'a,
Param0: ::windows::IntoParam<'a, super::IGameController>,
>(
&self,
value: Param0,
) -> ::windows::Result<()> {
let this = self;
unsafe {
(::windows::Interface::vtable(this).8)(
::std::mem::transmute_copy(this),
value.into_param().abi(),
)
.ok()
}
}
}
unsafe impl ::windows::RuntimeType for ICustomGameControllerFactory {
const SIGNATURE: ::windows::ConstBuffer =
::windows::ConstBuffer::from_slice(b"{69a0ae5e-758e-4cbe-ace6-62155fe9126f}");
}
impl ::std::convert::From<ICustomGameControllerFactory> for ::windows::IUnknown {
fn from(value: ICustomGameControllerFactory) -> Self {
unsafe { ::std::mem::transmute(value) }
}
}
impl ::std::convert::From<&ICustomGameControllerFactory> for ::windows::IUnknown {
fn from(value: &ICustomGameControllerFactory) -> Self {
::std::convert::From::from(::std::clone::Clone::clone(value))
}
}
impl<'a> ::windows::IntoParam<'a, ::windows::IUnknown> for ICustomGameControllerFactory {
fn into_param(self) -> ::windows::Param<'a, ::windows::IUnknown> {
::windows::Param::Owned(::std::convert::Into::<::windows::IUnknown>::into(self))
}
}
impl<'a> ::windows::IntoParam<'a, ::windows::IUnknown> for &ICustomGameControllerFactory {
fn into_param(self) -> ::windows::Param<'a, ::windows::IUnknown> {
::windows::Param::Owned(::std::convert::Into::<::windows::IUnknown>::into(
::std::clone::Clone::clone(self),
))
}
}
impl ::std::convert::From<ICustomGameControllerFactory> for ::windows::IInspectable {
fn from(value: ICustomGameControllerFactory) -> Self {
value.0
}
}
impl ::std::convert::From<&ICustomGameControllerFactory> for ::windows::IInspectable {
fn from(value: &ICustomGameControllerFactory) -> Self {
value.0.clone()
}
}
impl<'a> ::windows::IntoParam<'a, ::windows::IInspectable> for ICustomGameControllerFactory {
fn into_param(self) -> ::windows::Param<'a, ::windows::IInspectable> {
::windows::Param::Owned(self.0)
}
}
impl<'a> ::windows::IntoParam<'a, ::windows::IInspectable> for &'a ICustomGameControllerFactory {
fn into_param(self) -> ::windows::Param<'a, ::windows::IInspectable> {
::windows::Param::Borrowed(&self.0)
}
}
#[repr(C)]
#[doc(hidden)]
pub struct ICustomGameControllerFactory_abi(
pub unsafe extern "system" fn(
this: ::windows::RawPtr,
iid: &::windows::Guid,
interface: *mut ::windows::RawPtr,
) -> ::windows::HRESULT,
pub unsafe extern "system" fn(this: ::windows::RawPtr) -> u32,
pub unsafe extern "system" fn(this: ::windows::RawPtr) -> u32,
pub unsafe extern "system" fn(
this: ::windows::RawPtr,
count: *mut u32,
values: *mut *mut ::windows::Guid,
) -> ::windows::HRESULT,
pub unsafe extern "system" fn(
this: ::windows::RawPtr,
value: *mut ::windows::RawPtr,
) -> ::windows::HRESULT,
pub unsafe extern "system" fn(
this: ::windows::RawPtr,
value: *mut i32,
) -> ::windows::HRESULT,
pub unsafe extern "system" fn(
this: ::windows::RawPtr,
provider: ::windows::RawPtr,
result__: *mut ::windows::RawPtr,
) -> ::windows::HRESULT,
pub unsafe extern "system" fn(
this: ::windows::RawPtr,
value: ::windows::RawPtr,
) -> ::windows::HRESULT,
pub unsafe extern "system" fn(
this: ::windows::RawPtr,
value: ::windows::RawPtr,
) -> ::windows::HRESULT,
);
#[repr(transparent)]
#[derive(
:: std :: cmp :: PartialEq,
:: std :: cmp :: Eq,
:: std :: clone :: Clone,
:: std :: fmt :: Debug,
)]
#[doc(hidden)]
pub struct IGameControllerFactoryManagerStatics(::windows::IInspectable);
unsafe impl ::windows::Interface for IGameControllerFactoryManagerStatics {
type Vtable = IGameControllerFactoryManagerStatics_abi;
const IID: ::windows::Guid = ::windows::Guid::from_values(
919299811,
53409,
18822,
[162, 76, 64, 177, 55, 222, 186, 158],
);
}
#[repr(C)]
#[doc(hidden)]
pub struct IGameControllerFactoryManagerStatics_abi(
pub unsafe extern "system" fn(
this: ::windows::RawPtr,
iid: &::windows::Guid,
interface: *mut ::windows::RawPtr,
) -> ::windows::HRESULT,
pub unsafe extern "system" fn(this: ::windows::RawPtr) -> u32,
pub unsafe extern "system" fn(this: ::windows::RawPtr) -> u32,
pub unsafe extern "system" fn(
this: ::windows::RawPtr,
count: *mut u32,
values: *mut *mut ::windows::Guid,
) -> ::windows::HRESULT,
pub unsafe extern "system" fn(
this: ::windows::RawPtr,
value: *mut ::windows::RawPtr,
) -> ::windows::HRESULT,
pub unsafe extern "system" fn(
this: ::windows::RawPtr,
value: *mut i32,
) -> ::windows::HRESULT,
pub unsafe extern "system" fn(
this: ::windows::RawPtr,
factory: ::windows::RawPtr,
interfaceid: ::windows::Guid,
) -> ::windows::HRESULT,
pub unsafe extern "system" fn(
this: ::windows::RawPtr,
factory: ::windows::RawPtr,
hardwarevendorid: u16,
hardwareproductid: u16,
) -> ::windows::HRESULT,
pub unsafe extern "system" fn(
this: ::windows::RawPtr,
factory: ::windows::RawPtr,
xusbtype: XusbDeviceType,
xusbsubtype: XusbDeviceSubtype,
) -> ::windows::HRESULT,
);
#[repr(transparent)]
#[derive(
:: std :: cmp :: PartialEq,
:: std :: cmp :: Eq,
:: std :: clone :: Clone,
:: std :: fmt :: Debug,
)]
#[doc(hidden)]
pub struct IGameControllerFactoryManagerStatics2(::windows::IInspectable);
unsafe impl ::windows::Interface for IGameControllerFactoryManagerStatics2 {
type Vtable = IGameControllerFactoryManagerStatics2_abi;
const IID: ::windows::Guid = ::windows::Guid::from_values(
3939391044,
6623,
16661,
[179, 42, 39, 147, 226, 174, 163, 187],
);
}
#[repr(C)]
#[doc(hidden)]
pub struct IGameControllerFactoryManagerStatics2_abi(
pub unsafe extern "system" fn(
this: ::windows::RawPtr,
iid: &::windows::Guid,
interface: *mut ::windows::RawPtr,
) -> ::windows::HRESULT,
pub unsafe extern "system" fn(this: ::windows::RawPtr) -> u32,
pub unsafe extern "system" fn(this: ::windows::RawPtr) -> u32,
pub unsafe extern "system" fn(
this: ::windows::RawPtr,
count: *mut u32,
values: *mut *mut ::windows::Guid,
) -> ::windows::HRESULT,
pub unsafe extern "system" fn(
this: ::windows::RawPtr,
value: *mut ::windows::RawPtr,
) -> ::windows::HRESULT,
pub unsafe extern "system" fn(
this: ::windows::RawPtr,
value: *mut i32,
) -> ::windows::HRESULT,
pub unsafe extern "system" fn(
this: ::windows::RawPtr,
factory: ::windows::RawPtr,
gamecontroller: ::windows::RawPtr,
result__: *mut ::windows::RawPtr,
) -> ::windows::HRESULT,
);
#[repr(transparent)]
#[derive(
:: std :: cmp :: PartialEq,
:: std :: cmp :: Eq,
:: std :: clone :: Clone,
:: std :: fmt :: Debug,
)]
pub struct IGameControllerInputSink(::windows::IInspectable);
unsafe impl ::windows::Interface for IGameControllerInputSink {
type Vtable = IGameControllerInputSink_abi;
const IID: ::windows::Guid = ::windows::Guid::from_values(
536279330,
50752,
19576,
[168, 32, 154, 113, 92, 85, 139, 203],
);
}
impl IGameControllerInputSink {
pub fn OnInputResumed(&self, timestamp: u64) -> ::windows::Result<()> {
let this = self;
unsafe {
(::windows::Interface::vtable(this).6)(
::std::mem::transmute_copy(this),
timestamp,
)
.ok()
}
}
pub fn OnInputSuspended(&self, timestamp: u64) -> ::windows::Result<()> {
let this = self;
unsafe {
(::windows::Interface::vtable(this).7)(
::std::mem::transmute_copy(this),
timestamp,
)
.ok()
}
}
}
unsafe impl ::windows::RuntimeType for IGameControllerInputSink {
const SIGNATURE: ::windows::ConstBuffer =
::windows::ConstBuffer::from_slice(b"{1ff6f922-c640-4c78-a820-9a715c558bcb}");
}
impl ::std::convert::From<IGameControllerInputSink> for ::windows::IUnknown {
fn from(value: IGameControllerInputSink) -> Self {
unsafe { ::std::mem::transmute(value) }
}
}
impl ::std::convert::From<&IGameControllerInputSink> for ::windows::IUnknown {
fn from(value: &IGameControllerInputSink) -> Self {
::std::convert::From::from(::std::clone::Clone::clone(value))
}
}
impl<'a> ::windows::IntoParam<'a, ::windows::IUnknown> for IGameControllerInputSink {
fn into_param(self) -> ::windows::Param<'a, ::windows::IUnknown> {
::windows::Param::Owned(::std::convert::Into::<::windows::IUnknown>::into(self))
}
}
impl<'a> ::windows::IntoParam<'a, ::windows::IUnknown> for &IGameControllerInputSink {
fn into_param(self) -> ::windows::Param<'a, ::windows::IUnknown> {
::windows::Param::Owned(::std::convert::Into::<::windows::IUnknown>::into(
::std::clone::Clone::clone(self),
))
}
}
impl ::std::convert::From<IGameControllerInputSink> for ::windows::IInspectable {
fn from(value: IGameControllerInputSink) -> Self {
value.0
}
}
impl ::std::convert::From<&IGameControllerInputSink> for ::windows::IInspectable {
fn from(value: &IGameControllerInputSink) -> Self {
value.0.clone()
}
}
impl<'a> ::windows::IntoParam<'a, ::windows::IInspectable> for IGameControllerInputSink {
fn into_param(self) -> ::windows::Param<'a, ::windows::IInspectable> {
::windows::Param::Owned(self.0)
}
}
impl<'a> ::windows::IntoParam<'a, ::windows::IInspectable> for &'a IGameControllerInputSink {
fn into_param(self) -> ::windows::Param<'a, ::windows::IInspectable> {
::windows::Param::Borrowed(&self.0)
}
}
#[repr(C)]
#[doc(hidden)]
pub struct IGameControllerInputSink_abi(
pub unsafe extern "system" fn(
this: ::windows::RawPtr,
iid: &::windows::Guid,
interface: *mut ::windows::RawPtr,
) -> ::windows::HRESULT,
pub unsafe extern "system" fn(this: ::windows::RawPtr) -> u32,
pub unsafe extern "system" fn(this: ::windows::RawPtr) -> u32,
pub unsafe extern "system" fn(
this: ::windows::RawPtr,
count: *mut u32,
values: *mut *mut ::windows::Guid,
) -> ::windows::HRESULT,
pub unsafe extern "system" fn(
this: ::windows::RawPtr,
value: *mut ::windows::RawPtr,
) -> ::windows::HRESULT,
pub unsafe extern "system" fn(
this: ::windows::RawPtr,
value: *mut i32,
) -> ::windows::HRESULT,
pub unsafe extern "system" fn(
this: ::windows::RawPtr,
timestamp: u64,
) -> ::windows::HRESULT,
pub unsafe extern "system" fn(
this: ::windows::RawPtr,
timestamp: u64,
) -> ::windows::HRESULT,
);
#[repr(transparent)]
#[derive(
:: std :: cmp :: PartialEq,
:: std :: cmp :: Eq,
:: std :: clone :: Clone,
:: std :: fmt :: Debug,
)]
pub struct IGameControllerProvider(::windows::IInspectable);
unsafe impl ::windows::Interface for IGameControllerProvider {
type Vtable = IGameControllerProvider_abi;
const IID: ::windows::Guid = ::windows::Guid::from_values(
3872864642,
10646,
17753,
[177, 108, 62, 87, 212, 110, 88, 214],
);
}
impl IGameControllerProvider {
pub fn FirmwareVersionInfo(&self) -> ::windows::Result<GameControllerVersionInfo> {
let this = self;
unsafe {
let mut result__: GameControllerVersionInfo = ::std::mem::zeroed();
(::windows::Interface::vtable(this).6)(
::std::mem::transmute_copy(this),
&mut result__,
)
.from_abi::<GameControllerVersionInfo>(result__)
}
}
pub fn HardwareProductId(&self) -> ::windows::Result<u16> {
let this = self;
unsafe {
let mut result__: u16 = ::std::mem::zeroed();
(::windows::Interface::vtable(this).7)(
::std::mem::transmute_copy(this),
&mut result__,
)
.from_abi::<u16>(result__)
}
}
pub fn HardwareVendorId(&self) -> ::windows::Result<u16> {
let this = self;
unsafe {
let mut result__: u16 = ::std::mem::zeroed();
(::windows::Interface::vtable(this).8)(
::std::mem::transmute_copy(this),
&mut result__,
)
.from_abi::<u16>(result__)
}
}
pub fn HardwareVersionInfo(&self) -> ::windows::Result<GameControllerVersionInfo> {
let this = self;
unsafe {
let mut result__: GameControllerVersionInfo = ::std::mem::zeroed();
(::windows::Interface::vtable(this).9)(
::std::mem::transmute_copy(this),
&mut result__,
)
.from_abi::<GameControllerVersionInfo>(result__)
}
}
pub fn IsConnected(&self) -> ::windows::Result<bool> {
let this = self;
unsafe {
let mut result__: bool = ::std::mem::zeroed();
(::windows::Interface::vtable(this).10)(
::std::mem::transmute_copy(this),
&mut result__,
)
.from_abi::<bool>(result__)
}
}
}
unsafe impl ::windows::RuntimeType for IGameControllerProvider {
const SIGNATURE: ::windows::ConstBuffer =
::windows::ConstBuffer::from_slice(b"{e6d73982-2996-4559-b16c-3e57d46e58d6}");
}
impl ::std::convert::From<IGameControllerProvider> for ::windows::IUnknown {
fn from(value: IGameControllerProvider) -> Self {
unsafe { ::std::mem::transmute(value) }
}
}
impl ::std::convert::From<&IGameControllerProvider> for ::windows::IUnknown {
fn from(value: &IGameControllerProvider) -> Self {
::std::convert::From::from(::std::clone::Clone::clone(value))
}
}
impl<'a> ::windows::IntoParam<'a, ::windows::IUnknown> for IGameControllerProvider {
fn into_param(self) -> ::windows::Param<'a, ::windows::IUnknown> {
::windows::Param::Owned(::std::convert::Into::<::windows::IUnknown>::into(self))
}
}
impl<'a> ::windows::IntoParam<'a, ::windows::IUnknown> for &IGameControllerProvider {
fn into_param(self) -> ::windows::Param<'a, ::windows::IUnknown> {
::windows::Param::Owned(::std::convert::Into::<::windows::IUnknown>::into(
::std::clone::Clone::clone(self),
))
}
}
impl ::std::convert::From<IGameControllerProvider> for ::windows::IInspectable {
fn from(value: IGameControllerProvider) -> Self {
value.0
}
}
impl ::std::convert::From<&IGameControllerProvider> for ::windows::IInspectable {
fn from(value: &IGameControllerProvider) -> Self {
value.0.clone()
}
}
impl<'a> ::windows::IntoParam<'a, ::windows::IInspectable> for IGameControllerProvider {
fn into_param(self) -> ::windows::Param<'a, ::windows::IInspectable> {
::windows::Param::Owned(self.0)
}
}
impl<'a> ::windows::IntoParam<'a, ::windows::IInspectable> for &'a IGameControllerProvider {
fn into_param(self) -> ::windows::Param<'a, ::windows::IInspectable> {
::windows::Param::Borrowed(&self.0)
}
}
#[repr(C)]
#[doc(hidden)]
pub struct IGameControllerProvider_abi(
pub unsafe extern "system" fn(
this: ::windows::RawPtr,
iid: &::windows::Guid,
interface: *mut ::windows::RawPtr,
) -> ::windows::HRESULT,
pub unsafe extern "system" fn(this: ::windows::RawPtr) -> u32,
pub unsafe extern "system" fn(this: ::windows::RawPtr) -> u32,
pub unsafe extern "system" fn(
this: ::windows::RawPtr,
count: *mut u32,
values: *mut *mut ::windows::Guid,
) -> ::windows::HRESULT,
pub unsafe extern "system" fn(
this: ::windows::RawPtr,
value: *mut ::windows::RawPtr,
) -> ::windows::HRESULT,
pub unsafe extern "system" fn(
this: ::windows::RawPtr,
value: *mut i32,
) -> ::windows::HRESULT,
pub unsafe extern "system" fn(
this: ::windows::RawPtr,
result__: *mut GameControllerVersionInfo,
) -> ::windows::HRESULT,
pub unsafe extern "system" fn(
this: ::windows::RawPtr,
result__: *mut u16,
) -> ::windows::HRESULT,
pub unsafe extern "system" fn(
this: ::windows::RawPtr,
result__: *mut u16,
) -> ::windows::HRESULT,
pub unsafe extern "system" fn(
this: ::windows::RawPtr,
result__: *mut GameControllerVersionInfo,
) -> ::windows::HRESULT,
pub unsafe extern "system" fn(
this: ::windows::RawPtr,
result__: *mut bool,
) -> ::windows::HRESULT,
);
#[repr(transparent)]
#[derive(
:: std :: cmp :: PartialEq,
:: std :: cmp :: Eq,
:: std :: clone :: Clone,
:: std :: fmt :: Debug,
)]
#[doc(hidden)]
pub struct IGipFirmwareUpdateResult(::windows::IInspectable);
unsafe impl ::windows::Interface for IGipFirmwareUpdateResult {
type Vtable = IGipFirmwareUpdateResult_abi;
const IID: ::windows::Guid = ::windows::Guid::from_values(
1803111730,
34131,
17042,
[142, 3, 225, 102, 81, 162, 248, 188],
);
}
#[repr(C)]
#[doc(hidden)]
pub struct IGipFirmwareUpdateResult_abi(
pub unsafe extern "system" fn(
this: ::windows::RawPtr,
iid: &::windows::Guid,
interface: *mut ::windows::RawPtr,
) -> ::windows::HRESULT,
pub unsafe extern "system" fn(this: ::windows::RawPtr) -> u32,
pub unsafe extern "system" fn(this: ::windows::RawPtr) -> u32,
pub unsafe extern "system" fn(
this: ::windows::RawPtr,
count: *mut u32,
values: *mut *mut ::windows::Guid,
) -> ::windows::HRESULT,
pub unsafe extern "system" fn(
this: ::windows::RawPtr,
value: *mut ::windows::RawPtr,
) -> ::windows::HRESULT,
pub unsafe extern "system" fn(
this: ::windows::RawPtr,
value: *mut i32,
) -> ::windows::HRESULT,
pub unsafe extern "system" fn(
this: ::windows::RawPtr,
result__: *mut u32,
) -> ::windows::HRESULT,
pub unsafe extern "system" fn(
this: ::windows::RawPtr,
result__: *mut u32,
) -> ::windows::HRESULT,
pub unsafe extern "system" fn(
this: ::windows::RawPtr,
result__: *mut GipFirmwareUpdateStatus,
) -> ::windows::HRESULT,
);
#[repr(transparent)]
#[derive(
:: std :: cmp :: PartialEq,
:: std :: cmp :: Eq,
:: std :: clone :: Clone,
:: std :: fmt :: Debug,
)]
pub struct IGipGameControllerInputSink(::windows::IInspectable);
unsafe impl ::windows::Interface for IGipGameControllerInputSink {
type Vtable = IGipGameControllerInputSink_abi;
const IID: ::windows::Guid = ::windows::Guid::from_values(
2718993087,
2545,
17340,
[161, 64, 128, 248, 153, 236, 54, 251],
);
}
impl IGipGameControllerInputSink {
pub fn OnKeyReceived(
&self,
timestamp: u64,
keycode: u8,
ispressed: bool,
) -> ::windows::Result<()> {
let this = self;
unsafe {
(::windows::Interface::vtable(this).6)(
::std::mem::transmute_copy(this),
timestamp,
keycode,
ispressed,
)
.ok()
}
}
pub fn OnMessageReceived(
&self,
timestamp: u64,
messageclass: GipMessageClass,
messageid: u8,
sequenceid: u8,
messagebuffer: &[<u8 as ::windows::Abi>::DefaultType],
) -> ::windows::Result<()> {
let this = self;
unsafe {
(::windows::Interface::vtable(this).7)(
::std::mem::transmute_copy(this),
timestamp,
messageclass,
messageid,
sequenceid,
messagebuffer.len() as u32,
::std::mem::transmute(messagebuffer.as_ptr()),
)
.ok()
}
}
pub fn OnInputResumed(&self, timestamp: u64) -> ::windows::Result<()> {
let this = &::windows::Interface::cast::<IGameControllerInputSink>(self)?;
unsafe {
(::windows::Interface::vtable(this).6)(
::std::mem::transmute_copy(this),
timestamp,
)
.ok()
}
}
pub fn OnInputSuspended(&self, timestamp: u64) -> ::windows::Result<()> {
let this = &::windows::Interface::cast::<IGameControllerInputSink>(self)?;
unsafe {
(::windows::Interface::vtable(this).7)(
::std::mem::transmute_copy(this),
timestamp,
)
.ok()
}
}
}
unsafe impl ::windows::RuntimeType for IGipGameControllerInputSink {
const SIGNATURE: ::windows::ConstBuffer =
::windows::ConstBuffer::from_slice(b"{a2108abf-09f1-43bc-a140-80f899ec36fb}");
}
impl ::std::convert::From<IGipGameControllerInputSink> for ::windows::IUnknown {
fn from(value: IGipGameControllerInputSink) -> Self {
unsafe { ::std::mem::transmute(value) }
}
}
impl ::std::convert::From<&IGipGameControllerInputSink> for ::windows::IUnknown {
fn from(value: &IGipGameControllerInputSink) -> Self {
::std::convert::From::from(::std::clone::Clone::clone(value))
}
}
impl<'a> ::windows::IntoParam<'a, ::windows::IUnknown> for IGipGameControllerInputSink {
fn into_param(self) -> ::windows::Param<'a, ::windows::IUnknown> {
::windows::Param::Owned(::std::convert::Into::<::windows::IUnknown>::into(self))
}
}
impl<'a> ::windows::IntoParam<'a, ::windows::IUnknown> for &IGipGameControllerInputSink {
fn into_param(self) -> ::windows::Param<'a, ::windows::IUnknown> {
::windows::Param::Owned(::std::convert::Into::<::windows::IUnknown>::into(
::std::clone::Clone::clone(self),
))
}
}
impl ::std::convert::From<IGipGameControllerInputSink> for ::windows::IInspectable {
fn from(value: IGipGameControllerInputSink) -> Self {
value.0
}
}
impl ::std::convert::From<&IGipGameControllerInputSink> for ::windows::IInspectable {
fn from(value: &IGipGameControllerInputSink) -> Self {
value.0.clone()
}
}
impl<'a> ::windows::IntoParam<'a, ::windows::IInspectable> for IGipGameControllerInputSink {
fn into_param(self) -> ::windows::Param<'a, ::windows::IInspectable> {
::windows::Param::Owned(self.0)
}
}
impl<'a> ::windows::IntoParam<'a, ::windows::IInspectable> for &'a IGipGameControllerInputSink {
fn into_param(self) -> ::windows::Param<'a, ::windows::IInspectable> {
::windows::Param::Borrowed(&self.0)
}
}
impl ::std::convert::TryFrom<IGipGameControllerInputSink> for IGameControllerInputSink {
type Error = ::windows::Error;
fn try_from(value: IGipGameControllerInputSink) -> ::windows::Result<Self> {
::std::convert::TryFrom::try_from(&value)
}
}
impl ::std::convert::TryFrom<&IGipGameControllerInputSink> for IGameControllerInputSink {
type Error = ::windows::Error;
fn try_from(value: &IGipGameControllerInputSink) -> ::windows::Result<Self> {
::windows::Interface::cast(value)
}
}
impl<'a> ::windows::IntoParam<'a, IGameControllerInputSink> for IGipGameControllerInputSink {
fn into_param(self) -> ::windows::Param<'a, IGameControllerInputSink> {
::windows::IntoParam::into_param(&self)
}
}
impl<'a> ::windows::IntoParam<'a, IGameControllerInputSink> for &IGipGameControllerInputSink {
fn into_param(self) -> ::windows::Param<'a, IGameControllerInputSink> {
::std::convert::TryInto::<IGameControllerInputSink>::try_into(self)
.map(::windows::Param::Owned)
.unwrap_or(::windows::Param::None)
}
}
#[repr(C)]
#[doc(hidden)]
pub struct IGipGameControllerInputSink_abi(
pub unsafe extern "system" fn(
this: ::windows::RawPtr,
iid: &::windows::Guid,
interface: *mut ::windows::RawPtr,
) -> ::windows::HRESULT,
pub unsafe extern "system" fn(this: ::windows::RawPtr) -> u32,
pub unsafe extern "system" fn(this: ::windows::RawPtr) -> u32,
pub unsafe extern "system" fn(
this: ::windows::RawPtr,
count: *mut u32,
values: *mut *mut ::windows::Guid,
) -> ::windows::HRESULT,
pub unsafe extern "system" fn(
this: ::windows::RawPtr,
value: *mut ::windows::RawPtr,
) -> ::windows::HRESULT,
pub unsafe extern "system" fn(
this: ::windows::RawPtr,
value: *mut i32,
) -> ::windows::HRESULT,
pub unsafe extern "system" fn(
this: ::windows::RawPtr,
timestamp: u64,
keycode: u8,
ispressed: bool,
) -> ::windows::HRESULT,
pub unsafe extern "system" fn(
this: ::windows::RawPtr,
timestamp: u64,
messageclass: GipMessageClass,
messageid: u8,
sequenceid: u8,
messageBuffer_array_size: u32,
messagebuffer: *const u8,
) -> ::windows::HRESULT,
);
#[repr(transparent)]
#[derive(
:: std :: cmp :: PartialEq,
:: std :: cmp :: Eq,
:: std :: clone :: Clone,
:: std :: fmt :: Debug,
)]
#[doc(hidden)]
pub struct IGipGameControllerProvider(::windows::IInspectable);
unsafe impl ::windows::Interface for IGipGameControllerProvider {
type Vtable = IGipGameControllerProvider_abi;
const IID: ::windows::Guid = ::windows::Guid::from_values(
3687783961,
6901,
17832,
[191, 2, 160, 238, 80, 200, 35, 252],
);
}
#[repr(C)]
#[doc(hidden)]
pub struct IGipGameControllerProvider_abi(
pub unsafe extern "system" fn(
this: ::windows::RawPtr,
iid: &::windows::Guid,
interface: *mut ::windows::RawPtr,
) -> ::windows::HRESULT,
pub unsafe extern "system" fn(this: ::windows::RawPtr) -> u32,
pub unsafe extern "system" fn(this: ::windows::RawPtr) -> u32,
pub unsafe extern "system" fn(
this: ::windows::RawPtr,
count: *mut u32,
values: *mut *mut ::windows::Guid,
) -> ::windows::HRESULT,
pub unsafe extern "system" fn(
this: ::windows::RawPtr,
value: *mut ::windows::RawPtr,
) -> ::windows::HRESULT,
pub unsafe extern "system" fn(
this: ::windows::RawPtr,
value: *mut i32,
) -> ::windows::HRESULT,
pub unsafe extern "system" fn(
this: ::windows::RawPtr,
messageclass: GipMessageClass,
messageid: u8,
messageBuffer_array_size: u32,
messagebuffer: *const u8,
) -> ::windows::HRESULT,
pub unsafe extern "system" fn(
this: ::windows::RawPtr,
messageclass: GipMessageClass,
messageid: u8,
requestMessageBuffer_array_size: u32,
requestmessagebuffer: *const u8,
responseMessageBuffer_array_size: u32,
responsemessagebuffer: *mut u8,
) -> ::windows::HRESULT,
pub unsafe extern "system" fn(
this: ::windows::RawPtr,
firmwareimage: ::windows::RawPtr,
result__: *mut ::windows::RawPtr,
) -> ::windows::HRESULT,
);
#[repr(transparent)]
#[derive(
:: std :: cmp :: PartialEq,
:: std :: cmp :: Eq,
:: std :: clone :: Clone,
:: std :: fmt :: Debug,
)]
pub struct IHidGameControllerInputSink(::windows::IInspectable);
unsafe impl ::windows::Interface for IHidGameControllerInputSink {
type Vtable = IHidGameControllerInputSink_abi;
const IID: ::windows::Guid = ::windows::Guid::from_values(
4149527330,
6189,
16612,
[161, 38, 252, 238, 79, 250, 30, 49],
);
}
impl IHidGameControllerInputSink {
pub fn OnInputResumed(&self, timestamp: u64) -> ::windows::Result<()> {
let this = &::windows::Interface::cast::<IGameControllerInputSink>(self)?;
unsafe {
(::windows::Interface::vtable(this).6)(
::std::mem::transmute_copy(this),
timestamp,
)
.ok()
}
}
pub fn OnInputSuspended(&self, timestamp: u64) -> ::windows::Result<()> {
let this = &::windows::Interface::cast::<IGameControllerInputSink>(self)?;
unsafe {
(::windows::Interface::vtable(this).7)(
::std::mem::transmute_copy(this),
timestamp,
)
.ok()
}
}
pub fn OnInputReportReceived(
&self,
timestamp: u64,
reportid: u8,
reportbuffer: &[<u8 as ::windows::Abi>::DefaultType],
) -> ::windows::Result<()> {
let this = self;
unsafe {
(::windows::Interface::vtable(this).6)(
::std::mem::transmute_copy(this),
timestamp,
reportid,
reportbuffer.len() as u32,
::std::mem::transmute(reportbuffer.as_ptr()),
)
.ok()
}
}
}
unsafe impl ::windows::RuntimeType for IHidGameControllerInputSink {
const SIGNATURE: ::windows::ConstBuffer =
::windows::ConstBuffer::from_slice(b"{f754c322-182d-40e4-a126-fcee4ffa1e31}");
}
impl ::std::convert::From<IHidGameControllerInputSink> for ::windows::IUnknown {
fn from(value: IHidGameControllerInputSink) -> Self {
unsafe { ::std::mem::transmute(value) }
}
}
impl ::std::convert::From<&IHidGameControllerInputSink> for ::windows::IUnknown {
fn from(value: &IHidGameControllerInputSink) -> Self {
::std::convert::From::from(::std::clone::Clone::clone(value))
}
}
impl<'a> ::windows::IntoParam<'a, ::windows::IUnknown> for IHidGameControllerInputSink {
fn into_param(self) -> ::windows::Param<'a, ::windows::IUnknown> {
::windows::Param::Owned(::std::convert::Into::<::windows::IUnknown>::into(self))
}
}
impl<'a> ::windows::IntoParam<'a, ::windows::IUnknown> for &IHidGameControllerInputSink {
fn into_param(self) -> ::windows::Param<'a, ::windows::IUnknown> {
::windows::Param::Owned(::std::convert::Into::<::windows::IUnknown>::into(
::std::clone::Clone::clone(self),
))
}
}
impl ::std::convert::From<IHidGameControllerInputSink> for ::windows::IInspectable {
fn from(value: IHidGameControllerInputSink) -> Self {
value.0
}
}
impl ::std::convert::From<&IHidGameControllerInputSink> for ::windows::IInspectable {
fn from(value: &IHidGameControllerInputSink) -> Self {
value.0.clone()
}
}
impl<'a> ::windows::IntoParam<'a, ::windows::IInspectable> for IHidGameControllerInputSink {
fn into_param(self) -> ::windows::Param<'a, ::windows::IInspectable> {
::windows::Param::Owned(self.0)
}
}
impl<'a> ::windows::IntoParam<'a, ::windows::IInspectable> for &'a IHidGameControllerInputSink {
fn into_param(self) -> ::windows::Param<'a, ::windows::IInspectable> {
::windows::Param::Borrowed(&self.0)
}
}
impl ::std::convert::TryFrom<IHidGameControllerInputSink> for IGameControllerInputSink {
type Error = ::windows::Error;
fn try_from(value: IHidGameControllerInputSink) -> ::windows::Result<Self> {
::std::convert::TryFrom::try_from(&value)
}
}
impl ::std::convert::TryFrom<&IHidGameControllerInputSink> for IGameControllerInputSink {
type Error = ::windows::Error;
fn try_from(value: &IHidGameControllerInputSink) -> ::windows::Result<Self> {
::windows::Interface::cast(value)
}
}
impl<'a> ::windows::IntoParam<'a, IGameControllerInputSink> for IHidGameControllerInputSink {
fn into_param(self) -> ::windows::Param<'a, IGameControllerInputSink> {
::windows::IntoParam::into_param(&self)
}
}
impl<'a> ::windows::IntoParam<'a, IGameControllerInputSink> for &IHidGameControllerInputSink {
fn into_param(self) -> ::windows::Param<'a, IGameControllerInputSink> {
::std::convert::TryInto::<IGameControllerInputSink>::try_into(self)
.map(::windows::Param::Owned)
.unwrap_or(::windows::Param::None)
}
}
#[repr(C)]
#[doc(hidden)]
pub struct IHidGameControllerInputSink_abi(
pub unsafe extern "system" fn(
this: ::windows::RawPtr,
iid: &::windows::Guid,
interface: *mut ::windows::RawPtr,
) -> ::windows::HRESULT,
pub unsafe extern "system" fn(this: ::windows::RawPtr) -> u32,
pub unsafe extern "system" fn(this: ::windows::RawPtr) -> u32,
pub unsafe extern "system" fn(
this: ::windows::RawPtr,
count: *mut u32,
values: *mut *mut ::windows::Guid,
) -> ::windows::HRESULT,
pub unsafe extern "system" fn(
this: ::windows::RawPtr,
value: *mut ::windows::RawPtr,
) -> ::windows::HRESULT,
pub unsafe extern "system" fn(
this: ::windows::RawPtr,
value: *mut i32,
) -> ::windows::HRESULT,
pub unsafe extern "system" fn(
this: ::windows::RawPtr,
timestamp: u64,
reportid: u8,
reportBuffer_array_size: u32,
reportbuffer: *const u8,
) -> ::windows::HRESULT,
);
#[repr(transparent)]
#[derive(
:: std :: cmp :: PartialEq,
:: std :: cmp :: Eq,
:: std :: clone :: Clone,
:: std :: fmt :: Debug,
)]
#[doc(hidden)]
pub struct IHidGameControllerProvider(::windows::IInspectable);
unsafe impl ::windows::Interface for IHidGameControllerProvider {
type Vtable = IHidGameControllerProvider_abi;
const IID: ::windows::Guid = ::windows::Guid::from_values(
2513320692,
44016,
19304,
[160, 129, 59, 125, 231, 63, 240, 231],
);
}
#[repr(C)]
#[doc(hidden)]
pub struct IHidGameControllerProvider_abi(
pub unsafe extern "system" fn(
this: ::windows::RawPtr,
iid: &::windows::Guid,
interface: *mut ::windows::RawPtr,
) -> ::windows::HRESULT,
pub unsafe extern "system" fn(this: ::windows::RawPtr) -> u32,
pub unsafe extern "system" fn(this: ::windows::RawPtr) -> u32,
pub unsafe extern "system" fn(
this: ::windows::RawPtr,
count: *mut u32,
values: *mut *mut ::windows::Guid,
) -> ::windows::HRESULT,
pub unsafe extern "system" fn(
this: ::windows::RawPtr,
value: *mut ::windows::RawPtr,
) -> ::windows::HRESULT,
pub unsafe extern "system" fn(
this: ::windows::RawPtr,
value: *mut i32,
) -> ::windows::HRESULT,
pub unsafe extern "system" fn(
this: ::windows::RawPtr,
result__: *mut u16,
) -> ::windows::HRESULT,
pub unsafe extern "system" fn(
this: ::windows::RawPtr,
result__: *mut u16,
) -> ::windows::HRESULT,
pub unsafe extern "system" fn(
this: ::windows::RawPtr,
reportid: u8,
reportBuffer_array_size: u32,
reportbuffer: *mut u8,
) -> ::windows::HRESULT,
pub unsafe extern "system" fn(
this: ::windows::RawPtr,
reportid: u8,
reportBuffer_array_size: u32,
reportbuffer: *const u8,
) -> ::windows::HRESULT,
pub unsafe extern "system" fn(
this: ::windows::RawPtr,
reportid: u8,
reportBuffer_array_size: u32,
reportbuffer: *const u8,
) -> ::windows::HRESULT,
);
#[repr(transparent)]
#[derive(
:: std :: cmp :: PartialEq,
:: std :: cmp :: Eq,
:: std :: clone :: Clone,
:: std :: fmt :: Debug,
)]
pub struct IXusbGameControllerInputSink(::windows::IInspectable);
unsafe impl ::windows::Interface for IXusbGameControllerInputSink {
type Vtable = IXusbGameControllerInputSink_abi;
const IID: ::windows::Guid = ::windows::Guid::from_values(
2997624213,
28363,
17075,
[138, 171, 2, 84, 1, 202, 71, 18],
);
}
impl IXusbGameControllerInputSink {
pub fn OnInputReceived(
&self,
timestamp: u64,
reportid: u8,
inputbuffer: &[<u8 as ::windows::Abi>::DefaultType],
) -> ::windows::Result<()> {
let this = self;
unsafe {
(::windows::Interface::vtable(this).6)(
::std::mem::transmute_copy(this),
timestamp,
reportid,
inputbuffer.len() as u32,
::std::mem::transmute(inputbuffer.as_ptr()),
)
.ok()
}
}
pub fn OnInputResumed(&self, timestamp: u64) -> ::windows::Result<()> {
let this = &::windows::Interface::cast::<IGameControllerInputSink>(self)?;
unsafe {
(::windows::Interface::vtable(this).6)(
::std::mem::transmute_copy(this),
timestamp,
)
.ok()
}
}
pub fn OnInputSuspended(&self, timestamp: u64) -> ::windows::Result<()> {
let this = &::windows::Interface::cast::<IGameControllerInputSink>(self)?;
unsafe {
(::windows::Interface::vtable(this).7)(
::std::mem::transmute_copy(this),
timestamp,
)
.ok()
}
}
}
unsafe impl ::windows::RuntimeType for IXusbGameControllerInputSink {
const SIGNATURE: ::windows::ConstBuffer =
::windows::ConstBuffer::from_slice(b"{b2ac1d95-6ecb-42b3-8aab-025401ca4712}");
}
impl ::std::convert::From<IXusbGameControllerInputSink> for ::windows::IUnknown {
fn from(value: IXusbGameControllerInputSink) -> Self {
unsafe { ::std::mem::transmute(value) }
}
}
impl ::std::convert::From<&IXusbGameControllerInputSink> for ::windows::IUnknown {
fn from(value: &IXusbGameControllerInputSink) -> Self {
::std::convert::From::from(::std::clone::Clone::clone(value))
}
}
impl<'a> ::windows::IntoParam<'a, ::windows::IUnknown> for IXusbGameControllerInputSink {
fn into_param(self) -> ::windows::Param<'a, ::windows::IUnknown> {
::windows::Param::Owned(::std::convert::Into::<::windows::IUnknown>::into(self))
}
}
impl<'a> ::windows::IntoParam<'a, ::windows::IUnknown> for &IXusbGameControllerInputSink {
fn into_param(self) -> ::windows::Param<'a, ::windows::IUnknown> {
::windows::Param::Owned(::std::convert::Into::<::windows::IUnknown>::into(
::std::clone::Clone::clone(self),
))
}
}
impl ::std::convert::From<IXusbGameControllerInputSink> for ::windows::IInspectable {
fn from(value: IXusbGameControllerInputSink) -> Self {
value.0
}
}
impl ::std::convert::From<&IXusbGameControllerInputSink> for ::windows::IInspectable {
fn from(value: &IXusbGameControllerInputSink) -> Self {
value.0.clone()
}
}
impl<'a> ::windows::IntoParam<'a, ::windows::IInspectable> for IXusbGameControllerInputSink {
fn into_param(self) -> ::windows::Param<'a, ::windows::IInspectable> {
::windows::Param::Owned(self.0)
}
}
impl<'a> ::windows::IntoParam<'a, ::windows::IInspectable> for &'a IXusbGameControllerInputSink {
fn into_param(self) -> ::windows::Param<'a, ::windows::IInspectable> {
::windows::Param::Borrowed(&self.0)
}
}
impl ::std::convert::TryFrom<IXusbGameControllerInputSink> for IGameControllerInputSink {
type Error = ::windows::Error;
fn try_from(value: IXusbGameControllerInputSink) -> ::windows::Result<Self> {
::std::convert::TryFrom::try_from(&value)
}
}
impl ::std::convert::TryFrom<&IXusbGameControllerInputSink> for IGameControllerInputSink {
type Error = ::windows::Error;
fn try_from(value: &IXusbGameControllerInputSink) -> ::windows::Result<Self> {
::windows::Interface::cast(value)
}
}
impl<'a> ::windows::IntoParam<'a, IGameControllerInputSink> for IXusbGameControllerInputSink {
fn into_param(self) -> ::windows::Param<'a, IGameControllerInputSink> {
::windows::IntoParam::into_param(&self)
}
}
impl<'a> ::windows::IntoParam<'a, IGameControllerInputSink> for &IXusbGameControllerInputSink {
fn into_param(self) -> ::windows::Param<'a, IGameControllerInputSink> {
::std::convert::TryInto::<IGameControllerInputSink>::try_into(self)
.map(::windows::Param::Owned)
.unwrap_or(::windows::Param::None)
}
}
#[repr(C)]
#[doc(hidden)]
pub struct IXusbGameControllerInputSink_abi(
pub unsafe extern "system" fn(
this: ::windows::RawPtr,
iid: &::windows::Guid,
interface: *mut ::windows::RawPtr,
) -> ::windows::HRESULT,
pub unsafe extern "system" fn(this: ::windows::RawPtr) -> u32,
pub unsafe extern "system" fn(this: ::windows::RawPtr) -> u32,
pub unsafe extern "system" fn(
this: ::windows::RawPtr,
count: *mut u32,
values: *mut *mut ::windows::Guid,
) -> ::windows::HRESULT,
pub unsafe extern "system" fn(
this: ::windows::RawPtr,
value: *mut ::windows::RawPtr,
) -> ::windows::HRESULT,
pub unsafe extern "system" fn(
this: ::windows::RawPtr,
value: *mut i32,
) -> ::windows::HRESULT,
pub unsafe extern "system" fn(
this: ::windows::RawPtr,
timestamp: u64,
reportid: u8,
inputBuffer_array_size: u32,
inputbuffer: *const u8,
) -> ::windows::HRESULT,
);
#[repr(transparent)]
#[derive(
:: std :: cmp :: PartialEq,
:: std :: cmp :: Eq,
:: std :: clone :: Clone,
:: std :: fmt :: Debug,
)]
#[doc(hidden)]
pub struct IXusbGameControllerProvider(::windows::IInspectable);
unsafe impl ::windows::Interface for IXusbGameControllerProvider {
type Vtable = IXusbGameControllerProvider_abi;
const IID: ::windows::Guid = ::windows::Guid::from_values(
1848209899,
3835,
18612,
[128, 139, 131, 118, 67, 178, 242, 22],
);
}
#[repr(C)]
#[doc(hidden)]
pub struct IXusbGameControllerProvider_abi(
pub unsafe extern "system" fn(
this: ::windows::RawPtr,
iid: &::windows::Guid,
interface: *mut ::windows::RawPtr,
) -> ::windows::HRESULT,
pub unsafe extern "system" fn(this: ::windows::RawPtr) -> u32,
pub unsafe extern "system" fn(this: ::windows::RawPtr) -> u32,
pub unsafe extern "system" fn(
this: ::windows::RawPtr,
count: *mut u32,
values: *mut *mut ::windows::Guid,
) -> ::windows::HRESULT,
pub unsafe extern "system" fn(
this: ::windows::RawPtr,
value: *mut ::windows::RawPtr,
) -> ::windows::HRESULT,
pub unsafe extern "system" fn(
this: ::windows::RawPtr,
value: *mut i32,
) -> ::windows::HRESULT,
pub unsafe extern "system" fn(
this: ::windows::RawPtr,
lowfrequencymotorspeed: f64,
highfrequencymotorspeed: f64,
) -> ::windows::HRESULT,
);
#[derive(
:: std :: cmp :: PartialEq,
:: std :: cmp :: Eq,
:: std :: marker :: Copy,
:: std :: clone :: Clone,
:: std :: default :: Default,
:: std :: fmt :: Debug,
)]
#[repr(transparent)]
pub struct XusbDeviceSubtype(pub i32);
impl XusbDeviceSubtype {
pub const Unknown: XusbDeviceSubtype = XusbDeviceSubtype(0i32);
pub const Gamepad: XusbDeviceSubtype = XusbDeviceSubtype(1i32);
pub const ArcadePad: XusbDeviceSubtype = XusbDeviceSubtype(2i32);
pub const ArcadeStick: XusbDeviceSubtype = XusbDeviceSubtype(3i32);
pub const FlightStick: XusbDeviceSubtype = XusbDeviceSubtype(4i32);
pub const Wheel: XusbDeviceSubtype = XusbDeviceSubtype(5i32);
pub const Guitar: XusbDeviceSubtype = XusbDeviceSubtype(6i32);
pub const GuitarAlternate: XusbDeviceSubtype = XusbDeviceSubtype(7i32);
pub const GuitarBass: XusbDeviceSubtype = XusbDeviceSubtype(8i32);
pub const DrumKit: XusbDeviceSubtype = XusbDeviceSubtype(9i32);
pub const DancePad: XusbDeviceSubtype = XusbDeviceSubtype(10i32);
}
impl ::std::convert::From<i32> for XusbDeviceSubtype {
fn from(value: i32) -> Self {
Self(value)
}
}
unsafe impl ::windows::Abi for XusbDeviceSubtype {
type Abi = Self;
type DefaultType = Self;
}
unsafe impl ::windows::RuntimeType for XusbDeviceSubtype {
const SIGNATURE: ::windows::ConstBuffer = ::windows::ConstBuffer::from_slice(
b"enum(Windows.Gaming.Input.Custom.XusbDeviceSubtype;i4)",
);
}
#[derive(
:: std :: cmp :: PartialEq,
:: std :: cmp :: Eq,
:: std :: marker :: Copy,
:: std :: clone :: Clone,
:: std :: default :: Default,
:: std :: fmt :: Debug,
)]
#[repr(transparent)]
pub struct XusbDeviceType(pub i32);
impl XusbDeviceType {
pub const Unknown: XusbDeviceType = XusbDeviceType(0i32);
pub const Gamepad: XusbDeviceType = XusbDeviceType(1i32);
}
impl ::std::convert::From<i32> for XusbDeviceType {
fn from(value: i32) -> Self {
Self(value)
}
}
unsafe impl ::windows::Abi for XusbDeviceType {
type Abi = Self;
type DefaultType = Self;
}
unsafe impl ::windows::RuntimeType for XusbDeviceType {
const SIGNATURE: ::windows::ConstBuffer = ::windows::ConstBuffer::from_slice(
b"enum(Windows.Gaming.Input.Custom.XusbDeviceType;i4)",
);
}
#[repr(transparent)]
#[derive(
:: std :: cmp :: PartialEq,
:: std :: cmp :: Eq,
:: std :: clone :: Clone,
:: std :: fmt :: Debug,
)]
pub struct XusbGameControllerProvider(::windows::IInspectable);
impl XusbGameControllerProvider {
pub fn SetVibration(
&self,
lowfrequencymotorspeed: f64,
highfrequencymotorspeed: f64,
) -> ::windows::Result<()> {
let this = self;
unsafe {
(::windows::Interface::vtable(this).6)(
::std::mem::transmute_copy(this),
lowfrequencymotorspeed,
highfrequencymotorspeed,
)
.ok()
}
}
pub fn FirmwareVersionInfo(&self) -> ::windows::Result<GameControllerVersionInfo> {
let this = &::windows::Interface::cast::<IGameControllerProvider>(self)?;
unsafe {
let mut result__: GameControllerVersionInfo = ::std::mem::zeroed();
(::windows::Interface::vtable(this).6)(
::std::mem::transmute_copy(this),
&mut result__,
)
.from_abi::<GameControllerVersionInfo>(result__)
}
}
pub fn HardwareProductId(&self) -> ::windows::Result<u16> {
let this = &::windows::Interface::cast::<IGameControllerProvider>(self)?;
unsafe {
let mut result__: u16 = ::std::mem::zeroed();
(::windows::Interface::vtable(this).7)(
::std::mem::transmute_copy(this),
&mut result__,
)
.from_abi::<u16>(result__)
}
}
pub fn HardwareVendorId(&self) -> ::windows::Result<u16> {
let this = &::windows::Interface::cast::<IGameControllerProvider>(self)?;
unsafe {
let mut result__: u16 = ::std::mem::zeroed();
(::windows::Interface::vtable(this).8)(
::std::mem::transmute_copy(this),
&mut result__,
)
.from_abi::<u16>(result__)
}
}
pub fn HardwareVersionInfo(&self) -> ::windows::Result<GameControllerVersionInfo> {
let this = &::windows::Interface::cast::<IGameControllerProvider>(self)?;
unsafe {
let mut result__: GameControllerVersionInfo = ::std::mem::zeroed();
(::windows::Interface::vtable(this).9)(
::std::mem::transmute_copy(this),
&mut result__,
)
.from_abi::<GameControllerVersionInfo>(result__)
}
}
pub fn IsConnected(&self) -> ::windows::Result<bool> {
let this = &::windows::Interface::cast::<IGameControllerProvider>(self)?;
unsafe {
let mut result__: bool = ::std::mem::zeroed();
(::windows::Interface::vtable(this).10)(
::std::mem::transmute_copy(this),
&mut result__,
)
.from_abi::<bool>(result__)
}
}
}
unsafe impl ::windows::RuntimeType for XusbGameControllerProvider {
const SIGNATURE : :: windows :: ConstBuffer = :: windows :: ConstBuffer :: from_slice ( b"rc(Windows.Gaming.Input.Custom.XusbGameControllerProvider;{6e2971eb-0efb-48b4-808b-837643b2f216})" ) ;
}
unsafe impl ::windows::Interface for XusbGameControllerProvider {
type Vtable = IXusbGameControllerProvider_abi;
const IID: ::windows::Guid = ::windows::Guid::from_values(
1848209899,
3835,
18612,
[128, 139, 131, 118, 67, 178, 242, 22],
);
}
impl ::windows::RuntimeName for XusbGameControllerProvider {
const NAME: &'static str = "Windows.Gaming.Input.Custom.XusbGameControllerProvider";
}
impl ::std::convert::From<XusbGameControllerProvider> for ::windows::IUnknown {
fn from(value: XusbGameControllerProvider) -> Self {
unsafe { ::std::mem::transmute(value) }
}
}
impl ::std::convert::From<&XusbGameControllerProvider> for ::windows::IUnknown {
fn from(value: &XusbGameControllerProvider) -> Self {
::std::convert::From::from(::std::clone::Clone::clone(value))
}
}
impl<'a> ::windows::IntoParam<'a, ::windows::IUnknown> for XusbGameControllerProvider {
fn into_param(self) -> ::windows::Param<'a, ::windows::IUnknown> {
::windows::Param::Owned(::std::convert::Into::<::windows::IUnknown>::into(self))
}
}
impl<'a> ::windows::IntoParam<'a, ::windows::IUnknown> for &XusbGameControllerProvider {
fn into_param(self) -> ::windows::Param<'a, ::windows::IUnknown> {
::windows::Param::Owned(::std::convert::Into::<::windows::IUnknown>::into(
::std::clone::Clone::clone(self),
))
}
}
impl ::std::convert::From<XusbGameControllerProvider> for ::windows::IInspectable {
fn from(value: XusbGameControllerProvider) -> Self {
value.0
}
}
impl ::std::convert::From<&XusbGameControllerProvider> for ::windows::IInspectable {
fn from(value: &XusbGameControllerProvider) -> Self {
value.0.clone()
}
}
impl<'a> ::windows::IntoParam<'a, ::windows::IInspectable> for XusbGameControllerProvider {
fn into_param(self) -> ::windows::Param<'a, ::windows::IInspectable> {
::windows::Param::Owned(self.0)
}
}
impl<'a> ::windows::IntoParam<'a, ::windows::IInspectable> for &'a XusbGameControllerProvider {
fn into_param(self) -> ::windows::Param<'a, ::windows::IInspectable> {
::windows::Param::Borrowed(&self.0)
}
}
impl ::std::convert::TryFrom<XusbGameControllerProvider> for IGameControllerProvider {
type Error = ::windows::Error;
fn try_from(value: XusbGameControllerProvider) -> ::windows::Result<Self> {
::std::convert::TryFrom::try_from(&value)
}
}
impl ::std::convert::TryFrom<&XusbGameControllerProvider> for IGameControllerProvider {
type Error = ::windows::Error;
fn try_from(value: &XusbGameControllerProvider) -> ::windows::Result<Self> {
::windows::Interface::cast(value)
}
}
impl<'a> ::windows::IntoParam<'a, IGameControllerProvider> for XusbGameControllerProvider {
fn into_param(self) -> ::windows::Param<'a, IGameControllerProvider> {
::windows::IntoParam::into_param(&self)
}
}
impl<'a> ::windows::IntoParam<'a, IGameControllerProvider> for &XusbGameControllerProvider {
fn into_param(self) -> ::windows::Param<'a, IGameControllerProvider> {
::std::convert::TryInto::<IGameControllerProvider>::try_into(self)
.map(::windows::Param::Owned)
.unwrap_or(::windows::Param::None)
}
}
unsafe impl ::std::marker::Send for XusbGameControllerProvider {}
unsafe impl ::std::marker::Sync for XusbGameControllerProvider {}
}
pub mod ForceFeedback {
#[repr(transparent)]
#[derive(
:: std :: cmp :: PartialEq,
:: std :: cmp :: Eq,
:: std :: clone :: Clone,
:: std :: fmt :: Debug,
)]
pub struct ConditionForceEffect(::windows::IInspectable);
impl ConditionForceEffect {
pub fn Gain(&self) -> ::windows::Result<f64> {
let this = self;
unsafe {
let mut result__: f64 = ::std::mem::zeroed();
(::windows::Interface::vtable(this).6)(
::std::mem::transmute_copy(this),
&mut result__,
)
.from_abi::<f64>(result__)
}
}
pub fn SetGain(&self, value: f64) -> ::windows::Result<()> {
let this = self;
unsafe {
(::windows::Interface::vtable(this).7)(::std::mem::transmute_copy(this), value)
.ok()
}
}
pub fn State(&self) -> ::windows::Result<ForceFeedbackEffectState> {
let this = self;
unsafe {
let mut result__: ForceFeedbackEffectState = ::std::mem::zeroed();
(::windows::Interface::vtable(this).8)(
::std::mem::transmute_copy(this),
&mut result__,
)
.from_abi::<ForceFeedbackEffectState>(result__)
}
}
pub fn Start(&self) -> ::windows::Result<()> {
let this = self;
unsafe {
(::windows::Interface::vtable(this).9)(::std::mem::transmute_copy(this)).ok()
}
}
pub fn Stop(&self) -> ::windows::Result<()> {
let this = self;
unsafe {
(::windows::Interface::vtable(this).10)(::std::mem::transmute_copy(this)).ok()
}
}
pub fn Kind(&self) -> ::windows::Result<ConditionForceEffectKind> {
let this = &::windows::Interface::cast::<IConditionForceEffect>(self)?;
unsafe {
let mut result__: ConditionForceEffectKind = ::std::mem::zeroed();
(::windows::Interface::vtable(this).6)(
::std::mem::transmute_copy(this),
&mut result__,
)
.from_abi::<ConditionForceEffectKind>(result__)
}
}
pub fn SetParameters<
'a,
Param0: ::windows::IntoParam<'a, ::windows_foundation::Numerics::Vector3>,
>(
&self,
direction: Param0,
positivecoefficient: f32,
negativecoefficient: f32,
maxpositivemagnitude: f32,
maxnegativemagnitude: f32,
deadzone: f32,
bias: f32,
) -> ::windows::Result<()> {
let this = &::windows::Interface::cast::<IConditionForceEffect>(self)?;
unsafe {
(::windows::Interface::vtable(this).7)(
::std::mem::transmute_copy(this),
direction.into_param().abi(),
positivecoefficient,
negativecoefficient,
maxpositivemagnitude,
maxnegativemagnitude,
deadzone,
bias,
)
.ok()
}
}
pub fn CreateInstance(
effectkind: ConditionForceEffectKind,
) -> ::windows::Result<ConditionForceEffect> {
Self::IConditionForceEffectFactory(|this| unsafe {
let mut result__: ::windows::RawPtr = ::std::mem::zeroed();
(::windows::Interface::vtable(this).6)(
::std::mem::transmute_copy(this),
effectkind,
&mut result__,
)
.from_abi::<ConditionForceEffect>(result__)
})
}
pub fn IConditionForceEffectFactory<
R,
F: FnOnce(&IConditionForceEffectFactory) -> ::windows::Result<R>,
>(
callback: F,
) -> ::windows::Result<R> {
static mut SHARED: ::windows::FactoryCache<
ConditionForceEffect,
IConditionForceEffectFactory,
> = ::windows::FactoryCache::new();
unsafe { SHARED.call(callback) }
}
}
unsafe impl ::windows::RuntimeType for ConditionForceEffect {
const SIGNATURE : :: windows :: ConstBuffer = :: windows :: ConstBuffer :: from_slice ( b"rc(Windows.Gaming.Input.ForceFeedback.ConditionForceEffect;{a17fba0c-2ae4-48c2-8063-eabd0777cb89})" ) ;
}
unsafe impl ::windows::Interface for ConditionForceEffect {
type Vtable = IForceFeedbackEffect_abi;
const IID: ::windows::Guid = ::windows::Guid::from_values(
2709502476,
10980,
18626,
[128, 99, 234, 189, 7, 119, 203, 137],
);
}
impl ::windows::RuntimeName for ConditionForceEffect {
const NAME: &'static str = "Windows.Gaming.Input.ForceFeedback.ConditionForceEffect";
}
impl ::std::convert::From<ConditionForceEffect> for ::windows::IUnknown {
fn from(value: ConditionForceEffect) -> Self {
unsafe { ::std::mem::transmute(value) }
}
}
impl ::std::convert::From<&ConditionForceEffect> for ::windows::IUnknown {
fn from(value: &ConditionForceEffect) -> Self {
::std::convert::From::from(::std::clone::Clone::clone(value))
}
}
impl<'a> ::windows::IntoParam<'a, ::windows::IUnknown> for ConditionForceEffect {
fn into_param(self) -> ::windows::Param<'a, ::windows::IUnknown> {
::windows::Param::Owned(::std::convert::Into::<::windows::IUnknown>::into(self))
}
}
impl<'a> ::windows::IntoParam<'a, ::windows::IUnknown> for &ConditionForceEffect {
fn into_param(self) -> ::windows::Param<'a, ::windows::IUnknown> {
::windows::Param::Owned(::std::convert::Into::<::windows::IUnknown>::into(
::std::clone::Clone::clone(self),
))
}
}
impl ::std::convert::From<ConditionForceEffect> for ::windows::IInspectable {
fn from(value: ConditionForceEffect) -> Self {
value.0
}
}
impl ::std::convert::From<&ConditionForceEffect> for ::windows::IInspectable {
fn from(value: &ConditionForceEffect) -> Self {
value.0.clone()
}
}
impl<'a> ::windows::IntoParam<'a, ::windows::IInspectable> for ConditionForceEffect {
fn into_param(self) -> ::windows::Param<'a, ::windows::IInspectable> {
::windows::Param::Owned(self.0)
}
}
impl<'a> ::windows::IntoParam<'a, ::windows::IInspectable> for &'a ConditionForceEffect {
fn into_param(self) -> ::windows::Param<'a, ::windows::IInspectable> {
::windows::Param::Borrowed(&self.0)
}
}
impl ::std::convert::From<ConditionForceEffect> for IForceFeedbackEffect {
fn from(value: ConditionForceEffect) -> Self {
unsafe { ::std::mem::transmute(value) }
}
}
impl ::std::convert::From<&ConditionForceEffect> for IForceFeedbackEffect {
fn from(value: &ConditionForceEffect) -> Self {
::std::convert::From::from(::std::clone::Clone::clone(value))
}
}
impl<'a> ::windows::IntoParam<'a, IForceFeedbackEffect> for ConditionForceEffect {
fn into_param(self) -> ::windows::Param<'a, IForceFeedbackEffect> {
::windows::Param::Owned(::std::convert::Into::<IForceFeedbackEffect>::into(self))
}
}
impl<'a> ::windows::IntoParam<'a, IForceFeedbackEffect> for &ConditionForceEffect {
fn into_param(self) -> ::windows::Param<'a, IForceFeedbackEffect> {
::windows::Param::Owned(::std::convert::Into::<IForceFeedbackEffect>::into(
::std::clone::Clone::clone(self),
))
}
}
unsafe impl ::std::marker::Send for ConditionForceEffect {}
unsafe impl ::std::marker::Sync for ConditionForceEffect {}
#[derive(
:: std :: cmp :: PartialEq,
:: std :: cmp :: Eq,
:: std :: marker :: Copy,
:: std :: clone :: Clone,
:: std :: default :: Default,
:: std :: fmt :: Debug,
)]
#[repr(transparent)]
pub struct ConditionForceEffectKind(pub i32);
impl ConditionForceEffectKind {
pub const Spring: ConditionForceEffectKind = ConditionForceEffectKind(0i32);
pub const Damper: ConditionForceEffectKind = ConditionForceEffectKind(1i32);
pub const Inertia: ConditionForceEffectKind = ConditionForceEffectKind(2i32);
pub const Friction: ConditionForceEffectKind = ConditionForceEffectKind(3i32);
}
impl ::std::convert::From<i32> for ConditionForceEffectKind {
fn from(value: i32) -> Self {
Self(value)
}
}
unsafe impl ::windows::Abi for ConditionForceEffectKind {
type Abi = Self;
type DefaultType = Self;
}
unsafe impl ::windows::RuntimeType for ConditionForceEffectKind {
const SIGNATURE: ::windows::ConstBuffer = ::windows::ConstBuffer::from_slice(
b"enum(Windows.Gaming.Input.ForceFeedback.ConditionForceEffectKind;i4)",
);
}
#[repr(transparent)]
#[derive(
:: std :: cmp :: PartialEq,
:: std :: cmp :: Eq,
:: std :: clone :: Clone,
:: std :: fmt :: Debug,
)]
pub struct ConstantForceEffect(::windows::IInspectable);
impl ConstantForceEffect {
pub fn new() -> ::windows::Result<Self> {
Self::IActivationFactory(|f| f.activate_instance::<Self>())
}
fn IActivationFactory<
R,
F: FnOnce(&::windows::IActivationFactory) -> ::windows::Result<R>,
>(
callback: F,
) -> ::windows::Result<R> {
static mut SHARED: ::windows::FactoryCache<
ConstantForceEffect,
::windows::IActivationFactory,
> = ::windows::FactoryCache::new();
unsafe { SHARED.call(callback) }
}
pub fn Gain(&self) -> ::windows::Result<f64> {
let this = self;
unsafe {
let mut result__: f64 = ::std::mem::zeroed();
(::windows::Interface::vtable(this).6)(
::std::mem::transmute_copy(this),
&mut result__,
)
.from_abi::<f64>(result__)
}
}
pub fn SetGain(&self, value: f64) -> ::windows::Result<()> {
let this = self;
unsafe {
(::windows::Interface::vtable(this).7)(::std::mem::transmute_copy(this), value)
.ok()
}
}
pub fn State(&self) -> ::windows::Result<ForceFeedbackEffectState> {
let this = self;
unsafe {
let mut result__: ForceFeedbackEffectState = ::std::mem::zeroed();
(::windows::Interface::vtable(this).8)(
::std::mem::transmute_copy(this),
&mut result__,
)
.from_abi::<ForceFeedbackEffectState>(result__)
}
}
pub fn Start(&self) -> ::windows::Result<()> {
let this = self;
unsafe {
(::windows::Interface::vtable(this).9)(::std::mem::transmute_copy(this)).ok()
}
}
pub fn Stop(&self) -> ::windows::Result<()> {
let this = self;
unsafe {
(::windows::Interface::vtable(this).10)(::std::mem::transmute_copy(this)).ok()
}
}
pub fn SetParameters<
'a,
Param0: ::windows::IntoParam<'a, ::windows_foundation::Numerics::Vector3>,
Param1: ::windows::IntoParam<'a, ::windows_foundation::TimeSpan>,
>(
&self,
vector: Param0,
duration: Param1,
) -> ::windows::Result<()> {
let this = &::windows::Interface::cast::<IConstantForceEffect>(self)?;
unsafe {
(::windows::Interface::vtable(this).6)(
::std::mem::transmute_copy(this),
vector.into_param().abi(),
duration.into_param().abi(),
)
.ok()
}
}
pub fn SetParametersWithEnvelope<
'a,
Param0: ::windows::IntoParam<'a, ::windows_foundation::Numerics::Vector3>,
Param4: ::windows::IntoParam<'a, ::windows_foundation::TimeSpan>,
Param5: ::windows::IntoParam<'a, ::windows_foundation::TimeSpan>,
Param6: ::windows::IntoParam<'a, ::windows_foundation::TimeSpan>,
Param7: ::windows::IntoParam<'a, ::windows_foundation::TimeSpan>,
>(
&self,
vector: Param0,
attackgain: f32,
sustaingain: f32,
releasegain: f32,
startdelay: Param4,
attackduration: Param5,
sustainduration: Param6,
releaseduration: Param7,
repeatcount: u32,
) -> ::windows::Result<()> {
let this = &::windows::Interface::cast::<IConstantForceEffect>(self)?;
unsafe {
(::windows::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()
}
}
}
unsafe impl ::windows::RuntimeType for ConstantForceEffect {
const SIGNATURE : :: windows :: ConstBuffer = :: windows :: ConstBuffer :: from_slice ( b"rc(Windows.Gaming.Input.ForceFeedback.ConstantForceEffect;{a17fba0c-2ae4-48c2-8063-eabd0777cb89})" ) ;
}
unsafe impl ::windows::Interface for ConstantForceEffect {
type Vtable = IForceFeedbackEffect_abi;
const IID: ::windows::Guid = ::windows::Guid::from_values(
2709502476,
10980,
18626,
[128, 99, 234, 189, 7, 119, 203, 137],
);
}
impl ::windows::RuntimeName for ConstantForceEffect {
const NAME: &'static str = "Windows.Gaming.Input.ForceFeedback.ConstantForceEffect";
}
impl ::std::convert::From<ConstantForceEffect> for ::windows::IUnknown {
fn from(value: ConstantForceEffect) -> Self {
unsafe { ::std::mem::transmute(value) }
}
}
impl ::std::convert::From<&ConstantForceEffect> for ::windows::IUnknown {
fn from(value: &ConstantForceEffect) -> Self {
::std::convert::From::from(::std::clone::Clone::clone(value))
}
}
impl<'a> ::windows::IntoParam<'a, ::windows::IUnknown> for ConstantForceEffect {
fn into_param(self) -> ::windows::Param<'a, ::windows::IUnknown> {
::windows::Param::Owned(::std::convert::Into::<::windows::IUnknown>::into(self))
}
}
impl<'a> ::windows::IntoParam<'a, ::windows::IUnknown> for &ConstantForceEffect {
fn into_param(self) -> ::windows::Param<'a, ::windows::IUnknown> {
::windows::Param::Owned(::std::convert::Into::<::windows::IUnknown>::into(
::std::clone::Clone::clone(self),
))
}
}
impl ::std::convert::From<ConstantForceEffect> for ::windows::IInspectable {
fn from(value: ConstantForceEffect) -> Self {
value.0
}
}
impl ::std::convert::From<&ConstantForceEffect> for ::windows::IInspectable {
fn from(value: &ConstantForceEffect) -> Self {
value.0.clone()
}
}
impl<'a> ::windows::IntoParam<'a, ::windows::IInspectable> for ConstantForceEffect {
fn into_param(self) -> ::windows::Param<'a, ::windows::IInspectable> {
::windows::Param::Owned(self.0)
}
}
impl<'a> ::windows::IntoParam<'a, ::windows::IInspectable> for &'a ConstantForceEffect {
fn into_param(self) -> ::windows::Param<'a, ::windows::IInspectable> {
::windows::Param::Borrowed(&self.0)
}
}
impl ::std::convert::From<ConstantForceEffect> for IForceFeedbackEffect {
fn from(value: ConstantForceEffect) -> Self {
unsafe { ::std::mem::transmute(value) }
}
}
impl ::std::convert::From<&ConstantForceEffect> for IForceFeedbackEffect {
fn from(value: &ConstantForceEffect) -> Self {
::std::convert::From::from(::std::clone::Clone::clone(value))
}
}
impl<'a> ::windows::IntoParam<'a, IForceFeedbackEffect> for ConstantForceEffect {
fn into_param(self) -> ::windows::Param<'a, IForceFeedbackEffect> {
::windows::Param::Owned(::std::convert::Into::<IForceFeedbackEffect>::into(self))
}
}
impl<'a> ::windows::IntoParam<'a, IForceFeedbackEffect> for &ConstantForceEffect {
fn into_param(self) -> ::windows::Param<'a, IForceFeedbackEffect> {
::windows::Param::Owned(::std::convert::Into::<IForceFeedbackEffect>::into(
::std::clone::Clone::clone(self),
))
}
}
unsafe impl ::std::marker::Send for ConstantForceEffect {}
unsafe impl ::std::marker::Sync for ConstantForceEffect {}
#[derive(
:: std :: cmp :: PartialEq,
:: std :: cmp :: Eq,
:: std :: marker :: Copy,
:: std :: clone :: Clone,
:: std :: default :: Default,
:: std :: fmt :: Debug,
)]
#[repr(transparent)]
pub struct ForceFeedbackEffectAxes(pub u32);
impl ForceFeedbackEffectAxes {
pub const None: ForceFeedbackEffectAxes = ForceFeedbackEffectAxes(0u32);
pub const X: ForceFeedbackEffectAxes = ForceFeedbackEffectAxes(1u32);
pub const Y: ForceFeedbackEffectAxes = ForceFeedbackEffectAxes(2u32);
pub const Z: ForceFeedbackEffectAxes = ForceFeedbackEffectAxes(4u32);
}
impl ::std::convert::From<u32> for ForceFeedbackEffectAxes {
fn from(value: u32) -> Self {
Self(value)
}
}
unsafe impl ::windows::Abi for ForceFeedbackEffectAxes {
type Abi = Self;
type DefaultType = Self;
}
unsafe impl ::windows::RuntimeType for ForceFeedbackEffectAxes {
const SIGNATURE: ::windows::ConstBuffer = ::windows::ConstBuffer::from_slice(
b"enum(Windows.Gaming.Input.ForceFeedback.ForceFeedbackEffectAxes;u4)",
);
}
impl ::std::ops::BitOr for ForceFeedbackEffectAxes {
type Output = Self;
fn bitor(self, rhs: Self) -> Self {
Self(self.0 | rhs.0)
}
}
impl ::std::ops::BitAnd for ForceFeedbackEffectAxes {
type Output = Self;
fn bitand(self, rhs: Self) -> Self {
Self(self.0 & rhs.0)
}
}
impl ::std::ops::BitOrAssign for ForceFeedbackEffectAxes {
fn bitor_assign(&mut self, rhs: Self) {
self.0.bitor_assign(rhs.0)
}
}
impl ::std::ops::BitAndAssign for ForceFeedbackEffectAxes {
fn bitand_assign(&mut self, rhs: Self) {
self.0.bitand_assign(rhs.0)
}
}
impl ::std::ops::Not for ForceFeedbackEffectAxes {
type Output = Self;
fn not(self) -> Self {
Self(self.0.not())
}
}
#[derive(
:: std :: cmp :: PartialEq,
:: std :: cmp :: Eq,
:: std :: marker :: Copy,
:: std :: clone :: Clone,
:: std :: default :: Default,
:: std :: fmt :: Debug,
)]
#[repr(transparent)]
pub struct ForceFeedbackEffectState(pub i32);
impl ForceFeedbackEffectState {
pub const Stopped: ForceFeedbackEffectState = ForceFeedbackEffectState(0i32);
pub const Running: ForceFeedbackEffectState = ForceFeedbackEffectState(1i32);
pub const Paused: ForceFeedbackEffectState = ForceFeedbackEffectState(2i32);
pub const Faulted: ForceFeedbackEffectState = ForceFeedbackEffectState(3i32);
}
impl ::std::convert::From<i32> for ForceFeedbackEffectState {
fn from(value: i32) -> Self {
Self(value)
}
}
unsafe impl ::windows::Abi for ForceFeedbackEffectState {
type Abi = Self;
type DefaultType = Self;
}
unsafe impl ::windows::RuntimeType for ForceFeedbackEffectState {
const SIGNATURE: ::windows::ConstBuffer = ::windows::ConstBuffer::from_slice(
b"enum(Windows.Gaming.Input.ForceFeedback.ForceFeedbackEffectState;i4)",
);
}
#[derive(
:: std :: cmp :: PartialEq,
:: std :: cmp :: Eq,
:: std :: marker :: Copy,
:: std :: clone :: Clone,
:: std :: default :: Default,
:: std :: fmt :: Debug,
)]
#[repr(transparent)]
pub struct ForceFeedbackLoadEffectResult(pub i32);
impl ForceFeedbackLoadEffectResult {
pub const Succeeded: ForceFeedbackLoadEffectResult =
ForceFeedbackLoadEffectResult(0i32);
pub const EffectStorageFull: ForceFeedbackLoadEffectResult =
ForceFeedbackLoadEffectResult(1i32);
pub const EffectNotSupported: ForceFeedbackLoadEffectResult =
ForceFeedbackLoadEffectResult(2i32);
}
impl ::std::convert::From<i32> for ForceFeedbackLoadEffectResult {
fn from(value: i32) -> Self {
Self(value)
}
}
unsafe impl ::windows::Abi for ForceFeedbackLoadEffectResult {
type Abi = Self;
type DefaultType = Self;
}
unsafe impl ::windows::RuntimeType for ForceFeedbackLoadEffectResult {
const SIGNATURE: ::windows::ConstBuffer = ::windows::ConstBuffer::from_slice(
b"enum(Windows.Gaming.Input.ForceFeedback.ForceFeedbackLoadEffectResult;i4)",
);
}
#[repr(transparent)]
#[derive(
:: std :: cmp :: PartialEq,
:: std :: cmp :: Eq,
:: std :: clone :: Clone,
:: std :: fmt :: Debug,
)]
pub struct ForceFeedbackMotor(::windows::IInspectable);
impl ForceFeedbackMotor {
pub fn AreEffectsPaused(&self) -> ::windows::Result<bool> {
let this = self;
unsafe {
let mut result__: bool = ::std::mem::zeroed();
(::windows::Interface::vtable(this).6)(
::std::mem::transmute_copy(this),
&mut result__,
)
.from_abi::<bool>(result__)
}
}
pub fn MasterGain(&self) -> ::windows::Result<f64> {
let this = self;
unsafe {
let mut result__: f64 = ::std::mem::zeroed();
(::windows::Interface::vtable(this).7)(
::std::mem::transmute_copy(this),
&mut result__,
)
.from_abi::<f64>(result__)
}
}
pub fn SetMasterGain(&self, value: f64) -> ::windows::Result<()> {
let this = self;
unsafe {
(::windows::Interface::vtable(this).8)(::std::mem::transmute_copy(this), value)
.ok()
}
}
pub fn IsEnabled(&self) -> ::windows::Result<bool> {
let this = self;
unsafe {
let mut result__: bool = ::std::mem::zeroed();
(::windows::Interface::vtable(this).9)(
::std::mem::transmute_copy(this),
&mut result__,
)
.from_abi::<bool>(result__)
}
}
pub fn SupportedAxes(&self) -> ::windows::Result<ForceFeedbackEffectAxes> {
let this = self;
unsafe {
let mut result__: ForceFeedbackEffectAxes = ::std::mem::zeroed();
(::windows::Interface::vtable(this).10)(
::std::mem::transmute_copy(this),
&mut result__,
)
.from_abi::<ForceFeedbackEffectAxes>(result__)
}
}
pub fn LoadEffectAsync<'a, Param0: ::windows::IntoParam<'a, IForceFeedbackEffect>>(
&self,
effect: Param0,
) -> ::windows::Result<
::windows_foundation::IAsyncOperation<ForceFeedbackLoadEffectResult>,
> {
let this = self;
unsafe {
let mut result__: ::windows::RawPtr = ::std::mem::zeroed();
(::windows::Interface::vtable(this).11)(
::std::mem::transmute_copy(this),
effect.into_param().abi(),
&mut result__,
)
.from_abi::<::windows_foundation::IAsyncOperation<
ForceFeedbackLoadEffectResult,
>>(result__)
}
}
pub fn PauseAllEffects(&self) -> ::windows::Result<()> {
let this = self;
unsafe {
(::windows::Interface::vtable(this).12)(::std::mem::transmute_copy(this)).ok()
}
}
pub fn ResumeAllEffects(&self) -> ::windows::Result<()> {
let this = self;
unsafe {
(::windows::Interface::vtable(this).13)(::std::mem::transmute_copy(this)).ok()
}
}
pub fn StopAllEffects(&self) -> ::windows::Result<()> {
let this = self;
unsafe {
(::windows::Interface::vtable(this).14)(::std::mem::transmute_copy(this)).ok()
}
}
pub fn TryDisableAsync(
&self,
) -> ::windows::Result<::windows_foundation::IAsyncOperation<bool>> {
let this = self;
unsafe {
let mut result__: ::windows::RawPtr = ::std::mem::zeroed();
(::windows::Interface::vtable(this).15)(
::std::mem::transmute_copy(this),
&mut result__,
)
.from_abi::<::windows_foundation::IAsyncOperation<bool>>(result__)
}
}
pub fn TryEnableAsync(
&self,
) -> ::windows::Result<::windows_foundation::IAsyncOperation<bool>> {
let this = self;
unsafe {
let mut result__: ::windows::RawPtr = ::std::mem::zeroed();
(::windows::Interface::vtable(this).16)(
::std::mem::transmute_copy(this),
&mut result__,
)
.from_abi::<::windows_foundation::IAsyncOperation<bool>>(result__)
}
}
pub fn TryResetAsync(
&self,
) -> ::windows::Result<::windows_foundation::IAsyncOperation<bool>> {
let this = self;
unsafe {
let mut result__: ::windows::RawPtr = ::std::mem::zeroed();
(::windows::Interface::vtable(this).17)(
::std::mem::transmute_copy(this),
&mut result__,
)
.from_abi::<::windows_foundation::IAsyncOperation<bool>>(result__)
}
}
pub fn TryUnloadEffectAsync<
'a,
Param0: ::windows::IntoParam<'a, IForceFeedbackEffect>,
>(
&self,
effect: Param0,
) -> ::windows::Result<::windows_foundation::IAsyncOperation<bool>> {
let this = self;
unsafe {
let mut result__: ::windows::RawPtr = ::std::mem::zeroed();
(::windows::Interface::vtable(this).18)(
::std::mem::transmute_copy(this),
effect.into_param().abi(),
&mut result__,
)
.from_abi::<::windows_foundation::IAsyncOperation<bool>>(result__)
}
}
}
unsafe impl ::windows::RuntimeType for ForceFeedbackMotor {
const SIGNATURE : :: windows :: ConstBuffer = :: windows :: ConstBuffer :: from_slice ( b"rc(Windows.Gaming.Input.ForceFeedback.ForceFeedbackMotor;{8d3d417c-a5ea-4516-8026-2b00f74ef6e5})" ) ;
}
unsafe impl ::windows::Interface for ForceFeedbackMotor {
type Vtable = IForceFeedbackMotor_abi;
const IID: ::windows::Guid = ::windows::Guid::from_values(
2369601916,
42474,
17686,
[128, 38, 43, 0, 247, 78, 246, 229],
);
}
impl ::windows::RuntimeName for ForceFeedbackMotor {
const NAME: &'static str = "Windows.Gaming.Input.ForceFeedback.ForceFeedbackMotor";
}
impl ::std::convert::From<ForceFeedbackMotor> for ::windows::IUnknown {
fn from(value: ForceFeedbackMotor) -> Self {
unsafe { ::std::mem::transmute(value) }
}
}
impl ::std::convert::From<&ForceFeedbackMotor> for ::windows::IUnknown {
fn from(value: &ForceFeedbackMotor) -> Self {
::std::convert::From::from(::std::clone::Clone::clone(value))
}
}
impl<'a> ::windows::IntoParam<'a, ::windows::IUnknown> for ForceFeedbackMotor {
fn into_param(self) -> ::windows::Param<'a, ::windows::IUnknown> {
::windows::Param::Owned(::std::convert::Into::<::windows::IUnknown>::into(self))
}
}
impl<'a> ::windows::IntoParam<'a, ::windows::IUnknown> for &ForceFeedbackMotor {
fn into_param(self) -> ::windows::Param<'a, ::windows::IUnknown> {
::windows::Param::Owned(::std::convert::Into::<::windows::IUnknown>::into(
::std::clone::Clone::clone(self),
))
}
}
impl ::std::convert::From<ForceFeedbackMotor> for ::windows::IInspectable {
fn from(value: ForceFeedbackMotor) -> Self {
value.0
}
}
impl ::std::convert::From<&ForceFeedbackMotor> for ::windows::IInspectable {
fn from(value: &ForceFeedbackMotor) -> Self {
value.0.clone()
}
}
impl<'a> ::windows::IntoParam<'a, ::windows::IInspectable> for ForceFeedbackMotor {
fn into_param(self) -> ::windows::Param<'a, ::windows::IInspectable> {
::windows::Param::Owned(self.0)
}
}
impl<'a> ::windows::IntoParam<'a, ::windows::IInspectable> for &'a ForceFeedbackMotor {
fn into_param(self) -> ::windows::Param<'a, ::windows::IInspectable> {
::windows::Param::Borrowed(&self.0)
}
}
unsafe impl ::std::marker::Send for ForceFeedbackMotor {}
unsafe impl ::std::marker::Sync for ForceFeedbackMotor {}
#[repr(transparent)]
#[derive(
:: std :: cmp :: PartialEq,
:: std :: cmp :: Eq,
:: std :: clone :: Clone,
:: std :: fmt :: Debug,
)]
#[doc(hidden)]
pub struct IConditionForceEffect(::windows::IInspectable);
unsafe impl ::windows::Interface for IConditionForceEffect {
type Vtable = IConditionForceEffect_abi;
const IID: ::windows::Guid = ::windows::Guid::from_values(
852617832,
13973,
20073,
[133, 192, 205, 25, 68, 24, 145, 64],
);
}
#[repr(C)]
#[doc(hidden)]
pub struct IConditionForceEffect_abi(
pub unsafe extern "system" fn(
this: ::windows::RawPtr,
iid: &::windows::Guid,
interface: *mut ::windows::RawPtr,
) -> ::windows::HRESULT,
pub unsafe extern "system" fn(this: ::windows::RawPtr) -> u32,
pub unsafe extern "system" fn(this: ::windows::RawPtr) -> u32,
pub unsafe extern "system" fn(
this: ::windows::RawPtr,
count: *mut u32,
values: *mut *mut ::windows::Guid,
) -> ::windows::HRESULT,
pub unsafe extern "system" fn(
this: ::windows::RawPtr,
value: *mut ::windows::RawPtr,
) -> ::windows::HRESULT,
pub unsafe extern "system" fn(
this: ::windows::RawPtr,
value: *mut i32,
) -> ::windows::HRESULT,
pub unsafe extern "system" fn(
this: ::windows::RawPtr,
result__: *mut ConditionForceEffectKind,
) -> ::windows::HRESULT,
pub unsafe extern "system" fn(
this: ::windows::RawPtr,
direction: ::windows_foundation::Numerics::Vector3,
positivecoefficient: f32,
negativecoefficient: f32,
maxpositivemagnitude: f32,
maxnegativemagnitude: f32,
deadzone: f32,
bias: f32,
) -> ::windows::HRESULT,
);
#[repr(transparent)]
#[derive(
:: std :: cmp :: PartialEq,
:: std :: cmp :: Eq,
:: std :: clone :: Clone,
:: std :: fmt :: Debug,
)]
#[doc(hidden)]
pub struct IConditionForceEffectFactory(::windows::IInspectable);
unsafe impl ::windows::Interface for IConditionForceEffectFactory {
type Vtable = IConditionForceEffectFactory_abi;
const IID: ::windows::Guid = ::windows::Guid::from_values(
2443809380,
6160,
20150,
[167, 115, 191, 211, 184, 205, 219, 171],
);
}
#[repr(C)]
#[doc(hidden)]
pub struct IConditionForceEffectFactory_abi(
pub unsafe extern "system" fn(
this: ::windows::RawPtr,
iid: &::windows::Guid,
interface: *mut ::windows::RawPtr,
) -> ::windows::HRESULT,
pub unsafe extern "system" fn(this: ::windows::RawPtr) -> u32,
pub unsafe extern "system" fn(this: ::windows::RawPtr) -> u32,
pub unsafe extern "system" fn(
this: ::windows::RawPtr,
count: *mut u32,
values: *mut *mut ::windows::Guid,
) -> ::windows::HRESULT,
pub unsafe extern "system" fn(
this: ::windows::RawPtr,
value: *mut ::windows::RawPtr,
) -> ::windows::HRESULT,
pub unsafe extern "system" fn(
this: ::windows::RawPtr,
value: *mut i32,
) -> ::windows::HRESULT,
pub unsafe extern "system" fn(
this: ::windows::RawPtr,
effectkind: ConditionForceEffectKind,
result__: *mut ::windows::RawPtr,
) -> ::windows::HRESULT,
);
#[repr(transparent)]
#[derive(
:: std :: cmp :: PartialEq,
:: std :: cmp :: Eq,
:: std :: clone :: Clone,
:: std :: fmt :: Debug,
)]
#[doc(hidden)]
pub struct IConstantForceEffect(::windows::IInspectable);
unsafe impl ::windows::Interface for IConstantForceEffect {
type Vtable = IConstantForceEffect_abi;
const IID: ::windows::Guid = ::windows::Guid::from_values(
2616852800,
62407,
16732,
[176, 104, 15, 6, 135, 52, 188, 224],
);
}
#[repr(C)]
#[doc(hidden)]
pub struct IConstantForceEffect_abi(
pub unsafe extern "system" fn(
this: ::windows::RawPtr,
iid: &::windows::Guid,
interface: *mut ::windows::RawPtr,
) -> ::windows::HRESULT,
pub unsafe extern "system" fn(this: ::windows::RawPtr) -> u32,
pub unsafe extern "system" fn(this: ::windows::RawPtr) -> u32,
pub unsafe extern "system" fn(
this: ::windows::RawPtr,
count: *mut u32,
values: *mut *mut ::windows::Guid,
) -> ::windows::HRESULT,
pub unsafe extern "system" fn(
this: ::windows::RawPtr,
value: *mut ::windows::RawPtr,
) -> ::windows::HRESULT,
pub unsafe extern "system" fn(
this: ::windows::RawPtr,
value: *mut i32,
) -> ::windows::HRESULT,
pub unsafe extern "system" fn(
this: ::windows::RawPtr,
vector: ::windows_foundation::Numerics::Vector3,
duration: ::windows_foundation::TimeSpan,
) -> ::windows::HRESULT,
pub unsafe extern "system" fn(
this: ::windows::RawPtr,
vector: ::windows_foundation::Numerics::Vector3,
attackgain: f32,
sustaingain: f32,
releasegain: f32,
startdelay: ::windows_foundation::TimeSpan,
attackduration: ::windows_foundation::TimeSpan,
sustainduration: ::windows_foundation::TimeSpan,
releaseduration: ::windows_foundation::TimeSpan,
repeatcount: u32,
) -> ::windows::HRESULT,
);
#[repr(transparent)]
#[derive(
:: std :: cmp :: PartialEq,
:: std :: cmp :: Eq,
:: std :: clone :: Clone,
:: std :: fmt :: Debug,
)]
pub struct IForceFeedbackEffect(::windows::IInspectable);
unsafe impl ::windows::Interface for IForceFeedbackEffect {
type Vtable = IForceFeedbackEffect_abi;
const IID: ::windows::Guid = ::windows::Guid::from_values(
2709502476,
10980,
18626,
[128, 99, 234, 189, 7, 119, 203, 137],
);
}
impl IForceFeedbackEffect {
pub fn Gain(&self) -> ::windows::Result<f64> {
let this = self;
unsafe {
let mut result__: f64 = ::std::mem::zeroed();
(::windows::Interface::vtable(this).6)(
::std::mem::transmute_copy(this),
&mut result__,
)
.from_abi::<f64>(result__)
}
}
pub fn SetGain(&self, value: f64) -> ::windows::Result<()> {
let this = self;
unsafe {
(::windows::Interface::vtable(this).7)(::std::mem::transmute_copy(this), value)
.ok()
}
}
pub fn State(&self) -> ::windows::Result<ForceFeedbackEffectState> {
let this = self;
unsafe {
let mut result__: ForceFeedbackEffectState = ::std::mem::zeroed();
(::windows::Interface::vtable(this).8)(
::std::mem::transmute_copy(this),
&mut result__,
)
.from_abi::<ForceFeedbackEffectState>(result__)
}
}
pub fn Start(&self) -> ::windows::Result<()> {
let this = self;
unsafe {
(::windows::Interface::vtable(this).9)(::std::mem::transmute_copy(this)).ok()
}
}
pub fn Stop(&self) -> ::windows::Result<()> {
let this = self;
unsafe {
(::windows::Interface::vtable(this).10)(::std::mem::transmute_copy(this)).ok()
}
}
}
unsafe impl ::windows::RuntimeType for IForceFeedbackEffect {
const SIGNATURE: ::windows::ConstBuffer =
::windows::ConstBuffer::from_slice(b"{a17fba0c-2ae4-48c2-8063-eabd0777cb89}");
}
impl ::std::convert::From<IForceFeedbackEffect> for ::windows::IUnknown {
fn from(value: IForceFeedbackEffect) -> Self {
unsafe { ::std::mem::transmute(value) }
}
}
impl ::std::convert::From<&IForceFeedbackEffect> for ::windows::IUnknown {
fn from(value: &IForceFeedbackEffect) -> Self {
::std::convert::From::from(::std::clone::Clone::clone(value))
}
}
impl<'a> ::windows::IntoParam<'a, ::windows::IUnknown> for IForceFeedbackEffect {
fn into_param(self) -> ::windows::Param<'a, ::windows::IUnknown> {
::windows::Param::Owned(::std::convert::Into::<::windows::IUnknown>::into(self))
}
}
impl<'a> ::windows::IntoParam<'a, ::windows::IUnknown> for &IForceFeedbackEffect {
fn into_param(self) -> ::windows::Param<'a, ::windows::IUnknown> {
::windows::Param::Owned(::std::convert::Into::<::windows::IUnknown>::into(
::std::clone::Clone::clone(self),
))
}
}
impl ::std::convert::From<IForceFeedbackEffect> for ::windows::IInspectable {
fn from(value: IForceFeedbackEffect) -> Self {
value.0
}
}
impl ::std::convert::From<&IForceFeedbackEffect> for ::windows::IInspectable {
fn from(value: &IForceFeedbackEffect) -> Self {
value.0.clone()
}
}
impl<'a> ::windows::IntoParam<'a, ::windows::IInspectable> for IForceFeedbackEffect {
fn into_param(self) -> ::windows::Param<'a, ::windows::IInspectable> {
::windows::Param::Owned(self.0)
}
}
impl<'a> ::windows::IntoParam<'a, ::windows::IInspectable> for &'a IForceFeedbackEffect {
fn into_param(self) -> ::windows::Param<'a, ::windows::IInspectable> {
::windows::Param::Borrowed(&self.0)
}
}
#[repr(C)]
#[doc(hidden)]
pub struct IForceFeedbackEffect_abi(
pub unsafe extern "system" fn(
this: ::windows::RawPtr,
iid: &::windows::Guid,
interface: *mut ::windows::RawPtr,
) -> ::windows::HRESULT,
pub unsafe extern "system" fn(this: ::windows::RawPtr) -> u32,
pub unsafe extern "system" fn(this: ::windows::RawPtr) -> u32,
pub unsafe extern "system" fn(
this: ::windows::RawPtr,
count: *mut u32,
values: *mut *mut ::windows::Guid,
) -> ::windows::HRESULT,
pub unsafe extern "system" fn(
this: ::windows::RawPtr,
value: *mut ::windows::RawPtr,
) -> ::windows::HRESULT,
pub unsafe extern "system" fn(
this: ::windows::RawPtr,
value: *mut i32,
) -> ::windows::HRESULT,
pub unsafe extern "system" fn(
this: ::windows::RawPtr,
result__: *mut f64,
) -> ::windows::HRESULT,
pub unsafe extern "system" fn(this: ::windows::RawPtr, value: f64) -> ::windows::HRESULT,
pub unsafe extern "system" fn(
this: ::windows::RawPtr,
result__: *mut ForceFeedbackEffectState,
) -> ::windows::HRESULT,
pub unsafe extern "system" fn(this: ::windows::RawPtr) -> ::windows::HRESULT,
pub unsafe extern "system" fn(this: ::windows::RawPtr) -> ::windows::HRESULT,
);
#[repr(transparent)]
#[derive(
:: std :: cmp :: PartialEq,
:: std :: cmp :: Eq,
:: std :: clone :: Clone,
:: std :: fmt :: Debug,
)]
#[doc(hidden)]
pub struct IForceFeedbackMotor(::windows::IInspectable);
unsafe impl ::windows::Interface for IForceFeedbackMotor {
type Vtable = IForceFeedbackMotor_abi;
const IID: ::windows::Guid = ::windows::Guid::from_values(
2369601916,
42474,
17686,
[128, 38, 43, 0, 247, 78, 246, 229],
);
}
#[repr(C)]
#[doc(hidden)]
pub struct IForceFeedbackMotor_abi(
pub unsafe extern "system" fn(
this: ::windows::RawPtr,
iid: &::windows::Guid,
interface: *mut ::windows::RawPtr,
) -> ::windows::HRESULT,
pub unsafe extern "system" fn(this: ::windows::RawPtr) -> u32,
pub unsafe extern "system" fn(this: ::windows::RawPtr) -> u32,
pub unsafe extern "system" fn(
this: ::windows::RawPtr,
count: *mut u32,
values: *mut *mut ::windows::Guid,
) -> ::windows::HRESULT,
pub unsafe extern "system" fn(
this: ::windows::RawPtr,
value: *mut ::windows::RawPtr,
) -> ::windows::HRESULT,
pub unsafe extern "system" fn(
this: ::windows::RawPtr,
value: *mut i32,
) -> ::windows::HRESULT,
pub unsafe extern "system" fn(
this: ::windows::RawPtr,
result__: *mut bool,
) -> ::windows::HRESULT,
pub unsafe extern "system" fn(
this: ::windows::RawPtr,
result__: *mut f64,
) -> ::windows::HRESULT,
pub unsafe extern "system" fn(this: ::windows::RawPtr, value: f64) -> ::windows::HRESULT,
pub unsafe extern "system" fn(
this: ::windows::RawPtr,
result__: *mut bool,
) -> ::windows::HRESULT,
pub unsafe extern "system" fn(
this: ::windows::RawPtr,
result__: *mut ForceFeedbackEffectAxes,
) -> ::windows::HRESULT,
pub unsafe extern "system" fn(
this: ::windows::RawPtr,
effect: ::windows::RawPtr,
result__: *mut ::windows::RawPtr,
) -> ::windows::HRESULT,
pub unsafe extern "system" fn(this: ::windows::RawPtr) -> ::windows::HRESULT,
pub unsafe extern "system" fn(this: ::windows::RawPtr) -> ::windows::HRESULT,
pub unsafe extern "system" fn(this: ::windows::RawPtr) -> ::windows::HRESULT,
pub unsafe extern "system" fn(
this: ::windows::RawPtr,
result__: *mut ::windows::RawPtr,
) -> ::windows::HRESULT,
pub unsafe extern "system" fn(
this: ::windows::RawPtr,
result__: *mut ::windows::RawPtr,
) -> ::windows::HRESULT,
pub unsafe extern "system" fn(
this: ::windows::RawPtr,
result__: *mut ::windows::RawPtr,
) -> ::windows::HRESULT,
pub unsafe extern "system" fn(
this: ::windows::RawPtr,
effect: ::windows::RawPtr,
result__: *mut ::windows::RawPtr,
) -> ::windows::HRESULT,
);
#[repr(transparent)]
#[derive(
:: std :: cmp :: PartialEq,
:: std :: cmp :: Eq,
:: std :: clone :: Clone,
:: std :: fmt :: Debug,
)]
#[doc(hidden)]
pub struct IPeriodicForceEffect(::windows::IInspectable);
unsafe impl ::windows::Interface for IPeriodicForceEffect {
type Vtable = IPeriodicForceEffect_abi;
const IID: ::windows::Guid = ::windows::Guid::from_values(
1548826839,
64629,
19794,
[154, 10, 239, 228, 202, 181, 254, 100],
);
}
#[repr(C)]
#[doc(hidden)]
pub struct IPeriodicForceEffect_abi(
pub unsafe extern "system" fn(
this: ::windows::RawPtr,
iid: &::windows::Guid,
interface: *mut ::windows::RawPtr,
) -> ::windows::HRESULT,
pub unsafe extern "system" fn(this: ::windows::RawPtr) -> u32,
pub unsafe extern "system" fn(this: ::windows::RawPtr) -> u32,
pub unsafe extern "system" fn(
this: ::windows::RawPtr,
count: *mut u32,
values: *mut *mut ::windows::Guid,
) -> ::windows::HRESULT,
pub unsafe extern "system" fn(
this: ::windows::RawPtr,
value: *mut ::windows::RawPtr,
) -> ::windows::HRESULT,
pub unsafe extern "system" fn(
this: ::windows::RawPtr,
value: *mut i32,
) -> ::windows::HRESULT,
pub unsafe extern "system" fn(
this: ::windows::RawPtr,
result__: *mut PeriodicForceEffectKind,
) -> ::windows::HRESULT,
pub unsafe extern "system" fn(
this: ::windows::RawPtr,
vector: ::windows_foundation::Numerics::Vector3,
frequency: f32,
phase: f32,
bias: f32,
duration: ::windows_foundation::TimeSpan,
) -> ::windows::HRESULT,
pub unsafe extern "system" fn(
this: ::windows::RawPtr,
vector: ::windows_foundation::Numerics::Vector3,
frequency: f32,
phase: f32,
bias: f32,
attackgain: f32,
sustaingain: f32,
releasegain: f32,
startdelay: ::windows_foundation::TimeSpan,
attackduration: ::windows_foundation::TimeSpan,
sustainduration: ::windows_foundation::TimeSpan,
releaseduration: ::windows_foundation::TimeSpan,
repeatcount: u32,
) -> ::windows::HRESULT,
);
#[repr(transparent)]
#[derive(
:: std :: cmp :: PartialEq,
:: std :: cmp :: Eq,
:: std :: clone :: Clone,
:: std :: fmt :: Debug,
)]
#[doc(hidden)]
pub struct IPeriodicForceEffectFactory(::windows::IInspectable);
unsafe impl ::windows::Interface for IPeriodicForceEffectFactory {
type Vtable = IPeriodicForceEffectFactory_abi;
const IID: ::windows::Guid = ::windows::Guid::from_values(
1868753690,
38993,
18299,
[179, 24, 53, 236, 170, 21, 7, 15],
);
}
#[repr(C)]
#[doc(hidden)]
pub struct IPeriodicForceEffectFactory_abi(
pub unsafe extern "system" fn(
this: ::windows::RawPtr,
iid: &::windows::Guid,
interface: *mut ::windows::RawPtr,
) -> ::windows::HRESULT,
pub unsafe extern "system" fn(this: ::windows::RawPtr) -> u32,
pub unsafe extern "system" fn(this: ::windows::RawPtr) -> u32,
pub unsafe extern "system" fn(
this: ::windows::RawPtr,
count: *mut u32,
values: *mut *mut ::windows::Guid,
) -> ::windows::HRESULT,
pub unsafe extern "system" fn(
this: ::windows::RawPtr,
value: *mut ::windows::RawPtr,
) -> ::windows::HRESULT,
pub unsafe extern "system" fn(
this: ::windows::RawPtr,
value: *mut i32,
) -> ::windows::HRESULT,
pub unsafe extern "system" fn(
this: ::windows::RawPtr,
effectkind: PeriodicForceEffectKind,
result__: *mut ::windows::RawPtr,
) -> ::windows::HRESULT,
);
#[repr(transparent)]
#[derive(
:: std :: cmp :: PartialEq,
:: std :: cmp :: Eq,
:: std :: clone :: Clone,
:: std :: fmt :: Debug,
)]
#[doc(hidden)]
pub struct IRampForceEffect(::windows::IInspectable);
unsafe impl ::windows::Interface for IRampForceEffect {
type Vtable = IRampForceEffect_abi;
const IID: ::windows::Guid = ::windows::Guid::from_values(
4059566681,
7334,
16512,
[181, 109, 180, 63, 51, 84, 208, 82],
);
}
#[repr(C)]
#[doc(hidden)]
pub struct IRampForceEffect_abi(
pub unsafe extern "system" fn(
this: ::windows::RawPtr,
iid: &::windows::Guid,
interface: *mut ::windows::RawPtr,
) -> ::windows::HRESULT,
pub unsafe extern "system" fn(this: ::windows::RawPtr) -> u32,
pub unsafe extern "system" fn(this: ::windows::RawPtr) -> u32,
pub unsafe extern "system" fn(
this: ::windows::RawPtr,
count: *mut u32,
values: *mut *mut ::windows::Guid,
) -> ::windows::HRESULT,
pub unsafe extern "system" fn(
this: ::windows::RawPtr,
value: *mut ::windows::RawPtr,
) -> ::windows::HRESULT,
pub unsafe extern "system" fn(
this: ::windows::RawPtr,
value: *mut i32,
) -> ::windows::HRESULT,
pub unsafe extern "system" fn(
this: ::windows::RawPtr,
startvector: ::windows_foundation::Numerics::Vector3,
endvector: ::windows_foundation::Numerics::Vector3,
duration: ::windows_foundation::TimeSpan,
) -> ::windows::HRESULT,
pub unsafe extern "system" fn(
this: ::windows::RawPtr,
startvector: ::windows_foundation::Numerics::Vector3,
endvector: ::windows_foundation::Numerics::Vector3,
attackgain: f32,
sustaingain: f32,
releasegain: f32,
startdelay: ::windows_foundation::TimeSpan,
attackduration: ::windows_foundation::TimeSpan,
sustainduration: ::windows_foundation::TimeSpan,
releaseduration: ::windows_foundation::TimeSpan,
repeatcount: u32,
) -> ::windows::HRESULT,
);
#[repr(transparent)]
#[derive(
:: std :: cmp :: PartialEq,
:: std :: cmp :: Eq,
:: std :: clone :: Clone,
:: std :: fmt :: Debug,
)]
pub struct PeriodicForceEffect(::windows::IInspectable);
impl PeriodicForceEffect {
pub fn Gain(&self) -> ::windows::Result<f64> {
let this = self;
unsafe {
let mut result__: f64 = ::std::mem::zeroed();
(::windows::Interface::vtable(this).6)(
::std::mem::transmute_copy(this),
&mut result__,
)
.from_abi::<f64>(result__)
}
}
pub fn SetGain(&self, value: f64) -> ::windows::Result<()> {
let this = self;
unsafe {
(::windows::Interface::vtable(this).7)(::std::mem::transmute_copy(this), value)
.ok()
}
}
pub fn State(&self) -> ::windows::Result<ForceFeedbackEffectState> {
let this = self;
unsafe {
let mut result__: ForceFeedbackEffectState = ::std::mem::zeroed();
(::windows::Interface::vtable(this).8)(
::std::mem::transmute_copy(this),
&mut result__,
)
.from_abi::<ForceFeedbackEffectState>(result__)
}
}
pub fn Start(&self) -> ::windows::Result<()> {
let this = self;
unsafe {
(::windows::Interface::vtable(this).9)(::std::mem::transmute_copy(this)).ok()
}
}
pub fn Stop(&self) -> ::windows::Result<()> {
let this = self;
unsafe {
(::windows::Interface::vtable(this).10)(::std::mem::transmute_copy(this)).ok()
}
}
pub fn Kind(&self) -> ::windows::Result<PeriodicForceEffectKind> {
let this = &::windows::Interface::cast::<IPeriodicForceEffect>(self)?;
unsafe {
let mut result__: PeriodicForceEffectKind = ::std::mem::zeroed();
(::windows::Interface::vtable(this).6)(
::std::mem::transmute_copy(this),
&mut result__,
)
.from_abi::<PeriodicForceEffectKind>(result__)
}
}
pub fn SetParameters<
'a,
Param0: ::windows::IntoParam<'a, ::windows_foundation::Numerics::Vector3>,
Param4: ::windows::IntoParam<'a, ::windows_foundation::TimeSpan>,
>(
&self,
vector: Param0,
frequency: f32,
phase: f32,
bias: f32,
duration: Param4,
) -> ::windows::Result<()> {
let this = &::windows::Interface::cast::<IPeriodicForceEffect>(self)?;
unsafe {
(::windows::Interface::vtable(this).7)(
::std::mem::transmute_copy(this),
vector.into_param().abi(),
frequency,
phase,
bias,
duration.into_param().abi(),
)
.ok()
}
}
pub fn SetParametersWithEnvelope<
'a,
Param0: ::windows::IntoParam<'a, ::windows_foundation::Numerics::Vector3>,
Param7: ::windows::IntoParam<'a, ::windows_foundation::TimeSpan>,
Param8: ::windows::IntoParam<'a, ::windows_foundation::TimeSpan>,
Param9: ::windows::IntoParam<'a, ::windows_foundation::TimeSpan>,
Param10: ::windows::IntoParam<'a, ::windows_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::Result<()> {
let this = &::windows::Interface::cast::<IPeriodicForceEffect>(self)?;
unsafe {
(::windows::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()
}
}
pub fn CreateInstance(
effectkind: PeriodicForceEffectKind,
) -> ::windows::Result<PeriodicForceEffect> {
Self::IPeriodicForceEffectFactory(|this| unsafe {
let mut result__: ::windows::RawPtr = ::std::mem::zeroed();
(::windows::Interface::vtable(this).6)(
::std::mem::transmute_copy(this),
effectkind,
&mut result__,
)
.from_abi::<PeriodicForceEffect>(result__)
})
}
pub fn IPeriodicForceEffectFactory<
R,
F: FnOnce(&IPeriodicForceEffectFactory) -> ::windows::Result<R>,
>(
callback: F,
) -> ::windows::Result<R> {
static mut SHARED: ::windows::FactoryCache<
PeriodicForceEffect,
IPeriodicForceEffectFactory,
> = ::windows::FactoryCache::new();
unsafe { SHARED.call(callback) }
}
}
unsafe impl ::windows::RuntimeType for PeriodicForceEffect {
const SIGNATURE : :: windows :: ConstBuffer = :: windows :: ConstBuffer :: from_slice ( b"rc(Windows.Gaming.Input.ForceFeedback.PeriodicForceEffect;{a17fba0c-2ae4-48c2-8063-eabd0777cb89})" ) ;
}
unsafe impl ::windows::Interface for PeriodicForceEffect {
type Vtable = IForceFeedbackEffect_abi;
const IID: ::windows::Guid = ::windows::Guid::from_values(
2709502476,
10980,
18626,
[128, 99, 234, 189, 7, 119, 203, 137],
);
}
impl ::windows::RuntimeName for PeriodicForceEffect {
const NAME: &'static str = "Windows.Gaming.Input.ForceFeedback.PeriodicForceEffect";
}
impl ::std::convert::From<PeriodicForceEffect> for ::windows::IUnknown {
fn from(value: PeriodicForceEffect) -> Self {
unsafe { ::std::mem::transmute(value) }
}
}
impl ::std::convert::From<&PeriodicForceEffect> for ::windows::IUnknown {
fn from(value: &PeriodicForceEffect) -> Self {
::std::convert::From::from(::std::clone::Clone::clone(value))
}
}
impl<'a> ::windows::IntoParam<'a, ::windows::IUnknown> for PeriodicForceEffect {
fn into_param(self) -> ::windows::Param<'a, ::windows::IUnknown> {
::windows::Param::Owned(::std::convert::Into::<::windows::IUnknown>::into(self))
}
}
impl<'a> ::windows::IntoParam<'a, ::windows::IUnknown> for &PeriodicForceEffect {
fn into_param(self) -> ::windows::Param<'a, ::windows::IUnknown> {
::windows::Param::Owned(::std::convert::Into::<::windows::IUnknown>::into(
::std::clone::Clone::clone(self),
))
}
}
impl ::std::convert::From<PeriodicForceEffect> for ::windows::IInspectable {
fn from(value: PeriodicForceEffect) -> Self {
value.0
}
}
impl ::std::convert::From<&PeriodicForceEffect> for ::windows::IInspectable {
fn from(value: &PeriodicForceEffect) -> Self {
value.0.clone()
}
}
impl<'a> ::windows::IntoParam<'a, ::windows::IInspectable> for PeriodicForceEffect {
fn into_param(self) -> ::windows::Param<'a, ::windows::IInspectable> {
::windows::Param::Owned(self.0)
}
}
impl<'a> ::windows::IntoParam<'a, ::windows::IInspectable> for &'a PeriodicForceEffect {
fn into_param(self) -> ::windows::Param<'a, ::windows::IInspectable> {
::windows::Param::Borrowed(&self.0)
}
}
impl ::std::convert::From<PeriodicForceEffect> for IForceFeedbackEffect {
fn from(value: PeriodicForceEffect) -> Self {
unsafe { ::std::mem::transmute(value) }
}
}
impl ::std::convert::From<&PeriodicForceEffect> for IForceFeedbackEffect {
fn from(value: &PeriodicForceEffect) -> Self {
::std::convert::From::from(::std::clone::Clone::clone(value))
}
}
impl<'a> ::windows::IntoParam<'a, IForceFeedbackEffect> for PeriodicForceEffect {
fn into_param(self) -> ::windows::Param<'a, IForceFeedbackEffect> {
::windows::Param::Owned(::std::convert::Into::<IForceFeedbackEffect>::into(self))
}
}
impl<'a> ::windows::IntoParam<'a, IForceFeedbackEffect> for &PeriodicForceEffect {
fn into_param(self) -> ::windows::Param<'a, IForceFeedbackEffect> {
::windows::Param::Owned(::std::convert::Into::<IForceFeedbackEffect>::into(
::std::clone::Clone::clone(self),
))
}
}
unsafe impl ::std::marker::Send for PeriodicForceEffect {}
unsafe impl ::std::marker::Sync for PeriodicForceEffect {}
#[derive(
:: std :: cmp :: PartialEq,
:: std :: cmp :: Eq,
:: std :: marker :: Copy,
:: std :: clone :: Clone,
:: std :: default :: Default,
:: std :: fmt :: Debug,
)]
#[repr(transparent)]
pub struct PeriodicForceEffectKind(pub i32);
impl PeriodicForceEffectKind {
pub const SquareWave: PeriodicForceEffectKind = PeriodicForceEffectKind(0i32);
pub const SineWave: PeriodicForceEffectKind = PeriodicForceEffectKind(1i32);
pub const TriangleWave: PeriodicForceEffectKind = PeriodicForceEffectKind(2i32);
pub const SawtoothWaveUp: PeriodicForceEffectKind = PeriodicForceEffectKind(3i32);
pub const SawtoothWaveDown: PeriodicForceEffectKind = PeriodicForceEffectKind(4i32);
}
impl ::std::convert::From<i32> for PeriodicForceEffectKind {
fn from(value: i32) -> Self {
Self(value)
}
}
unsafe impl ::windows::Abi for PeriodicForceEffectKind {
type Abi = Self;
type DefaultType = Self;
}
unsafe impl ::windows::RuntimeType for PeriodicForceEffectKind {
const SIGNATURE: ::windows::ConstBuffer = ::windows::ConstBuffer::from_slice(
b"enum(Windows.Gaming.Input.ForceFeedback.PeriodicForceEffectKind;i4)",
);
}
#[repr(transparent)]
#[derive(
:: std :: cmp :: PartialEq,
:: std :: cmp :: Eq,
:: std :: clone :: Clone,
:: std :: fmt :: Debug,
)]
pub struct RampForceEffect(::windows::IInspectable);
impl RampForceEffect {
pub fn new() -> ::windows::Result<Self> {
Self::IActivationFactory(|f| f.activate_instance::<Self>())
}
fn IActivationFactory<
R,
F: FnOnce(&::windows::IActivationFactory) -> ::windows::Result<R>,
>(
callback: F,
) -> ::windows::Result<R> {
static mut SHARED: ::windows::FactoryCache<
RampForceEffect,
::windows::IActivationFactory,
> = ::windows::FactoryCache::new();
unsafe { SHARED.call(callback) }
}
pub fn Gain(&self) -> ::windows::Result<f64> {
let this = self;
unsafe {
let mut result__: f64 = ::std::mem::zeroed();
(::windows::Interface::vtable(this).6)(
::std::mem::transmute_copy(this),
&mut result__,
)
.from_abi::<f64>(result__)
}
}
pub fn SetGain(&self, value: f64) -> ::windows::Result<()> {
let this = self;
unsafe {
(::windows::Interface::vtable(this).7)(::std::mem::transmute_copy(this), value)
.ok()
}
}
pub fn State(&self) -> ::windows::Result<ForceFeedbackEffectState> {
let this = self;
unsafe {
let mut result__: ForceFeedbackEffectState = ::std::mem::zeroed();
(::windows::Interface::vtable(this).8)(
::std::mem::transmute_copy(this),
&mut result__,
)
.from_abi::<ForceFeedbackEffectState>(result__)
}
}
pub fn Start(&self) -> ::windows::Result<()> {
let this = self;
unsafe {
(::windows::Interface::vtable(this).9)(::std::mem::transmute_copy(this)).ok()
}
}
pub fn Stop(&self) -> ::windows::Result<()> {
let this = self;
unsafe {
(::windows::Interface::vtable(this).10)(::std::mem::transmute_copy(this)).ok()
}
}
pub fn SetParameters<
'a,
Param0: ::windows::IntoParam<'a, ::windows_foundation::Numerics::Vector3>,
Param1: ::windows::IntoParam<'a, ::windows_foundation::Numerics::Vector3>,
Param2: ::windows::IntoParam<'a, ::windows_foundation::TimeSpan>,
>(
&self,
startvector: Param0,
endvector: Param1,
duration: Param2,
) -> ::windows::Result<()> {
let this = &::windows::Interface::cast::<IRampForceEffect>(self)?;
unsafe {
(::windows::Interface::vtable(this).6)(
::std::mem::transmute_copy(this),
startvector.into_param().abi(),
endvector.into_param().abi(),
duration.into_param().abi(),
)
.ok()
}
}
pub fn SetParametersWithEnvelope<
'a,
Param0: ::windows::IntoParam<'a, ::windows_foundation::Numerics::Vector3>,
Param1: ::windows::IntoParam<'a, ::windows_foundation::Numerics::Vector3>,
Param5: ::windows::IntoParam<'a, ::windows_foundation::TimeSpan>,
Param6: ::windows::IntoParam<'a, ::windows_foundation::TimeSpan>,
Param7: ::windows::IntoParam<'a, ::windows_foundation::TimeSpan>,
Param8: ::windows::IntoParam<'a, ::windows_foundation::TimeSpan>,
>(
&self,
startvector: Param0,
endvector: Param1,
attackgain: f32,
sustaingain: f32,
releasegain: f32,
startdelay: Param5,
attackduration: Param6,
sustainduration: Param7,
releaseduration: Param8,
repeatcount: u32,
) -> ::windows::Result<()> {
let this = &::windows::Interface::cast::<IRampForceEffect>(self)?;
unsafe {
(::windows::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()
}
}
}
unsafe impl ::windows::RuntimeType for RampForceEffect {
const SIGNATURE : :: windows :: ConstBuffer = :: windows :: ConstBuffer :: from_slice ( b"rc(Windows.Gaming.Input.ForceFeedback.RampForceEffect;{a17fba0c-2ae4-48c2-8063-eabd0777cb89})" ) ;
}
unsafe impl ::windows::Interface for RampForceEffect {
type Vtable = IForceFeedbackEffect_abi;
const IID: ::windows::Guid = ::windows::Guid::from_values(
2709502476,
10980,
18626,
[128, 99, 234, 189, 7, 119, 203, 137],
);
}
impl ::windows::RuntimeName for RampForceEffect {
const NAME: &'static str = "Windows.Gaming.Input.ForceFeedback.RampForceEffect";
}
impl ::std::convert::From<RampForceEffect> for ::windows::IUnknown {
fn from(value: RampForceEffect) -> Self {
unsafe { ::std::mem::transmute(value) }
}
}
impl ::std::convert::From<&RampForceEffect> for ::windows::IUnknown {
fn from(value: &RampForceEffect) -> Self {
::std::convert::From::from(::std::clone::Clone::clone(value))
}
}
impl<'a> ::windows::IntoParam<'a, ::windows::IUnknown> for RampForceEffect {
fn into_param(self) -> ::windows::Param<'a, ::windows::IUnknown> {
::windows::Param::Owned(::std::convert::Into::<::windows::IUnknown>::into(self))
}
}
impl<'a> ::windows::IntoParam<'a, ::windows::IUnknown> for &RampForceEffect {
fn into_param(self) -> ::windows::Param<'a, ::windows::IUnknown> {
::windows::Param::Owned(::std::convert::Into::<::windows::IUnknown>::into(
::std::clone::Clone::clone(self),
))
}
}
impl ::std::convert::From<RampForceEffect> for ::windows::IInspectable {
fn from(value: RampForceEffect) -> Self {
value.0
}
}
impl ::std::convert::From<&RampForceEffect> for ::windows::IInspectable {
fn from(value: &RampForceEffect) -> Self {
value.0.clone()
}
}
impl<'a> ::windows::IntoParam<'a, ::windows::IInspectable> for RampForceEffect {
fn into_param(self) -> ::windows::Param<'a, ::windows::IInspectable> {
::windows::Param::Owned(self.0)
}
}
impl<'a> ::windows::IntoParam<'a, ::windows::IInspectable> for &'a RampForceEffect {
fn into_param(self) -> ::windows::Param<'a, ::windows::IInspectable> {
::windows::Param::Borrowed(&self.0)
}
}
impl ::std::convert::From<RampForceEffect> for IForceFeedbackEffect {
fn from(value: RampForceEffect) -> Self {
unsafe { ::std::mem::transmute(value) }
}
}
impl ::std::convert::From<&RampForceEffect> for IForceFeedbackEffect {
fn from(value: &RampForceEffect) -> Self {
::std::convert::From::from(::std::clone::Clone::clone(value))
}
}
impl<'a> ::windows::IntoParam<'a, IForceFeedbackEffect> for RampForceEffect {
fn into_param(self) -> ::windows::Param<'a, IForceFeedbackEffect> {
::windows::Param::Owned(::std::convert::Into::<IForceFeedbackEffect>::into(self))
}
}
impl<'a> ::windows::IntoParam<'a, IForceFeedbackEffect> for &RampForceEffect {
fn into_param(self) -> ::windows::Param<'a, IForceFeedbackEffect> {
::windows::Param::Owned(::std::convert::Into::<IForceFeedbackEffect>::into(
::std::clone::Clone::clone(self),
))
}
}
unsafe impl ::std::marker::Send for RampForceEffect {}
unsafe impl ::std::marker::Sync for RampForceEffect {}
}
pub mod Preview {
pub struct GameControllerProviderInfo {}
impl GameControllerProviderInfo {
pub fn GetParentProviderId<
'a,
Param0: ::windows::IntoParam<'a, super::Custom::IGameControllerProvider>,
>(
provider: Param0,
) -> ::windows::Result<::windows::HSTRING> {
Self::IGameControllerProviderInfoStatics(|this| unsafe {
let mut result__: ::std::mem::ManuallyDrop<::windows::HSTRING> =
::std::mem::zeroed();
(::windows::Interface::vtable(this).6)(
::std::mem::transmute_copy(this),
provider.into_param().abi(),
&mut result__,
)
.from_abi::<::windows::HSTRING>(result__)
})
}
pub fn GetProviderId<
'a,
Param0: ::windows::IntoParam<'a, super::Custom::IGameControllerProvider>,
>(
provider: Param0,
) -> ::windows::Result<::windows::HSTRING> {
Self::IGameControllerProviderInfoStatics(|this| unsafe {
let mut result__: ::std::mem::ManuallyDrop<::windows::HSTRING> =
::std::mem::zeroed();
(::windows::Interface::vtable(this).7)(
::std::mem::transmute_copy(this),
provider.into_param().abi(),
&mut result__,
)
.from_abi::<::windows::HSTRING>(result__)
})
}
pub fn IGameControllerProviderInfoStatics<
R,
F: FnOnce(&IGameControllerProviderInfoStatics) -> ::windows::Result<R>,
>(
callback: F,
) -> ::windows::Result<R> {
static mut SHARED: ::windows::FactoryCache<
GameControllerProviderInfo,
IGameControllerProviderInfoStatics,
> = ::windows::FactoryCache::new();
unsafe { SHARED.call(callback) }
}
}
impl ::windows::RuntimeName for GameControllerProviderInfo {
const NAME: &'static str = "Windows.Gaming.Input.Preview.GameControllerProviderInfo";
}
#[repr(transparent)]
#[derive(
:: std :: cmp :: PartialEq,
:: std :: cmp :: Eq,
:: std :: clone :: Clone,
:: std :: fmt :: Debug,
)]
#[doc(hidden)]
pub struct IGameControllerProviderInfoStatics(::windows::IInspectable);
unsafe impl ::windows::Interface for IGameControllerProviderInfoStatics {
type Vtable = IGameControllerProviderInfoStatics_abi;
const IID: ::windows::Guid = ::windows::Guid::from_values(
199354053,
55741,
17646,
[131, 98, 72, 139, 46, 70, 75, 251],
);
}
#[repr(C)]
#[doc(hidden)]
pub struct IGameControllerProviderInfoStatics_abi(
pub unsafe extern "system" fn(
this: ::windows::RawPtr,
iid: &::windows::Guid,
interface: *mut ::windows::RawPtr,
) -> ::windows::HRESULT,
pub unsafe extern "system" fn(this: ::windows::RawPtr) -> u32,
pub unsafe extern "system" fn(this: ::windows::RawPtr) -> u32,
pub unsafe extern "system" fn(
this: ::windows::RawPtr,
count: *mut u32,
values: *mut *mut ::windows::Guid,
) -> ::windows::HRESULT,
pub unsafe extern "system" fn(
this: ::windows::RawPtr,
value: *mut ::windows::RawPtr,
) -> ::windows::HRESULT,
pub unsafe extern "system" fn(
this: ::windows::RawPtr,
value: *mut i32,
) -> ::windows::HRESULT,
pub unsafe extern "system" fn(
this: ::windows::RawPtr,
provider: ::windows::RawPtr,
result__: *mut ::std::mem::ManuallyDrop<::windows::HSTRING>,
) -> ::windows::HRESULT,
pub unsafe extern "system" fn(
this: ::windows::RawPtr,
provider: ::windows::RawPtr,
result__: *mut ::std::mem::ManuallyDrop<::windows::HSTRING>,
) -> ::windows::HRESULT,
);
}
#[repr(transparent)]
#[derive(
:: std :: cmp :: PartialEq,
:: std :: cmp :: Eq,
:: std :: clone :: Clone,
:: std :: fmt :: Debug,
)]
pub struct ArcadeStick(::windows::IInspectable);
impl ArcadeStick {
pub fn HeadsetConnected<
'a,
Param0: ::windows::IntoParam<
'a,
::windows_foundation::TypedEventHandler<IGameController, Headset>,
>,
>(
&self,
value: Param0,
) -> ::windows::Result<::windows_foundation::EventRegistrationToken> {
let this = &::windows::Interface::cast::<IGameController>(self)?;
unsafe {
let mut result__: ::windows_foundation::EventRegistrationToken =
::std::mem::zeroed();
(::windows::Interface::vtable(this).6)(
::std::mem::transmute_copy(this),
value.into_param().abi(),
&mut result__,
)
.from_abi::<::windows_foundation::EventRegistrationToken>(result__)
}
}
pub fn RemoveHeadsetConnected<
'a,
Param0: ::windows::IntoParam<'a, ::windows_foundation::EventRegistrationToken>,
>(
&self,
token: Param0,
) -> ::windows::Result<()> {
let this = &::windows::Interface::cast::<IGameController>(self)?;
unsafe {
(::windows::Interface::vtable(this).7)(
::std::mem::transmute_copy(this),
token.into_param().abi(),
)
.ok()
}
}
pub fn HeadsetDisconnected<
'a,
Param0: ::windows::IntoParam<
'a,
::windows_foundation::TypedEventHandler<IGameController, Headset>,
>,
>(
&self,
value: Param0,
) -> ::windows::Result<::windows_foundation::EventRegistrationToken> {
let this = &::windows::Interface::cast::<IGameController>(self)?;
unsafe {
let mut result__: ::windows_foundation::EventRegistrationToken =
::std::mem::zeroed();
(::windows::Interface::vtable(this).8)(
::std::mem::transmute_copy(this),
value.into_param().abi(),
&mut result__,
)
.from_abi::<::windows_foundation::EventRegistrationToken>(result__)
}
}
pub fn RemoveHeadsetDisconnected<
'a,
Param0: ::windows::IntoParam<'a, ::windows_foundation::EventRegistrationToken>,
>(
&self,
token: Param0,
) -> ::windows::Result<()> {
let this = &::windows::Interface::cast::<IGameController>(self)?;
unsafe {
(::windows::Interface::vtable(this).9)(
::std::mem::transmute_copy(this),
token.into_param().abi(),
)
.ok()
}
}
pub fn UserChanged<
'a,
Param0: ::windows::IntoParam<
'a,
::windows_foundation::TypedEventHandler<
IGameController,
::windows_system::UserChangedEventArgs,
>,
>,
>(
&self,
value: Param0,
) -> ::windows::Result<::windows_foundation::EventRegistrationToken> {
let this = &::windows::Interface::cast::<IGameController>(self)?;
unsafe {
let mut result__: ::windows_foundation::EventRegistrationToken =
::std::mem::zeroed();
(::windows::Interface::vtable(this).10)(
::std::mem::transmute_copy(this),
value.into_param().abi(),
&mut result__,
)
.from_abi::<::windows_foundation::EventRegistrationToken>(result__)
}
}
pub fn RemoveUserChanged<
'a,
Param0: ::windows::IntoParam<'a, ::windows_foundation::EventRegistrationToken>,
>(
&self,
token: Param0,
) -> ::windows::Result<()> {
let this = &::windows::Interface::cast::<IGameController>(self)?;
unsafe {
(::windows::Interface::vtable(this).11)(
::std::mem::transmute_copy(this),
token.into_param().abi(),
)
.ok()
}
}
pub fn Headset(&self) -> ::windows::Result<Headset> {
let this = &::windows::Interface::cast::<IGameController>(self)?;
unsafe {
let mut result__: ::windows::RawPtr = ::std::mem::zeroed();
(::windows::Interface::vtable(this).12)(
::std::mem::transmute_copy(this),
&mut result__,
)
.from_abi::<Headset>(result__)
}
}
pub fn IsWireless(&self) -> ::windows::Result<bool> {
let this = &::windows::Interface::cast::<IGameController>(self)?;
unsafe {
let mut result__: bool = ::std::mem::zeroed();
(::windows::Interface::vtable(this).13)(
::std::mem::transmute_copy(this),
&mut result__,
)
.from_abi::<bool>(result__)
}
}
pub fn User(&self) -> ::windows::Result<::windows_system::User> {
let this = &::windows::Interface::cast::<IGameController>(self)?;
unsafe {
let mut result__: ::windows::RawPtr = ::std::mem::zeroed();
(::windows::Interface::vtable(this).14)(
::std::mem::transmute_copy(this),
&mut result__,
)
.from_abi::<::windows_system::User>(result__)
}
}
pub fn GetButtonLabel(
&self,
button: ArcadeStickButtons,
) -> ::windows::Result<GameControllerButtonLabel> {
let this = self;
unsafe {
let mut result__: GameControllerButtonLabel = ::std::mem::zeroed();
(::windows::Interface::vtable(this).6)(
::std::mem::transmute_copy(this),
button,
&mut result__,
)
.from_abi::<GameControllerButtonLabel>(result__)
}
}
pub fn GetCurrentReading(&self) -> ::windows::Result<ArcadeStickReading> {
let this = self;
unsafe {
let mut result__: ArcadeStickReading = ::std::mem::zeroed();
(::windows::Interface::vtable(this).7)(
::std::mem::transmute_copy(this),
&mut result__,
)
.from_abi::<ArcadeStickReading>(result__)
}
}
pub fn ArcadeStickAdded<
'a,
Param0: ::windows::IntoParam<'a, ::windows_foundation::EventHandler<ArcadeStick>>,
>(
value: Param0,
) -> ::windows::Result<::windows_foundation::EventRegistrationToken> {
Self::IArcadeStickStatics(|this| unsafe {
let mut result__: ::windows_foundation::EventRegistrationToken =
::std::mem::zeroed();
(::windows::Interface::vtable(this).6)(
::std::mem::transmute_copy(this),
value.into_param().abi(),
&mut result__,
)
.from_abi::<::windows_foundation::EventRegistrationToken>(result__)
})
}
pub fn RemoveArcadeStickAdded<
'a,
Param0: ::windows::IntoParam<'a, ::windows_foundation::EventRegistrationToken>,
>(
token: Param0,
) -> ::windows::Result<()> {
Self::IArcadeStickStatics(|this| unsafe {
(::windows::Interface::vtable(this).7)(
::std::mem::transmute_copy(this),
token.into_param().abi(),
)
.ok()
})
}
pub fn ArcadeStickRemoved<
'a,
Param0: ::windows::IntoParam<'a, ::windows_foundation::EventHandler<ArcadeStick>>,
>(
value: Param0,
) -> ::windows::Result<::windows_foundation::EventRegistrationToken> {
Self::IArcadeStickStatics(|this| unsafe {
let mut result__: ::windows_foundation::EventRegistrationToken =
::std::mem::zeroed();
(::windows::Interface::vtable(this).8)(
::std::mem::transmute_copy(this),
value.into_param().abi(),
&mut result__,
)
.from_abi::<::windows_foundation::EventRegistrationToken>(result__)
})
}
pub fn RemoveArcadeStickRemoved<
'a,
Param0: ::windows::IntoParam<'a, ::windows_foundation::EventRegistrationToken>,
>(
token: Param0,
) -> ::windows::Result<()> {
Self::IArcadeStickStatics(|this| unsafe {
(::windows::Interface::vtable(this).9)(
::std::mem::transmute_copy(this),
token.into_param().abi(),
)
.ok()
})
}
pub fn ArcadeSticks(
) -> ::windows::Result<::windows_foundation::Collections::IVectorView<ArcadeStick>>
{
Self::IArcadeStickStatics(|this| unsafe {
let mut result__: ::windows::RawPtr = ::std::mem::zeroed();
(::windows::Interface::vtable(this).10)(
::std::mem::transmute_copy(this),
&mut result__,
)
.from_abi::<::windows_foundation::Collections::IVectorView<ArcadeStick>>(result__)
})
}
pub fn TryGetBatteryReport(
&self,
) -> ::windows::Result<::windows_devices::Power::BatteryReport> {
let this = &::windows::Interface::cast::<IGameControllerBatteryInfo>(self)?;
unsafe {
let mut result__: ::windows::RawPtr = ::std::mem::zeroed();
(::windows::Interface::vtable(this).6)(
::std::mem::transmute_copy(this),
&mut result__,
)
.from_abi::<::windows_devices::Power::BatteryReport>(result__)
}
}
pub fn FromGameController<'a, Param0: ::windows::IntoParam<'a, IGameController>>(
gamecontroller: Param0,
) -> ::windows::Result<ArcadeStick> {
Self::IArcadeStickStatics2(|this| unsafe {
let mut result__: ::windows::RawPtr = ::std::mem::zeroed();
(::windows::Interface::vtable(this).6)(
::std::mem::transmute_copy(this),
gamecontroller.into_param().abi(),
&mut result__,
)
.from_abi::<ArcadeStick>(result__)
})
}
pub fn IArcadeStickStatics<R, F: FnOnce(&IArcadeStickStatics) -> ::windows::Result<R>>(
callback: F,
) -> ::windows::Result<R> {
static mut SHARED: ::windows::FactoryCache<ArcadeStick, IArcadeStickStatics> =
::windows::FactoryCache::new();
unsafe { SHARED.call(callback) }
}
pub fn IArcadeStickStatics2<R, F: FnOnce(&IArcadeStickStatics2) -> ::windows::Result<R>>(
callback: F,
) -> ::windows::Result<R> {
static mut SHARED: ::windows::FactoryCache<ArcadeStick, IArcadeStickStatics2> =
::windows::FactoryCache::new();
unsafe { SHARED.call(callback) }
}
}
unsafe impl ::windows::RuntimeType for ArcadeStick {
const SIGNATURE: ::windows::ConstBuffer = ::windows::ConstBuffer::from_slice(
b"rc(Windows.Gaming.Input.ArcadeStick;{b14a539d-befb-4c81-8051-15ecf3b13036})",
);
}
unsafe impl ::windows::Interface for ArcadeStick {
type Vtable = IArcadeStick_abi;
const IID: ::windows::Guid = ::windows::Guid::from_values(
2974438301,
48891,
19585,
[128, 81, 21, 236, 243, 177, 48, 54],
);
}
impl ::windows::RuntimeName for ArcadeStick {
const NAME: &'static str = "Windows.Gaming.Input.ArcadeStick";
}
impl ::std::convert::From<ArcadeStick> for ::windows::IUnknown {
fn from(value: ArcadeStick) -> Self {
unsafe { ::std::mem::transmute(value) }
}
}
impl ::std::convert::From<&ArcadeStick> for ::windows::IUnknown {
fn from(value: &ArcadeStick) -> Self {
::std::convert::From::from(::std::clone::Clone::clone(value))
}
}
impl<'a> ::windows::IntoParam<'a, ::windows::IUnknown> for ArcadeStick {
fn into_param(self) -> ::windows::Param<'a, ::windows::IUnknown> {
::windows::Param::Owned(::std::convert::Into::<::windows::IUnknown>::into(self))
}
}
impl<'a> ::windows::IntoParam<'a, ::windows::IUnknown> for &ArcadeStick {
fn into_param(self) -> ::windows::Param<'a, ::windows::IUnknown> {
::windows::Param::Owned(::std::convert::Into::<::windows::IUnknown>::into(
::std::clone::Clone::clone(self),
))
}
}
impl ::std::convert::From<ArcadeStick> for ::windows::IInspectable {
fn from(value: ArcadeStick) -> Self {
value.0
}
}
impl ::std::convert::From<&ArcadeStick> for ::windows::IInspectable {
fn from(value: &ArcadeStick) -> Self {
value.0.clone()
}
}
impl<'a> ::windows::IntoParam<'a, ::windows::IInspectable> for ArcadeStick {
fn into_param(self) -> ::windows::Param<'a, ::windows::IInspectable> {
::windows::Param::Owned(self.0)
}
}
impl<'a> ::windows::IntoParam<'a, ::windows::IInspectable> for &'a ArcadeStick {
fn into_param(self) -> ::windows::Param<'a, ::windows::IInspectable> {
::windows::Param::Borrowed(&self.0)
}
}
impl ::std::convert::TryFrom<ArcadeStick> for IGameController {
type Error = ::windows::Error;
fn try_from(value: ArcadeStick) -> ::windows::Result<Self> {
::std::convert::TryFrom::try_from(&value)
}
}
impl ::std::convert::TryFrom<&ArcadeStick> for IGameController {
type Error = ::windows::Error;
fn try_from(value: &ArcadeStick) -> ::windows::Result<Self> {
::windows::Interface::cast(value)
}
}
impl<'a> ::windows::IntoParam<'a, IGameController> for ArcadeStick {
fn into_param(self) -> ::windows::Param<'a, IGameController> {
::windows::IntoParam::into_param(&self)
}
}
impl<'a> ::windows::IntoParam<'a, IGameController> for &ArcadeStick {
fn into_param(self) -> ::windows::Param<'a, IGameController> {
::std::convert::TryInto::<IGameController>::try_into(self)
.map(::windows::Param::Owned)
.unwrap_or(::windows::Param::None)
}
}
impl ::std::convert::TryFrom<ArcadeStick> for IGameControllerBatteryInfo {
type Error = ::windows::Error;
fn try_from(value: ArcadeStick) -> ::windows::Result<Self> {
::std::convert::TryFrom::try_from(&value)
}
}
impl ::std::convert::TryFrom<&ArcadeStick> for IGameControllerBatteryInfo {
type Error = ::windows::Error;
fn try_from(value: &ArcadeStick) -> ::windows::Result<Self> {
::windows::Interface::cast(value)
}
}
impl<'a> ::windows::IntoParam<'a, IGameControllerBatteryInfo> for ArcadeStick {
fn into_param(self) -> ::windows::Param<'a, IGameControllerBatteryInfo> {
::windows::IntoParam::into_param(&self)
}
}
impl<'a> ::windows::IntoParam<'a, IGameControllerBatteryInfo> for &ArcadeStick {
fn into_param(self) -> ::windows::Param<'a, IGameControllerBatteryInfo> {
::std::convert::TryInto::<IGameControllerBatteryInfo>::try_into(self)
.map(::windows::Param::Owned)
.unwrap_or(::windows::Param::None)
}
}
unsafe impl ::std::marker::Send for ArcadeStick {}
unsafe impl ::std::marker::Sync for ArcadeStick {}
#[derive(
:: std :: cmp :: PartialEq,
:: std :: cmp :: Eq,
:: std :: marker :: Copy,
:: std :: clone :: Clone,
:: std :: default :: Default,
:: std :: fmt :: Debug,
)]
#[repr(transparent)]
pub struct ArcadeStickButtons(pub u32);
impl ArcadeStickButtons {
pub const None: ArcadeStickButtons = ArcadeStickButtons(0u32);
pub const StickUp: ArcadeStickButtons = ArcadeStickButtons(1u32);
pub const StickDown: ArcadeStickButtons = ArcadeStickButtons(2u32);
pub const StickLeft: ArcadeStickButtons = ArcadeStickButtons(4u32);
pub const StickRight: ArcadeStickButtons = ArcadeStickButtons(8u32);
pub const Action1: ArcadeStickButtons = ArcadeStickButtons(16u32);
pub const Action2: ArcadeStickButtons = ArcadeStickButtons(32u32);
pub const Action3: ArcadeStickButtons = ArcadeStickButtons(64u32);
pub const Action4: ArcadeStickButtons = ArcadeStickButtons(128u32);
pub const Action5: ArcadeStickButtons = ArcadeStickButtons(256u32);
pub const Action6: ArcadeStickButtons = ArcadeStickButtons(512u32);
pub const Special1: ArcadeStickButtons = ArcadeStickButtons(1024u32);
pub const Special2: ArcadeStickButtons = ArcadeStickButtons(2048u32);
}
impl ::std::convert::From<u32> for ArcadeStickButtons {
fn from(value: u32) -> Self {
Self(value)
}
}
unsafe impl ::windows::Abi for ArcadeStickButtons {
type Abi = Self;
type DefaultType = Self;
}
unsafe impl ::windows::RuntimeType for ArcadeStickButtons {
const SIGNATURE: ::windows::ConstBuffer =
::windows::ConstBuffer::from_slice(b"enum(Windows.Gaming.Input.ArcadeStickButtons;u4)");
}
impl ::std::ops::BitOr for ArcadeStickButtons {
type Output = Self;
fn bitor(self, rhs: Self) -> Self {
Self(self.0 | rhs.0)
}
}
impl ::std::ops::BitAnd for ArcadeStickButtons {
type Output = Self;
fn bitand(self, rhs: Self) -> Self {
Self(self.0 & rhs.0)
}
}
impl ::std::ops::BitOrAssign for ArcadeStickButtons {
fn bitor_assign(&mut self, rhs: Self) {
self.0.bitor_assign(rhs.0)
}
}
impl ::std::ops::BitAndAssign for ArcadeStickButtons {
fn bitand_assign(&mut self, rhs: Self) {
self.0.bitand_assign(rhs.0)
}
}
impl ::std::ops::Not for ArcadeStickButtons {
type Output = Self;
fn not(self) -> Self {
Self(self.0.not())
}
}
#[derive(:: std :: clone :: Clone, :: std :: marker :: Copy)]
#[repr(C)]
pub struct ArcadeStickReading {
pub Timestamp: u64,
pub Buttons: ArcadeStickButtons,
}
impl ArcadeStickReading {}
impl ::std::default::Default for ArcadeStickReading {
fn default() -> Self {
unsafe { ::std::mem::zeroed() }
}
}
impl ::std::fmt::Debug for ArcadeStickReading {
fn fmt(&self, fmt: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
fmt.debug_struct("ArcadeStickReading")
.field("Timestamp", &self.Timestamp)
.field("Buttons", &self.Buttons)
.finish()
}
}
impl ::std::cmp::PartialEq for ArcadeStickReading {
fn eq(&self, other: &Self) -> bool {
self.Timestamp == other.Timestamp && self.Buttons == other.Buttons
}
}
impl ::std::cmp::Eq for ArcadeStickReading {}
unsafe impl ::windows::Abi for ArcadeStickReading {
type Abi = Self;
type DefaultType = Self;
}
unsafe impl ::windows::RuntimeType for ArcadeStickReading {
const SIGNATURE : :: windows :: ConstBuffer = :: windows :: ConstBuffer :: from_slice ( b"struct(Windows.Gaming.Input.ArcadeStickReading;u8;enum(Windows.Gaming.Input.ArcadeStickButtons;u4))" ) ;
}
#[repr(transparent)]
#[derive(
:: std :: cmp :: PartialEq,
:: std :: cmp :: Eq,
:: std :: clone :: Clone,
:: std :: fmt :: Debug,
)]
pub struct FlightStick(::windows::IInspectable);
impl FlightStick {
pub fn HeadsetConnected<
'a,
Param0: ::windows::IntoParam<
'a,
::windows_foundation::TypedEventHandler<IGameController, Headset>,
>,
>(
&self,
value: Param0,
) -> ::windows::Result<::windows_foundation::EventRegistrationToken> {
let this = &::windows::Interface::cast::<IGameController>(self)?;
unsafe {
let mut result__: ::windows_foundation::EventRegistrationToken =
::std::mem::zeroed();
(::windows::Interface::vtable(this).6)(
::std::mem::transmute_copy(this),
value.into_param().abi(),
&mut result__,
)
.from_abi::<::windows_foundation::EventRegistrationToken>(result__)
}
}
pub fn RemoveHeadsetConnected<
'a,
Param0: ::windows::IntoParam<'a, ::windows_foundation::EventRegistrationToken>,
>(
&self,
token: Param0,
) -> ::windows::Result<()> {
let this = &::windows::Interface::cast::<IGameController>(self)?;
unsafe {
(::windows::Interface::vtable(this).7)(
::std::mem::transmute_copy(this),
token.into_param().abi(),
)
.ok()
}
}
pub fn HeadsetDisconnected<
'a,
Param0: ::windows::IntoParam<
'a,
::windows_foundation::TypedEventHandler<IGameController, Headset>,
>,
>(
&self,
value: Param0,
) -> ::windows::Result<::windows_foundation::EventRegistrationToken> {
let this = &::windows::Interface::cast::<IGameController>(self)?;
unsafe {
let mut result__: ::windows_foundation::EventRegistrationToken =
::std::mem::zeroed();
(::windows::Interface::vtable(this).8)(
::std::mem::transmute_copy(this),
value.into_param().abi(),
&mut result__,
)
.from_abi::<::windows_foundation::EventRegistrationToken>(result__)
}
}
pub fn RemoveHeadsetDisconnected<
'a,
Param0: ::windows::IntoParam<'a, ::windows_foundation::EventRegistrationToken>,
>(
&self,
token: Param0,
) -> ::windows::Result<()> {
let this = &::windows::Interface::cast::<IGameController>(self)?;
unsafe {
(::windows::Interface::vtable(this).9)(
::std::mem::transmute_copy(this),
token.into_param().abi(),
)
.ok()
}
}
pub fn UserChanged<
'a,
Param0: ::windows::IntoParam<
'a,
::windows_foundation::TypedEventHandler<
IGameController,
::windows_system::UserChangedEventArgs,
>,
>,
>(
&self,
value: Param0,
) -> ::windows::Result<::windows_foundation::EventRegistrationToken> {
let this = &::windows::Interface::cast::<IGameController>(self)?;
unsafe {
let mut result__: ::windows_foundation::EventRegistrationToken =
::std::mem::zeroed();
(::windows::Interface::vtable(this).10)(
::std::mem::transmute_copy(this),
value.into_param().abi(),
&mut result__,
)
.from_abi::<::windows_foundation::EventRegistrationToken>(result__)
}
}
pub fn RemoveUserChanged<
'a,
Param0: ::windows::IntoParam<'a, ::windows_foundation::EventRegistrationToken>,
>(
&self,
token: Param0,
) -> ::windows::Result<()> {
let this = &::windows::Interface::cast::<IGameController>(self)?;
unsafe {
(::windows::Interface::vtable(this).11)(
::std::mem::transmute_copy(this),
token.into_param().abi(),
)
.ok()
}
}
pub fn Headset(&self) -> ::windows::Result<Headset> {
let this = &::windows::Interface::cast::<IGameController>(self)?;
unsafe {
let mut result__: ::windows::RawPtr = ::std::mem::zeroed();
(::windows::Interface::vtable(this).12)(
::std::mem::transmute_copy(this),
&mut result__,
)
.from_abi::<Headset>(result__)
}
}
pub fn IsWireless(&self) -> ::windows::Result<bool> {
let this = &::windows::Interface::cast::<IGameController>(self)?;
unsafe {
let mut result__: bool = ::std::mem::zeroed();
(::windows::Interface::vtable(this).13)(
::std::mem::transmute_copy(this),
&mut result__,
)
.from_abi::<bool>(result__)
}
}
pub fn User(&self) -> ::windows::Result<::windows_system::User> {
let this = &::windows::Interface::cast::<IGameController>(self)?;
unsafe {
let mut result__: ::windows::RawPtr = ::std::mem::zeroed();
(::windows::Interface::vtable(this).14)(
::std::mem::transmute_copy(this),
&mut result__,
)
.from_abi::<::windows_system::User>(result__)
}
}
pub fn HatSwitchKind(&self) -> ::windows::Result<GameControllerSwitchKind> {
let this = self;
unsafe {
let mut result__: GameControllerSwitchKind = ::std::mem::zeroed();
(::windows::Interface::vtable(this).6)(
::std::mem::transmute_copy(this),
&mut result__,
)
.from_abi::<GameControllerSwitchKind>(result__)
}
}
pub fn GetButtonLabel(
&self,
button: FlightStickButtons,
) -> ::windows::Result<GameControllerButtonLabel> {
let this = self;
unsafe {
let mut result__: GameControllerButtonLabel = ::std::mem::zeroed();
(::windows::Interface::vtable(this).7)(
::std::mem::transmute_copy(this),
button,
&mut result__,
)
.from_abi::<GameControllerButtonLabel>(result__)
}
}
pub fn GetCurrentReading(&self) -> ::windows::Result<FlightStickReading> {
let this = self;
unsafe {
let mut result__: FlightStickReading = ::std::mem::zeroed();
(::windows::Interface::vtable(this).8)(
::std::mem::transmute_copy(this),
&mut result__,
)
.from_abi::<FlightStickReading>(result__)
}
}
pub fn TryGetBatteryReport(
&self,
) -> ::windows::Result<::windows_devices::Power::BatteryReport> {
let this = &::windows::Interface::cast::<IGameControllerBatteryInfo>(self)?;
unsafe {
let mut result__: ::windows::RawPtr = ::std::mem::zeroed();
(::windows::Interface::vtable(this).6)(
::std::mem::transmute_copy(this),
&mut result__,
)
.from_abi::<::windows_devices::Power::BatteryReport>(result__)
}
}
pub fn FlightStickAdded<
'a,
Param0: ::windows::IntoParam<'a, ::windows_foundation::EventHandler<FlightStick>>,
>(
value: Param0,
) -> ::windows::Result<::windows_foundation::EventRegistrationToken> {
Self::IFlightStickStatics(|this| unsafe {
let mut result__: ::windows_foundation::EventRegistrationToken =
::std::mem::zeroed();
(::windows::Interface::vtable(this).6)(
::std::mem::transmute_copy(this),
value.into_param().abi(),
&mut result__,
)
.from_abi::<::windows_foundation::EventRegistrationToken>(result__)
})
}
pub fn RemoveFlightStickAdded<
'a,
Param0: ::windows::IntoParam<'a, ::windows_foundation::EventRegistrationToken>,
>(
token: Param0,
) -> ::windows::Result<()> {
Self::IFlightStickStatics(|this| unsafe {
(::windows::Interface::vtable(this).7)(
::std::mem::transmute_copy(this),
token.into_param().abi(),
)
.ok()
})
}
pub fn FlightStickRemoved<
'a,
Param0: ::windows::IntoParam<'a, ::windows_foundation::EventHandler<FlightStick>>,
>(
value: Param0,
) -> ::windows::Result<::windows_foundation::EventRegistrationToken> {
Self::IFlightStickStatics(|this| unsafe {
let mut result__: ::windows_foundation::EventRegistrationToken =
::std::mem::zeroed();
(::windows::Interface::vtable(this).8)(
::std::mem::transmute_copy(this),
value.into_param().abi(),
&mut result__,
)
.from_abi::<::windows_foundation::EventRegistrationToken>(result__)
})
}
pub fn RemoveFlightStickRemoved<
'a,
Param0: ::windows::IntoParam<'a, ::windows_foundation::EventRegistrationToken>,
>(
token: Param0,
) -> ::windows::Result<()> {
Self::IFlightStickStatics(|this| unsafe {
(::windows::Interface::vtable(this).9)(
::std::mem::transmute_copy(this),
token.into_param().abi(),
)
.ok()
})
}
pub fn FlightSticks(
) -> ::windows::Result<::windows_foundation::Collections::IVectorView<FlightStick>>
{
Self::IFlightStickStatics(|this| unsafe {
let mut result__: ::windows::RawPtr = ::std::mem::zeroed();
(::windows::Interface::vtable(this).10)(
::std::mem::transmute_copy(this),
&mut result__,
)
.from_abi::<::windows_foundation::Collections::IVectorView<FlightStick>>(result__)
})
}
pub fn FromGameController<'a, Param0: ::windows::IntoParam<'a, IGameController>>(
gamecontroller: Param0,
) -> ::windows::Result<FlightStick> {
Self::IFlightStickStatics(|this| unsafe {
let mut result__: ::windows::RawPtr = ::std::mem::zeroed();
(::windows::Interface::vtable(this).11)(
::std::mem::transmute_copy(this),
gamecontroller.into_param().abi(),
&mut result__,
)
.from_abi::<FlightStick>(result__)
})
}
pub fn IFlightStickStatics<R, F: FnOnce(&IFlightStickStatics) -> ::windows::Result<R>>(
callback: F,
) -> ::windows::Result<R> {
static mut SHARED: ::windows::FactoryCache<FlightStick, IFlightStickStatics> =
::windows::FactoryCache::new();
unsafe { SHARED.call(callback) }
}
}
unsafe impl ::windows::RuntimeType for FlightStick {
const SIGNATURE: ::windows::ConstBuffer = ::windows::ConstBuffer::from_slice(
b"rc(Windows.Gaming.Input.FlightStick;{b4a2c01c-b83b-4459-a1a9-97b03c33da7c})",
);
}
unsafe impl ::windows::Interface for FlightStick {
type Vtable = IFlightStick_abi;
const IID: ::windows::Guid = ::windows::Guid::from_values(
3030564892,
47163,
17497,
[161, 169, 151, 176, 60, 51, 218, 124],
);
}
impl ::windows::RuntimeName for FlightStick {
const NAME: &'static str = "Windows.Gaming.Input.FlightStick";
}
impl ::std::convert::From<FlightStick> for ::windows::IUnknown {
fn from(value: FlightStick) -> Self {
unsafe { ::std::mem::transmute(value) }
}
}
impl ::std::convert::From<&FlightStick> for ::windows::IUnknown {
fn from(value: &FlightStick) -> Self {
::std::convert::From::from(::std::clone::Clone::clone(value))
}
}
impl<'a> ::windows::IntoParam<'a, ::windows::IUnknown> for FlightStick {
fn into_param(self) -> ::windows::Param<'a, ::windows::IUnknown> {
::windows::Param::Owned(::std::convert::Into::<::windows::IUnknown>::into(self))
}
}
impl<'a> ::windows::IntoParam<'a, ::windows::IUnknown> for &FlightStick {
fn into_param(self) -> ::windows::Param<'a, ::windows::IUnknown> {
::windows::Param::Owned(::std::convert::Into::<::windows::IUnknown>::into(
::std::clone::Clone::clone(self),
))
}
}
impl ::std::convert::From<FlightStick> for ::windows::IInspectable {
fn from(value: FlightStick) -> Self {
value.0
}
}
impl ::std::convert::From<&FlightStick> for ::windows::IInspectable {
fn from(value: &FlightStick) -> Self {
value.0.clone()
}
}
impl<'a> ::windows::IntoParam<'a, ::windows::IInspectable> for FlightStick {
fn into_param(self) -> ::windows::Param<'a, ::windows::IInspectable> {
::windows::Param::Owned(self.0)
}
}
impl<'a> ::windows::IntoParam<'a, ::windows::IInspectable> for &'a FlightStick {
fn into_param(self) -> ::windows::Param<'a, ::windows::IInspectable> {
::windows::Param::Borrowed(&self.0)
}
}
impl ::std::convert::TryFrom<FlightStick> for IGameController {
type Error = ::windows::Error;
fn try_from(value: FlightStick) -> ::windows::Result<Self> {
::std::convert::TryFrom::try_from(&value)
}
}
impl ::std::convert::TryFrom<&FlightStick> for IGameController {
type Error = ::windows::Error;
fn try_from(value: &FlightStick) -> ::windows::Result<Self> {
::windows::Interface::cast(value)
}
}
impl<'a> ::windows::IntoParam<'a, IGameController> for FlightStick {
fn into_param(self) -> ::windows::Param<'a, IGameController> {
::windows::IntoParam::into_param(&self)
}
}
impl<'a> ::windows::IntoParam<'a, IGameController> for &FlightStick {
fn into_param(self) -> ::windows::Param<'a, IGameController> {
::std::convert::TryInto::<IGameController>::try_into(self)
.map(::windows::Param::Owned)
.unwrap_or(::windows::Param::None)
}
}
impl ::std::convert::TryFrom<FlightStick> for IGameControllerBatteryInfo {
type Error = ::windows::Error;
fn try_from(value: FlightStick) -> ::windows::Result<Self> {
::std::convert::TryFrom::try_from(&value)
}
}
impl ::std::convert::TryFrom<&FlightStick> for IGameControllerBatteryInfo {
type Error = ::windows::Error;
fn try_from(value: &FlightStick) -> ::windows::Result<Self> {
::windows::Interface::cast(value)
}
}
impl<'a> ::windows::IntoParam<'a, IGameControllerBatteryInfo> for FlightStick {
fn into_param(self) -> ::windows::Param<'a, IGameControllerBatteryInfo> {
::windows::IntoParam::into_param(&self)
}
}
impl<'a> ::windows::IntoParam<'a, IGameControllerBatteryInfo> for &FlightStick {
fn into_param(self) -> ::windows::Param<'a, IGameControllerBatteryInfo> {
::std::convert::TryInto::<IGameControllerBatteryInfo>::try_into(self)
.map(::windows::Param::Owned)
.unwrap_or(::windows::Param::None)
}
}
unsafe impl ::std::marker::Send for FlightStick {}
unsafe impl ::std::marker::Sync for FlightStick {}
#[derive(
:: std :: cmp :: PartialEq,
:: std :: cmp :: Eq,
:: std :: marker :: Copy,
:: std :: clone :: Clone,
:: std :: default :: Default,
:: std :: fmt :: Debug,
)]
#[repr(transparent)]
pub struct FlightStickButtons(pub u32);
impl FlightStickButtons {
pub const None: FlightStickButtons = FlightStickButtons(0u32);
pub const FirePrimary: FlightStickButtons = FlightStickButtons(1u32);
pub const FireSecondary: FlightStickButtons = FlightStickButtons(2u32);
}
impl ::std::convert::From<u32> for FlightStickButtons {
fn from(value: u32) -> Self {
Self(value)
}
}
unsafe impl ::windows::Abi for FlightStickButtons {
type Abi = Self;
type DefaultType = Self;
}
unsafe impl ::windows::RuntimeType for FlightStickButtons {
const SIGNATURE: ::windows::ConstBuffer =
::windows::ConstBuffer::from_slice(b"enum(Windows.Gaming.Input.FlightStickButtons;u4)");
}
impl ::std::ops::BitOr for FlightStickButtons {
type Output = Self;
fn bitor(self, rhs: Self) -> Self {
Self(self.0 | rhs.0)
}
}
impl ::std::ops::BitAnd for FlightStickButtons {
type Output = Self;
fn bitand(self, rhs: Self) -> Self {
Self(self.0 & rhs.0)
}
}
impl ::std::ops::BitOrAssign for FlightStickButtons {
fn bitor_assign(&mut self, rhs: Self) {
self.0.bitor_assign(rhs.0)
}
}
impl ::std::ops::BitAndAssign for FlightStickButtons {
fn bitand_assign(&mut self, rhs: Self) {
self.0.bitand_assign(rhs.0)
}
}
impl ::std::ops::Not for FlightStickButtons {
type Output = Self;
fn not(self) -> Self {
Self(self.0.not())
}
}
#[derive(:: std :: clone :: Clone, :: std :: marker :: Copy)]
#[repr(C)]
pub struct FlightStickReading {
pub Timestamp: u64,
pub Buttons: FlightStickButtons,
pub HatSwitch: GameControllerSwitchPosition,
pub Roll: f64,
pub Pitch: f64,
pub Yaw: f64,
pub Throttle: f64,
}
impl FlightStickReading {}
impl ::std::default::Default for FlightStickReading {
fn default() -> Self {
unsafe { ::std::mem::zeroed() }
}
}
impl ::std::fmt::Debug for FlightStickReading {
fn fmt(&self, fmt: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
fmt.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()
}
}
impl ::std::cmp::PartialEq for FlightStickReading {
fn eq(&self, other: &Self) -> bool {
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
}
}
impl ::std::cmp::Eq for FlightStickReading {}
unsafe impl ::windows::Abi for FlightStickReading {
type Abi = Self;
type DefaultType = Self;
}
unsafe impl ::windows::RuntimeType for FlightStickReading {
const SIGNATURE : :: windows :: ConstBuffer = :: windows :: 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)" ) ;
}
#[derive(
:: std :: cmp :: PartialEq,
:: std :: cmp :: Eq,
:: std :: marker :: Copy,
:: std :: clone :: Clone,
:: std :: default :: Default,
:: std :: fmt :: Debug,
)]
#[repr(transparent)]
pub struct GameControllerButtonLabel(pub i32);
impl GameControllerButtonLabel {
pub const None: GameControllerButtonLabel = GameControllerButtonLabel(0i32);
pub const XboxBack: GameControllerButtonLabel = GameControllerButtonLabel(1i32);
pub const XboxStart: GameControllerButtonLabel = GameControllerButtonLabel(2i32);
pub const XboxMenu: GameControllerButtonLabel = GameControllerButtonLabel(3i32);
pub const XboxView: GameControllerButtonLabel = GameControllerButtonLabel(4i32);
pub const XboxUp: GameControllerButtonLabel = GameControllerButtonLabel(5i32);
pub const XboxDown: GameControllerButtonLabel = GameControllerButtonLabel(6i32);
pub const XboxLeft: GameControllerButtonLabel = GameControllerButtonLabel(7i32);
pub const XboxRight: GameControllerButtonLabel = GameControllerButtonLabel(8i32);
pub const XboxA: GameControllerButtonLabel = GameControllerButtonLabel(9i32);
pub const XboxB: GameControllerButtonLabel = GameControllerButtonLabel(10i32);
pub const XboxX: GameControllerButtonLabel = GameControllerButtonLabel(11i32);
pub const XboxY: GameControllerButtonLabel = GameControllerButtonLabel(12i32);
pub const XboxLeftBumper: GameControllerButtonLabel = GameControllerButtonLabel(13i32);
pub const XboxLeftTrigger: GameControllerButtonLabel = GameControllerButtonLabel(14i32);
pub const XboxLeftStickButton: GameControllerButtonLabel = GameControllerButtonLabel(15i32);
pub const XboxRightBumper: GameControllerButtonLabel = GameControllerButtonLabel(16i32);
pub const XboxRightTrigger: GameControllerButtonLabel = GameControllerButtonLabel(17i32);
pub const XboxRightStickButton: GameControllerButtonLabel =
GameControllerButtonLabel(18i32);
pub const XboxPaddle1: GameControllerButtonLabel = GameControllerButtonLabel(19i32);
pub const XboxPaddle2: GameControllerButtonLabel = GameControllerButtonLabel(20i32);
pub const XboxPaddle3: GameControllerButtonLabel = GameControllerButtonLabel(21i32);
pub const XboxPaddle4: GameControllerButtonLabel = GameControllerButtonLabel(22i32);
pub const Mode: GameControllerButtonLabel = GameControllerButtonLabel(23i32);
pub const Select: GameControllerButtonLabel = GameControllerButtonLabel(24i32);
pub const Menu: GameControllerButtonLabel = GameControllerButtonLabel(25i32);
pub const View: GameControllerButtonLabel = GameControllerButtonLabel(26i32);
pub const Back: GameControllerButtonLabel = GameControllerButtonLabel(27i32);
pub const Start: GameControllerButtonLabel = GameControllerButtonLabel(28i32);
pub const Options: GameControllerButtonLabel = GameControllerButtonLabel(29i32);
pub const Share: GameControllerButtonLabel = GameControllerButtonLabel(30i32);
pub const Up: GameControllerButtonLabel = GameControllerButtonLabel(31i32);
pub const Down: GameControllerButtonLabel = GameControllerButtonLabel(32i32);
pub const Left: GameControllerButtonLabel = GameControllerButtonLabel(33i32);
pub const Right: GameControllerButtonLabel = GameControllerButtonLabel(34i32);
pub const LetterA: GameControllerButtonLabel = GameControllerButtonLabel(35i32);
pub const LetterB: GameControllerButtonLabel = GameControllerButtonLabel(36i32);
pub const LetterC: GameControllerButtonLabel = GameControllerButtonLabel(37i32);
pub const LetterL: GameControllerButtonLabel = GameControllerButtonLabel(38i32);
pub const LetterR: GameControllerButtonLabel = GameControllerButtonLabel(39i32);
pub const LetterX: GameControllerButtonLabel = GameControllerButtonLabel(40i32);
pub const LetterY: GameControllerButtonLabel = GameControllerButtonLabel(41i32);
pub const LetterZ: GameControllerButtonLabel = GameControllerButtonLabel(42i32);
pub const Cross: GameControllerButtonLabel = GameControllerButtonLabel(43i32);
pub const Circle: GameControllerButtonLabel = GameControllerButtonLabel(44i32);
pub const Square: GameControllerButtonLabel = GameControllerButtonLabel(45i32);
pub const Triangle: GameControllerButtonLabel = GameControllerButtonLabel(46i32);
pub const LeftBumper: GameControllerButtonLabel = GameControllerButtonLabel(47i32);
pub const LeftTrigger: GameControllerButtonLabel = GameControllerButtonLabel(48i32);
pub const LeftStickButton: GameControllerButtonLabel = GameControllerButtonLabel(49i32);
pub const Left1: GameControllerButtonLabel = GameControllerButtonLabel(50i32);
pub const Left2: GameControllerButtonLabel = GameControllerButtonLabel(51i32);
pub const Left3: GameControllerButtonLabel = GameControllerButtonLabel(52i32);
pub const RightBumper: GameControllerButtonLabel = GameControllerButtonLabel(53i32);
pub const RightTrigger: GameControllerButtonLabel = GameControllerButtonLabel(54i32);
pub const RightStickButton: GameControllerButtonLabel = GameControllerButtonLabel(55i32);
pub const Right1: GameControllerButtonLabel = GameControllerButtonLabel(56i32);
pub const Right2: GameControllerButtonLabel = GameControllerButtonLabel(57i32);
pub const Right3: GameControllerButtonLabel = GameControllerButtonLabel(58i32);
pub const Paddle1: GameControllerButtonLabel = GameControllerButtonLabel(59i32);
pub const Paddle2: GameControllerButtonLabel = GameControllerButtonLabel(60i32);
pub const Paddle3: GameControllerButtonLabel = GameControllerButtonLabel(61i32);
pub const Paddle4: GameControllerButtonLabel = GameControllerButtonLabel(62i32);
pub const Plus: GameControllerButtonLabel = GameControllerButtonLabel(63i32);
pub const Minus: GameControllerButtonLabel = GameControllerButtonLabel(64i32);
pub const DownLeftArrow: GameControllerButtonLabel = GameControllerButtonLabel(65i32);
pub const DialLeft: GameControllerButtonLabel = GameControllerButtonLabel(66i32);
pub const DialRight: GameControllerButtonLabel = GameControllerButtonLabel(67i32);
pub const Suspension: GameControllerButtonLabel = GameControllerButtonLabel(68i32);
}
impl ::std::convert::From<i32> for GameControllerButtonLabel {
fn from(value: i32) -> Self {
Self(value)
}
}
unsafe impl ::windows::Abi for GameControllerButtonLabel {
type Abi = Self;
type DefaultType = Self;
}
unsafe impl ::windows::RuntimeType for GameControllerButtonLabel {
const SIGNATURE: ::windows::ConstBuffer = ::windows::ConstBuffer::from_slice(
b"enum(Windows.Gaming.Input.GameControllerButtonLabel;i4)",
);
}
#[derive(
:: std :: cmp :: PartialEq,
:: std :: cmp :: Eq,
:: std :: marker :: Copy,
:: std :: clone :: Clone,
:: std :: default :: Default,
:: std :: fmt :: Debug,
)]
#[repr(transparent)]
pub struct GameControllerSwitchKind(pub i32);
impl GameControllerSwitchKind {
pub const TwoWay: GameControllerSwitchKind = GameControllerSwitchKind(0i32);
pub const FourWay: GameControllerSwitchKind = GameControllerSwitchKind(1i32);
pub const EightWay: GameControllerSwitchKind = GameControllerSwitchKind(2i32);
}
impl ::std::convert::From<i32> for GameControllerSwitchKind {
fn from(value: i32) -> Self {
Self(value)
}
}
unsafe impl ::windows::Abi for GameControllerSwitchKind {
type Abi = Self;
type DefaultType = Self;
}
unsafe impl ::windows::RuntimeType for GameControllerSwitchKind {
const SIGNATURE: ::windows::ConstBuffer = ::windows::ConstBuffer::from_slice(
b"enum(Windows.Gaming.Input.GameControllerSwitchKind;i4)",
);
}
#[derive(
:: std :: cmp :: PartialEq,
:: std :: cmp :: Eq,
:: std :: marker :: Copy,
:: std :: clone :: Clone,
:: std :: default :: Default,
:: std :: fmt :: Debug,
)]
#[repr(transparent)]
pub struct GameControllerSwitchPosition(pub i32);
impl GameControllerSwitchPosition {
pub const Center: GameControllerSwitchPosition = GameControllerSwitchPosition(0i32);
pub const Up: GameControllerSwitchPosition = GameControllerSwitchPosition(1i32);
pub const UpRight: GameControllerSwitchPosition = GameControllerSwitchPosition(2i32);
pub const Right: GameControllerSwitchPosition = GameControllerSwitchPosition(3i32);
pub const DownRight: GameControllerSwitchPosition = GameControllerSwitchPosition(4i32);
pub const Down: GameControllerSwitchPosition = GameControllerSwitchPosition(5i32);
pub const DownLeft: GameControllerSwitchPosition = GameControllerSwitchPosition(6i32);
pub const Left: GameControllerSwitchPosition = GameControllerSwitchPosition(7i32);
pub const UpLeft: GameControllerSwitchPosition = GameControllerSwitchPosition(8i32);
}
impl ::std::convert::From<i32> for GameControllerSwitchPosition {
fn from(value: i32) -> Self {
Self(value)
}
}
unsafe impl ::windows::Abi for GameControllerSwitchPosition {
type Abi = Self;
type DefaultType = Self;
}
unsafe impl ::windows::RuntimeType for GameControllerSwitchPosition {
const SIGNATURE: ::windows::ConstBuffer = ::windows::ConstBuffer::from_slice(
b"enum(Windows.Gaming.Input.GameControllerSwitchPosition;i4)",
);
}
#[repr(transparent)]
#[derive(
:: std :: cmp :: PartialEq,
:: std :: cmp :: Eq,
:: std :: clone :: Clone,
:: std :: fmt :: Debug,
)]
pub struct Gamepad(::windows::IInspectable);
impl Gamepad {
pub fn Vibration(&self) -> ::windows::Result<GamepadVibration> {
let this = self;
unsafe {
let mut result__: GamepadVibration = ::std::mem::zeroed();
(::windows::Interface::vtable(this).6)(
::std::mem::transmute_copy(this),
&mut result__,
)
.from_abi::<GamepadVibration>(result__)
}
}
pub fn SetVibration<'a, Param0: ::windows::IntoParam<'a, GamepadVibration>>(
&self,
value: Param0,
) -> ::windows::Result<()> {
let this = self;
unsafe {
(::windows::Interface::vtable(this).7)(
::std::mem::transmute_copy(this),
value.into_param().abi(),
)
.ok()
}
}
pub fn GetCurrentReading(&self) -> ::windows::Result<GamepadReading> {
let this = self;
unsafe {
let mut result__: GamepadReading = ::std::mem::zeroed();
(::windows::Interface::vtable(this).8)(
::std::mem::transmute_copy(this),
&mut result__,
)
.from_abi::<GamepadReading>(result__)
}
}
pub fn HeadsetConnected<
'a,
Param0: ::windows::IntoParam<
'a,
::windows_foundation::TypedEventHandler<IGameController, Headset>,
>,
>(
&self,
value: Param0,
) -> ::windows::Result<::windows_foundation::EventRegistrationToken> {
let this = &::windows::Interface::cast::<IGameController>(self)?;
unsafe {
let mut result__: ::windows_foundation::EventRegistrationToken =
::std::mem::zeroed();
(::windows::Interface::vtable(this).6)(
::std::mem::transmute_copy(this),
value.into_param().abi(),
&mut result__,
)
.from_abi::<::windows_foundation::EventRegistrationToken>(result__)
}
}
pub fn RemoveHeadsetConnected<
'a,
Param0: ::windows::IntoParam<'a, ::windows_foundation::EventRegistrationToken>,
>(
&self,
token: Param0,
) -> ::windows::Result<()> {
let this = &::windows::Interface::cast::<IGameController>(self)?;
unsafe {
(::windows::Interface::vtable(this).7)(
::std::mem::transmute_copy(this),
token.into_param().abi(),
)
.ok()
}
}
pub fn HeadsetDisconnected<
'a,
Param0: ::windows::IntoParam<
'a,
::windows_foundation::TypedEventHandler<IGameController, Headset>,
>,
>(
&self,
value: Param0,
) -> ::windows::Result<::windows_foundation::EventRegistrationToken> {
let this = &::windows::Interface::cast::<IGameController>(self)?;
unsafe {
let mut result__: ::windows_foundation::EventRegistrationToken =
::std::mem::zeroed();
(::windows::Interface::vtable(this).8)(
::std::mem::transmute_copy(this),
value.into_param().abi(),
&mut result__,
)
.from_abi::<::windows_foundation::EventRegistrationToken>(result__)
}
}
pub fn RemoveHeadsetDisconnected<
'a,
Param0: ::windows::IntoParam<'a, ::windows_foundation::EventRegistrationToken>,
>(
&self,
token: Param0,
) -> ::windows::Result<()> {
let this = &::windows::Interface::cast::<IGameController>(self)?;
unsafe {
(::windows::Interface::vtable(this).9)(
::std::mem::transmute_copy(this),
token.into_param().abi(),
)
.ok()
}
}
pub fn UserChanged<
'a,
Param0: ::windows::IntoParam<
'a,
::windows_foundation::TypedEventHandler<
IGameController,
::windows_system::UserChangedEventArgs,
>,
>,
>(
&self,
value: Param0,
) -> ::windows::Result<::windows_foundation::EventRegistrationToken> {
let this = &::windows::Interface::cast::<IGameController>(self)?;
unsafe {
let mut result__: ::windows_foundation::EventRegistrationToken =
::std::mem::zeroed();
(::windows::Interface::vtable(this).10)(
::std::mem::transmute_copy(this),
value.into_param().abi(),
&mut result__,
)
.from_abi::<::windows_foundation::EventRegistrationToken>(result__)
}
}
pub fn RemoveUserChanged<
'a,
Param0: ::windows::IntoParam<'a, ::windows_foundation::EventRegistrationToken>,
>(
&self,
token: Param0,
) -> ::windows::Result<()> {
let this = &::windows::Interface::cast::<IGameController>(self)?;
unsafe {
(::windows::Interface::vtable(this).11)(
::std::mem::transmute_copy(this),
token.into_param().abi(),
)
.ok()
}
}
pub fn Headset(&self) -> ::windows::Result<Headset> {
let this = &::windows::Interface::cast::<IGameController>(self)?;
unsafe {
let mut result__: ::windows::RawPtr = ::std::mem::zeroed();
(::windows::Interface::vtable(this).12)(
::std::mem::transmute_copy(this),
&mut result__,
)
.from_abi::<Headset>(result__)
}
}
pub fn IsWireless(&self) -> ::windows::Result<bool> {
let this = &::windows::Interface::cast::<IGameController>(self)?;
unsafe {
let mut result__: bool = ::std::mem::zeroed();
(::windows::Interface::vtable(this).13)(
::std::mem::transmute_copy(this),
&mut result__,
)
.from_abi::<bool>(result__)
}
}
pub fn User(&self) -> ::windows::Result<::windows_system::User> {
let this = &::windows::Interface::cast::<IGameController>(self)?;
unsafe {
let mut result__: ::windows::RawPtr = ::std::mem::zeroed();
(::windows::Interface::vtable(this).14)(
::std::mem::transmute_copy(this),
&mut result__,
)
.from_abi::<::windows_system::User>(result__)
}
}
pub fn GamepadAdded<
'a,
Param0: ::windows::IntoParam<'a, ::windows_foundation::EventHandler<Gamepad>>,
>(
value: Param0,
) -> ::windows::Result<::windows_foundation::EventRegistrationToken> {
Self::IGamepadStatics(|this| unsafe {
let mut result__: ::windows_foundation::EventRegistrationToken =
::std::mem::zeroed();
(::windows::Interface::vtable(this).6)(
::std::mem::transmute_copy(this),
value.into_param().abi(),
&mut result__,
)
.from_abi::<::windows_foundation::EventRegistrationToken>(result__)
})
}
pub fn RemoveGamepadAdded<
'a,
Param0: ::windows::IntoParam<'a, ::windows_foundation::EventRegistrationToken>,
>(
token: Param0,
) -> ::windows::Result<()> {
Self::IGamepadStatics(|this| unsafe {
(::windows::Interface::vtable(this).7)(
::std::mem::transmute_copy(this),
token.into_param().abi(),
)
.ok()
})
}
pub fn GamepadRemoved<
'a,
Param0: ::windows::IntoParam<'a, ::windows_foundation::EventHandler<Gamepad>>,
>(
value: Param0,
) -> ::windows::Result<::windows_foundation::EventRegistrationToken> {
Self::IGamepadStatics(|this| unsafe {
let mut result__: ::windows_foundation::EventRegistrationToken =
::std::mem::zeroed();
(::windows::Interface::vtable(this).8)(
::std::mem::transmute_copy(this),
value.into_param().abi(),
&mut result__,
)
.from_abi::<::windows_foundation::EventRegistrationToken>(result__)
})
}
pub fn RemoveGamepadRemoved<
'a,
Param0: ::windows::IntoParam<'a, ::windows_foundation::EventRegistrationToken>,
>(
token: Param0,
) -> ::windows::Result<()> {
Self::IGamepadStatics(|this| unsafe {
(::windows::Interface::vtable(this).9)(
::std::mem::transmute_copy(this),
token.into_param().abi(),
)
.ok()
})
}
pub fn Gamepads(
) -> ::windows::Result<::windows_foundation::Collections::IVectorView<Gamepad>> {
Self::IGamepadStatics(|this| unsafe {
let mut result__: ::windows::RawPtr = ::std::mem::zeroed();
(::windows::Interface::vtable(this).10)(
::std::mem::transmute_copy(this),
&mut result__,
)
.from_abi::<::windows_foundation::Collections::IVectorView<Gamepad>>(result__)
})
}
pub fn GetButtonLabel(
&self,
button: GamepadButtons,
) -> ::windows::Result<GameControllerButtonLabel> {
let this = &::windows::Interface::cast::<IGamepad2>(self)?;
unsafe {
let mut result__: GameControllerButtonLabel = ::std::mem::zeroed();
(::windows::Interface::vtable(this).6)(
::std::mem::transmute_copy(this),
button,
&mut result__,
)
.from_abi::<GameControllerButtonLabel>(result__)
}
}
pub fn TryGetBatteryReport(
&self,
) -> ::windows::Result<::windows_devices::Power::BatteryReport> {
let this = &::windows::Interface::cast::<IGameControllerBatteryInfo>(self)?;
unsafe {
let mut result__: ::windows::RawPtr = ::std::mem::zeroed();
(::windows::Interface::vtable(this).6)(
::std::mem::transmute_copy(this),
&mut result__,
)
.from_abi::<::windows_devices::Power::BatteryReport>(result__)
}
}
pub fn FromGameController<'a, Param0: ::windows::IntoParam<'a, IGameController>>(
gamecontroller: Param0,
) -> ::windows::Result<Gamepad> {
Self::IGamepadStatics2(|this| unsafe {
let mut result__: ::windows::RawPtr = ::std::mem::zeroed();
(::windows::Interface::vtable(this).6)(
::std::mem::transmute_copy(this),
gamecontroller.into_param().abi(),
&mut result__,
)
.from_abi::<Gamepad>(result__)
})
}
pub fn IGamepadStatics<R, F: FnOnce(&IGamepadStatics) -> ::windows::Result<R>>(
callback: F,
) -> ::windows::Result<R> {
static mut SHARED: ::windows::FactoryCache<Gamepad, IGamepadStatics> =
::windows::FactoryCache::new();
unsafe { SHARED.call(callback) }
}
pub fn IGamepadStatics2<R, F: FnOnce(&IGamepadStatics2) -> ::windows::Result<R>>(
callback: F,
) -> ::windows::Result<R> {
static mut SHARED: ::windows::FactoryCache<Gamepad, IGamepadStatics2> =
::windows::FactoryCache::new();
unsafe { SHARED.call(callback) }
}
}
unsafe impl ::windows::RuntimeType for Gamepad {
const SIGNATURE: ::windows::ConstBuffer = ::windows::ConstBuffer::from_slice(
b"rc(Windows.Gaming.Input.Gamepad;{bc7bb43c-0a69-3903-9e9d-a50f86a45de5})",
);
}
unsafe impl ::windows::Interface for Gamepad {
type Vtable = IGamepad_abi;
const IID: ::windows::Guid = ::windows::Guid::from_values(
3162223676,
2665,
14595,
[158, 157, 165, 15, 134, 164, 93, 229],
);
}
impl ::windows::RuntimeName for Gamepad {
const NAME: &'static str = "Windows.Gaming.Input.Gamepad";
}
impl ::std::convert::From<Gamepad> for ::windows::IUnknown {
fn from(value: Gamepad) -> Self {
unsafe { ::std::mem::transmute(value) }
}
}
impl ::std::convert::From<&Gamepad> for ::windows::IUnknown {
fn from(value: &Gamepad) -> Self {
::std::convert::From::from(::std::clone::Clone::clone(value))
}
}
impl<'a> ::windows::IntoParam<'a, ::windows::IUnknown> for Gamepad {
fn into_param(self) -> ::windows::Param<'a, ::windows::IUnknown> {
::windows::Param::Owned(::std::convert::Into::<::windows::IUnknown>::into(self))
}
}
impl<'a> ::windows::IntoParam<'a, ::windows::IUnknown> for &Gamepad {
fn into_param(self) -> ::windows::Param<'a, ::windows::IUnknown> {
::windows::Param::Owned(::std::convert::Into::<::windows::IUnknown>::into(
::std::clone::Clone::clone(self),
))
}
}
impl ::std::convert::From<Gamepad> for ::windows::IInspectable {
fn from(value: Gamepad) -> Self {
value.0
}
}
impl ::std::convert::From<&Gamepad> for ::windows::IInspectable {
fn from(value: &Gamepad) -> Self {
value.0.clone()
}
}
impl<'a> ::windows::IntoParam<'a, ::windows::IInspectable> for Gamepad {
fn into_param(self) -> ::windows::Param<'a, ::windows::IInspectable> {
::windows::Param::Owned(self.0)
}
}
impl<'a> ::windows::IntoParam<'a, ::windows::IInspectable> for &'a Gamepad {
fn into_param(self) -> ::windows::Param<'a, ::windows::IInspectable> {
::windows::Param::Borrowed(&self.0)
}
}
impl ::std::convert::TryFrom<Gamepad> for IGameController {
type Error = ::windows::Error;
fn try_from(value: Gamepad) -> ::windows::Result<Self> {
::std::convert::TryFrom::try_from(&value)
}
}
impl ::std::convert::TryFrom<&Gamepad> for IGameController {
type Error = ::windows::Error;
fn try_from(value: &Gamepad) -> ::windows::Result<Self> {
::windows::Interface::cast(value)
}
}
impl<'a> ::windows::IntoParam<'a, IGameController> for Gamepad {
fn into_param(self) -> ::windows::Param<'a, IGameController> {
::windows::IntoParam::into_param(&self)
}
}
impl<'a> ::windows::IntoParam<'a, IGameController> for &Gamepad {
fn into_param(self) -> ::windows::Param<'a, IGameController> {
::std::convert::TryInto::<IGameController>::try_into(self)
.map(::windows::Param::Owned)
.unwrap_or(::windows::Param::None)
}
}
impl ::std::convert::TryFrom<Gamepad> for IGameControllerBatteryInfo {
type Error = ::windows::Error;
fn try_from(value: Gamepad) -> ::windows::Result<Self> {
::std::convert::TryFrom::try_from(&value)
}
}
impl ::std::convert::TryFrom<&Gamepad> for IGameControllerBatteryInfo {
type Error = ::windows::Error;
fn try_from(value: &Gamepad) -> ::windows::Result<Self> {
::windows::Interface::cast(value)
}
}
impl<'a> ::windows::IntoParam<'a, IGameControllerBatteryInfo> for Gamepad {
fn into_param(self) -> ::windows::Param<'a, IGameControllerBatteryInfo> {
::windows::IntoParam::into_param(&self)
}
}
impl<'a> ::windows::IntoParam<'a, IGameControllerBatteryInfo> for &Gamepad {
fn into_param(self) -> ::windows::Param<'a, IGameControllerBatteryInfo> {
::std::convert::TryInto::<IGameControllerBatteryInfo>::try_into(self)
.map(::windows::Param::Owned)
.unwrap_or(::windows::Param::None)
}
}
unsafe impl ::std::marker::Send for Gamepad {}
unsafe impl ::std::marker::Sync for Gamepad {}
#[derive(
:: std :: cmp :: PartialEq,
:: std :: cmp :: Eq,
:: std :: marker :: Copy,
:: std :: clone :: Clone,
:: std :: default :: Default,
:: std :: fmt :: Debug,
)]
#[repr(transparent)]
pub struct GamepadButtons(pub u32);
impl GamepadButtons {
pub const None: GamepadButtons = GamepadButtons(0u32);
pub const Menu: GamepadButtons = GamepadButtons(1u32);
pub const View: GamepadButtons = GamepadButtons(2u32);
pub const A: GamepadButtons = GamepadButtons(4u32);
pub const B: GamepadButtons = GamepadButtons(8u32);
pub const X: GamepadButtons = GamepadButtons(16u32);
pub const Y: GamepadButtons = GamepadButtons(32u32);
pub const DPadUp: GamepadButtons = GamepadButtons(64u32);
pub const DPadDown: GamepadButtons = GamepadButtons(128u32);
pub const DPadLeft: GamepadButtons = GamepadButtons(256u32);
pub const DPadRight: GamepadButtons = GamepadButtons(512u32);
pub const LeftShoulder: GamepadButtons = GamepadButtons(1024u32);
pub const RightShoulder: GamepadButtons = GamepadButtons(2048u32);
pub const LeftThumbstick: GamepadButtons = GamepadButtons(4096u32);
pub const RightThumbstick: GamepadButtons = GamepadButtons(8192u32);
pub const Paddle1: GamepadButtons = GamepadButtons(16384u32);
pub const Paddle2: GamepadButtons = GamepadButtons(32768u32);
pub const Paddle3: GamepadButtons = GamepadButtons(65536u32);
pub const Paddle4: GamepadButtons = GamepadButtons(131072u32);
}
impl ::std::convert::From<u32> for GamepadButtons {
fn from(value: u32) -> Self {
Self(value)
}
}
unsafe impl ::windows::Abi for GamepadButtons {
type Abi = Self;
type DefaultType = Self;
}
unsafe impl ::windows::RuntimeType for GamepadButtons {
const SIGNATURE: ::windows::ConstBuffer =
::windows::ConstBuffer::from_slice(b"enum(Windows.Gaming.Input.GamepadButtons;u4)");
}
impl ::std::ops::BitOr for GamepadButtons {
type Output = Self;
fn bitor(self, rhs: Self) -> Self {
Self(self.0 | rhs.0)
}
}
impl ::std::ops::BitAnd for GamepadButtons {
type Output = Self;
fn bitand(self, rhs: Self) -> Self {
Self(self.0 & rhs.0)
}
}
impl ::std::ops::BitOrAssign for GamepadButtons {
fn bitor_assign(&mut self, rhs: Self) {
self.0.bitor_assign(rhs.0)
}
}
impl ::std::ops::BitAndAssign for GamepadButtons {
fn bitand_assign(&mut self, rhs: Self) {
self.0.bitand_assign(rhs.0)
}
}
impl ::std::ops::Not for GamepadButtons {
type Output = Self;
fn not(self) -> Self {
Self(self.0.not())
}
}
#[derive(:: std :: clone :: Clone, :: std :: marker :: Copy)]
#[repr(C)]
pub struct GamepadReading {
pub Timestamp: u64,
pub Buttons: GamepadButtons,
pub LeftTrigger: f64,
pub RightTrigger: f64,
pub LeftThumbstickX: f64,
pub LeftThumbstickY: f64,
pub RightThumbstickX: f64,
pub RightThumbstickY: f64,
}
impl GamepadReading {}
impl ::std::default::Default for GamepadReading {
fn default() -> Self {
unsafe { ::std::mem::zeroed() }
}
}
impl ::std::fmt::Debug for GamepadReading {
fn fmt(&self, fmt: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
fmt.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()
}
}
impl ::std::cmp::PartialEq for GamepadReading {
fn eq(&self, other: &Self) -> bool {
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
}
}
impl ::std::cmp::Eq for GamepadReading {}
unsafe impl ::windows::Abi for GamepadReading {
type Abi = Self;
type DefaultType = Self;
}
unsafe impl ::windows::RuntimeType for GamepadReading {
const SIGNATURE : :: windows :: ConstBuffer = :: windows :: ConstBuffer :: from_slice ( b"struct(Windows.Gaming.Input.GamepadReading;u8;enum(Windows.Gaming.Input.GamepadButtons;u4);f8;f8;f8;f8;f8;f8)" ) ;
}
#[derive(:: std :: clone :: Clone, :: std :: marker :: Copy)]
#[repr(C)]
pub struct GamepadVibration {
pub LeftMotor: f64,
pub RightMotor: f64,
pub LeftTrigger: f64,
pub RightTrigger: f64,
}
impl GamepadVibration {}
impl ::std::default::Default for GamepadVibration {
fn default() -> Self {
unsafe { ::std::mem::zeroed() }
}
}
impl ::std::fmt::Debug for GamepadVibration {
fn fmt(&self, fmt: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
fmt.debug_struct("GamepadVibration")
.field("LeftMotor", &self.LeftMotor)
.field("RightMotor", &self.RightMotor)
.field("LeftTrigger", &self.LeftTrigger)
.field("RightTrigger", &self.RightTrigger)
.finish()
}
}
impl ::std::cmp::PartialEq for GamepadVibration {
fn eq(&self, other: &Self) -> bool {
self.LeftMotor == other.LeftMotor
&& self.RightMotor == other.RightMotor
&& self.LeftTrigger == other.LeftTrigger
&& self.RightTrigger == other.RightTrigger
}
}
impl ::std::cmp::Eq for GamepadVibration {}
unsafe impl ::windows::Abi for GamepadVibration {
type Abi = Self;
type DefaultType = Self;
}
unsafe impl ::windows::RuntimeType for GamepadVibration {
const SIGNATURE: ::windows::ConstBuffer = ::windows::ConstBuffer::from_slice(
b"struct(Windows.Gaming.Input.GamepadVibration;f8;f8;f8;f8)",
);
}
#[repr(C)]
#[derive(
:: std :: clone :: Clone,
:: std :: default :: Default,
:: std :: fmt :: Debug,
:: std :: cmp :: PartialEq,
:: std :: cmp :: Eq,
:: std :: marker :: Copy,
)]
pub struct GamingInputPreviewContract(pub u8);
#[repr(transparent)]
#[derive(
:: std :: cmp :: PartialEq,
:: std :: cmp :: Eq,
:: std :: clone :: Clone,
:: std :: fmt :: Debug,
)]
pub struct Headset(::windows::IInspectable);
impl Headset {
pub fn CaptureDeviceId(&self) -> ::windows::Result<::windows::HSTRING> {
let this = self;
unsafe {
let mut result__: ::std::mem::ManuallyDrop<::windows::HSTRING> =
::std::mem::zeroed();
(::windows::Interface::vtable(this).6)(
::std::mem::transmute_copy(this),
&mut result__,
)
.from_abi::<::windows::HSTRING>(result__)
}
}
pub fn RenderDeviceId(&self) -> ::windows::Result<::windows::HSTRING> {
let this = self;
unsafe {
let mut result__: ::std::mem::ManuallyDrop<::windows::HSTRING> =
::std::mem::zeroed();
(::windows::Interface::vtable(this).7)(
::std::mem::transmute_copy(this),
&mut result__,
)
.from_abi::<::windows::HSTRING>(result__)
}
}
pub fn TryGetBatteryReport(
&self,
) -> ::windows::Result<::windows_devices::Power::BatteryReport> {
let this = &::windows::Interface::cast::<IGameControllerBatteryInfo>(self)?;
unsafe {
let mut result__: ::windows::RawPtr = ::std::mem::zeroed();
(::windows::Interface::vtable(this).6)(
::std::mem::transmute_copy(this),
&mut result__,
)
.from_abi::<::windows_devices::Power::BatteryReport>(result__)
}
}
}
unsafe impl ::windows::RuntimeType for Headset {
const SIGNATURE: ::windows::ConstBuffer = ::windows::ConstBuffer::from_slice(
b"rc(Windows.Gaming.Input.Headset;{3fd156ef-6925-3fa8-9181-029c5223ae3b})",
);
}
unsafe impl ::windows::Interface for Headset {
type Vtable = IHeadset_abi;
const IID: ::windows::Guid = ::windows::Guid::from_values(
1070683887,
26917,
16296,
[145, 129, 2, 156, 82, 35, 174, 59],
);
}
impl ::windows::RuntimeName for Headset {
const NAME: &'static str = "Windows.Gaming.Input.Headset";
}
impl ::std::convert::From<Headset> for ::windows::IUnknown {
fn from(value: Headset) -> Self {
unsafe { ::std::mem::transmute(value) }
}
}
impl ::std::convert::From<&Headset> for ::windows::IUnknown {
fn from(value: &Headset) -> Self {
::std::convert::From::from(::std::clone::Clone::clone(value))
}
}
impl<'a> ::windows::IntoParam<'a, ::windows::IUnknown> for Headset {
fn into_param(self) -> ::windows::Param<'a, ::windows::IUnknown> {
::windows::Param::Owned(::std::convert::Into::<::windows::IUnknown>::into(self))
}
}
impl<'a> ::windows::IntoParam<'a, ::windows::IUnknown> for &Headset {
fn into_param(self) -> ::windows::Param<'a, ::windows::IUnknown> {
::windows::Param::Owned(::std::convert::Into::<::windows::IUnknown>::into(
::std::clone::Clone::clone(self),
))
}
}
impl ::std::convert::From<Headset> for ::windows::IInspectable {
fn from(value: Headset) -> Self {
value.0
}
}
impl ::std::convert::From<&Headset> for ::windows::IInspectable {
fn from(value: &Headset) -> Self {
value.0.clone()
}
}
impl<'a> ::windows::IntoParam<'a, ::windows::IInspectable> for Headset {
fn into_param(self) -> ::windows::Param<'a, ::windows::IInspectable> {
::windows::Param::Owned(self.0)
}
}
impl<'a> ::windows::IntoParam<'a, ::windows::IInspectable> for &'a Headset {
fn into_param(self) -> ::windows::Param<'a, ::windows::IInspectable> {
::windows::Param::Borrowed(&self.0)
}
}
impl ::std::convert::TryFrom<Headset> for IGameControllerBatteryInfo {
type Error = ::windows::Error;
fn try_from(value: Headset) -> ::windows::Result<Self> {
::std::convert::TryFrom::try_from(&value)
}
}
impl ::std::convert::TryFrom<&Headset> for IGameControllerBatteryInfo {
type Error = ::windows::Error;
fn try_from(value: &Headset) -> ::windows::Result<Self> {
::windows::Interface::cast(value)
}
}
impl<'a> ::windows::IntoParam<'a, IGameControllerBatteryInfo> for Headset {
fn into_param(self) -> ::windows::Param<'a, IGameControllerBatteryInfo> {
::windows::IntoParam::into_param(&self)
}
}
impl<'a> ::windows::IntoParam<'a, IGameControllerBatteryInfo> for &Headset {
fn into_param(self) -> ::windows::Param<'a, IGameControllerBatteryInfo> {
::std::convert::TryInto::<IGameControllerBatteryInfo>::try_into(self)
.map(::windows::Param::Owned)
.unwrap_or(::windows::Param::None)
}
}
unsafe impl ::std::marker::Send for Headset {}
unsafe impl ::std::marker::Sync for Headset {}
#[repr(transparent)]
#[derive(
:: std :: cmp :: PartialEq,
:: std :: cmp :: Eq,
:: std :: clone :: Clone,
:: std :: fmt :: Debug,
)]
#[doc(hidden)]
pub struct IArcadeStick(::windows::IInspectable);
unsafe impl ::windows::Interface for IArcadeStick {
type Vtable = IArcadeStick_abi;
const IID: ::windows::Guid = ::windows::Guid::from_values(
2974438301,
48891,
19585,
[128, 81, 21, 236, 243, 177, 48, 54],
);
}
#[repr(C)]
#[doc(hidden)]
pub struct IArcadeStick_abi(
pub unsafe extern "system" fn(
this: ::windows::RawPtr,
iid: &::windows::Guid,
interface: *mut ::windows::RawPtr,
) -> ::windows::HRESULT,
pub unsafe extern "system" fn(this: ::windows::RawPtr) -> u32,
pub unsafe extern "system" fn(this: ::windows::RawPtr) -> u32,
pub unsafe extern "system" fn(
this: ::windows::RawPtr,
count: *mut u32,
values: *mut *mut ::windows::Guid,
) -> ::windows::HRESULT,
pub unsafe extern "system" fn(
this: ::windows::RawPtr,
value: *mut ::windows::RawPtr,
) -> ::windows::HRESULT,
pub unsafe extern "system" fn(
this: ::windows::RawPtr,
value: *mut i32,
) -> ::windows::HRESULT,
pub unsafe extern "system" fn(
this: ::windows::RawPtr,
button: ArcadeStickButtons,
result__: *mut GameControllerButtonLabel,
) -> ::windows::HRESULT,
pub unsafe extern "system" fn(
this: ::windows::RawPtr,
result__: *mut ArcadeStickReading,
) -> ::windows::HRESULT,
);
#[repr(transparent)]
#[derive(
:: std :: cmp :: PartialEq,
:: std :: cmp :: Eq,
:: std :: clone :: Clone,
:: std :: fmt :: Debug,
)]
#[doc(hidden)]
pub struct IArcadeStickStatics(::windows::IInspectable);
unsafe impl ::windows::Interface for IArcadeStickStatics {
type Vtable = IArcadeStickStatics_abi;
const IID: ::windows::Guid = ::windows::Guid::from_values(
1547155656,
14257,
19160,
[148, 88, 32, 15, 26, 48, 1, 142],
);
}
#[repr(C)]
#[doc(hidden)]
pub struct IArcadeStickStatics_abi(
pub unsafe extern "system" fn(
this: ::windows::RawPtr,
iid: &::windows::Guid,
interface: *mut ::windows::RawPtr,
) -> ::windows::HRESULT,
pub unsafe extern "system" fn(this: ::windows::RawPtr) -> u32,
pub unsafe extern "system" fn(this: ::windows::RawPtr) -> u32,
pub unsafe extern "system" fn(
this: ::windows::RawPtr,
count: *mut u32,
values: *mut *mut ::windows::Guid,
) -> ::windows::HRESULT,
pub unsafe extern "system" fn(
this: ::windows::RawPtr,
value: *mut ::windows::RawPtr,
) -> ::windows::HRESULT,
pub unsafe extern "system" fn(
this: ::windows::RawPtr,
value: *mut i32,
) -> ::windows::HRESULT,
pub unsafe extern "system" fn(
this: ::windows::RawPtr,
value: ::windows::RawPtr,
result__: *mut ::windows_foundation::EventRegistrationToken,
) -> ::windows::HRESULT,
pub unsafe extern "system" fn(
this: ::windows::RawPtr,
token: ::windows_foundation::EventRegistrationToken,
) -> ::windows::HRESULT,
pub unsafe extern "system" fn(
this: ::windows::RawPtr,
value: ::windows::RawPtr,
result__: *mut ::windows_foundation::EventRegistrationToken,
) -> ::windows::HRESULT,
pub unsafe extern "system" fn(
this: ::windows::RawPtr,
token: ::windows_foundation::EventRegistrationToken,
) -> ::windows::HRESULT,
pub unsafe extern "system" fn(
this: ::windows::RawPtr,
result__: *mut ::windows::RawPtr,
) -> ::windows::HRESULT,
);
#[repr(transparent)]
#[derive(
:: std :: cmp :: PartialEq,
:: std :: cmp :: Eq,
:: std :: clone :: Clone,
:: std :: fmt :: Debug,
)]
#[doc(hidden)]
pub struct IArcadeStickStatics2(::windows::IInspectable);
unsafe impl ::windows::Interface for IArcadeStickStatics2 {
type Vtable = IArcadeStickStatics2_abi;
const IID: ::windows::Guid = ::windows::Guid::from_values(
1387648836,
48006,
17498,
[181, 156, 89, 111, 14, 42, 73, 223],
);
}
#[repr(C)]
#[doc(hidden)]
pub struct IArcadeStickStatics2_abi(
pub unsafe extern "system" fn(
this: ::windows::RawPtr,
iid: &::windows::Guid,
interface: *mut ::windows::RawPtr,
) -> ::windows::HRESULT,
pub unsafe extern "system" fn(this: ::windows::RawPtr) -> u32,
pub unsafe extern "system" fn(this: ::windows::RawPtr) -> u32,
pub unsafe extern "system" fn(
this: ::windows::RawPtr,
count: *mut u32,
values: *mut *mut ::windows::Guid,
) -> ::windows::HRESULT,
pub unsafe extern "system" fn(
this: ::windows::RawPtr,
value: *mut ::windows::RawPtr,
) -> ::windows::HRESULT,
pub unsafe extern "system" fn(
this: ::windows::RawPtr,
value: *mut i32,
) -> ::windows::HRESULT,
pub unsafe extern "system" fn(
this: ::windows::RawPtr,
gamecontroller: ::windows::RawPtr,
result__: *mut ::windows::RawPtr,
) -> ::windows::HRESULT,
);
#[repr(transparent)]
#[derive(
:: std :: cmp :: PartialEq,
:: std :: cmp :: Eq,
:: std :: clone :: Clone,
:: std :: fmt :: Debug,
)]
#[doc(hidden)]
pub struct IFlightStick(::windows::IInspectable);
unsafe impl ::windows::Interface for IFlightStick {
type Vtable = IFlightStick_abi;
const IID: ::windows::Guid = ::windows::Guid::from_values(
3030564892,
47163,
17497,
[161, 169, 151, 176, 60, 51, 218, 124],
);
}
#[repr(C)]
#[doc(hidden)]
pub struct IFlightStick_abi(
pub unsafe extern "system" fn(
this: ::windows::RawPtr,
iid: &::windows::Guid,
interface: *mut ::windows::RawPtr,
) -> ::windows::HRESULT,
pub unsafe extern "system" fn(this: ::windows::RawPtr) -> u32,
pub unsafe extern "system" fn(this: ::windows::RawPtr) -> u32,
pub unsafe extern "system" fn(
this: ::windows::RawPtr,
count: *mut u32,
values: *mut *mut ::windows::Guid,
) -> ::windows::HRESULT,
pub unsafe extern "system" fn(
this: ::windows::RawPtr,
value: *mut ::windows::RawPtr,
) -> ::windows::HRESULT,
pub unsafe extern "system" fn(
this: ::windows::RawPtr,
value: *mut i32,
) -> ::windows::HRESULT,
pub unsafe extern "system" fn(
this: ::windows::RawPtr,
result__: *mut GameControllerSwitchKind,
) -> ::windows::HRESULT,
pub unsafe extern "system" fn(
this: ::windows::RawPtr,
button: FlightStickButtons,
result__: *mut GameControllerButtonLabel,
) -> ::windows::HRESULT,
pub unsafe extern "system" fn(
this: ::windows::RawPtr,
result__: *mut FlightStickReading,
) -> ::windows::HRESULT,
);
#[repr(transparent)]
#[derive(
:: std :: cmp :: PartialEq,
:: std :: cmp :: Eq,
:: std :: clone :: Clone,
:: std :: fmt :: Debug,
)]
#[doc(hidden)]
pub struct IFlightStickStatics(::windows::IInspectable);
unsafe impl ::windows::Interface for IFlightStickStatics {
type Vtable = IFlightStickStatics_abi;
const IID: ::windows::Guid = ::windows::Guid::from_values(
1427411530,
65228,
17246,
[131, 220, 92, 236, 138, 24, 165, 32],
);
}
#[repr(C)]
#[doc(hidden)]
pub struct IFlightStickStatics_abi(
pub unsafe extern "system" fn(
this: ::windows::RawPtr,
iid: &::windows::Guid,
interface: *mut ::windows::RawPtr,
) -> ::windows::HRESULT,
pub unsafe extern "system" fn(this: ::windows::RawPtr) -> u32,
pub unsafe extern "system" fn(this: ::windows::RawPtr) -> u32,
pub unsafe extern "system" fn(
this: ::windows::RawPtr,
count: *mut u32,
values: *mut *mut ::windows::Guid,
) -> ::windows::HRESULT,
pub unsafe extern "system" fn(
this: ::windows::RawPtr,
value: *mut ::windows::RawPtr,
) -> ::windows::HRESULT,
pub unsafe extern "system" fn(
this: ::windows::RawPtr,
value: *mut i32,
) -> ::windows::HRESULT,
pub unsafe extern "system" fn(
this: ::windows::RawPtr,
value: ::windows::RawPtr,
result__: *mut ::windows_foundation::EventRegistrationToken,
) -> ::windows::HRESULT,
pub unsafe extern "system" fn(
this: ::windows::RawPtr,
token: ::windows_foundation::EventRegistrationToken,
) -> ::windows::HRESULT,
pub unsafe extern "system" fn(
this: ::windows::RawPtr,
value: ::windows::RawPtr,
result__: *mut ::windows_foundation::EventRegistrationToken,
) -> ::windows::HRESULT,
pub unsafe extern "system" fn(
this: ::windows::RawPtr,
token: ::windows_foundation::EventRegistrationToken,
) -> ::windows::HRESULT,
pub unsafe extern "system" fn(
this: ::windows::RawPtr,
result__: *mut ::windows::RawPtr,
) -> ::windows::HRESULT,
pub unsafe extern "system" fn(
this: ::windows::RawPtr,
gamecontroller: ::windows::RawPtr,
result__: *mut ::windows::RawPtr,
) -> ::windows::HRESULT,
);
#[repr(transparent)]
#[derive(
:: std :: cmp :: PartialEq,
:: std :: cmp :: Eq,
:: std :: clone :: Clone,
:: std :: fmt :: Debug,
)]
pub struct IGameController(::windows::IInspectable);
unsafe impl ::windows::Interface for IGameController {
type Vtable = IGameController_abi;
const IID: ::windows::Guid = ::windows::Guid::from_values(
464479522,
24420,
17093,
[130, 103, 185, 254, 34, 21, 191, 189],
);
}
impl IGameController {
pub fn HeadsetConnected<
'a,
Param0: ::windows::IntoParam<
'a,
::windows_foundation::TypedEventHandler<IGameController, Headset>,
>,
>(
&self,
value: Param0,
) -> ::windows::Result<::windows_foundation::EventRegistrationToken> {
let this = self;
unsafe {
let mut result__: ::windows_foundation::EventRegistrationToken =
::std::mem::zeroed();
(::windows::Interface::vtable(this).6)(
::std::mem::transmute_copy(this),
value.into_param().abi(),
&mut result__,
)
.from_abi::<::windows_foundation::EventRegistrationToken>(result__)
}
}
pub fn RemoveHeadsetConnected<
'a,
Param0: ::windows::IntoParam<'a, ::windows_foundation::EventRegistrationToken>,
>(
&self,
token: Param0,
) -> ::windows::Result<()> {
let this = self;
unsafe {
(::windows::Interface::vtable(this).7)(
::std::mem::transmute_copy(this),
token.into_param().abi(),
)
.ok()
}
}
pub fn HeadsetDisconnected<
'a,
Param0: ::windows::IntoParam<
'a,
::windows_foundation::TypedEventHandler<IGameController, Headset>,
>,
>(
&self,
value: Param0,
) -> ::windows::Result<::windows_foundation::EventRegistrationToken> {
let this = self;
unsafe {
let mut result__: ::windows_foundation::EventRegistrationToken =
::std::mem::zeroed();
(::windows::Interface::vtable(this).8)(
::std::mem::transmute_copy(this),
value.into_param().abi(),
&mut result__,
)
.from_abi::<::windows_foundation::EventRegistrationToken>(result__)
}
}
pub fn RemoveHeadsetDisconnected<
'a,
Param0: ::windows::IntoParam<'a, ::windows_foundation::EventRegistrationToken>,
>(
&self,
token: Param0,
) -> ::windows::Result<()> {
let this = self;
unsafe {
(::windows::Interface::vtable(this).9)(
::std::mem::transmute_copy(this),
token.into_param().abi(),
)
.ok()
}
}
pub fn UserChanged<
'a,
Param0: ::windows::IntoParam<
'a,
::windows_foundation::TypedEventHandler<
IGameController,
::windows_system::UserChangedEventArgs,
>,
>,
>(
&self,
value: Param0,
) -> ::windows::Result<::windows_foundation::EventRegistrationToken> {
let this = self;
unsafe {
let mut result__: ::windows_foundation::EventRegistrationToken =
::std::mem::zeroed();
(::windows::Interface::vtable(this).10)(
::std::mem::transmute_copy(this),
value.into_param().abi(),
&mut result__,
)
.from_abi::<::windows_foundation::EventRegistrationToken>(result__)
}
}
pub fn RemoveUserChanged<
'a,
Param0: ::windows::IntoParam<'a, ::windows_foundation::EventRegistrationToken>,
>(
&self,
token: Param0,
) -> ::windows::Result<()> {
let this = self;
unsafe {
(::windows::Interface::vtable(this).11)(
::std::mem::transmute_copy(this),
token.into_param().abi(),
)
.ok()
}
}
pub fn Headset(&self) -> ::windows::Result<Headset> {
let this = self;
unsafe {
let mut result__: ::windows::RawPtr = ::std::mem::zeroed();
(::windows::Interface::vtable(this).12)(
::std::mem::transmute_copy(this),
&mut result__,
)
.from_abi::<Headset>(result__)
}
}
pub fn IsWireless(&self) -> ::windows::Result<bool> {
let this = self;
unsafe {
let mut result__: bool = ::std::mem::zeroed();
(::windows::Interface::vtable(this).13)(
::std::mem::transmute_copy(this),
&mut result__,
)
.from_abi::<bool>(result__)
}
}
pub fn User(&self) -> ::windows::Result<::windows_system::User> {
let this = self;
unsafe {
let mut result__: ::windows::RawPtr = ::std::mem::zeroed();
(::windows::Interface::vtable(this).14)(
::std::mem::transmute_copy(this),
&mut result__,
)
.from_abi::<::windows_system::User>(result__)
}
}
}
unsafe impl ::windows::RuntimeType for IGameController {
const SIGNATURE: ::windows::ConstBuffer =
::windows::ConstBuffer::from_slice(b"{1baf6522-5f64-42c5-8267-b9fe2215bfbd}");
}
impl ::std::convert::From<IGameController> for ::windows::IUnknown {
fn from(value: IGameController) -> Self {
unsafe { ::std::mem::transmute(value) }
}
}
impl ::std::convert::From<&IGameController> for ::windows::IUnknown {
fn from(value: &IGameController) -> Self {
::std::convert::From::from(::std::clone::Clone::clone(value))
}
}
impl<'a> ::windows::IntoParam<'a, ::windows::IUnknown> for IGameController {
fn into_param(self) -> ::windows::Param<'a, ::windows::IUnknown> {
::windows::Param::Owned(::std::convert::Into::<::windows::IUnknown>::into(self))
}
}
impl<'a> ::windows::IntoParam<'a, ::windows::IUnknown> for &IGameController {
fn into_param(self) -> ::windows::Param<'a, ::windows::IUnknown> {
::windows::Param::Owned(::std::convert::Into::<::windows::IUnknown>::into(
::std::clone::Clone::clone(self),
))
}
}
impl ::std::convert::From<IGameController> for ::windows::IInspectable {
fn from(value: IGameController) -> Self {
value.0
}
}
impl ::std::convert::From<&IGameController> for ::windows::IInspectable {
fn from(value: &IGameController) -> Self {
value.0.clone()
}
}
impl<'a> ::windows::IntoParam<'a, ::windows::IInspectable> for IGameController {
fn into_param(self) -> ::windows::Param<'a, ::windows::IInspectable> {
::windows::Param::Owned(self.0)
}
}
impl<'a> ::windows::IntoParam<'a, ::windows::IInspectable> for &'a IGameController {
fn into_param(self) -> ::windows::Param<'a, ::windows::IInspectable> {
::windows::Param::Borrowed(&self.0)
}
}
#[repr(C)]
#[doc(hidden)]
pub struct IGameController_abi(
pub unsafe extern "system" fn(
this: ::windows::RawPtr,
iid: &::windows::Guid,
interface: *mut ::windows::RawPtr,
) -> ::windows::HRESULT,
pub unsafe extern "system" fn(this: ::windows::RawPtr) -> u32,
pub unsafe extern "system" fn(this: ::windows::RawPtr) -> u32,
pub unsafe extern "system" fn(
this: ::windows::RawPtr,
count: *mut u32,
values: *mut *mut ::windows::Guid,
) -> ::windows::HRESULT,
pub unsafe extern "system" fn(
this: ::windows::RawPtr,
value: *mut ::windows::RawPtr,
) -> ::windows::HRESULT,
pub unsafe extern "system" fn(
this: ::windows::RawPtr,
value: *mut i32,
) -> ::windows::HRESULT,
pub unsafe extern "system" fn(
this: ::windows::RawPtr,
value: ::windows::RawPtr,
result__: *mut ::windows_foundation::EventRegistrationToken,
) -> ::windows::HRESULT,
pub unsafe extern "system" fn(
this: ::windows::RawPtr,
token: ::windows_foundation::EventRegistrationToken,
) -> ::windows::HRESULT,
pub unsafe extern "system" fn(
this: ::windows::RawPtr,
value: ::windows::RawPtr,
result__: *mut ::windows_foundation::EventRegistrationToken,
) -> ::windows::HRESULT,
pub unsafe extern "system" fn(
this: ::windows::RawPtr,
token: ::windows_foundation::EventRegistrationToken,
) -> ::windows::HRESULT,
pub unsafe extern "system" fn(
this: ::windows::RawPtr,
value: ::windows::RawPtr,
result__: *mut ::windows_foundation::EventRegistrationToken,
) -> ::windows::HRESULT,
pub unsafe extern "system" fn(
this: ::windows::RawPtr,
token: ::windows_foundation::EventRegistrationToken,
) -> ::windows::HRESULT,
pub unsafe extern "system" fn(
this: ::windows::RawPtr,
result__: *mut ::windows::RawPtr,
) -> ::windows::HRESULT,
pub unsafe extern "system" fn(
this: ::windows::RawPtr,
result__: *mut bool,
) -> ::windows::HRESULT,
pub unsafe extern "system" fn(
this: ::windows::RawPtr,
result__: *mut ::windows::RawPtr,
) -> ::windows::HRESULT,
);
#[repr(transparent)]
#[derive(
:: std :: cmp :: PartialEq,
:: std :: cmp :: Eq,
:: std :: clone :: Clone,
:: std :: fmt :: Debug,
)]
pub struct IGameControllerBatteryInfo(::windows::IInspectable);
unsafe impl ::windows::Interface for IGameControllerBatteryInfo {
type Vtable = IGameControllerBatteryInfo_abi;
const IID: ::windows::Guid = ::windows::Guid::from_values(
3706504833,
14691,
19878,
[149, 93, 85, 63, 59, 111, 97, 97],
);
}
impl IGameControllerBatteryInfo {
pub fn TryGetBatteryReport(
&self,
) -> ::windows::Result<::windows_devices::Power::BatteryReport> {
let this = self;
unsafe {
let mut result__: ::windows::RawPtr = ::std::mem::zeroed();
(::windows::Interface::vtable(this).6)(
::std::mem::transmute_copy(this),
&mut result__,
)
.from_abi::<::windows_devices::Power::BatteryReport>(result__)
}
}
}
unsafe impl ::windows::RuntimeType for IGameControllerBatteryInfo {
const SIGNATURE: ::windows::ConstBuffer =
::windows::ConstBuffer::from_slice(b"{dcecc681-3963-4da6-955d-553f3b6f6161}");
}
impl ::std::convert::From<IGameControllerBatteryInfo> for ::windows::IUnknown {
fn from(value: IGameControllerBatteryInfo) -> Self {
unsafe { ::std::mem::transmute(value) }
}
}
impl ::std::convert::From<&IGameControllerBatteryInfo> for ::windows::IUnknown {
fn from(value: &IGameControllerBatteryInfo) -> Self {
::std::convert::From::from(::std::clone::Clone::clone(value))
}
}
impl<'a> ::windows::IntoParam<'a, ::windows::IUnknown> for IGameControllerBatteryInfo {
fn into_param(self) -> ::windows::Param<'a, ::windows::IUnknown> {
::windows::Param::Owned(::std::convert::Into::<::windows::IUnknown>::into(self))
}
}
impl<'a> ::windows::IntoParam<'a, ::windows::IUnknown> for &IGameControllerBatteryInfo {
fn into_param(self) -> ::windows::Param<'a, ::windows::IUnknown> {
::windows::Param::Owned(::std::convert::Into::<::windows::IUnknown>::into(
::std::clone::Clone::clone(self),
))
}
}
impl ::std::convert::From<IGameControllerBatteryInfo> for ::windows::IInspectable {
fn from(value: IGameControllerBatteryInfo) -> Self {
value.0
}
}
impl ::std::convert::From<&IGameControllerBatteryInfo> for ::windows::IInspectable {
fn from(value: &IGameControllerBatteryInfo) -> Self {
value.0.clone()
}
}
impl<'a> ::windows::IntoParam<'a, ::windows::IInspectable> for IGameControllerBatteryInfo {
fn into_param(self) -> ::windows::Param<'a, ::windows::IInspectable> {
::windows::Param::Owned(self.0)
}
}
impl<'a> ::windows::IntoParam<'a, ::windows::IInspectable> for &'a IGameControllerBatteryInfo {
fn into_param(self) -> ::windows::Param<'a, ::windows::IInspectable> {
::windows::Param::Borrowed(&self.0)
}
}
#[repr(C)]
#[doc(hidden)]
pub struct IGameControllerBatteryInfo_abi(
pub unsafe extern "system" fn(
this: ::windows::RawPtr,
iid: &::windows::Guid,
interface: *mut ::windows::RawPtr,
) -> ::windows::HRESULT,
pub unsafe extern "system" fn(this: ::windows::RawPtr) -> u32,
pub unsafe extern "system" fn(this: ::windows::RawPtr) -> u32,
pub unsafe extern "system" fn(
this: ::windows::RawPtr,
count: *mut u32,
values: *mut *mut ::windows::Guid,
) -> ::windows::HRESULT,
pub unsafe extern "system" fn(
this: ::windows::RawPtr,
value: *mut ::windows::RawPtr,
) -> ::windows::HRESULT,
pub unsafe extern "system" fn(
this: ::windows::RawPtr,
value: *mut i32,
) -> ::windows::HRESULT,
pub unsafe extern "system" fn(
this: ::windows::RawPtr,
result__: *mut ::windows::RawPtr,
) -> ::windows::HRESULT,
);
#[repr(transparent)]
#[derive(
:: std :: cmp :: PartialEq,
:: std :: cmp :: Eq,
:: std :: clone :: Clone,
:: std :: fmt :: Debug,
)]
#[doc(hidden)]
pub struct IGamepad(::windows::IInspectable);
unsafe impl ::windows::Interface for IGamepad {
type Vtable = IGamepad_abi;
const IID: ::windows::Guid = ::windows::Guid::from_values(
3162223676,
2665,
14595,
[158, 157, 165, 15, 134, 164, 93, 229],
);
}
#[repr(C)]
#[doc(hidden)]
pub struct IGamepad_abi(
pub unsafe extern "system" fn(
this: ::windows::RawPtr,
iid: &::windows::Guid,
interface: *mut ::windows::RawPtr,
) -> ::windows::HRESULT,
pub unsafe extern "system" fn(this: ::windows::RawPtr) -> u32,
pub unsafe extern "system" fn(this: ::windows::RawPtr) -> u32,
pub unsafe extern "system" fn(
this: ::windows::RawPtr,
count: *mut u32,
values: *mut *mut ::windows::Guid,
) -> ::windows::HRESULT,
pub unsafe extern "system" fn(
this: ::windows::RawPtr,
value: *mut ::windows::RawPtr,
) -> ::windows::HRESULT,
pub unsafe extern "system" fn(
this: ::windows::RawPtr,
value: *mut i32,
) -> ::windows::HRESULT,
pub unsafe extern "system" fn(
this: ::windows::RawPtr,
result__: *mut GamepadVibration,
) -> ::windows::HRESULT,
pub unsafe extern "system" fn(
this: ::windows::RawPtr,
value: GamepadVibration,
) -> ::windows::HRESULT,
pub unsafe extern "system" fn(
this: ::windows::RawPtr,
result__: *mut GamepadReading,
) -> ::windows::HRESULT,
);
#[repr(transparent)]
#[derive(
:: std :: cmp :: PartialEq,
:: std :: cmp :: Eq,
:: std :: clone :: Clone,
:: std :: fmt :: Debug,
)]
#[doc(hidden)]
pub struct IGamepad2(::windows::IInspectable);
unsafe impl ::windows::Interface for IGamepad2 {
type Vtable = IGamepad2_abi;
const IID: ::windows::Guid = ::windows::Guid::from_values(
1008110013,
22805,
16965,
[176, 192, 200, 159, 174, 3, 8, 255],
);
}
#[repr(C)]
#[doc(hidden)]
pub struct IGamepad2_abi(
pub unsafe extern "system" fn(
this: ::windows::RawPtr,
iid: &::windows::Guid,
interface: *mut ::windows::RawPtr,
) -> ::windows::HRESULT,
pub unsafe extern "system" fn(this: ::windows::RawPtr) -> u32,
pub unsafe extern "system" fn(this: ::windows::RawPtr) -> u32,
pub unsafe extern "system" fn(
this: ::windows::RawPtr,
count: *mut u32,
values: *mut *mut ::windows::Guid,
) -> ::windows::HRESULT,
pub unsafe extern "system" fn(
this: ::windows::RawPtr,
value: *mut ::windows::RawPtr,
) -> ::windows::HRESULT,
pub unsafe extern "system" fn(
this: ::windows::RawPtr,
value: *mut i32,
) -> ::windows::HRESULT,
pub unsafe extern "system" fn(
this: ::windows::RawPtr,
button: GamepadButtons,
result__: *mut GameControllerButtonLabel,
) -> ::windows::HRESULT,
);
#[repr(transparent)]
#[derive(
:: std :: cmp :: PartialEq,
:: std :: cmp :: Eq,
:: std :: clone :: Clone,
:: std :: fmt :: Debug,
)]
#[doc(hidden)]
pub struct IGamepadStatics(::windows::IInspectable);
unsafe impl ::windows::Interface for IGamepadStatics {
type Vtable = IGamepadStatics_abi;
const IID: ::windows::Guid = ::windows::Guid::from_values(
2344412457,
54428,
14825,
[149, 96, 228, 125, 222, 150, 183, 200],
);
}
#[repr(C)]
#[doc(hidden)]
pub struct IGamepadStatics_abi(
pub unsafe extern "system" fn(
this: ::windows::RawPtr,
iid: &::windows::Guid,
interface: *mut ::windows::RawPtr,
) -> ::windows::HRESULT,
pub unsafe extern "system" fn(this: ::windows::RawPtr) -> u32,
pub unsafe extern "system" fn(this: ::windows::RawPtr) -> u32,
pub unsafe extern "system" fn(
this: ::windows::RawPtr,
count: *mut u32,
values: *mut *mut ::windows::Guid,
) -> ::windows::HRESULT,
pub unsafe extern "system" fn(
this: ::windows::RawPtr,
value: *mut ::windows::RawPtr,
) -> ::windows::HRESULT,
pub unsafe extern "system" fn(
this: ::windows::RawPtr,
value: *mut i32,
) -> ::windows::HRESULT,
pub unsafe extern "system" fn(
this: ::windows::RawPtr,
value: ::windows::RawPtr,
result__: *mut ::windows_foundation::EventRegistrationToken,
) -> ::windows::HRESULT,
pub unsafe extern "system" fn(
this: ::windows::RawPtr,
token: ::windows_foundation::EventRegistrationToken,
) -> ::windows::HRESULT,
pub unsafe extern "system" fn(
this: ::windows::RawPtr,
value: ::windows::RawPtr,
result__: *mut ::windows_foundation::EventRegistrationToken,
) -> ::windows::HRESULT,
pub unsafe extern "system" fn(
this: ::windows::RawPtr,
token: ::windows_foundation::EventRegistrationToken,
) -> ::windows::HRESULT,
pub unsafe extern "system" fn(
this: ::windows::RawPtr,
result__: *mut ::windows::RawPtr,
) -> ::windows::HRESULT,
);
#[repr(transparent)]
#[derive(
:: std :: cmp :: PartialEq,
:: std :: cmp :: Eq,
:: std :: clone :: Clone,
:: std :: fmt :: Debug,
)]
#[doc(hidden)]
pub struct IGamepadStatics2(::windows::IInspectable);
unsafe impl ::windows::Interface for IGamepadStatics2 {
type Vtable = IGamepadStatics2_abi;
const IID: ::windows::Guid = ::windows::Guid::from_values(
1114074565,
2134,
18372,
[146, 19, 179, 149, 80, 76, 58, 60],
);
}
#[repr(C)]
#[doc(hidden)]
pub struct IGamepadStatics2_abi(
pub unsafe extern "system" fn(
this: ::windows::RawPtr,
iid: &::windows::Guid,
interface: *mut ::windows::RawPtr,
) -> ::windows::HRESULT,
pub unsafe extern "system" fn(this: ::windows::RawPtr) -> u32,
pub unsafe extern "system" fn(this: ::windows::RawPtr) -> u32,
pub unsafe extern "system" fn(
this: ::windows::RawPtr,
count: *mut u32,
values: *mut *mut ::windows::Guid,
) -> ::windows::HRESULT,
pub unsafe extern "system" fn(
this: ::windows::RawPtr,
value: *mut ::windows::RawPtr,
) -> ::windows::HRESULT,
pub unsafe extern "system" fn(
this: ::windows::RawPtr,
value: *mut i32,
) -> ::windows::HRESULT,
pub unsafe extern "system" fn(
this: ::windows::RawPtr,
gamecontroller: ::windows::RawPtr,
result__: *mut ::windows::RawPtr,
) -> ::windows::HRESULT,
);
#[repr(transparent)]
#[derive(
:: std :: cmp :: PartialEq,
:: std :: cmp :: Eq,
:: std :: clone :: Clone,
:: std :: fmt :: Debug,
)]
#[doc(hidden)]
pub struct IHeadset(::windows::IInspectable);
unsafe impl ::windows::Interface for IHeadset {
type Vtable = IHeadset_abi;
const IID: ::windows::Guid = ::windows::Guid::from_values(
1070683887,
26917,
16296,
[145, 129, 2, 156, 82, 35, 174, 59],
);
}
#[repr(C)]
#[doc(hidden)]
pub struct IHeadset_abi(
pub unsafe extern "system" fn(
this: ::windows::RawPtr,
iid: &::windows::Guid,
interface: *mut ::windows::RawPtr,
) -> ::windows::HRESULT,
pub unsafe extern "system" fn(this: ::windows::RawPtr) -> u32,
pub unsafe extern "system" fn(this: ::windows::RawPtr) -> u32,
pub unsafe extern "system" fn(
this: ::windows::RawPtr,
count: *mut u32,
values: *mut *mut ::windows::Guid,
) -> ::windows::HRESULT,
pub unsafe extern "system" fn(
this: ::windows::RawPtr,
value: *mut ::windows::RawPtr,
) -> ::windows::HRESULT,
pub unsafe extern "system" fn(
this: ::windows::RawPtr,
value: *mut i32,
) -> ::windows::HRESULT,
pub unsafe extern "system" fn(
this: ::windows::RawPtr,
result__: *mut ::std::mem::ManuallyDrop<::windows::HSTRING>,
) -> ::windows::HRESULT,
pub unsafe extern "system" fn(
this: ::windows::RawPtr,
result__: *mut ::std::mem::ManuallyDrop<::windows::HSTRING>,
) -> ::windows::HRESULT,
);
#[repr(transparent)]
#[derive(
:: std :: cmp :: PartialEq,
:: std :: cmp :: Eq,
:: std :: clone :: Clone,
:: std :: fmt :: Debug,
)]
#[doc(hidden)]
pub struct IRacingWheel(::windows::IInspectable);
unsafe impl ::windows::Interface for IRacingWheel {
type Vtable = IRacingWheel_abi;
const IID: ::windows::Guid = ::windows::Guid::from_values(
4115031407,
57606,
19586,
[169, 15, 85, 64, 18, 144, 75, 133],
);
}
#[repr(C)]
#[doc(hidden)]
pub struct IRacingWheel_abi(
pub unsafe extern "system" fn(
this: ::windows::RawPtr,
iid: &::windows::Guid,
interface: *mut ::windows::RawPtr,
) -> ::windows::HRESULT,
pub unsafe extern "system" fn(this: ::windows::RawPtr) -> u32,
pub unsafe extern "system" fn(this: ::windows::RawPtr) -> u32,
pub unsafe extern "system" fn(
this: ::windows::RawPtr,
count: *mut u32,
values: *mut *mut ::windows::Guid,
) -> ::windows::HRESULT,
pub unsafe extern "system" fn(
this: ::windows::RawPtr,
value: *mut ::windows::RawPtr,
) -> ::windows::HRESULT,
pub unsafe extern "system" fn(
this: ::windows::RawPtr,
value: *mut i32,
) -> ::windows::HRESULT,
pub unsafe extern "system" fn(
this: ::windows::RawPtr,
result__: *mut bool,
) -> ::windows::HRESULT,
pub unsafe extern "system" fn(
this: ::windows::RawPtr,
result__: *mut bool,
) -> ::windows::HRESULT,
pub unsafe extern "system" fn(
this: ::windows::RawPtr,
result__: *mut bool,
) -> ::windows::HRESULT,
pub unsafe extern "system" fn(
this: ::windows::RawPtr,
result__: *mut i32,
) -> ::windows::HRESULT,
pub unsafe extern "system" fn(
this: ::windows::RawPtr,
result__: *mut f64,
) -> ::windows::HRESULT,
pub unsafe extern "system" fn(
this: ::windows::RawPtr,
result__: *mut ::windows::RawPtr,
) -> ::windows::HRESULT,
pub unsafe extern "system" fn(
this: ::windows::RawPtr,
button: RacingWheelButtons,
result__: *mut GameControllerButtonLabel,
) -> ::windows::HRESULT,
pub unsafe extern "system" fn(
this: ::windows::RawPtr,
result__: *mut RacingWheelReading,
) -> ::windows::HRESULT,
);
#[repr(transparent)]
#[derive(
:: std :: cmp :: PartialEq,
:: std :: cmp :: Eq,
:: std :: clone :: Clone,
:: std :: fmt :: Debug,
)]
#[doc(hidden)]
pub struct IRacingWheelStatics(::windows::IInspectable);
unsafe impl ::windows::Interface for IRacingWheelStatics {
type Vtable = IRacingWheelStatics_abi;
const IID: ::windows::Guid = ::windows::Guid::from_values(
985738453,
22555,
18742,
[159, 148, 105, 241, 230, 81, 76, 125],
);
}
#[repr(C)]
#[doc(hidden)]
pub struct IRacingWheelStatics_abi(
pub unsafe extern "system" fn(
this: ::windows::RawPtr,
iid: &::windows::Guid,
interface: *mut ::windows::RawPtr,
) -> ::windows::HRESULT,
pub unsafe extern "system" fn(this: ::windows::RawPtr) -> u32,
pub unsafe extern "system" fn(this: ::windows::RawPtr) -> u32,
pub unsafe extern "system" fn(
this: ::windows::RawPtr,
count: *mut u32,
values: *mut *mut ::windows::Guid,
) -> ::windows::HRESULT,
pub unsafe extern "system" fn(
this: ::windows::RawPtr,
value: *mut ::windows::RawPtr,
) -> ::windows::HRESULT,
pub unsafe extern "system" fn(
this: ::windows::RawPtr,
value: *mut i32,
) -> ::windows::HRESULT,
pub unsafe extern "system" fn(
this: ::windows::RawPtr,
value: ::windows::RawPtr,
result__: *mut ::windows_foundation::EventRegistrationToken,
) -> ::windows::HRESULT,
pub unsafe extern "system" fn(
this: ::windows::RawPtr,
token: ::windows_foundation::EventRegistrationToken,
) -> ::windows::HRESULT,
pub unsafe extern "system" fn(
this: ::windows::RawPtr,
value: ::windows::RawPtr,
result__: *mut ::windows_foundation::EventRegistrationToken,
) -> ::windows::HRESULT,
pub unsafe extern "system" fn(
this: ::windows::RawPtr,
token: ::windows_foundation::EventRegistrationToken,
) -> ::windows::HRESULT,
pub unsafe extern "system" fn(
this: ::windows::RawPtr,
result__: *mut ::windows::RawPtr,
) -> ::windows::HRESULT,
);
#[repr(transparent)]
#[derive(
:: std :: cmp :: PartialEq,
:: std :: cmp :: Eq,
:: std :: clone :: Clone,
:: std :: fmt :: Debug,
)]
#[doc(hidden)]
pub struct IRacingWheelStatics2(::windows::IInspectable);
unsafe impl ::windows::Interface for IRacingWheelStatics2 {
type Vtable = IRacingWheelStatics2_abi;
const IID: ::windows::Guid = ::windows::Guid::from_values(
3865492650,
60925,
17187,
[169, 246, 60, 56, 64, 72, 209, 237],
);
}
#[repr(C)]
#[doc(hidden)]
pub struct IRacingWheelStatics2_abi(
pub unsafe extern "system" fn(
this: ::windows::RawPtr,
iid: &::windows::Guid,
interface: *mut ::windows::RawPtr,
) -> ::windows::HRESULT,
pub unsafe extern "system" fn(this: ::windows::RawPtr) -> u32,
pub unsafe extern "system" fn(this: ::windows::RawPtr) -> u32,
pub unsafe extern "system" fn(
this: ::windows::RawPtr,
count: *mut u32,
values: *mut *mut ::windows::Guid,
) -> ::windows::HRESULT,
pub unsafe extern "system" fn(
this: ::windows::RawPtr,
value: *mut ::windows::RawPtr,
) -> ::windows::HRESULT,
pub unsafe extern "system" fn(
this: ::windows::RawPtr,
value: *mut i32,
) -> ::windows::HRESULT,
pub unsafe extern "system" fn(
this: ::windows::RawPtr,
gamecontroller: ::windows::RawPtr,
result__: *mut ::windows::RawPtr,
) -> ::windows::HRESULT,
);
#[repr(transparent)]
#[derive(
:: std :: cmp :: PartialEq,
:: std :: cmp :: Eq,
:: std :: clone :: Clone,
:: std :: fmt :: Debug,
)]
#[doc(hidden)]
pub struct IRawGameController(::windows::IInspectable);
unsafe impl ::windows::Interface for IRawGameController {
type Vtable = IRawGameController_abi;
const IID: ::windows::Guid = ::windows::Guid::from_values(
2091740561,
42977,
20337,
[154, 120, 51, 233, 197, 223, 234, 98],
);
}
#[repr(C)]
#[doc(hidden)]
pub struct IRawGameController_abi(
pub unsafe extern "system" fn(
this: ::windows::RawPtr,
iid: &::windows::Guid,
interface: *mut ::windows::RawPtr,
) -> ::windows::HRESULT,
pub unsafe extern "system" fn(this: ::windows::RawPtr) -> u32,
pub unsafe extern "system" fn(this: ::windows::RawPtr) -> u32,
pub unsafe extern "system" fn(
this: ::windows::RawPtr,
count: *mut u32,
values: *mut *mut ::windows::Guid,
) -> ::windows::HRESULT,
pub unsafe extern "system" fn(
this: ::windows::RawPtr,
value: *mut ::windows::RawPtr,
) -> ::windows::HRESULT,
pub unsafe extern "system" fn(
this: ::windows::RawPtr,
value: *mut i32,
) -> ::windows::HRESULT,
pub unsafe extern "system" fn(
this: ::windows::RawPtr,
result__: *mut i32,
) -> ::windows::HRESULT,
pub unsafe extern "system" fn(
this: ::windows::RawPtr,
result__: *mut i32,
) -> ::windows::HRESULT,
pub unsafe extern "system" fn(
this: ::windows::RawPtr,
result__: *mut ::windows::RawPtr,
) -> ::windows::HRESULT,
pub unsafe extern "system" fn(
this: ::windows::RawPtr,
result__: *mut u16,
) -> ::windows::HRESULT,
pub unsafe extern "system" fn(
this: ::windows::RawPtr,
result__: *mut u16,
) -> ::windows::HRESULT,
pub unsafe extern "system" fn(
this: ::windows::RawPtr,
result__: *mut i32,
) -> ::windows::HRESULT,
pub unsafe extern "system" fn(
this: ::windows::RawPtr,
buttonindex: i32,
result__: *mut GameControllerButtonLabel,
) -> ::windows::HRESULT,
pub unsafe extern "system" fn(
this: ::windows::RawPtr,
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::HRESULT,
pub unsafe extern "system" fn(
this: ::windows::RawPtr,
switchindex: i32,
result__: *mut GameControllerSwitchKind,
) -> ::windows::HRESULT,
);
#[repr(transparent)]
#[derive(
:: std :: cmp :: PartialEq,
:: std :: cmp :: Eq,
:: std :: clone :: Clone,
:: std :: fmt :: Debug,
)]
#[doc(hidden)]
pub struct IRawGameController2(::windows::IInspectable);
unsafe impl ::windows::Interface for IRawGameController2 {
type Vtable = IRawGameController2_abi;
const IID: ::windows::Guid = ::windows::Guid::from_values(
1136705589,
47987,
18262,
[167, 135, 62, 214, 190, 166, 23, 189],
);
}
#[repr(C)]
#[doc(hidden)]
pub struct IRawGameController2_abi(
pub unsafe extern "system" fn(
this: ::windows::RawPtr,
iid: &::windows::Guid,
interface: *mut ::windows::RawPtr,
) -> ::windows::HRESULT,
pub unsafe extern "system" fn(this: ::windows::RawPtr) -> u32,
pub unsafe extern "system" fn(this: ::windows::RawPtr) -> u32,
pub unsafe extern "system" fn(
this: ::windows::RawPtr,
count: *mut u32,
values: *mut *mut ::windows::Guid,
) -> ::windows::HRESULT,
pub unsafe extern "system" fn(
this: ::windows::RawPtr,
value: *mut ::windows::RawPtr,
) -> ::windows::HRESULT,
pub unsafe extern "system" fn(
this: ::windows::RawPtr,
value: *mut i32,
) -> ::windows::HRESULT,
pub unsafe extern "system" fn(
this: ::windows::RawPtr,
result__: *mut ::windows::RawPtr,
) -> ::windows::HRESULT,
pub unsafe extern "system" fn(
this: ::windows::RawPtr,
result__: *mut ::std::mem::ManuallyDrop<::windows::HSTRING>,
) -> ::windows::HRESULT,
pub unsafe extern "system" fn(
this: ::windows::RawPtr,
result__: *mut ::std::mem::ManuallyDrop<::windows::HSTRING>,
) -> ::windows::HRESULT,
);
#[repr(transparent)]
#[derive(
:: std :: cmp :: PartialEq,
:: std :: cmp :: Eq,
:: std :: clone :: Clone,
:: std :: fmt :: Debug,
)]
#[doc(hidden)]
pub struct IRawGameControllerStatics(::windows::IInspectable);
unsafe impl ::windows::Interface for IRawGameControllerStatics {
type Vtable = IRawGameControllerStatics_abi;
const IID: ::windows::Guid = ::windows::Guid::from_values(
3951888274,
59738,
19225,
[175, 199, 10, 89, 248, 191, 117, 158],
);
}
#[repr(C)]
#[doc(hidden)]
pub struct IRawGameControllerStatics_abi(
pub unsafe extern "system" fn(
this: ::windows::RawPtr,
iid: &::windows::Guid,
interface: *mut ::windows::RawPtr,
) -> ::windows::HRESULT,
pub unsafe extern "system" fn(this: ::windows::RawPtr) -> u32,
pub unsafe extern "system" fn(this: ::windows::RawPtr) -> u32,
pub unsafe extern "system" fn(
this: ::windows::RawPtr,
count: *mut u32,
values: *mut *mut ::windows::Guid,
) -> ::windows::HRESULT,
pub unsafe extern "system" fn(
this: ::windows::RawPtr,
value: *mut ::windows::RawPtr,
) -> ::windows::HRESULT,
pub unsafe extern "system" fn(
this: ::windows::RawPtr,
value: *mut i32,
) -> ::windows::HRESULT,
pub unsafe extern "system" fn(
this: ::windows::RawPtr,
value: ::windows::RawPtr,
result__: *mut ::windows_foundation::EventRegistrationToken,
) -> ::windows::HRESULT,
pub unsafe extern "system" fn(
this: ::windows::RawPtr,
token: ::windows_foundation::EventRegistrationToken,
) -> ::windows::HRESULT,
pub unsafe extern "system" fn(
this: ::windows::RawPtr,
value: ::windows::RawPtr,
result__: *mut ::windows_foundation::EventRegistrationToken,
) -> ::windows::HRESULT,
pub unsafe extern "system" fn(
this: ::windows::RawPtr,
token: ::windows_foundation::EventRegistrationToken,
) -> ::windows::HRESULT,
pub unsafe extern "system" fn(
this: ::windows::RawPtr,
result__: *mut ::windows::RawPtr,
) -> ::windows::HRESULT,
pub unsafe extern "system" fn(
this: ::windows::RawPtr,
gamecontroller: ::windows::RawPtr,
result__: *mut ::windows::RawPtr,
) -> ::windows::HRESULT,
);
#[repr(transparent)]
#[derive(
:: std :: cmp :: PartialEq,
:: std :: cmp :: Eq,
:: std :: clone :: Clone,
:: std :: fmt :: Debug,
)]
#[doc(hidden)]
pub struct IUINavigationController(::windows::IInspectable);
unsafe impl ::windows::Interface for IUINavigationController {
type Vtable = IUINavigationController_abi;
const IID: ::windows::Guid = ::windows::Guid::from_values(
3853447133,
62734,
19029,
[140, 220, 211, 50, 41, 84, 129, 117],
);
}
#[repr(C)]
#[doc(hidden)]
pub struct IUINavigationController_abi(
pub unsafe extern "system" fn(
this: ::windows::RawPtr,
iid: &::windows::Guid,
interface: *mut ::windows::RawPtr,
) -> ::windows::HRESULT,
pub unsafe extern "system" fn(this: ::windows::RawPtr) -> u32,
pub unsafe extern "system" fn(this: ::windows::RawPtr) -> u32,
pub unsafe extern "system" fn(
this: ::windows::RawPtr,
count: *mut u32,
values: *mut *mut ::windows::Guid,
) -> ::windows::HRESULT,
pub unsafe extern "system" fn(
this: ::windows::RawPtr,
value: *mut ::windows::RawPtr,
) -> ::windows::HRESULT,
pub unsafe extern "system" fn(
this: ::windows::RawPtr,
value: *mut i32,
) -> ::windows::HRESULT,
pub unsafe extern "system" fn(
this: ::windows::RawPtr,
result__: *mut UINavigationReading,
) -> ::windows::HRESULT,
pub unsafe extern "system" fn(
this: ::windows::RawPtr,
button: OptionalUINavigationButtons,
result__: *mut GameControllerButtonLabel,
) -> ::windows::HRESULT,
pub unsafe extern "system" fn(
this: ::windows::RawPtr,
button: RequiredUINavigationButtons,
result__: *mut GameControllerButtonLabel,
) -> ::windows::HRESULT,
);
#[repr(transparent)]
#[derive(
:: std :: cmp :: PartialEq,
:: std :: cmp :: Eq,
:: std :: clone :: Clone,
:: std :: fmt :: Debug,
)]
#[doc(hidden)]
pub struct IUINavigationControllerStatics(::windows::IInspectable);
unsafe impl ::windows::Interface for IUINavigationControllerStatics {
type Vtable = IUINavigationControllerStatics_abi;
const IID: ::windows::Guid = ::windows::Guid::from_values(
789877514,
63224,
19016,
[141, 137, 148, 120, 108, 202, 12, 46],
);
}
#[repr(C)]
#[doc(hidden)]
pub struct IUINavigationControllerStatics_abi(
pub unsafe extern "system" fn(
this: ::windows::RawPtr,
iid: &::windows::Guid,
interface: *mut ::windows::RawPtr,
) -> ::windows::HRESULT,
pub unsafe extern "system" fn(this: ::windows::RawPtr) -> u32,
pub unsafe extern "system" fn(this: ::windows::RawPtr) -> u32,
pub unsafe extern "system" fn(
this: ::windows::RawPtr,
count: *mut u32,
values: *mut *mut ::windows::Guid,
) -> ::windows::HRESULT,
pub unsafe extern "system" fn(
this: ::windows::RawPtr,
value: *mut ::windows::RawPtr,
) -> ::windows::HRESULT,
pub unsafe extern "system" fn(
this: ::windows::RawPtr,
value: *mut i32,
) -> ::windows::HRESULT,
pub unsafe extern "system" fn(
this: ::windows::RawPtr,
value: ::windows::RawPtr,
result__: *mut ::windows_foundation::EventRegistrationToken,
) -> ::windows::HRESULT,
pub unsafe extern "system" fn(
this: ::windows::RawPtr,
token: ::windows_foundation::EventRegistrationToken,
) -> ::windows::HRESULT,
pub unsafe extern "system" fn(
this: ::windows::RawPtr,
value: ::windows::RawPtr,
result__: *mut ::windows_foundation::EventRegistrationToken,
) -> ::windows::HRESULT,
pub unsafe extern "system" fn(
this: ::windows::RawPtr,
token: ::windows_foundation::EventRegistrationToken,
) -> ::windows::HRESULT,
pub unsafe extern "system" fn(
this: ::windows::RawPtr,
result__: *mut ::windows::RawPtr,
) -> ::windows::HRESULT,
);
#[repr(transparent)]
#[derive(
:: std :: cmp :: PartialEq,
:: std :: cmp :: Eq,
:: std :: clone :: Clone,
:: std :: fmt :: Debug,
)]
#[doc(hidden)]
pub struct IUINavigationControllerStatics2(::windows::IInspectable);
unsafe impl ::windows::Interface for IUINavigationControllerStatics2 {
type Vtable = IUINavigationControllerStatics2_abi;
const IID: ::windows::Guid = ::windows::Guid::from_values(
3771410659,
45579,
19211,
[158, 212, 243, 213, 60, 236, 13, 228],
);
}
#[repr(C)]
#[doc(hidden)]
pub struct IUINavigationControllerStatics2_abi(
pub unsafe extern "system" fn(
this: ::windows::RawPtr,
iid: &::windows::Guid,
interface: *mut ::windows::RawPtr,
) -> ::windows::HRESULT,
pub unsafe extern "system" fn(this: ::windows::RawPtr) -> u32,
pub unsafe extern "system" fn(this: ::windows::RawPtr) -> u32,
pub unsafe extern "system" fn(
this: ::windows::RawPtr,
count: *mut u32,
values: *mut *mut ::windows::Guid,
) -> ::windows::HRESULT,
pub unsafe extern "system" fn(
this: ::windows::RawPtr,
value: *mut ::windows::RawPtr,
) -> ::windows::HRESULT,
pub unsafe extern "system" fn(
this: ::windows::RawPtr,
value: *mut i32,
) -> ::windows::HRESULT,
pub unsafe extern "system" fn(
this: ::windows::RawPtr,
gamecontroller: ::windows::RawPtr,
result__: *mut ::windows::RawPtr,
) -> ::windows::HRESULT,
);
#[derive(
:: std :: cmp :: PartialEq,
:: std :: cmp :: Eq,
:: std :: marker :: Copy,
:: std :: clone :: Clone,
:: std :: default :: Default,
:: std :: fmt :: Debug,
)]
#[repr(transparent)]
pub struct OptionalUINavigationButtons(pub u32);
impl OptionalUINavigationButtons {
pub const None: OptionalUINavigationButtons = OptionalUINavigationButtons(0u32);
pub const Context1: OptionalUINavigationButtons = OptionalUINavigationButtons(1u32);
pub const Context2: OptionalUINavigationButtons = OptionalUINavigationButtons(2u32);
pub const Context3: OptionalUINavigationButtons = OptionalUINavigationButtons(4u32);
pub const Context4: OptionalUINavigationButtons = OptionalUINavigationButtons(8u32);
pub const PageUp: OptionalUINavigationButtons = OptionalUINavigationButtons(16u32);
pub const PageDown: OptionalUINavigationButtons = OptionalUINavigationButtons(32u32);
pub const PageLeft: OptionalUINavigationButtons = OptionalUINavigationButtons(64u32);
pub const PageRight: OptionalUINavigationButtons = OptionalUINavigationButtons(128u32);
pub const ScrollUp: OptionalUINavigationButtons = OptionalUINavigationButtons(256u32);
pub const ScrollDown: OptionalUINavigationButtons = OptionalUINavigationButtons(512u32);
pub const ScrollLeft: OptionalUINavigationButtons = OptionalUINavigationButtons(1024u32);
pub const ScrollRight: OptionalUINavigationButtons = OptionalUINavigationButtons(2048u32);
}
impl ::std::convert::From<u32> for OptionalUINavigationButtons {
fn from(value: u32) -> Self {
Self(value)
}
}
unsafe impl ::windows::Abi for OptionalUINavigationButtons {
type Abi = Self;
type DefaultType = Self;
}
unsafe impl ::windows::RuntimeType for OptionalUINavigationButtons {
const SIGNATURE: ::windows::ConstBuffer = ::windows::ConstBuffer::from_slice(
b"enum(Windows.Gaming.Input.OptionalUINavigationButtons;u4)",
);
}
impl ::std::ops::BitOr for OptionalUINavigationButtons {
type Output = Self;
fn bitor(self, rhs: Self) -> Self {
Self(self.0 | rhs.0)
}
}
impl ::std::ops::BitAnd for OptionalUINavigationButtons {
type Output = Self;
fn bitand(self, rhs: Self) -> Self {
Self(self.0 & rhs.0)
}
}
impl ::std::ops::BitOrAssign for OptionalUINavigationButtons {
fn bitor_assign(&mut self, rhs: Self) {
self.0.bitor_assign(rhs.0)
}
}
impl ::std::ops::BitAndAssign for OptionalUINavigationButtons {
fn bitand_assign(&mut self, rhs: Self) {
self.0.bitand_assign(rhs.0)
}
}
impl ::std::ops::Not for OptionalUINavigationButtons {
type Output = Self;
fn not(self) -> Self {
Self(self.0.not())
}
}
#[repr(transparent)]
#[derive(
:: std :: cmp :: PartialEq,
:: std :: cmp :: Eq,
:: std :: clone :: Clone,
:: std :: fmt :: Debug,
)]
pub struct RacingWheel(::windows::IInspectable);
impl RacingWheel {
pub fn HeadsetConnected<
'a,
Param0: ::windows::IntoParam<
'a,
::windows_foundation::TypedEventHandler<IGameController, Headset>,
>,
>(
&self,
value: Param0,
) -> ::windows::Result<::windows_foundation::EventRegistrationToken> {
let this = &::windows::Interface::cast::<IGameController>(self)?;
unsafe {
let mut result__: ::windows_foundation::EventRegistrationToken =
::std::mem::zeroed();
(::windows::Interface::vtable(this).6)(
::std::mem::transmute_copy(this),
value.into_param().abi(),
&mut result__,
)
.from_abi::<::windows_foundation::EventRegistrationToken>(result__)
}
}
pub fn RemoveHeadsetConnected<
'a,
Param0: ::windows::IntoParam<'a, ::windows_foundation::EventRegistrationToken>,
>(
&self,
token: Param0,
) -> ::windows::Result<()> {
let this = &::windows::Interface::cast::<IGameController>(self)?;
unsafe {
(::windows::Interface::vtable(this).7)(
::std::mem::transmute_copy(this),
token.into_param().abi(),
)
.ok()
}
}
pub fn HeadsetDisconnected<
'a,
Param0: ::windows::IntoParam<
'a,
::windows_foundation::TypedEventHandler<IGameController, Headset>,
>,
>(
&self,
value: Param0,
) -> ::windows::Result<::windows_foundation::EventRegistrationToken> {
let this = &::windows::Interface::cast::<IGameController>(self)?;
unsafe {
let mut result__: ::windows_foundation::EventRegistrationToken =
::std::mem::zeroed();
(::windows::Interface::vtable(this).8)(
::std::mem::transmute_copy(this),
value.into_param().abi(),
&mut result__,
)
.from_abi::<::windows_foundation::EventRegistrationToken>(result__)
}
}
pub fn RemoveHeadsetDisconnected<
'a,
Param0: ::windows::IntoParam<'a, ::windows_foundation::EventRegistrationToken>,
>(
&self,
token: Param0,
) -> ::windows::Result<()> {
let this = &::windows::Interface::cast::<IGameController>(self)?;
unsafe {
(::windows::Interface::vtable(this).9)(
::std::mem::transmute_copy(this),
token.into_param().abi(),
)
.ok()
}
}
pub fn UserChanged<
'a,
Param0: ::windows::IntoParam<
'a,
::windows_foundation::TypedEventHandler<
IGameController,
::windows_system::UserChangedEventArgs,
>,
>,
>(
&self,
value: Param0,
) -> ::windows::Result<::windows_foundation::EventRegistrationToken> {
let this = &::windows::Interface::cast::<IGameController>(self)?;
unsafe {
let mut result__: ::windows_foundation::EventRegistrationToken =
::std::mem::zeroed();
(::windows::Interface::vtable(this).10)(
::std::mem::transmute_copy(this),
value.into_param().abi(),
&mut result__,
)
.from_abi::<::windows_foundation::EventRegistrationToken>(result__)
}
}
pub fn RemoveUserChanged<
'a,
Param0: ::windows::IntoParam<'a, ::windows_foundation::EventRegistrationToken>,
>(
&self,
token: Param0,
) -> ::windows::Result<()> {
let this = &::windows::Interface::cast::<IGameController>(self)?;
unsafe {
(::windows::Interface::vtable(this).11)(
::std::mem::transmute_copy(this),
token.into_param().abi(),
)
.ok()
}
}
pub fn Headset(&self) -> ::windows::Result<Headset> {
let this = &::windows::Interface::cast::<IGameController>(self)?;
unsafe {
let mut result__: ::windows::RawPtr = ::std::mem::zeroed();
(::windows::Interface::vtable(this).12)(
::std::mem::transmute_copy(this),
&mut result__,
)
.from_abi::<Headset>(result__)
}
}
pub fn IsWireless(&self) -> ::windows::Result<bool> {
let this = &::windows::Interface::cast::<IGameController>(self)?;
unsafe {
let mut result__: bool = ::std::mem::zeroed();
(::windows::Interface::vtable(this).13)(
::std::mem::transmute_copy(this),
&mut result__,
)
.from_abi::<bool>(result__)
}
}
pub fn User(&self) -> ::windows::Result<::windows_system::User> {
let this = &::windows::Interface::cast::<IGameController>(self)?;
unsafe {
let mut result__: ::windows::RawPtr = ::std::mem::zeroed();
(::windows::Interface::vtable(this).14)(
::std::mem::transmute_copy(this),
&mut result__,
)
.from_abi::<::windows_system::User>(result__)
}
}
pub fn HasClutch(&self) -> ::windows::Result<bool> {
let this = self;
unsafe {
let mut result__: bool = ::std::mem::zeroed();
(::windows::Interface::vtable(this).6)(
::std::mem::transmute_copy(this),
&mut result__,
)
.from_abi::<bool>(result__)
}
}
pub fn HasHandbrake(&self) -> ::windows::Result<bool> {
let this = self;
unsafe {
let mut result__: bool = ::std::mem::zeroed();
(::windows::Interface::vtable(this).7)(
::std::mem::transmute_copy(this),
&mut result__,
)
.from_abi::<bool>(result__)
}
}
pub fn HasPatternShifter(&self) -> ::windows::Result<bool> {
let this = self;
unsafe {
let mut result__: bool = ::std::mem::zeroed();
(::windows::Interface::vtable(this).8)(
::std::mem::transmute_copy(this),
&mut result__,
)
.from_abi::<bool>(result__)
}
}
pub fn MaxPatternShifterGear(&self) -> ::windows::Result<i32> {
let this = self;
unsafe {
let mut result__: i32 = ::std::mem::zeroed();
(::windows::Interface::vtable(this).9)(
::std::mem::transmute_copy(this),
&mut result__,
)
.from_abi::<i32>(result__)
}
}
pub fn MaxWheelAngle(&self) -> ::windows::Result<f64> {
let this = self;
unsafe {
let mut result__: f64 = ::std::mem::zeroed();
(::windows::Interface::vtable(this).10)(
::std::mem::transmute_copy(this),
&mut result__,
)
.from_abi::<f64>(result__)
}
}
pub fn WheelMotor(&self) -> ::windows::Result<ForceFeedback::ForceFeedbackMotor> {
let this = self;
unsafe {
let mut result__: ::windows::RawPtr = ::std::mem::zeroed();
(::windows::Interface::vtable(this).11)(
::std::mem::transmute_copy(this),
&mut result__,
)
.from_abi::<ForceFeedback::ForceFeedbackMotor>(result__)
}
}
pub fn GetButtonLabel(
&self,
button: RacingWheelButtons,
) -> ::windows::Result<GameControllerButtonLabel> {
let this = self;
unsafe {
let mut result__: GameControllerButtonLabel = ::std::mem::zeroed();
(::windows::Interface::vtable(this).12)(
::std::mem::transmute_copy(this),
button,
&mut result__,
)
.from_abi::<GameControllerButtonLabel>(result__)
}
}
pub fn GetCurrentReading(&self) -> ::windows::Result<RacingWheelReading> {
let this = self;
unsafe {
let mut result__: RacingWheelReading = ::std::mem::zeroed();
(::windows::Interface::vtable(this).13)(
::std::mem::transmute_copy(this),
&mut result__,
)
.from_abi::<RacingWheelReading>(result__)
}
}
pub fn RacingWheelAdded<
'a,
Param0: ::windows::IntoParam<'a, ::windows_foundation::EventHandler<RacingWheel>>,
>(
value: Param0,
) -> ::windows::Result<::windows_foundation::EventRegistrationToken> {
Self::IRacingWheelStatics(|this| unsafe {
let mut result__: ::windows_foundation::EventRegistrationToken =
::std::mem::zeroed();
(::windows::Interface::vtable(this).6)(
::std::mem::transmute_copy(this),
value.into_param().abi(),
&mut result__,
)
.from_abi::<::windows_foundation::EventRegistrationToken>(result__)
})
}
pub fn RemoveRacingWheelAdded<
'a,
Param0: ::windows::IntoParam<'a, ::windows_foundation::EventRegistrationToken>,
>(
token: Param0,
) -> ::windows::Result<()> {
Self::IRacingWheelStatics(|this| unsafe {
(::windows::Interface::vtable(this).7)(
::std::mem::transmute_copy(this),
token.into_param().abi(),
)
.ok()
})
}
pub fn RacingWheelRemoved<
'a,
Param0: ::windows::IntoParam<'a, ::windows_foundation::EventHandler<RacingWheel>>,
>(
value: Param0,
) -> ::windows::Result<::windows_foundation::EventRegistrationToken> {
Self::IRacingWheelStatics(|this| unsafe {
let mut result__: ::windows_foundation::EventRegistrationToken =
::std::mem::zeroed();
(::windows::Interface::vtable(this).8)(
::std::mem::transmute_copy(this),
value.into_param().abi(),
&mut result__,
)
.from_abi::<::windows_foundation::EventRegistrationToken>(result__)
})
}
pub fn RemoveRacingWheelRemoved<
'a,
Param0: ::windows::IntoParam<'a, ::windows_foundation::EventRegistrationToken>,
>(
token: Param0,
) -> ::windows::Result<()> {
Self::IRacingWheelStatics(|this| unsafe {
(::windows::Interface::vtable(this).9)(
::std::mem::transmute_copy(this),
token.into_param().abi(),
)
.ok()
})
}
pub fn RacingWheels(
) -> ::windows::Result<::windows_foundation::Collections::IVectorView<RacingWheel>>
{
Self::IRacingWheelStatics(|this| unsafe {
let mut result__: ::windows::RawPtr = ::std::mem::zeroed();
(::windows::Interface::vtable(this).10)(
::std::mem::transmute_copy(this),
&mut result__,
)
.from_abi::<::windows_foundation::Collections::IVectorView<RacingWheel>>(result__)
})
}
pub fn TryGetBatteryReport(
&self,
) -> ::windows::Result<::windows_devices::Power::BatteryReport> {
let this = &::windows::Interface::cast::<IGameControllerBatteryInfo>(self)?;
unsafe {
let mut result__: ::windows::RawPtr = ::std::mem::zeroed();
(::windows::Interface::vtable(this).6)(
::std::mem::transmute_copy(this),
&mut result__,
)
.from_abi::<::windows_devices::Power::BatteryReport>(result__)
}
}
pub fn FromGameController<'a, Param0: ::windows::IntoParam<'a, IGameController>>(
gamecontroller: Param0,
) -> ::windows::Result<RacingWheel> {
Self::IRacingWheelStatics2(|this| unsafe {
let mut result__: ::windows::RawPtr = ::std::mem::zeroed();
(::windows::Interface::vtable(this).6)(
::std::mem::transmute_copy(this),
gamecontroller.into_param().abi(),
&mut result__,
)
.from_abi::<RacingWheel>(result__)
})
}
pub fn IRacingWheelStatics<R, F: FnOnce(&IRacingWheelStatics) -> ::windows::Result<R>>(
callback: F,
) -> ::windows::Result<R> {
static mut SHARED: ::windows::FactoryCache<RacingWheel, IRacingWheelStatics> =
::windows::FactoryCache::new();
unsafe { SHARED.call(callback) }
}
pub fn IRacingWheelStatics2<R, F: FnOnce(&IRacingWheelStatics2) -> ::windows::Result<R>>(
callback: F,
) -> ::windows::Result<R> {
static mut SHARED: ::windows::FactoryCache<RacingWheel, IRacingWheelStatics2> =
::windows::FactoryCache::new();
unsafe { SHARED.call(callback) }
}
}
unsafe impl ::windows::RuntimeType for RacingWheel {
const SIGNATURE: ::windows::ConstBuffer = ::windows::ConstBuffer::from_slice(
b"rc(Windows.Gaming.Input.RacingWheel;{f546656f-e106-4c82-a90f-554012904b85})",
);
}
unsafe impl ::windows::Interface for RacingWheel {
type Vtable = IRacingWheel_abi;
const IID: ::windows::Guid = ::windows::Guid::from_values(
4115031407,
57606,
19586,
[169, 15, 85, 64, 18, 144, 75, 133],
);
}
impl ::windows::RuntimeName for RacingWheel {
const NAME: &'static str = "Windows.Gaming.Input.RacingWheel";
}
impl ::std::convert::From<RacingWheel> for ::windows::IUnknown {
fn from(value: RacingWheel) -> Self {
unsafe { ::std::mem::transmute(value) }
}
}
impl ::std::convert::From<&RacingWheel> for ::windows::IUnknown {
fn from(value: &RacingWheel) -> Self {
::std::convert::From::from(::std::clone::Clone::clone(value))
}
}
impl<'a> ::windows::IntoParam<'a, ::windows::IUnknown> for RacingWheel {
fn into_param(self) -> ::windows::Param<'a, ::windows::IUnknown> {
::windows::Param::Owned(::std::convert::Into::<::windows::IUnknown>::into(self))
}
}
impl<'a> ::windows::IntoParam<'a, ::windows::IUnknown> for &RacingWheel {
fn into_param(self) -> ::windows::Param<'a, ::windows::IUnknown> {
::windows::Param::Owned(::std::convert::Into::<::windows::IUnknown>::into(
::std::clone::Clone::clone(self),
))
}
}
impl ::std::convert::From<RacingWheel> for ::windows::IInspectable {
fn from(value: RacingWheel) -> Self {
value.0
}
}
impl ::std::convert::From<&RacingWheel> for ::windows::IInspectable {
fn from(value: &RacingWheel) -> Self {
value.0.clone()
}
}
impl<'a> ::windows::IntoParam<'a, ::windows::IInspectable> for RacingWheel {
fn into_param(self) -> ::windows::Param<'a, ::windows::IInspectable> {
::windows::Param::Owned(self.0)
}
}
impl<'a> ::windows::IntoParam<'a, ::windows::IInspectable> for &'a RacingWheel {
fn into_param(self) -> ::windows::Param<'a, ::windows::IInspectable> {
::windows::Param::Borrowed(&self.0)
}
}
impl ::std::convert::TryFrom<RacingWheel> for IGameController {
type Error = ::windows::Error;
fn try_from(value: RacingWheel) -> ::windows::Result<Self> {
::std::convert::TryFrom::try_from(&value)
}
}
impl ::std::convert::TryFrom<&RacingWheel> for IGameController {
type Error = ::windows::Error;
fn try_from(value: &RacingWheel) -> ::windows::Result<Self> {
::windows::Interface::cast(value)
}
}
impl<'a> ::windows::IntoParam<'a, IGameController> for RacingWheel {
fn into_param(self) -> ::windows::Param<'a, IGameController> {
::windows::IntoParam::into_param(&self)
}
}
impl<'a> ::windows::IntoParam<'a, IGameController> for &RacingWheel {
fn into_param(self) -> ::windows::Param<'a, IGameController> {
::std::convert::TryInto::<IGameController>::try_into(self)
.map(::windows::Param::Owned)
.unwrap_or(::windows::Param::None)
}
}
impl ::std::convert::TryFrom<RacingWheel> for IGameControllerBatteryInfo {
type Error = ::windows::Error;
fn try_from(value: RacingWheel) -> ::windows::Result<Self> {
::std::convert::TryFrom::try_from(&value)
}
}
impl ::std::convert::TryFrom<&RacingWheel> for IGameControllerBatteryInfo {
type Error = ::windows::Error;
fn try_from(value: &RacingWheel) -> ::windows::Result<Self> {
::windows::Interface::cast(value)
}
}
impl<'a> ::windows::IntoParam<'a, IGameControllerBatteryInfo> for RacingWheel {
fn into_param(self) -> ::windows::Param<'a, IGameControllerBatteryInfo> {
::windows::IntoParam::into_param(&self)
}
}
impl<'a> ::windows::IntoParam<'a, IGameControllerBatteryInfo> for &RacingWheel {
fn into_param(self) -> ::windows::Param<'a, IGameControllerBatteryInfo> {
::std::convert::TryInto::<IGameControllerBatteryInfo>::try_into(self)
.map(::windows::Param::Owned)
.unwrap_or(::windows::Param::None)
}
}
unsafe impl ::std::marker::Send for RacingWheel {}
unsafe impl ::std::marker::Sync for RacingWheel {}
#[derive(
:: std :: cmp :: PartialEq,
:: std :: cmp :: Eq,
:: std :: marker :: Copy,
:: std :: clone :: Clone,
:: std :: default :: Default,
:: std :: fmt :: Debug,
)]
#[repr(transparent)]
pub struct RacingWheelButtons(pub u32);
impl RacingWheelButtons {
pub const None: RacingWheelButtons = RacingWheelButtons(0u32);
pub const PreviousGear: RacingWheelButtons = RacingWheelButtons(1u32);
pub const NextGear: RacingWheelButtons = RacingWheelButtons(2u32);
pub const DPadUp: RacingWheelButtons = RacingWheelButtons(4u32);
pub const DPadDown: RacingWheelButtons = RacingWheelButtons(8u32);
pub const DPadLeft: RacingWheelButtons = RacingWheelButtons(16u32);
pub const DPadRight: RacingWheelButtons = RacingWheelButtons(32u32);
pub const Button1: RacingWheelButtons = RacingWheelButtons(64u32);
pub const Button2: RacingWheelButtons = RacingWheelButtons(128u32);
pub const Button3: RacingWheelButtons = RacingWheelButtons(256u32);
pub const Button4: RacingWheelButtons = RacingWheelButtons(512u32);
pub const Button5: RacingWheelButtons = RacingWheelButtons(1024u32);
pub const Button6: RacingWheelButtons = RacingWheelButtons(2048u32);
pub const Button7: RacingWheelButtons = RacingWheelButtons(4096u32);
pub const Button8: RacingWheelButtons = RacingWheelButtons(8192u32);
pub const Button9: RacingWheelButtons = RacingWheelButtons(16384u32);
pub const Button10: RacingWheelButtons = RacingWheelButtons(32768u32);
pub const Button11: RacingWheelButtons = RacingWheelButtons(65536u32);
pub const Button12: RacingWheelButtons = RacingWheelButtons(131072u32);
pub const Button13: RacingWheelButtons = RacingWheelButtons(262144u32);
pub const Button14: RacingWheelButtons = RacingWheelButtons(524288u32);
pub const Button15: RacingWheelButtons = RacingWheelButtons(1048576u32);
pub const Button16: RacingWheelButtons = RacingWheelButtons(2097152u32);
}
impl ::std::convert::From<u32> for RacingWheelButtons {
fn from(value: u32) -> Self {
Self(value)
}
}
unsafe impl ::windows::Abi for RacingWheelButtons {
type Abi = Self;
type DefaultType = Self;
}
unsafe impl ::windows::RuntimeType for RacingWheelButtons {
const SIGNATURE: ::windows::ConstBuffer =
::windows::ConstBuffer::from_slice(b"enum(Windows.Gaming.Input.RacingWheelButtons;u4)");
}
impl ::std::ops::BitOr for RacingWheelButtons {
type Output = Self;
fn bitor(self, rhs: Self) -> Self {
Self(self.0 | rhs.0)
}
}
impl ::std::ops::BitAnd for RacingWheelButtons {
type Output = Self;
fn bitand(self, rhs: Self) -> Self {
Self(self.0 & rhs.0)
}
}
impl ::std::ops::BitOrAssign for RacingWheelButtons {
fn bitor_assign(&mut self, rhs: Self) {
self.0.bitor_assign(rhs.0)
}
}
impl ::std::ops::BitAndAssign for RacingWheelButtons {
fn bitand_assign(&mut self, rhs: Self) {
self.0.bitand_assign(rhs.0)
}
}
impl ::std::ops::Not for RacingWheelButtons {
type Output = Self;
fn not(self) -> Self {
Self(self.0.not())
}
}
#[derive(:: std :: clone :: Clone, :: std :: marker :: Copy)]
#[repr(C)]
pub struct RacingWheelReading {
pub Timestamp: u64,
pub Buttons: RacingWheelButtons,
pub PatternShifterGear: i32,
pub Wheel: f64,
pub Throttle: f64,
pub Brake: f64,
pub Clutch: f64,
pub Handbrake: f64,
}
impl RacingWheelReading {}
impl ::std::default::Default for RacingWheelReading {
fn default() -> Self {
unsafe { ::std::mem::zeroed() }
}
}
impl ::std::fmt::Debug for RacingWheelReading {
fn fmt(&self, fmt: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
fmt.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()
}
}
impl ::std::cmp::PartialEq for RacingWheelReading {
fn eq(&self, other: &Self) -> bool {
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
}
}
impl ::std::cmp::Eq for RacingWheelReading {}
unsafe impl ::windows::Abi for RacingWheelReading {
type Abi = Self;
type DefaultType = Self;
}
unsafe impl ::windows::RuntimeType for RacingWheelReading {
const SIGNATURE : :: windows :: ConstBuffer = :: windows :: ConstBuffer :: from_slice ( b"struct(Windows.Gaming.Input.RacingWheelReading;u8;enum(Windows.Gaming.Input.RacingWheelButtons;u4);i4;f8;f8;f8;f8;f8)" ) ;
}
#[repr(transparent)]
#[derive(
:: std :: cmp :: PartialEq,
:: std :: cmp :: Eq,
:: std :: clone :: Clone,
:: std :: fmt :: Debug,
)]
pub struct RawGameController(::windows::IInspectable);
impl RawGameController {
pub fn HeadsetConnected<
'a,
Param0: ::windows::IntoParam<
'a,
::windows_foundation::TypedEventHandler<IGameController, Headset>,
>,
>(
&self,
value: Param0,
) -> ::windows::Result<::windows_foundation::EventRegistrationToken> {
let this = &::windows::Interface::cast::<IGameController>(self)?;
unsafe {
let mut result__: ::windows_foundation::EventRegistrationToken =
::std::mem::zeroed();
(::windows::Interface::vtable(this).6)(
::std::mem::transmute_copy(this),
value.into_param().abi(),
&mut result__,
)
.from_abi::<::windows_foundation::EventRegistrationToken>(result__)
}
}
pub fn RemoveHeadsetConnected<
'a,
Param0: ::windows::IntoParam<'a, ::windows_foundation::EventRegistrationToken>,
>(
&self,
token: Param0,
) -> ::windows::Result<()> {
let this = &::windows::Interface::cast::<IGameController>(self)?;
unsafe {
(::windows::Interface::vtable(this).7)(
::std::mem::transmute_copy(this),
token.into_param().abi(),
)
.ok()
}
}
pub fn HeadsetDisconnected<
'a,
Param0: ::windows::IntoParam<
'a,
::windows_foundation::TypedEventHandler<IGameController, Headset>,
>,
>(
&self,
value: Param0,
) -> ::windows::Result<::windows_foundation::EventRegistrationToken> {
let this = &::windows::Interface::cast::<IGameController>(self)?;
unsafe {
let mut result__: ::windows_foundation::EventRegistrationToken =
::std::mem::zeroed();
(::windows::Interface::vtable(this).8)(
::std::mem::transmute_copy(this),
value.into_param().abi(),
&mut result__,
)
.from_abi::<::windows_foundation::EventRegistrationToken>(result__)
}
}
pub fn RemoveHeadsetDisconnected<
'a,
Param0: ::windows::IntoParam<'a, ::windows_foundation::EventRegistrationToken>,
>(
&self,
token: Param0,
) -> ::windows::Result<()> {
let this = &::windows::Interface::cast::<IGameController>(self)?;
unsafe {
(::windows::Interface::vtable(this).9)(
::std::mem::transmute_copy(this),
token.into_param().abi(),
)
.ok()
}
}
pub fn UserChanged<
'a,
Param0: ::windows::IntoParam<
'a,
::windows_foundation::TypedEventHandler<
IGameController,
::windows_system::UserChangedEventArgs,
>,
>,
>(
&self,
value: Param0,
) -> ::windows::Result<::windows_foundation::EventRegistrationToken> {
let this = &::windows::Interface::cast::<IGameController>(self)?;
unsafe {
let mut result__: ::windows_foundation::EventRegistrationToken =
::std::mem::zeroed();
(::windows::Interface::vtable(this).10)(
::std::mem::transmute_copy(this),
value.into_param().abi(),
&mut result__,
)
.from_abi::<::windows_foundation::EventRegistrationToken>(result__)
}
}
pub fn RemoveUserChanged<
'a,
Param0: ::windows::IntoParam<'a, ::windows_foundation::EventRegistrationToken>,
>(
&self,
token: Param0,
) -> ::windows::Result<()> {
let this = &::windows::Interface::cast::<IGameController>(self)?;
unsafe {
(::windows::Interface::vtable(this).11)(
::std::mem::transmute_copy(this),
token.into_param().abi(),
)
.ok()
}
}
pub fn Headset(&self) -> ::windows::Result<Headset> {
let this = &::windows::Interface::cast::<IGameController>(self)?;
unsafe {
let mut result__: ::windows::RawPtr = ::std::mem::zeroed();
(::windows::Interface::vtable(this).12)(
::std::mem::transmute_copy(this),
&mut result__,
)
.from_abi::<Headset>(result__)
}
}
pub fn IsWireless(&self) -> ::windows::Result<bool> {
let this = &::windows::Interface::cast::<IGameController>(self)?;
unsafe {
let mut result__: bool = ::std::mem::zeroed();
(::windows::Interface::vtable(this).13)(
::std::mem::transmute_copy(this),
&mut result__,
)
.from_abi::<bool>(result__)
}
}
pub fn User(&self) -> ::windows::Result<::windows_system::User> {
let this = &::windows::Interface::cast::<IGameController>(self)?;
unsafe {
let mut result__: ::windows::RawPtr = ::std::mem::zeroed();
(::windows::Interface::vtable(this).14)(
::std::mem::transmute_copy(this),
&mut result__,
)
.from_abi::<::windows_system::User>(result__)
}
}
pub fn AxisCount(&self) -> ::windows::Result<i32> {
let this = self;
unsafe {
let mut result__: i32 = ::std::mem::zeroed();
(::windows::Interface::vtable(this).6)(
::std::mem::transmute_copy(this),
&mut result__,
)
.from_abi::<i32>(result__)
}
}
pub fn ButtonCount(&self) -> ::windows::Result<i32> {
let this = self;
unsafe {
let mut result__: i32 = ::std::mem::zeroed();
(::windows::Interface::vtable(this).7)(
::std::mem::transmute_copy(this),
&mut result__,
)
.from_abi::<i32>(result__)
}
}
pub fn ForceFeedbackMotors(
&self,
) -> ::windows::Result<
::windows_foundation::Collections::IVectorView<ForceFeedback::ForceFeedbackMotor>,
> {
let this = self;
unsafe {
let mut result__: ::windows::RawPtr = ::std::mem::zeroed();
(::windows::Interface::vtable(this).8)(
::std::mem::transmute_copy(this),
&mut result__,
)
.from_abi::<::windows_foundation::Collections::IVectorView<
ForceFeedback::ForceFeedbackMotor,
>>(result__)
}
}
pub fn HardwareProductId(&self) -> ::windows::Result<u16> {
let this = self;
unsafe {
let mut result__: u16 = ::std::mem::zeroed();
(::windows::Interface::vtable(this).9)(
::std::mem::transmute_copy(this),
&mut result__,
)
.from_abi::<u16>(result__)
}
}
pub fn HardwareVendorId(&self) -> ::windows::Result<u16> {
let this = self;
unsafe {
let mut result__: u16 = ::std::mem::zeroed();
(::windows::Interface::vtable(this).10)(
::std::mem::transmute_copy(this),
&mut result__,
)
.from_abi::<u16>(result__)
}
}
pub fn SwitchCount(&self) -> ::windows::Result<i32> {
let this = self;
unsafe {
let mut result__: i32 = ::std::mem::zeroed();
(::windows::Interface::vtable(this).11)(
::std::mem::transmute_copy(this),
&mut result__,
)
.from_abi::<i32>(result__)
}
}
pub fn GetButtonLabel(
&self,
buttonindex: i32,
) -> ::windows::Result<GameControllerButtonLabel> {
let this = self;
unsafe {
let mut result__: GameControllerButtonLabel = ::std::mem::zeroed();
(::windows::Interface::vtable(this).12)(
::std::mem::transmute_copy(this),
buttonindex,
&mut result__,
)
.from_abi::<GameControllerButtonLabel>(result__)
}
}
pub fn GetCurrentReading(
&self,
buttonarray: &mut [<bool as ::windows::Abi>::DefaultType],
switcharray: &mut [<GameControllerSwitchPosition as ::windows::Abi>::DefaultType],
axisarray: &mut [<f64 as ::windows::Abi>::DefaultType],
) -> ::windows::Result<u64> {
let this = self;
unsafe {
let mut result__: u64 = ::std::mem::zeroed();
(::windows::Interface::vtable(this).13)(
::std::mem::transmute_copy(this),
buttonarray.len() as u32,
::std::mem::transmute_copy(&buttonarray),
switcharray.len() as u32,
::std::mem::transmute_copy(&switcharray),
axisarray.len() as u32,
::std::mem::transmute_copy(&axisarray),
&mut result__,
)
.from_abi::<u64>(result__)
}
}
pub fn GetSwitchKind(
&self,
switchindex: i32,
) -> ::windows::Result<GameControllerSwitchKind> {
let this = self;
unsafe {
let mut result__: GameControllerSwitchKind = ::std::mem::zeroed();
(::windows::Interface::vtable(this).14)(
::std::mem::transmute_copy(this),
switchindex,
&mut result__,
)
.from_abi::<GameControllerSwitchKind>(result__)
}
}
pub fn TryGetBatteryReport(
&self,
) -> ::windows::Result<::windows_devices::Power::BatteryReport> {
let this = &::windows::Interface::cast::<IGameControllerBatteryInfo>(self)?;
unsafe {
let mut result__: ::windows::RawPtr = ::std::mem::zeroed();
(::windows::Interface::vtable(this).6)(
::std::mem::transmute_copy(this),
&mut result__,
)
.from_abi::<::windows_devices::Power::BatteryReport>(result__)
}
}
pub fn RawGameControllerAdded<
'a,
Param0: ::windows::IntoParam<'a, ::windows_foundation::EventHandler<RawGameController>>,
>(
value: Param0,
) -> ::windows::Result<::windows_foundation::EventRegistrationToken> {
Self::IRawGameControllerStatics(|this| unsafe {
let mut result__: ::windows_foundation::EventRegistrationToken =
::std::mem::zeroed();
(::windows::Interface::vtable(this).6)(
::std::mem::transmute_copy(this),
value.into_param().abi(),
&mut result__,
)
.from_abi::<::windows_foundation::EventRegistrationToken>(result__)
})
}
pub fn RemoveRawGameControllerAdded<
'a,
Param0: ::windows::IntoParam<'a, ::windows_foundation::EventRegistrationToken>,
>(
token: Param0,
) -> ::windows::Result<()> {
Self::IRawGameControllerStatics(|this| unsafe {
(::windows::Interface::vtable(this).7)(
::std::mem::transmute_copy(this),
token.into_param().abi(),
)
.ok()
})
}
pub fn RawGameControllerRemoved<
'a,
Param0: ::windows::IntoParam<'a, ::windows_foundation::EventHandler<RawGameController>>,
>(
value: Param0,
) -> ::windows::Result<::windows_foundation::EventRegistrationToken> {
Self::IRawGameControllerStatics(|this| unsafe {
let mut result__: ::windows_foundation::EventRegistrationToken =
::std::mem::zeroed();
(::windows::Interface::vtable(this).8)(
::std::mem::transmute_copy(this),
value.into_param().abi(),
&mut result__,
)
.from_abi::<::windows_foundation::EventRegistrationToken>(result__)
})
}
pub fn RemoveRawGameControllerRemoved<
'a,
Param0: ::windows::IntoParam<'a, ::windows_foundation::EventRegistrationToken>,
>(
token: Param0,
) -> ::windows::Result<()> {
Self::IRawGameControllerStatics(|this| unsafe {
(::windows::Interface::vtable(this).9)(
::std::mem::transmute_copy(this),
token.into_param().abi(),
)
.ok()
})
}
pub fn RawGameControllers(
) -> ::windows::Result<::windows_foundation::Collections::IVectorView<RawGameController>>
{
Self::IRawGameControllerStatics(|this| unsafe {
let mut result__: ::windows::RawPtr = ::std::mem::zeroed();
(::windows::Interface::vtable(this).10)(
::std::mem::transmute_copy(this),
&mut result__,
)
.from_abi::<::windows_foundation::Collections::IVectorView<RawGameController>>(
result__,
)
})
}
pub fn FromGameController<'a, Param0: ::windows::IntoParam<'a, IGameController>>(
gamecontroller: Param0,
) -> ::windows::Result<RawGameController> {
Self::IRawGameControllerStatics(|this| unsafe {
let mut result__: ::windows::RawPtr = ::std::mem::zeroed();
(::windows::Interface::vtable(this).11)(
::std::mem::transmute_copy(this),
gamecontroller.into_param().abi(),
&mut result__,
)
.from_abi::<RawGameController>(result__)
})
}
pub fn SimpleHapticsControllers(
&self,
) -> ::windows::Result<
::windows_foundation::Collections::IVectorView<
::windows_devices::Haptics::SimpleHapticsController,
>,
> {
let this = &::windows::Interface::cast::<IRawGameController2>(self)?;
unsafe {
let mut result__: ::windows::RawPtr = ::std::mem::zeroed();
(::windows::Interface::vtable(this).6)(
::std::mem::transmute_copy(this),
&mut result__,
)
.from_abi::<::windows_foundation::Collections::IVectorView<
::windows_devices::Haptics::SimpleHapticsController,
>>(result__)
}
}
pub fn NonRoamableId(&self) -> ::windows::Result<::windows::HSTRING> {
let this = &::windows::Interface::cast::<IRawGameController2>(self)?;
unsafe {
let mut result__: ::std::mem::ManuallyDrop<::windows::HSTRING> =
::std::mem::zeroed();
(::windows::Interface::vtable(this).7)(
::std::mem::transmute_copy(this),
&mut result__,
)
.from_abi::<::windows::HSTRING>(result__)
}
}
pub fn DisplayName(&self) -> ::windows::Result<::windows::HSTRING> {
let this = &::windows::Interface::cast::<IRawGameController2>(self)?;
unsafe {
let mut result__: ::std::mem::ManuallyDrop<::windows::HSTRING> =
::std::mem::zeroed();
(::windows::Interface::vtable(this).8)(
::std::mem::transmute_copy(this),
&mut result__,
)
.from_abi::<::windows::HSTRING>(result__)
}
}
pub fn IRawGameControllerStatics<
R,
F: FnOnce(&IRawGameControllerStatics) -> ::windows::Result<R>,
>(
callback: F,
) -> ::windows::Result<R> {
static mut SHARED: ::windows::FactoryCache<
RawGameController,
IRawGameControllerStatics,
> = ::windows::FactoryCache::new();
unsafe { SHARED.call(callback) }
}
}
unsafe impl ::windows::RuntimeType for RawGameController {
const SIGNATURE: ::windows::ConstBuffer = ::windows::ConstBuffer::from_slice(
b"rc(Windows.Gaming.Input.RawGameController;{7cad6d91-a7e1-4f71-9a78-33e9c5dfea62})",
);
}
unsafe impl ::windows::Interface for RawGameController {
type Vtable = IRawGameController_abi;
const IID: ::windows::Guid = ::windows::Guid::from_values(
2091740561,
42977,
20337,
[154, 120, 51, 233, 197, 223, 234, 98],
);
}
impl ::windows::RuntimeName for RawGameController {
const NAME: &'static str = "Windows.Gaming.Input.RawGameController";
}
impl ::std::convert::From<RawGameController> for ::windows::IUnknown {
fn from(value: RawGameController) -> Self {
unsafe { ::std::mem::transmute(value) }
}
}
impl ::std::convert::From<&RawGameController> for ::windows::IUnknown {
fn from(value: &RawGameController) -> Self {
::std::convert::From::from(::std::clone::Clone::clone(value))
}
}
impl<'a> ::windows::IntoParam<'a, ::windows::IUnknown> for RawGameController {
fn into_param(self) -> ::windows::Param<'a, ::windows::IUnknown> {
::windows::Param::Owned(::std::convert::Into::<::windows::IUnknown>::into(self))
}
}
impl<'a> ::windows::IntoParam<'a, ::windows::IUnknown> for &RawGameController {
fn into_param(self) -> ::windows::Param<'a, ::windows::IUnknown> {
::windows::Param::Owned(::std::convert::Into::<::windows::IUnknown>::into(
::std::clone::Clone::clone(self),
))
}
}
impl ::std::convert::From<RawGameController> for ::windows::IInspectable {
fn from(value: RawGameController) -> Self {
value.0
}
}
impl ::std::convert::From<&RawGameController> for ::windows::IInspectable {
fn from(value: &RawGameController) -> Self {
value.0.clone()
}
}
impl<'a> ::windows::IntoParam<'a, ::windows::IInspectable> for RawGameController {
fn into_param(self) -> ::windows::Param<'a, ::windows::IInspectable> {
::windows::Param::Owned(self.0)
}
}
impl<'a> ::windows::IntoParam<'a, ::windows::IInspectable> for &'a RawGameController {
fn into_param(self) -> ::windows::Param<'a, ::windows::IInspectable> {
::windows::Param::Borrowed(&self.0)
}
}
impl ::std::convert::TryFrom<RawGameController> for IGameController {
type Error = ::windows::Error;
fn try_from(value: RawGameController) -> ::windows::Result<Self> {
::std::convert::TryFrom::try_from(&value)
}
}
impl ::std::convert::TryFrom<&RawGameController> for IGameController {
type Error = ::windows::Error;
fn try_from(value: &RawGameController) -> ::windows::Result<Self> {
::windows::Interface::cast(value)
}
}
impl<'a> ::windows::IntoParam<'a, IGameController> for RawGameController {
fn into_param(self) -> ::windows::Param<'a, IGameController> {
::windows::IntoParam::into_param(&self)
}
}
impl<'a> ::windows::IntoParam<'a, IGameController> for &RawGameController {
fn into_param(self) -> ::windows::Param<'a, IGameController> {
::std::convert::TryInto::<IGameController>::try_into(self)
.map(::windows::Param::Owned)
.unwrap_or(::windows::Param::None)
}
}
impl ::std::convert::TryFrom<RawGameController> for IGameControllerBatteryInfo {
type Error = ::windows::Error;
fn try_from(value: RawGameController) -> ::windows::Result<Self> {
::std::convert::TryFrom::try_from(&value)
}
}
impl ::std::convert::TryFrom<&RawGameController> for IGameControllerBatteryInfo {
type Error = ::windows::Error;
fn try_from(value: &RawGameController) -> ::windows::Result<Self> {
::windows::Interface::cast(value)
}
}
impl<'a> ::windows::IntoParam<'a, IGameControllerBatteryInfo> for RawGameController {
fn into_param(self) -> ::windows::Param<'a, IGameControllerBatteryInfo> {
::windows::IntoParam::into_param(&self)
}
}
impl<'a> ::windows::IntoParam<'a, IGameControllerBatteryInfo> for &RawGameController {
fn into_param(self) -> ::windows::Param<'a, IGameControllerBatteryInfo> {
::std::convert::TryInto::<IGameControllerBatteryInfo>::try_into(self)
.map(::windows::Param::Owned)
.unwrap_or(::windows::Param::None)
}
}
unsafe impl ::std::marker::Send for RawGameController {}
unsafe impl ::std::marker::Sync for RawGameController {}
#[derive(
:: std :: cmp :: PartialEq,
:: std :: cmp :: Eq,
:: std :: marker :: Copy,
:: std :: clone :: Clone,
:: std :: default :: Default,
:: std :: fmt :: Debug,
)]
#[repr(transparent)]
pub struct RequiredUINavigationButtons(pub u32);
impl RequiredUINavigationButtons {
pub const None: RequiredUINavigationButtons = RequiredUINavigationButtons(0u32);
pub const Menu: RequiredUINavigationButtons = RequiredUINavigationButtons(1u32);
pub const View: RequiredUINavigationButtons = RequiredUINavigationButtons(2u32);
pub const Accept: RequiredUINavigationButtons = RequiredUINavigationButtons(4u32);
pub const Cancel: RequiredUINavigationButtons = RequiredUINavigationButtons(8u32);
pub const Up: RequiredUINavigationButtons = RequiredUINavigationButtons(16u32);
pub const Down: RequiredUINavigationButtons = RequiredUINavigationButtons(32u32);
pub const Left: RequiredUINavigationButtons = RequiredUINavigationButtons(64u32);
pub const Right: RequiredUINavigationButtons = RequiredUINavigationButtons(128u32);
}
impl ::std::convert::From<u32> for RequiredUINavigationButtons {
fn from(value: u32) -> Self {
Self(value)
}
}
unsafe impl ::windows::Abi for RequiredUINavigationButtons {
type Abi = Self;
type DefaultType = Self;
}
unsafe impl ::windows::RuntimeType for RequiredUINavigationButtons {
const SIGNATURE: ::windows::ConstBuffer = ::windows::ConstBuffer::from_slice(
b"enum(Windows.Gaming.Input.RequiredUINavigationButtons;u4)",
);
}
impl ::std::ops::BitOr for RequiredUINavigationButtons {
type Output = Self;
fn bitor(self, rhs: Self) -> Self {
Self(self.0 | rhs.0)
}
}
impl ::std::ops::BitAnd for RequiredUINavigationButtons {
type Output = Self;
fn bitand(self, rhs: Self) -> Self {
Self(self.0 & rhs.0)
}
}
impl ::std::ops::BitOrAssign for RequiredUINavigationButtons {
fn bitor_assign(&mut self, rhs: Self) {
self.0.bitor_assign(rhs.0)
}
}
impl ::std::ops::BitAndAssign for RequiredUINavigationButtons {
fn bitand_assign(&mut self, rhs: Self) {
self.0.bitand_assign(rhs.0)
}
}
impl ::std::ops::Not for RequiredUINavigationButtons {
type Output = Self;
fn not(self) -> Self {
Self(self.0.not())
}
}
#[repr(transparent)]
#[derive(
:: std :: cmp :: PartialEq,
:: std :: cmp :: Eq,
:: std :: clone :: Clone,
:: std :: fmt :: Debug,
)]
pub struct UINavigationController(::windows::IInspectable);
impl UINavigationController {
pub fn HeadsetConnected<
'a,
Param0: ::windows::IntoParam<
'a,
::windows_foundation::TypedEventHandler<IGameController, Headset>,
>,
>(
&self,
value: Param0,
) -> ::windows::Result<::windows_foundation::EventRegistrationToken> {
let this = &::windows::Interface::cast::<IGameController>(self)?;
unsafe {
let mut result__: ::windows_foundation::EventRegistrationToken =
::std::mem::zeroed();
(::windows::Interface::vtable(this).6)(
::std::mem::transmute_copy(this),
value.into_param().abi(),
&mut result__,
)
.from_abi::<::windows_foundation::EventRegistrationToken>(result__)
}
}
pub fn RemoveHeadsetConnected<
'a,
Param0: ::windows::IntoParam<'a, ::windows_foundation::EventRegistrationToken>,
>(
&self,
token: Param0,
) -> ::windows::Result<()> {
let this = &::windows::Interface::cast::<IGameController>(self)?;
unsafe {
(::windows::Interface::vtable(this).7)(
::std::mem::transmute_copy(this),
token.into_param().abi(),
)
.ok()
}
}
pub fn HeadsetDisconnected<
'a,
Param0: ::windows::IntoParam<
'a,
::windows_foundation::TypedEventHandler<IGameController, Headset>,
>,
>(
&self,
value: Param0,
) -> ::windows::Result<::windows_foundation::EventRegistrationToken> {
let this = &::windows::Interface::cast::<IGameController>(self)?;
unsafe {
let mut result__: ::windows_foundation::EventRegistrationToken =
::std::mem::zeroed();
(::windows::Interface::vtable(this).8)(
::std::mem::transmute_copy(this),
value.into_param().abi(),
&mut result__,
)
.from_abi::<::windows_foundation::EventRegistrationToken>(result__)
}
}
pub fn RemoveHeadsetDisconnected<
'a,
Param0: ::windows::IntoParam<'a, ::windows_foundation::EventRegistrationToken>,
>(
&self,
token: Param0,
) -> ::windows::Result<()> {
let this = &::windows::Interface::cast::<IGameController>(self)?;
unsafe {
(::windows::Interface::vtable(this).9)(
::std::mem::transmute_copy(this),
token.into_param().abi(),
)
.ok()
}
}
pub fn UserChanged<
'a,
Param0: ::windows::IntoParam<
'a,
::windows_foundation::TypedEventHandler<
IGameController,
::windows_system::UserChangedEventArgs,
>,
>,
>(
&self,
value: Param0,
) -> ::windows::Result<::windows_foundation::EventRegistrationToken> {
let this = &::windows::Interface::cast::<IGameController>(self)?;
unsafe {
let mut result__: ::windows_foundation::EventRegistrationToken =
::std::mem::zeroed();
(::windows::Interface::vtable(this).10)(
::std::mem::transmute_copy(this),
value.into_param().abi(),
&mut result__,
)
.from_abi::<::windows_foundation::EventRegistrationToken>(result__)
}
}
pub fn RemoveUserChanged<
'a,
Param0: ::windows::IntoParam<'a, ::windows_foundation::EventRegistrationToken>,
>(
&self,
token: Param0,
) -> ::windows::Result<()> {
let this = &::windows::Interface::cast::<IGameController>(self)?;
unsafe {
(::windows::Interface::vtable(this).11)(
::std::mem::transmute_copy(this),
token.into_param().abi(),
)
.ok()
}
}
pub fn Headset(&self) -> ::windows::Result<Headset> {
let this = &::windows::Interface::cast::<IGameController>(self)?;
unsafe {
let mut result__: ::windows::RawPtr = ::std::mem::zeroed();
(::windows::Interface::vtable(this).12)(
::std::mem::transmute_copy(this),
&mut result__,
)
.from_abi::<Headset>(result__)
}
}
pub fn IsWireless(&self) -> ::windows::Result<bool> {
let this = &::windows::Interface::cast::<IGameController>(self)?;
unsafe {
let mut result__: bool = ::std::mem::zeroed();
(::windows::Interface::vtable(this).13)(
::std::mem::transmute_copy(this),
&mut result__,
)
.from_abi::<bool>(result__)
}
}
pub fn User(&self) -> ::windows::Result<::windows_system::User> {
let this = &::windows::Interface::cast::<IGameController>(self)?;
unsafe {
let mut result__: ::windows::RawPtr = ::std::mem::zeroed();
(::windows::Interface::vtable(this).14)(
::std::mem::transmute_copy(this),
&mut result__,
)
.from_abi::<::windows_system::User>(result__)
}
}
pub fn GetCurrentReading(&self) -> ::windows::Result<UINavigationReading> {
let this = self;
unsafe {
let mut result__: UINavigationReading = ::std::mem::zeroed();
(::windows::Interface::vtable(this).6)(
::std::mem::transmute_copy(this),
&mut result__,
)
.from_abi::<UINavigationReading>(result__)
}
}
pub fn GetOptionalButtonLabel(
&self,
button: OptionalUINavigationButtons,
) -> ::windows::Result<GameControllerButtonLabel> {
let this = self;
unsafe {
let mut result__: GameControllerButtonLabel = ::std::mem::zeroed();
(::windows::Interface::vtable(this).7)(
::std::mem::transmute_copy(this),
button,
&mut result__,
)
.from_abi::<GameControllerButtonLabel>(result__)
}
}
pub fn GetRequiredButtonLabel(
&self,
button: RequiredUINavigationButtons,
) -> ::windows::Result<GameControllerButtonLabel> {
let this = self;
unsafe {
let mut result__: GameControllerButtonLabel = ::std::mem::zeroed();
(::windows::Interface::vtable(this).8)(
::std::mem::transmute_copy(this),
button,
&mut result__,
)
.from_abi::<GameControllerButtonLabel>(result__)
}
}
pub fn UINavigationControllerAdded<
'a,
Param0: ::windows::IntoParam<'a, ::windows_foundation::EventHandler<UINavigationController>>,
>(
value: Param0,
) -> ::windows::Result<::windows_foundation::EventRegistrationToken> {
Self::IUINavigationControllerStatics(|this| unsafe {
let mut result__: ::windows_foundation::EventRegistrationToken =
::std::mem::zeroed();
(::windows::Interface::vtable(this).6)(
::std::mem::transmute_copy(this),
value.into_param().abi(),
&mut result__,
)
.from_abi::<::windows_foundation::EventRegistrationToken>(result__)
})
}
pub fn RemoveUINavigationControllerAdded<
'a,
Param0: ::windows::IntoParam<'a, ::windows_foundation::EventRegistrationToken>,
>(
token: Param0,
) -> ::windows::Result<()> {
Self::IUINavigationControllerStatics(|this| unsafe {
(::windows::Interface::vtable(this).7)(
::std::mem::transmute_copy(this),
token.into_param().abi(),
)
.ok()
})
}
pub fn UINavigationControllerRemoved<
'a,
Param0: ::windows::IntoParam<'a, ::windows_foundation::EventHandler<UINavigationController>>,
>(
value: Param0,
) -> ::windows::Result<::windows_foundation::EventRegistrationToken> {
Self::IUINavigationControllerStatics(|this| unsafe {
let mut result__: ::windows_foundation::EventRegistrationToken =
::std::mem::zeroed();
(::windows::Interface::vtable(this).8)(
::std::mem::transmute_copy(this),
value.into_param().abi(),
&mut result__,
)
.from_abi::<::windows_foundation::EventRegistrationToken>(result__)
})
}
pub fn RemoveUINavigationControllerRemoved<
'a,
Param0: ::windows::IntoParam<'a, ::windows_foundation::EventRegistrationToken>,
>(
token: Param0,
) -> ::windows::Result<()> {
Self::IUINavigationControllerStatics(|this| unsafe {
(::windows::Interface::vtable(this).9)(
::std::mem::transmute_copy(this),
token.into_param().abi(),
)
.ok()
})
}
pub fn UINavigationControllers(
) -> ::windows::Result<::windows_foundation::Collections::IVectorView<UINavigationController>>
{
Self::IUINavigationControllerStatics(|this| unsafe {
let mut result__: ::windows::RawPtr = ::std::mem::zeroed();
(::windows::Interface::vtable(this).10)(
::std::mem::transmute_copy(this),
&mut result__,
)
.from_abi::<::windows_foundation::Collections::IVectorView<
UINavigationController,
>>(result__)
})
}
pub fn TryGetBatteryReport(
&self,
) -> ::windows::Result<::windows_devices::Power::BatteryReport> {
let this = &::windows::Interface::cast::<IGameControllerBatteryInfo>(self)?;
unsafe {
let mut result__: ::windows::RawPtr = ::std::mem::zeroed();
(::windows::Interface::vtable(this).6)(
::std::mem::transmute_copy(this),
&mut result__,
)
.from_abi::<::windows_devices::Power::BatteryReport>(result__)
}
}
pub fn FromGameController<'a, Param0: ::windows::IntoParam<'a, IGameController>>(
gamecontroller: Param0,
) -> ::windows::Result<UINavigationController> {
Self::IUINavigationControllerStatics2(|this| unsafe {
let mut result__: ::windows::RawPtr = ::std::mem::zeroed();
(::windows::Interface::vtable(this).6)(
::std::mem::transmute_copy(this),
gamecontroller.into_param().abi(),
&mut result__,
)
.from_abi::<UINavigationController>(result__)
})
}
pub fn IUINavigationControllerStatics<
R,
F: FnOnce(&IUINavigationControllerStatics) -> ::windows::Result<R>,
>(
callback: F,
) -> ::windows::Result<R> {
static mut SHARED: ::windows::FactoryCache<
UINavigationController,
IUINavigationControllerStatics,
> = ::windows::FactoryCache::new();
unsafe { SHARED.call(callback) }
}
pub fn IUINavigationControllerStatics2<
R,
F: FnOnce(&IUINavigationControllerStatics2) -> ::windows::Result<R>,
>(
callback: F,
) -> ::windows::Result<R> {
static mut SHARED: ::windows::FactoryCache<
UINavigationController,
IUINavigationControllerStatics2,
> = ::windows::FactoryCache::new();
unsafe { SHARED.call(callback) }
}
}
unsafe impl ::windows::RuntimeType for UINavigationController {
const SIGNATURE : :: windows :: ConstBuffer = :: windows :: ConstBuffer :: from_slice ( b"rc(Windows.Gaming.Input.UINavigationController;{e5aeefdd-f50e-4a55-8cdc-d33229548175})" ) ;
}
unsafe impl ::windows::Interface for UINavigationController {
type Vtable = IUINavigationController_abi;
const IID: ::windows::Guid = ::windows::Guid::from_values(
3853447133,
62734,
19029,
[140, 220, 211, 50, 41, 84, 129, 117],
);
}
impl ::windows::RuntimeName for UINavigationController {
const NAME: &'static str = "Windows.Gaming.Input.UINavigationController";
}
impl ::std::convert::From<UINavigationController> for ::windows::IUnknown {
fn from(value: UINavigationController) -> Self {
unsafe { ::std::mem::transmute(value) }
}
}
impl ::std::convert::From<&UINavigationController> for ::windows::IUnknown {
fn from(value: &UINavigationController) -> Self {
::std::convert::From::from(::std::clone::Clone::clone(value))
}
}
impl<'a> ::windows::IntoParam<'a, ::windows::IUnknown> for UINavigationController {
fn into_param(self) -> ::windows::Param<'a, ::windows::IUnknown> {
::windows::Param::Owned(::std::convert::Into::<::windows::IUnknown>::into(self))
}
}
impl<'a> ::windows::IntoParam<'a, ::windows::IUnknown> for &UINavigationController {
fn into_param(self) -> ::windows::Param<'a, ::windows::IUnknown> {
::windows::Param::Owned(::std::convert::Into::<::windows::IUnknown>::into(
::std::clone::Clone::clone(self),
))
}
}
impl ::std::convert::From<UINavigationController> for ::windows::IInspectable {
fn from(value: UINavigationController) -> Self {
value.0
}
}
impl ::std::convert::From<&UINavigationController> for ::windows::IInspectable {
fn from(value: &UINavigationController) -> Self {
value.0.clone()
}
}
impl<'a> ::windows::IntoParam<'a, ::windows::IInspectable> for UINavigationController {
fn into_param(self) -> ::windows::Param<'a, ::windows::IInspectable> {
::windows::Param::Owned(self.0)
}
}
impl<'a> ::windows::IntoParam<'a, ::windows::IInspectable> for &'a UINavigationController {
fn into_param(self) -> ::windows::Param<'a, ::windows::IInspectable> {
::windows::Param::Borrowed(&self.0)
}
}
impl ::std::convert::TryFrom<UINavigationController> for IGameController {
type Error = ::windows::Error;
fn try_from(value: UINavigationController) -> ::windows::Result<Self> {
::std::convert::TryFrom::try_from(&value)
}
}
impl ::std::convert::TryFrom<&UINavigationController> for IGameController {
type Error = ::windows::Error;
fn try_from(value: &UINavigationController) -> ::windows::Result<Self> {
::windows::Interface::cast(value)
}
}
impl<'a> ::windows::IntoParam<'a, IGameController> for UINavigationController {
fn into_param(self) -> ::windows::Param<'a, IGameController> {
::windows::IntoParam::into_param(&self)
}
}
impl<'a> ::windows::IntoParam<'a, IGameController> for &UINavigationController {
fn into_param(self) -> ::windows::Param<'a, IGameController> {
::std::convert::TryInto::<IGameController>::try_into(self)
.map(::windows::Param::Owned)
.unwrap_or(::windows::Param::None)
}
}
impl ::std::convert::TryFrom<UINavigationController> for IGameControllerBatteryInfo {
type Error = ::windows::Error;
fn try_from(value: UINavigationController) -> ::windows::Result<Self> {
::std::convert::TryFrom::try_from(&value)
}
}
impl ::std::convert::TryFrom<&UINavigationController> for IGameControllerBatteryInfo {
type Error = ::windows::Error;
fn try_from(value: &UINavigationController) -> ::windows::Result<Self> {
::windows::Interface::cast(value)
}
}
impl<'a> ::windows::IntoParam<'a, IGameControllerBatteryInfo> for UINavigationController {
fn into_param(self) -> ::windows::Param<'a, IGameControllerBatteryInfo> {
::windows::IntoParam::into_param(&self)
}
}
impl<'a> ::windows::IntoParam<'a, IGameControllerBatteryInfo> for &UINavigationController {
fn into_param(self) -> ::windows::Param<'a, IGameControllerBatteryInfo> {
::std::convert::TryInto::<IGameControllerBatteryInfo>::try_into(self)
.map(::windows::Param::Owned)
.unwrap_or(::windows::Param::None)
}
}
unsafe impl ::std::marker::Send for UINavigationController {}
unsafe impl ::std::marker::Sync for UINavigationController {}
#[derive(:: std :: clone :: Clone, :: std :: marker :: Copy)]
#[repr(C)]
pub struct UINavigationReading {
pub Timestamp: u64,
pub RequiredButtons: RequiredUINavigationButtons,
pub OptionalButtons: OptionalUINavigationButtons,
}
impl UINavigationReading {}
impl ::std::default::Default for UINavigationReading {
fn default() -> Self {
unsafe { ::std::mem::zeroed() }
}
}
impl ::std::fmt::Debug for UINavigationReading {
fn fmt(&self, fmt: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
fmt.debug_struct("UINavigationReading")
.field("Timestamp", &self.Timestamp)
.field("RequiredButtons", &self.RequiredButtons)
.field("OptionalButtons", &self.OptionalButtons)
.finish()
}
}
impl ::std::cmp::PartialEq for UINavigationReading {
fn eq(&self, other: &Self) -> bool {
self.Timestamp == other.Timestamp
&& self.RequiredButtons == other.RequiredButtons
&& self.OptionalButtons == other.OptionalButtons
}
}
impl ::std::cmp::Eq for UINavigationReading {}
unsafe impl ::windows::Abi for UINavigationReading {
type Abi = Self;
type DefaultType = Self;
}
unsafe impl ::windows::RuntimeType for UINavigationReading {
const SIGNATURE : :: windows :: ConstBuffer = :: windows :: ConstBuffer :: from_slice ( b"struct(Windows.Gaming.Input.UINavigationReading;u8;enum(Windows.Gaming.Input.RequiredUINavigationButtons;u4);enum(Windows.Gaming.Input.OptionalUINavigationButtons;u4))" ) ;
}
}
pub mod Preview {
pub mod GamesEnumeration {
pub struct GameList {}
impl GameList {
pub fn FindAllAsync() -> ::windows::Result<
::windows_foundation::IAsyncOperation<
::windows_foundation::Collections::IVectorView<GameListEntry>,
>,
> {
Self::IGameListStatics(|this| unsafe {
let mut result__: ::windows::RawPtr = ::std::mem::zeroed();
(::windows::Interface::vtable(this).6)(
::std::mem::transmute_copy(this),
&mut result__,
)
.from_abi::<::windows_foundation::IAsyncOperation<
::windows_foundation::Collections::IVectorView<GameListEntry>,
>>(result__)
})
}
pub fn FindAllAsyncPackageFamilyName<
'a,
Param0: ::windows::IntoParam<'a, ::windows::HSTRING>,
>(
packagefamilyname: Param0,
) -> ::windows::Result<
::windows_foundation::IAsyncOperation<
::windows_foundation::Collections::IVectorView<GameListEntry>,
>,
> {
Self::IGameListStatics(|this| unsafe {
let mut result__: ::windows::RawPtr = ::std::mem::zeroed();
(::windows::Interface::vtable(this).7)(
::std::mem::transmute_copy(this),
packagefamilyname.into_param().abi(),
&mut result__,
)
.from_abi::<::windows_foundation::IAsyncOperation<
::windows_foundation::Collections::IVectorView<GameListEntry>,
>>(result__)
})
}
pub fn GameAdded<'a, Param0: ::windows::IntoParam<'a, GameListChangedEventHandler>>(
handler: Param0,
) -> ::windows::Result<::windows_foundation::EventRegistrationToken> {
Self::IGameListStatics(|this| unsafe {
let mut result__: ::windows_foundation::EventRegistrationToken =
::std::mem::zeroed();
(::windows::Interface::vtable(this).8)(
::std::mem::transmute_copy(this),
handler.into_param().abi(),
&mut result__,
)
.from_abi::<::windows_foundation::EventRegistrationToken>(result__)
})
}
pub fn RemoveGameAdded<
'a,
Param0: ::windows::IntoParam<'a, ::windows_foundation::EventRegistrationToken>,
>(
token: Param0,
) -> ::windows::Result<()> {
Self::IGameListStatics(|this| unsafe {
(::windows::Interface::vtable(this).9)(
::std::mem::transmute_copy(this),
token.into_param().abi(),
)
.ok()
})
}
pub fn GameRemoved<
'a,
Param0: ::windows::IntoParam<'a, GameListRemovedEventHandler>,
>(
handler: Param0,
) -> ::windows::Result<::windows_foundation::EventRegistrationToken> {
Self::IGameListStatics(|this| unsafe {
let mut result__: ::windows_foundation::EventRegistrationToken =
::std::mem::zeroed();
(::windows::Interface::vtable(this).10)(
::std::mem::transmute_copy(this),
handler.into_param().abi(),
&mut result__,
)
.from_abi::<::windows_foundation::EventRegistrationToken>(result__)
})
}
pub fn RemoveGameRemoved<
'a,
Param0: ::windows::IntoParam<'a, ::windows_foundation::EventRegistrationToken>,
>(
token: Param0,
) -> ::windows::Result<()> {
Self::IGameListStatics(|this| unsafe {
(::windows::Interface::vtable(this).11)(
::std::mem::transmute_copy(this),
token.into_param().abi(),
)
.ok()
})
}
pub fn GameUpdated<
'a,
Param0: ::windows::IntoParam<'a, GameListChangedEventHandler>,
>(
handler: Param0,
) -> ::windows::Result<::windows_foundation::EventRegistrationToken> {
Self::IGameListStatics(|this| unsafe {
let mut result__: ::windows_foundation::EventRegistrationToken =
::std::mem::zeroed();
(::windows::Interface::vtable(this).12)(
::std::mem::transmute_copy(this),
handler.into_param().abi(),
&mut result__,
)
.from_abi::<::windows_foundation::EventRegistrationToken>(result__)
})
}
pub fn RemoveGameUpdated<
'a,
Param0: ::windows::IntoParam<'a, ::windows_foundation::EventRegistrationToken>,
>(
token: Param0,
) -> ::windows::Result<()> {
Self::IGameListStatics(|this| unsafe {
(::windows::Interface::vtable(this).13)(
::std::mem::transmute_copy(this),
token.into_param().abi(),
)
.ok()
})
}
pub fn MergeEntriesAsync<
'a,
Param0: ::windows::IntoParam<'a, GameListEntry>,
Param1: ::windows::IntoParam<'a, GameListEntry>,
>(
left: Param0,
right: Param1,
) -> ::windows::Result<::windows_foundation::IAsyncOperation<GameListEntry>>
{
Self::IGameListStatics2(|this| unsafe {
let mut result__: ::windows::RawPtr = ::std::mem::zeroed();
(::windows::Interface::vtable(this).6)(
::std::mem::transmute_copy(this),
left.into_param().abi(),
right.into_param().abi(),
&mut result__,
)
.from_abi::<::windows_foundation::IAsyncOperation<GameListEntry>>(result__)
})
}
pub fn UnmergeEntryAsync<'a, Param0: ::windows::IntoParam<'a, GameListEntry>>(
mergedentry: Param0,
) -> ::windows::Result<
::windows_foundation::IAsyncOperation<
::windows_foundation::Collections::IVectorView<GameListEntry>,
>,
> {
Self::IGameListStatics2(|this| unsafe {
let mut result__: ::windows::RawPtr = ::std::mem::zeroed();
(::windows::Interface::vtable(this).7)(
::std::mem::transmute_copy(this),
mergedentry.into_param().abi(),
&mut result__,
)
.from_abi::<::windows_foundation::IAsyncOperation<
::windows_foundation::Collections::IVectorView<GameListEntry>,
>>(result__)
})
}
pub fn IGameListStatics<R, F: FnOnce(&IGameListStatics) -> ::windows::Result<R>>(
callback: F,
) -> ::windows::Result<R> {
static mut SHARED: ::windows::FactoryCache<GameList, IGameListStatics> =
::windows::FactoryCache::new();
unsafe { SHARED.call(callback) }
}
pub fn IGameListStatics2<R, F: FnOnce(&IGameListStatics2) -> ::windows::Result<R>>(
callback: F,
) -> ::windows::Result<R> {
static mut SHARED: ::windows::FactoryCache<GameList, IGameListStatics2> =
::windows::FactoryCache::new();
unsafe { SHARED.call(callback) }
}
}
impl ::windows::RuntimeName for GameList {
const NAME: &'static str = "Windows.Gaming.Preview.GamesEnumeration.GameList";
}
#[derive(
:: std :: cmp :: PartialEq,
:: std :: cmp :: Eq,
:: std :: marker :: Copy,
:: std :: clone :: Clone,
:: std :: default :: Default,
:: std :: fmt :: Debug,
)]
#[repr(transparent)]
pub struct GameListCategory(pub i32);
impl GameListCategory {
pub const Candidate: GameListCategory = GameListCategory(0i32);
pub const ConfirmedBySystem: GameListCategory = GameListCategory(1i32);
pub const ConfirmedByUser: GameListCategory = GameListCategory(2i32);
}
impl ::std::convert::From<i32> for GameListCategory {
fn from(value: i32) -> Self {
Self(value)
}
}
unsafe impl ::windows::Abi for GameListCategory {
type Abi = Self;
type DefaultType = Self;
}
unsafe impl ::windows::RuntimeType for GameListCategory {
const SIGNATURE: ::windows::ConstBuffer = ::windows::ConstBuffer::from_slice(
b"enum(Windows.Gaming.Preview.GamesEnumeration.GameListCategory;i4)",
);
}
#[repr(transparent)]
#[derive(
:: std :: cmp :: PartialEq,
:: std :: cmp :: Eq,
:: std :: clone :: Clone,
:: std :: fmt :: Debug,
)]
pub struct GameListChangedEventHandler(::windows::IUnknown);
impl GameListChangedEventHandler {
pub fn new<
F: FnMut(&::std::option::Option<GameListEntry>) -> ::windows::Result<()> + 'static,
>(
invoke: F,
) -> Self {
let com = GameListChangedEventHandler_box::<F> {
vtable: &GameListChangedEventHandler_box::<F>::VTABLE,
count: ::windows::RefCount::new(1),
invoke,
};
unsafe { std::mem::transmute(::std::boxed::Box::new(com)) }
}
pub fn Invoke<'a, Param0: ::windows::IntoParam<'a, GameListEntry>>(
&self,
game: Param0,
) -> ::windows::Result<()> {
let this = self;
unsafe {
(::windows::Interface::vtable(this).3)(
::std::mem::transmute_copy(this),
game.into_param().abi(),
)
.ok()
}
}
}
unsafe impl ::windows::RuntimeType for GameListChangedEventHandler {
const SIGNATURE: ::windows::ConstBuffer = ::windows::ConstBuffer::from_slice(
b"delegate({25f6a421-d8f5-4d91-b40e-53d5e86fde64})",
);
}
unsafe impl ::windows::Interface for GameListChangedEventHandler {
type Vtable = GameListChangedEventHandler_abi;
const IID: ::windows::Guid = ::windows::Guid::from_values(
636920865,
55541,
19857,
[180, 14, 83, 213, 232, 111, 222, 100],
);
}
#[repr(C)]
#[doc(hidden)]
pub struct GameListChangedEventHandler_abi(
pub unsafe extern "system" fn(
this: ::windows::RawPtr,
iid: &::windows::Guid,
interface: *mut ::windows::RawPtr,
) -> ::windows::HRESULT,
pub unsafe extern "system" fn(this: ::windows::RawPtr) -> u32,
pub unsafe extern "system" fn(this: ::windows::RawPtr) -> u32,
pub unsafe extern "system" fn(
this: ::windows::RawPtr,
game: ::windows::RawPtr,
) -> ::windows::HRESULT,
);
#[repr(C)]
struct GameListChangedEventHandler_box<
F: FnMut(&::std::option::Option<GameListEntry>) -> ::windows::Result<()> + 'static,
> {
vtable: *const GameListChangedEventHandler_abi,
invoke: F,
count: ::windows::RefCount,
}
impl<
F: FnMut(&::std::option::Option<GameListEntry>) -> ::windows::Result<()> + 'static,
> GameListChangedEventHandler_box<F>
{
const VTABLE: GameListChangedEventHandler_abi = GameListChangedEventHandler_abi(
Self::QueryInterface,
Self::AddRef,
Self::Release,
Self::Invoke,
);
unsafe extern "system" fn QueryInterface(
this: ::windows::RawPtr,
iid: &::windows::Guid,
interface: *mut ::windows::RawPtr,
) -> ::windows::HRESULT {
let this = this as *mut ::windows::RawPtr as *mut Self;
*interface = if iid == &<GameListChangedEventHandler as ::windows::Interface>::IID
|| iid == &<::windows::IUnknown as ::windows::Interface>::IID
|| iid == &<::windows::IAgileObject as ::windows::Interface>::IID
{
&mut (*this).vtable as *mut _ as _
} else {
::std::ptr::null_mut()
};
if (*interface).is_null() {
::windows::HRESULT(0x8000_4002)
} else {
(*this).count.add_ref();
::windows::HRESULT(0)
}
}
unsafe extern "system" fn AddRef(this: ::windows::RawPtr) -> u32 {
let this = this as *mut ::windows::RawPtr as *mut Self;
(*this).count.add_ref()
}
unsafe extern "system" fn Release(this: ::windows::RawPtr) -> u32 {
let this = this as *mut ::windows::RawPtr as *mut Self;
let remaining = (*this).count.release();
if remaining == 0 {
Box::from_raw(this);
}
remaining
}
unsafe extern "system" fn Invoke(
this: ::windows::RawPtr,
game: ::windows::RawPtr,
) -> ::windows::HRESULT {
let this = this as *mut ::windows::RawPtr as *mut Self;
((*this).invoke)(
&*(&game as *const <GameListEntry as ::windows::Abi>::Abi
as *const <GameListEntry as ::windows::Abi>::DefaultType),
)
.into()
}
}
#[repr(transparent)]
#[derive(
:: std :: cmp :: PartialEq,
:: std :: cmp :: Eq,
:: std :: clone :: Clone,
:: std :: fmt :: Debug,
)]
pub struct GameListEntry(::windows::IInspectable);
impl GameListEntry {
pub fn DisplayInfo(
&self,
) -> ::windows::Result<::windows_applicationmodel::AppDisplayInfo> {
let this = self;
unsafe {
let mut result__: ::windows::RawPtr = ::std::mem::zeroed();
(::windows::Interface::vtable(this).6)(
::std::mem::transmute_copy(this),
&mut result__,
)
.from_abi::<::windows_applicationmodel::AppDisplayInfo>(result__)
}
}
pub fn LaunchAsync(
&self,
) -> ::windows::Result<::windows_foundation::IAsyncOperation<bool>> {
let this = self;
unsafe {
let mut result__: ::windows::RawPtr = ::std::mem::zeroed();
(::windows::Interface::vtable(this).7)(
::std::mem::transmute_copy(this),
&mut result__,
)
.from_abi::<::windows_foundation::IAsyncOperation<bool>>(result__)
}
}
pub fn Category(&self) -> ::windows::Result<GameListCategory> {
let this = self;
unsafe {
let mut result__: GameListCategory = ::std::mem::zeroed();
(::windows::Interface::vtable(this).8)(
::std::mem::transmute_copy(this),
&mut result__,
)
.from_abi::<GameListCategory>(result__)
}
}
pub fn Properties(
&self,
) -> ::windows::Result<
::windows_foundation::Collections::IMapView<
::windows::HSTRING,
::windows::IInspectable,
>,
> {
let this = self;
unsafe {
let mut result__: ::windows::RawPtr = ::std::mem::zeroed();
(::windows::Interface::vtable(this).9)(
::std::mem::transmute_copy(this),
&mut result__,
)
.from_abi::<::windows_foundation::Collections::IMapView<
::windows::HSTRING,
::windows::IInspectable,
>>(result__)
}
}
pub fn SetCategoryAsync(
&self,
value: GameListCategory,
) -> ::windows::Result<::windows_foundation::IAsyncAction> {
let this = self;
unsafe {
let mut result__: ::windows::RawPtr = ::std::mem::zeroed();
(::windows::Interface::vtable(this).10)(
::std::mem::transmute_copy(this),
value,
&mut result__,
)
.from_abi::<::windows_foundation::IAsyncAction>(result__)
}
}
pub fn LaunchableState(&self) -> ::windows::Result<GameListEntryLaunchableState> {
let this = &::windows::Interface::cast::<IGameListEntry2>(self)?;
unsafe {
let mut result__: GameListEntryLaunchableState = ::std::mem::zeroed();
(::windows::Interface::vtable(this).6)(
::std::mem::transmute_copy(this),
&mut result__,
)
.from_abi::<GameListEntryLaunchableState>(result__)
}
}
pub fn LauncherExecutable(&self) -> ::windows::Result<::windows_storage::IStorageFile> {
let this = &::windows::Interface::cast::<IGameListEntry2>(self)?;
unsafe {
let mut result__: ::windows::RawPtr = ::std::mem::zeroed();
(::windows::Interface::vtable(this).7)(
::std::mem::transmute_copy(this),
&mut result__,
)
.from_abi::<::windows_storage::IStorageFile>(result__)
}
}
pub fn LaunchParameters(&self) -> ::windows::Result<::windows::HSTRING> {
let this = &::windows::Interface::cast::<IGameListEntry2>(self)?;
unsafe {
let mut result__: ::std::mem::ManuallyDrop<::windows::HSTRING> =
::std::mem::zeroed();
(::windows::Interface::vtable(this).8)(
::std::mem::transmute_copy(this),
&mut result__,
)
.from_abi::<::windows::HSTRING>(result__)
}
}
pub fn SetLauncherExecutableFileAsync<
'a,
Param0: ::windows::IntoParam<'a, ::windows_storage::IStorageFile>,
>(
&self,
executablefile: Param0,
) -> ::windows::Result<::windows_foundation::IAsyncAction> {
let this = &::windows::Interface::cast::<IGameListEntry2>(self)?;
unsafe {
let mut result__: ::windows::RawPtr = ::std::mem::zeroed();
(::windows::Interface::vtable(this).9)(
::std::mem::transmute_copy(this),
executablefile.into_param().abi(),
&mut result__,
)
.from_abi::<::windows_foundation::IAsyncAction>(result__)
}
}
pub fn SetLauncherExecutableFileWithParamsAsync<
'a,
Param0: ::windows::IntoParam<'a, ::windows_storage::IStorageFile>,
Param1: ::windows::IntoParam<'a, ::windows::HSTRING>,
>(
&self,
executablefile: Param0,
launchparams: Param1,
) -> ::windows::Result<::windows_foundation::IAsyncAction> {
let this = &::windows::Interface::cast::<IGameListEntry2>(self)?;
unsafe {
let mut result__: ::windows::RawPtr = ::std::mem::zeroed();
(::windows::Interface::vtable(this).10)(
::std::mem::transmute_copy(this),
executablefile.into_param().abi(),
launchparams.into_param().abi(),
&mut result__,
)
.from_abi::<::windows_foundation::IAsyncAction>(result__)
}
}
pub fn TitleId(&self) -> ::windows::Result<::windows::HSTRING> {
let this = &::windows::Interface::cast::<IGameListEntry2>(self)?;
unsafe {
let mut result__: ::std::mem::ManuallyDrop<::windows::HSTRING> =
::std::mem::zeroed();
(::windows::Interface::vtable(this).11)(
::std::mem::transmute_copy(this),
&mut result__,
)
.from_abi::<::windows::HSTRING>(result__)
}
}
pub fn SetTitleIdAsync<'a, Param0: ::windows::IntoParam<'a, ::windows::HSTRING>>(
&self,
id: Param0,
) -> ::windows::Result<::windows_foundation::IAsyncAction> {
let this = &::windows::Interface::cast::<IGameListEntry2>(self)?;
unsafe {
let mut result__: ::windows::RawPtr = ::std::mem::zeroed();
(::windows::Interface::vtable(this).12)(
::std::mem::transmute_copy(this),
id.into_param().abi(),
&mut result__,
)
.from_abi::<::windows_foundation::IAsyncAction>(result__)
}
}
pub fn GameModeConfiguration(&self) -> ::windows::Result<GameModeConfiguration> {
let this = &::windows::Interface::cast::<IGameListEntry2>(self)?;
unsafe {
let mut result__: ::windows::RawPtr = ::std::mem::zeroed();
(::windows::Interface::vtable(this).13)(
::std::mem::transmute_copy(this),
&mut result__,
)
.from_abi::<GameModeConfiguration>(result__)
}
}
}
unsafe impl ::windows::RuntimeType for GameListEntry {
const SIGNATURE : :: windows :: ConstBuffer = :: windows :: ConstBuffer :: from_slice ( b"rc(Windows.Gaming.Preview.GamesEnumeration.GameListEntry;{735924d3-811f-4494-b69c-c641a0c61543})" ) ;
}
unsafe impl ::windows::Interface for GameListEntry {
type Vtable = IGameListEntry_abi;
const IID: ::windows::Guid = ::windows::Guid::from_values(
1935221971,
33055,
17556,
[182, 156, 198, 65, 160, 198, 21, 67],
);
}
impl ::windows::RuntimeName for GameListEntry {
const NAME: &'static str = "Windows.Gaming.Preview.GamesEnumeration.GameListEntry";
}
impl ::std::convert::From<GameListEntry> for ::windows::IUnknown {
fn from(value: GameListEntry) -> Self {
unsafe { ::std::mem::transmute(value) }
}
}
impl ::std::convert::From<&GameListEntry> for ::windows::IUnknown {
fn from(value: &GameListEntry) -> Self {
::std::convert::From::from(::std::clone::Clone::clone(value))
}
}
impl<'a> ::windows::IntoParam<'a, ::windows::IUnknown> for GameListEntry {
fn into_param(self) -> ::windows::Param<'a, ::windows::IUnknown> {
::windows::Param::Owned(::std::convert::Into::<::windows::IUnknown>::into(self))
}
}
impl<'a> ::windows::IntoParam<'a, ::windows::IUnknown> for &GameListEntry {
fn into_param(self) -> ::windows::Param<'a, ::windows::IUnknown> {
::windows::Param::Owned(::std::convert::Into::<::windows::IUnknown>::into(
::std::clone::Clone::clone(self),
))
}
}
impl ::std::convert::From<GameListEntry> for ::windows::IInspectable {
fn from(value: GameListEntry) -> Self {
value.0
}
}
impl ::std::convert::From<&GameListEntry> for ::windows::IInspectable {
fn from(value: &GameListEntry) -> Self {
value.0.clone()
}
}
impl<'a> ::windows::IntoParam<'a, ::windows::IInspectable> for GameListEntry {
fn into_param(self) -> ::windows::Param<'a, ::windows::IInspectable> {
::windows::Param::Owned(self.0)
}
}
impl<'a> ::windows::IntoParam<'a, ::windows::IInspectable> for &'a GameListEntry {
fn into_param(self) -> ::windows::Param<'a, ::windows::IInspectable> {
::windows::Param::Borrowed(&self.0)
}
}
impl ::std::convert::From<GameListEntry> for IGameListEntry {
fn from(value: GameListEntry) -> Self {
unsafe { ::std::mem::transmute(value) }
}
}
impl ::std::convert::From<&GameListEntry> for IGameListEntry {
fn from(value: &GameListEntry) -> Self {
::std::convert::From::from(::std::clone::Clone::clone(value))
}
}
impl<'a> ::windows::IntoParam<'a, IGameListEntry> for GameListEntry {
fn into_param(self) -> ::windows::Param<'a, IGameListEntry> {
::windows::Param::Owned(::std::convert::Into::<IGameListEntry>::into(self))
}
}
impl<'a> ::windows::IntoParam<'a, IGameListEntry> for &GameListEntry {
fn into_param(self) -> ::windows::Param<'a, IGameListEntry> {
::windows::Param::Owned(::std::convert::Into::<IGameListEntry>::into(
::std::clone::Clone::clone(self),
))
}
}
unsafe impl ::std::marker::Send for GameListEntry {}
unsafe impl ::std::marker::Sync for GameListEntry {}
#[derive(
:: std :: cmp :: PartialEq,
:: std :: cmp :: Eq,
:: std :: marker :: Copy,
:: std :: clone :: Clone,
:: std :: default :: Default,
:: std :: fmt :: Debug,
)]
#[repr(transparent)]
pub struct GameListEntryLaunchableState(pub i32);
impl GameListEntryLaunchableState {
pub const NotLaunchable: GameListEntryLaunchableState =
GameListEntryLaunchableState(0i32);
pub const ByLastRunningFullPath: GameListEntryLaunchableState =
GameListEntryLaunchableState(1i32);
pub const ByUserProvidedPath: GameListEntryLaunchableState =
GameListEntryLaunchableState(2i32);
pub const ByTile: GameListEntryLaunchableState = GameListEntryLaunchableState(3i32);
}
impl ::std::convert::From<i32> for GameListEntryLaunchableState {
fn from(value: i32) -> Self {
Self(value)
}
}
unsafe impl ::windows::Abi for GameListEntryLaunchableState {
type Abi = Self;
type DefaultType = Self;
}
unsafe impl ::windows::RuntimeType for GameListEntryLaunchableState {
const SIGNATURE: ::windows::ConstBuffer = ::windows::ConstBuffer::from_slice(
b"enum(Windows.Gaming.Preview.GamesEnumeration.GameListEntryLaunchableState;i4)",
);
}
#[repr(transparent)]
#[derive(
:: std :: cmp :: PartialEq,
:: std :: cmp :: Eq,
:: std :: clone :: Clone,
:: std :: fmt :: Debug,
)]
pub struct GameListRemovedEventHandler(::windows::IUnknown);
impl GameListRemovedEventHandler {
pub fn new<F: FnMut(&::windows::HSTRING) -> ::windows::Result<()> + 'static>(
invoke: F,
) -> Self {
let com = GameListRemovedEventHandler_box::<F> {
vtable: &GameListRemovedEventHandler_box::<F>::VTABLE,
count: ::windows::RefCount::new(1),
invoke,
};
unsafe { std::mem::transmute(::std::boxed::Box::new(com)) }
}
pub fn Invoke<'a, Param0: ::windows::IntoParam<'a, ::windows::HSTRING>>(
&self,
identifier: Param0,
) -> ::windows::Result<()> {
let this = self;
unsafe {
(::windows::Interface::vtable(this).3)(
::std::mem::transmute_copy(this),
identifier.into_param().abi(),
)
.ok()
}
}
}
unsafe impl ::windows::RuntimeType for GameListRemovedEventHandler {
const SIGNATURE: ::windows::ConstBuffer = ::windows::ConstBuffer::from_slice(
b"delegate({10c5648f-6c8f-4712-9b38-474bc22e76d8})",
);
}
unsafe impl ::windows::Interface for GameListRemovedEventHandler {
type Vtable = GameListRemovedEventHandler_abi;
const IID: ::windows::Guid = ::windows::Guid::from_values(
281371791,
27791,
18194,
[155, 56, 71, 75, 194, 46, 118, 216],
);
}
#[repr(C)]
#[doc(hidden)]
pub struct GameListRemovedEventHandler_abi(
pub unsafe extern "system" fn(
this: ::windows::RawPtr,
iid: &::windows::Guid,
interface: *mut ::windows::RawPtr,
) -> ::windows::HRESULT,
pub unsafe extern "system" fn(this: ::windows::RawPtr) -> u32,
pub unsafe extern "system" fn(this: ::windows::RawPtr) -> u32,
pub unsafe extern "system" fn(
this: ::windows::RawPtr,
identifier: ::std::mem::ManuallyDrop<::windows::HSTRING>,
) -> ::windows::HRESULT,
);
#[repr(C)]
struct GameListRemovedEventHandler_box<
F: FnMut(&::windows::HSTRING) -> ::windows::Result<()> + 'static,
> {
vtable: *const GameListRemovedEventHandler_abi,
invoke: F,
count: ::windows::RefCount,
}
impl<F: FnMut(&::windows::HSTRING) -> ::windows::Result<()> + 'static>
GameListRemovedEventHandler_box<F>
{
const VTABLE: GameListRemovedEventHandler_abi = GameListRemovedEventHandler_abi(
Self::QueryInterface,
Self::AddRef,
Self::Release,
Self::Invoke,
);
unsafe extern "system" fn QueryInterface(
this: ::windows::RawPtr,
iid: &::windows::Guid,
interface: *mut ::windows::RawPtr,
) -> ::windows::HRESULT {
let this = this as *mut ::windows::RawPtr as *mut Self;
*interface = if iid == &<GameListRemovedEventHandler as ::windows::Interface>::IID
|| iid == &<::windows::IUnknown as ::windows::Interface>::IID
|| iid == &<::windows::IAgileObject as ::windows::Interface>::IID
{
&mut (*this).vtable as *mut _ as _
} else {
::std::ptr::null_mut()
};
if (*interface).is_null() {
::windows::HRESULT(0x8000_4002)
} else {
(*this).count.add_ref();
::windows::HRESULT(0)
}
}
unsafe extern "system" fn AddRef(this: ::windows::RawPtr) -> u32 {
let this = this as *mut ::windows::RawPtr as *mut Self;
(*this).count.add_ref()
}
unsafe extern "system" fn Release(this: ::windows::RawPtr) -> u32 {
let this = this as *mut ::windows::RawPtr as *mut Self;
let remaining = (*this).count.release();
if remaining == 0 {
Box::from_raw(this);
}
remaining
}
unsafe extern "system" fn Invoke(
this: ::windows::RawPtr,
identifier: ::std::mem::ManuallyDrop<::windows::HSTRING>,
) -> ::windows::HRESULT {
let this = this as *mut ::windows::RawPtr as *mut Self;
((*this).invoke)(
&*(&identifier as *const <::windows::HSTRING as ::windows::Abi>::Abi
as *const <::windows::HSTRING as ::windows::Abi>::DefaultType),
)
.into()
}
}
#[repr(transparent)]
#[derive(
:: std :: cmp :: PartialEq,
:: std :: cmp :: Eq,
:: std :: clone :: Clone,
:: std :: fmt :: Debug,
)]
pub struct GameModeConfiguration(::windows::IInspectable);
impl GameModeConfiguration {
pub fn IsEnabled(&self) -> ::windows::Result<bool> {
let this = self;
unsafe {
let mut result__: bool = ::std::mem::zeroed();
(::windows::Interface::vtable(this).6)(
::std::mem::transmute_copy(this),
&mut result__,
)
.from_abi::<bool>(result__)
}
}
pub fn SetIsEnabled(&self, value: bool) -> ::windows::Result<()> {
let this = self;
unsafe {
(::windows::Interface::vtable(this).7)(::std::mem::transmute_copy(this), value)
.ok()
}
}
pub fn RelatedProcessNames(
&self,
) -> ::windows::Result<::windows_foundation::Collections::IVector<::windows::HSTRING>>
{
let this = self;
unsafe {
let mut result__: ::windows::RawPtr = ::std::mem::zeroed();
(::windows::Interface::vtable(this).8)(
::std::mem::transmute_copy(this),
&mut result__,
)
.from_abi::<::windows_foundation::Collections::IVector<
::windows::HSTRING,
>>(result__)
}
}
pub fn PercentGpuTimeAllocatedToGame(
&self,
) -> ::windows::Result<::windows_foundation::IReference<i32>> {
let this = self;
unsafe {
let mut result__: ::windows::RawPtr = ::std::mem::zeroed();
(::windows::Interface::vtable(this).9)(
::std::mem::transmute_copy(this),
&mut result__,
)
.from_abi::<::windows_foundation::IReference<i32>>(result__)
}
}
pub fn SetPercentGpuTimeAllocatedToGame<
'a,
Param0: ::windows::IntoParam<'a, ::windows_foundation::IReference<i32>>,
>(
&self,
value: Param0,
) -> ::windows::Result<()> {
let this = self;
unsafe {
(::windows::Interface::vtable(this).10)(
::std::mem::transmute_copy(this),
value.into_param().abi(),
)
.ok()
}
}
pub fn PercentGpuMemoryAllocatedToGame(
&self,
) -> ::windows::Result<::windows_foundation::IReference<i32>> {
let this = self;
unsafe {
let mut result__: ::windows::RawPtr = ::std::mem::zeroed();
(::windows::Interface::vtable(this).11)(
::std::mem::transmute_copy(this),
&mut result__,
)
.from_abi::<::windows_foundation::IReference<i32>>(result__)
}
}
pub fn SetPercentGpuMemoryAllocatedToGame<
'a,
Param0: ::windows::IntoParam<'a, ::windows_foundation::IReference<i32>>,
>(
&self,
value: Param0,
) -> ::windows::Result<()> {
let this = self;
unsafe {
(::windows::Interface::vtable(this).12)(
::std::mem::transmute_copy(this),
value.into_param().abi(),
)
.ok()
}
}
pub fn PercentGpuMemoryAllocatedToSystemCompositor(
&self,
) -> ::windows::Result<::windows_foundation::IReference<i32>> {
let this = self;
unsafe {
let mut result__: ::windows::RawPtr = ::std::mem::zeroed();
(::windows::Interface::vtable(this).13)(
::std::mem::transmute_copy(this),
&mut result__,
)
.from_abi::<::windows_foundation::IReference<i32>>(result__)
}
}
pub fn SetPercentGpuMemoryAllocatedToSystemCompositor<
'a,
Param0: ::windows::IntoParam<'a, ::windows_foundation::IReference<i32>>,
>(
&self,
value: Param0,
) -> ::windows::Result<()> {
let this = self;
unsafe {
(::windows::Interface::vtable(this).14)(
::std::mem::transmute_copy(this),
value.into_param().abi(),
)
.ok()
}
}
pub fn MaxCpuCount(&self) -> ::windows::Result<::windows_foundation::IReference<i32>> {
let this = self;
unsafe {
let mut result__: ::windows::RawPtr = ::std::mem::zeroed();
(::windows::Interface::vtable(this).15)(
::std::mem::transmute_copy(this),
&mut result__,
)
.from_abi::<::windows_foundation::IReference<i32>>(result__)
}
}
pub fn SetMaxCpuCount<
'a,
Param0: ::windows::IntoParam<'a, ::windows_foundation::IReference<i32>>,
>(
&self,
value: Param0,
) -> ::windows::Result<()> {
let this = self;
unsafe {
(::windows::Interface::vtable(this).16)(
::std::mem::transmute_copy(this),
value.into_param().abi(),
)
.ok()
}
}
pub fn CpuExclusivityMaskLow(
&self,
) -> ::windows::Result<::windows_foundation::IReference<i32>> {
let this = self;
unsafe {
let mut result__: ::windows::RawPtr = ::std::mem::zeroed();
(::windows::Interface::vtable(this).17)(
::std::mem::transmute_copy(this),
&mut result__,
)
.from_abi::<::windows_foundation::IReference<i32>>(result__)
}
}
pub fn SetCpuExclusivityMaskLow<
'a,
Param0: ::windows::IntoParam<'a, ::windows_foundation::IReference<i32>>,
>(
&self,
value: Param0,
) -> ::windows::Result<()> {
let this = self;
unsafe {
(::windows::Interface::vtable(this).18)(
::std::mem::transmute_copy(this),
value.into_param().abi(),
)
.ok()
}
}
pub fn CpuExclusivityMaskHigh(
&self,
) -> ::windows::Result<::windows_foundation::IReference<i32>> {
let this = self;
unsafe {
let mut result__: ::windows::RawPtr = ::std::mem::zeroed();
(::windows::Interface::vtable(this).19)(
::std::mem::transmute_copy(this),
&mut result__,
)
.from_abi::<::windows_foundation::IReference<i32>>(result__)
}
}
pub fn SetCpuExclusivityMaskHigh<
'a,
Param0: ::windows::IntoParam<'a, ::windows_foundation::IReference<i32>>,
>(
&self,
value: Param0,
) -> ::windows::Result<()> {
let this = self;
unsafe {
(::windows::Interface::vtable(this).20)(
::std::mem::transmute_copy(this),
value.into_param().abi(),
)
.ok()
}
}
pub fn AffinitizeToExclusiveCpus(&self) -> ::windows::Result<bool> {
let this = self;
unsafe {
let mut result__: bool = ::std::mem::zeroed();
(::windows::Interface::vtable(this).21)(
::std::mem::transmute_copy(this),
&mut result__,
)
.from_abi::<bool>(result__)
}
}
pub fn SetAffinitizeToExclusiveCpus(&self, value: bool) -> ::windows::Result<()> {
let this = self;
unsafe {
(::windows::Interface::vtable(this).22)(::std::mem::transmute_copy(this), value)
.ok()
}
}
pub fn SaveAsync(&self) -> ::windows::Result<::windows_foundation::IAsyncAction> {
let this = self;
unsafe {
let mut result__: ::windows::RawPtr = ::std::mem::zeroed();
(::windows::Interface::vtable(this).23)(
::std::mem::transmute_copy(this),
&mut result__,
)
.from_abi::<::windows_foundation::IAsyncAction>(result__)
}
}
}
unsafe impl ::windows::RuntimeType for GameModeConfiguration {
const SIGNATURE : :: windows :: ConstBuffer = :: windows :: ConstBuffer :: from_slice ( b"rc(Windows.Gaming.Preview.GamesEnumeration.GameModeConfiguration;{78e591af-b142-4ef0-8830-55bc2be4f5ea})" ) ;
}
unsafe impl ::windows::Interface for GameModeConfiguration {
type Vtable = IGameModeConfiguration_abi;
const IID: ::windows::Guid = ::windows::Guid::from_values(
2028310959,
45378,
20208,
[136, 48, 85, 188, 43, 228, 245, 234],
);
}
impl ::windows::RuntimeName for GameModeConfiguration {
const NAME: &'static str =
"Windows.Gaming.Preview.GamesEnumeration.GameModeConfiguration";
}
impl ::std::convert::From<GameModeConfiguration> for ::windows::IUnknown {
fn from(value: GameModeConfiguration) -> Self {
unsafe { ::std::mem::transmute(value) }
}
}
impl ::std::convert::From<&GameModeConfiguration> for ::windows::IUnknown {
fn from(value: &GameModeConfiguration) -> Self {
::std::convert::From::from(::std::clone::Clone::clone(value))
}
}
impl<'a> ::windows::IntoParam<'a, ::windows::IUnknown> for GameModeConfiguration {
fn into_param(self) -> ::windows::Param<'a, ::windows::IUnknown> {
::windows::Param::Owned(::std::convert::Into::<::windows::IUnknown>::into(self))
}
}
impl<'a> ::windows::IntoParam<'a, ::windows::IUnknown> for &GameModeConfiguration {
fn into_param(self) -> ::windows::Param<'a, ::windows::IUnknown> {
::windows::Param::Owned(::std::convert::Into::<::windows::IUnknown>::into(
::std::clone::Clone::clone(self),
))
}
}
impl ::std::convert::From<GameModeConfiguration> for ::windows::IInspectable {
fn from(value: GameModeConfiguration) -> Self {
value.0
}
}
impl ::std::convert::From<&GameModeConfiguration> for ::windows::IInspectable {
fn from(value: &GameModeConfiguration) -> Self {
value.0.clone()
}
}
impl<'a> ::windows::IntoParam<'a, ::windows::IInspectable> for GameModeConfiguration {
fn into_param(self) -> ::windows::Param<'a, ::windows::IInspectable> {
::windows::Param::Owned(self.0)
}
}
impl<'a> ::windows::IntoParam<'a, ::windows::IInspectable> for &'a GameModeConfiguration {
fn into_param(self) -> ::windows::Param<'a, ::windows::IInspectable> {
::windows::Param::Borrowed(&self.0)
}
}
unsafe impl ::std::marker::Send for GameModeConfiguration {}
unsafe impl ::std::marker::Sync for GameModeConfiguration {}
#[repr(transparent)]
#[derive(
:: std :: cmp :: PartialEq,
:: std :: cmp :: Eq,
:: std :: clone :: Clone,
:: std :: fmt :: Debug,
)]
pub struct GameModeUserConfiguration(::windows::IInspectable);
impl GameModeUserConfiguration {
pub fn GamingRelatedProcessNames(
&self,
) -> ::windows::Result<::windows_foundation::Collections::IVector<::windows::HSTRING>>
{
let this = self;
unsafe {
let mut result__: ::windows::RawPtr = ::std::mem::zeroed();
(::windows::Interface::vtable(this).6)(
::std::mem::transmute_copy(this),
&mut result__,
)
.from_abi::<::windows_foundation::Collections::IVector<
::windows::HSTRING,
>>(result__)
}
}
pub fn SaveAsync(&self) -> ::windows::Result<::windows_foundation::IAsyncAction> {
let this = self;
unsafe {
let mut result__: ::windows::RawPtr = ::std::mem::zeroed();
(::windows::Interface::vtable(this).7)(
::std::mem::transmute_copy(this),
&mut result__,
)
.from_abi::<::windows_foundation::IAsyncAction>(result__)
}
}
pub fn GetDefault() -> ::windows::Result<GameModeUserConfiguration> {
Self::IGameModeUserConfigurationStatics(|this| unsafe {
let mut result__: ::windows::RawPtr = ::std::mem::zeroed();
(::windows::Interface::vtable(this).6)(
::std::mem::transmute_copy(this),
&mut result__,
)
.from_abi::<GameModeUserConfiguration>(result__)
})
}
pub fn IGameModeUserConfigurationStatics<
R,
F: FnOnce(&IGameModeUserConfigurationStatics) -> ::windows::Result<R>,
>(
callback: F,
) -> ::windows::Result<R> {
static mut SHARED: ::windows::FactoryCache<
GameModeUserConfiguration,
IGameModeUserConfigurationStatics,
> = ::windows::FactoryCache::new();
unsafe { SHARED.call(callback) }
}
}
unsafe impl ::windows::RuntimeType for GameModeUserConfiguration {
const SIGNATURE : :: windows :: ConstBuffer = :: windows :: ConstBuffer :: from_slice ( b"rc(Windows.Gaming.Preview.GamesEnumeration.GameModeUserConfiguration;{72d34af4-756b-470f-a0c2-ba62a90795db})" ) ;
}
unsafe impl ::windows::Interface for GameModeUserConfiguration {
type Vtable = IGameModeUserConfiguration_abi;
const IID: ::windows::Guid = ::windows::Guid::from_values(
1926449908,
30059,
18191,
[160, 194, 186, 98, 169, 7, 149, 219],
);
}
impl ::windows::RuntimeName for GameModeUserConfiguration {
const NAME: &'static str =
"Windows.Gaming.Preview.GamesEnumeration.GameModeUserConfiguration";
}
impl ::std::convert::From<GameModeUserConfiguration> for ::windows::IUnknown {
fn from(value: GameModeUserConfiguration) -> Self {
unsafe { ::std::mem::transmute(value) }
}
}
impl ::std::convert::From<&GameModeUserConfiguration> for ::windows::IUnknown {
fn from(value: &GameModeUserConfiguration) -> Self {
::std::convert::From::from(::std::clone::Clone::clone(value))
}
}
impl<'a> ::windows::IntoParam<'a, ::windows::IUnknown> for GameModeUserConfiguration {
fn into_param(self) -> ::windows::Param<'a, ::windows::IUnknown> {
::windows::Param::Owned(::std::convert::Into::<::windows::IUnknown>::into(self))
}
}
impl<'a> ::windows::IntoParam<'a, ::windows::IUnknown> for &GameModeUserConfiguration {
fn into_param(self) -> ::windows::Param<'a, ::windows::IUnknown> {
::windows::Param::Owned(::std::convert::Into::<::windows::IUnknown>::into(
::std::clone::Clone::clone(self),
))
}
}
impl ::std::convert::From<GameModeUserConfiguration> for ::windows::IInspectable {
fn from(value: GameModeUserConfiguration) -> Self {
value.0
}
}
impl ::std::convert::From<&GameModeUserConfiguration> for ::windows::IInspectable {
fn from(value: &GameModeUserConfiguration) -> Self {
value.0.clone()
}
}
impl<'a> ::windows::IntoParam<'a, ::windows::IInspectable> for GameModeUserConfiguration {
fn into_param(self) -> ::windows::Param<'a, ::windows::IInspectable> {
::windows::Param::Owned(self.0)
}
}
impl<'a> ::windows::IntoParam<'a, ::windows::IInspectable> for &'a GameModeUserConfiguration {
fn into_param(self) -> ::windows::Param<'a, ::windows::IInspectable> {
::windows::Param::Borrowed(&self.0)
}
}
unsafe impl ::std::marker::Send for GameModeUserConfiguration {}
unsafe impl ::std::marker::Sync for GameModeUserConfiguration {}
#[repr(transparent)]
#[derive(
:: std :: cmp :: PartialEq,
:: std :: cmp :: Eq,
:: std :: clone :: Clone,
:: std :: fmt :: Debug,
)]
pub struct IGameListEntry(::windows::IInspectable);
unsafe impl ::windows::Interface for IGameListEntry {
type Vtable = IGameListEntry_abi;
const IID: ::windows::Guid = ::windows::Guid::from_values(
1935221971,
33055,
17556,
[182, 156, 198, 65, 160, 198, 21, 67],
);
}
impl IGameListEntry {
pub fn DisplayInfo(
&self,
) -> ::windows::Result<::windows_applicationmodel::AppDisplayInfo> {
let this = self;
unsafe {
let mut result__: ::windows::RawPtr = ::std::mem::zeroed();
(::windows::Interface::vtable(this).6)(
::std::mem::transmute_copy(this),
&mut result__,
)
.from_abi::<::windows_applicationmodel::AppDisplayInfo>(result__)
}
}
pub fn LaunchAsync(
&self,
) -> ::windows::Result<::windows_foundation::IAsyncOperation<bool>> {
let this = self;
unsafe {
let mut result__: ::windows::RawPtr = ::std::mem::zeroed();
(::windows::Interface::vtable(this).7)(
::std::mem::transmute_copy(this),
&mut result__,
)
.from_abi::<::windows_foundation::IAsyncOperation<bool>>(result__)
}
}
pub fn Category(&self) -> ::windows::Result<GameListCategory> {
let this = self;
unsafe {
let mut result__: GameListCategory = ::std::mem::zeroed();
(::windows::Interface::vtable(this).8)(
::std::mem::transmute_copy(this),
&mut result__,
)
.from_abi::<GameListCategory>(result__)
}
}
pub fn Properties(
&self,
) -> ::windows::Result<
::windows_foundation::Collections::IMapView<
::windows::HSTRING,
::windows::IInspectable,
>,
> {
let this = self;
unsafe {
let mut result__: ::windows::RawPtr = ::std::mem::zeroed();
(::windows::Interface::vtable(this).9)(
::std::mem::transmute_copy(this),
&mut result__,
)
.from_abi::<::windows_foundation::Collections::IMapView<
::windows::HSTRING,
::windows::IInspectable,
>>(result__)
}
}
pub fn SetCategoryAsync(
&self,
value: GameListCategory,
) -> ::windows::Result<::windows_foundation::IAsyncAction> {
let this = self;
unsafe {
let mut result__: ::windows::RawPtr = ::std::mem::zeroed();
(::windows::Interface::vtable(this).10)(
::std::mem::transmute_copy(this),
value,
&mut result__,
)
.from_abi::<::windows_foundation::IAsyncAction>(result__)
}
}
}
unsafe impl ::windows::RuntimeType for IGameListEntry {
const SIGNATURE: ::windows::ConstBuffer =
::windows::ConstBuffer::from_slice(b"{735924d3-811f-4494-b69c-c641a0c61543}");
}
impl ::std::convert::From<IGameListEntry> for ::windows::IUnknown {
fn from(value: IGameListEntry) -> Self {
unsafe { ::std::mem::transmute(value) }
}
}
impl ::std::convert::From<&IGameListEntry> for ::windows::IUnknown {
fn from(value: &IGameListEntry) -> Self {
::std::convert::From::from(::std::clone::Clone::clone(value))
}
}
impl<'a> ::windows::IntoParam<'a, ::windows::IUnknown> for IGameListEntry {
fn into_param(self) -> ::windows::Param<'a, ::windows::IUnknown> {
::windows::Param::Owned(::std::convert::Into::<::windows::IUnknown>::into(self))
}
}
impl<'a> ::windows::IntoParam<'a, ::windows::IUnknown> for &IGameListEntry {
fn into_param(self) -> ::windows::Param<'a, ::windows::IUnknown> {
::windows::Param::Owned(::std::convert::Into::<::windows::IUnknown>::into(
::std::clone::Clone::clone(self),
))
}
}
impl ::std::convert::From<IGameListEntry> for ::windows::IInspectable {
fn from(value: IGameListEntry) -> Self {
value.0
}
}
impl ::std::convert::From<&IGameListEntry> for ::windows::IInspectable {
fn from(value: &IGameListEntry) -> Self {
value.0.clone()
}
}
impl<'a> ::windows::IntoParam<'a, ::windows::IInspectable> for IGameListEntry {
fn into_param(self) -> ::windows::Param<'a, ::windows::IInspectable> {
::windows::Param::Owned(self.0)
}
}
impl<'a> ::windows::IntoParam<'a, ::windows::IInspectable> for &'a IGameListEntry {
fn into_param(self) -> ::windows::Param<'a, ::windows::IInspectable> {
::windows::Param::Borrowed(&self.0)
}
}
#[repr(C)]
#[doc(hidden)]
pub struct IGameListEntry_abi(
pub unsafe extern "system" fn(
this: ::windows::RawPtr,
iid: &::windows::Guid,
interface: *mut ::windows::RawPtr,
) -> ::windows::HRESULT,
pub unsafe extern "system" fn(this: ::windows::RawPtr) -> u32,
pub unsafe extern "system" fn(this: ::windows::RawPtr) -> u32,
pub unsafe extern "system" fn(
this: ::windows::RawPtr,
count: *mut u32,
values: *mut *mut ::windows::Guid,
) -> ::windows::HRESULT,
pub unsafe extern "system" fn(
this: ::windows::RawPtr,
value: *mut ::windows::RawPtr,
) -> ::windows::HRESULT,
pub unsafe extern "system" fn(
this: ::windows::RawPtr,
value: *mut i32,
) -> ::windows::HRESULT,
pub unsafe extern "system" fn(
this: ::windows::RawPtr,
result__: *mut ::windows::RawPtr,
) -> ::windows::HRESULT,
pub unsafe extern "system" fn(
this: ::windows::RawPtr,
result__: *mut ::windows::RawPtr,
) -> ::windows::HRESULT,
pub unsafe extern "system" fn(
this: ::windows::RawPtr,
result__: *mut GameListCategory,
) -> ::windows::HRESULT,
pub unsafe extern "system" fn(
this: ::windows::RawPtr,
result__: *mut ::windows::RawPtr,
) -> ::windows::HRESULT,
pub unsafe extern "system" fn(
this: ::windows::RawPtr,
value: GameListCategory,
result__: *mut ::windows::RawPtr,
) -> ::windows::HRESULT,
);
#[repr(transparent)]
#[derive(
:: std :: cmp :: PartialEq,
:: std :: cmp :: Eq,
:: std :: clone :: Clone,
:: std :: fmt :: Debug,
)]
#[doc(hidden)]
pub struct IGameListEntry2(::windows::IInspectable);
unsafe impl ::windows::Interface for IGameListEntry2 {
type Vtable = IGameListEntry2_abi;
const IID: ::windows::Guid = ::windows::Guid::from_values(
3628765067,
34633,
18981,
[144, 211, 246, 197, 164, 39, 136, 109],
);
}
#[repr(C)]
#[doc(hidden)]
pub struct IGameListEntry2_abi(
pub unsafe extern "system" fn(
this: ::windows::RawPtr,
iid: &::windows::Guid,
interface: *mut ::windows::RawPtr,
) -> ::windows::HRESULT,
pub unsafe extern "system" fn(this: ::windows::RawPtr) -> u32,
pub unsafe extern "system" fn(this: ::windows::RawPtr) -> u32,
pub unsafe extern "system" fn(
this: ::windows::RawPtr,
count: *mut u32,
values: *mut *mut ::windows::Guid,
) -> ::windows::HRESULT,
pub unsafe extern "system" fn(
this: ::windows::RawPtr,
value: *mut ::windows::RawPtr,
) -> ::windows::HRESULT,
pub unsafe extern "system" fn(
this: ::windows::RawPtr,
value: *mut i32,
) -> ::windows::HRESULT,
pub unsafe extern "system" fn(
this: ::windows::RawPtr,
result__: *mut GameListEntryLaunchableState,
) -> ::windows::HRESULT,
pub unsafe extern "system" fn(
this: ::windows::RawPtr,
result__: *mut ::windows::RawPtr,
) -> ::windows::HRESULT,
pub unsafe extern "system" fn(
this: ::windows::RawPtr,
result__: *mut ::std::mem::ManuallyDrop<::windows::HSTRING>,
) -> ::windows::HRESULT,
pub unsafe extern "system" fn(
this: ::windows::RawPtr,
executablefile: ::windows::RawPtr,
result__: *mut ::windows::RawPtr,
) -> ::windows::HRESULT,
pub unsafe extern "system" fn(
this: ::windows::RawPtr,
executablefile: ::windows::RawPtr,
launchparams: ::std::mem::ManuallyDrop<::windows::HSTRING>,
result__: *mut ::windows::RawPtr,
) -> ::windows::HRESULT,
pub unsafe extern "system" fn(
this: ::windows::RawPtr,
result__: *mut ::std::mem::ManuallyDrop<::windows::HSTRING>,
) -> ::windows::HRESULT,
pub unsafe extern "system" fn(
this: ::windows::RawPtr,
id: ::std::mem::ManuallyDrop<::windows::HSTRING>,
result__: *mut ::windows::RawPtr,
) -> ::windows::HRESULT,
pub unsafe extern "system" fn(
this: ::windows::RawPtr,
result__: *mut ::windows::RawPtr,
) -> ::windows::HRESULT,
);
#[repr(transparent)]
#[derive(
:: std :: cmp :: PartialEq,
:: std :: cmp :: Eq,
:: std :: clone :: Clone,
:: std :: fmt :: Debug,
)]
#[doc(hidden)]
pub struct IGameListStatics(::windows::IInspectable);
unsafe impl ::windows::Interface for IGameListStatics {
type Vtable = IGameListStatics_abi;
const IID: ::windows::Guid = ::windows::Guid::from_values(
769462127,
40038,
19205,
[148, 92, 214, 237, 120, 73, 27, 140],
);
}
#[repr(C)]
#[doc(hidden)]
pub struct IGameListStatics_abi(
pub unsafe extern "system" fn(
this: ::windows::RawPtr,
iid: &::windows::Guid,
interface: *mut ::windows::RawPtr,
) -> ::windows::HRESULT,
pub unsafe extern "system" fn(this: ::windows::RawPtr) -> u32,
pub unsafe extern "system" fn(this: ::windows::RawPtr) -> u32,
pub unsafe extern "system" fn(
this: ::windows::RawPtr,
count: *mut u32,
values: *mut *mut ::windows::Guid,
) -> ::windows::HRESULT,
pub unsafe extern "system" fn(
this: ::windows::RawPtr,
value: *mut ::windows::RawPtr,
) -> ::windows::HRESULT,
pub unsafe extern "system" fn(
this: ::windows::RawPtr,
value: *mut i32,
) -> ::windows::HRESULT,
pub unsafe extern "system" fn(
this: ::windows::RawPtr,
result__: *mut ::windows::RawPtr,
) -> ::windows::HRESULT,
pub unsafe extern "system" fn(
this: ::windows::RawPtr,
packagefamilyname: ::std::mem::ManuallyDrop<::windows::HSTRING>,
result__: *mut ::windows::RawPtr,
) -> ::windows::HRESULT,
pub unsafe extern "system" fn(
this: ::windows::RawPtr,
handler: ::windows::RawPtr,
result__: *mut ::windows_foundation::EventRegistrationToken,
) -> ::windows::HRESULT,
pub unsafe extern "system" fn(
this: ::windows::RawPtr,
token: ::windows_foundation::EventRegistrationToken,
) -> ::windows::HRESULT,
pub unsafe extern "system" fn(
this: ::windows::RawPtr,
handler: ::windows::RawPtr,
result__: *mut ::windows_foundation::EventRegistrationToken,
) -> ::windows::HRESULT,
pub unsafe extern "system" fn(
this: ::windows::RawPtr,
token: ::windows_foundation::EventRegistrationToken,
) -> ::windows::HRESULT,
pub unsafe extern "system" fn(
this: ::windows::RawPtr,
handler: ::windows::RawPtr,
result__: *mut ::windows_foundation::EventRegistrationToken,
) -> ::windows::HRESULT,
pub unsafe extern "system" fn(
this: ::windows::RawPtr,
token: ::windows_foundation::EventRegistrationToken,
) -> ::windows::HRESULT,
);
#[repr(transparent)]
#[derive(
:: std :: cmp :: PartialEq,
:: std :: cmp :: Eq,
:: std :: clone :: Clone,
:: std :: fmt :: Debug,
)]
#[doc(hidden)]
pub struct IGameListStatics2(::windows::IInspectable);
unsafe impl ::windows::Interface for IGameListStatics2 {
type Vtable = IGameListStatics2_abi;
const IID: ::windows::Guid = ::windows::Guid::from_values(
962535576,
59930,
17834,
[146, 104, 168, 57, 5, 104, 111, 39],
);
}
#[repr(C)]
#[doc(hidden)]
pub struct IGameListStatics2_abi(
pub unsafe extern "system" fn(
this: ::windows::RawPtr,
iid: &::windows::Guid,
interface: *mut ::windows::RawPtr,
) -> ::windows::HRESULT,
pub unsafe extern "system" fn(this: ::windows::RawPtr) -> u32,
pub unsafe extern "system" fn(this: ::windows::RawPtr) -> u32,
pub unsafe extern "system" fn(
this: ::windows::RawPtr,
count: *mut u32,
values: *mut *mut ::windows::Guid,
) -> ::windows::HRESULT,
pub unsafe extern "system" fn(
this: ::windows::RawPtr,
value: *mut ::windows::RawPtr,
) -> ::windows::HRESULT,
pub unsafe extern "system" fn(
this: ::windows::RawPtr,
value: *mut i32,
) -> ::windows::HRESULT,
pub unsafe extern "system" fn(
this: ::windows::RawPtr,
left: ::windows::RawPtr,
right: ::windows::RawPtr,
result__: *mut ::windows::RawPtr,
) -> ::windows::HRESULT,
pub unsafe extern "system" fn(
this: ::windows::RawPtr,
mergedentry: ::windows::RawPtr,
result__: *mut ::windows::RawPtr,
) -> ::windows::HRESULT,
);
#[repr(transparent)]
#[derive(
:: std :: cmp :: PartialEq,
:: std :: cmp :: Eq,
:: std :: clone :: Clone,
:: std :: fmt :: Debug,
)]
#[doc(hidden)]
pub struct IGameModeConfiguration(::windows::IInspectable);
unsafe impl ::windows::Interface for IGameModeConfiguration {
type Vtable = IGameModeConfiguration_abi;
const IID: ::windows::Guid = ::windows::Guid::from_values(
2028310959,
45378,
20208,
[136, 48, 85, 188, 43, 228, 245, 234],
);
}
#[repr(C)]
#[doc(hidden)]
pub struct IGameModeConfiguration_abi(
pub unsafe extern "system" fn(
this: ::windows::RawPtr,
iid: &::windows::Guid,
interface: *mut ::windows::RawPtr,
) -> ::windows::HRESULT,
pub unsafe extern "system" fn(this: ::windows::RawPtr) -> u32,
pub unsafe extern "system" fn(this: ::windows::RawPtr) -> u32,
pub unsafe extern "system" fn(
this: ::windows::RawPtr,
count: *mut u32,
values: *mut *mut ::windows::Guid,
) -> ::windows::HRESULT,
pub unsafe extern "system" fn(
this: ::windows::RawPtr,
value: *mut ::windows::RawPtr,
) -> ::windows::HRESULT,
pub unsafe extern "system" fn(
this: ::windows::RawPtr,
value: *mut i32,
) -> ::windows::HRESULT,
pub unsafe extern "system" fn(
this: ::windows::RawPtr,
result__: *mut bool,
) -> ::windows::HRESULT,
pub unsafe extern "system" fn(
this: ::windows::RawPtr,
value: bool,
) -> ::windows::HRESULT,
pub unsafe extern "system" fn(
this: ::windows::RawPtr,
result__: *mut ::windows::RawPtr,
) -> ::windows::HRESULT,
pub unsafe extern "system" fn(
this: ::windows::RawPtr,
result__: *mut ::windows::RawPtr,
) -> ::windows::HRESULT,
pub unsafe extern "system" fn(
this: ::windows::RawPtr,
value: ::windows::RawPtr,
) -> ::windows::HRESULT,
pub unsafe extern "system" fn(
this: ::windows::RawPtr,
result__: *mut ::windows::RawPtr,
) -> ::windows::HRESULT,
pub unsafe extern "system" fn(
this: ::windows::RawPtr,
value: ::windows::RawPtr,
) -> ::windows::HRESULT,
pub unsafe extern "system" fn(
this: ::windows::RawPtr,
result__: *mut ::windows::RawPtr,
) -> ::windows::HRESULT,
pub unsafe extern "system" fn(
this: ::windows::RawPtr,
value: ::windows::RawPtr,
) -> ::windows::HRESULT,
pub unsafe extern "system" fn(
this: ::windows::RawPtr,
result__: *mut ::windows::RawPtr,
) -> ::windows::HRESULT,
pub unsafe extern "system" fn(
this: ::windows::RawPtr,
value: ::windows::RawPtr,
) -> ::windows::HRESULT,
pub unsafe extern "system" fn(
this: ::windows::RawPtr,
result__: *mut ::windows::RawPtr,
) -> ::windows::HRESULT,
pub unsafe extern "system" fn(
this: ::windows::RawPtr,
value: ::windows::RawPtr,
) -> ::windows::HRESULT,
pub unsafe extern "system" fn(
this: ::windows::RawPtr,
result__: *mut ::windows::RawPtr,
) -> ::windows::HRESULT,
pub unsafe extern "system" fn(
this: ::windows::RawPtr,
value: ::windows::RawPtr,
) -> ::windows::HRESULT,
pub unsafe extern "system" fn(
this: ::windows::RawPtr,
result__: *mut bool,
) -> ::windows::HRESULT,
pub unsafe extern "system" fn(
this: ::windows::RawPtr,
value: bool,
) -> ::windows::HRESULT,
pub unsafe extern "system" fn(
this: ::windows::RawPtr,
result__: *mut ::windows::RawPtr,
) -> ::windows::HRESULT,
);
#[repr(transparent)]
#[derive(
:: std :: cmp :: PartialEq,
:: std :: cmp :: Eq,
:: std :: clone :: Clone,
:: std :: fmt :: Debug,
)]
#[doc(hidden)]
pub struct IGameModeUserConfiguration(::windows::IInspectable);
unsafe impl ::windows::Interface for IGameModeUserConfiguration {
type Vtable = IGameModeUserConfiguration_abi;
const IID: ::windows::Guid = ::windows::Guid::from_values(
1926449908,
30059,
18191,
[160, 194, 186, 98, 169, 7, 149, 219],
);
}
#[repr(C)]
#[doc(hidden)]
pub struct IGameModeUserConfiguration_abi(
pub unsafe extern "system" fn(
this: ::windows::RawPtr,
iid: &::windows::Guid,
interface: *mut ::windows::RawPtr,
) -> ::windows::HRESULT,
pub unsafe extern "system" fn(this: ::windows::RawPtr) -> u32,
pub unsafe extern "system" fn(this: ::windows::RawPtr) -> u32,
pub unsafe extern "system" fn(
this: ::windows::RawPtr,
count: *mut u32,
values: *mut *mut ::windows::Guid,
) -> ::windows::HRESULT,
pub unsafe extern "system" fn(
this: ::windows::RawPtr,
value: *mut ::windows::RawPtr,
) -> ::windows::HRESULT,
pub unsafe extern "system" fn(
this: ::windows::RawPtr,
value: *mut i32,
) -> ::windows::HRESULT,
pub unsafe extern "system" fn(
this: ::windows::RawPtr,
result__: *mut ::windows::RawPtr,
) -> ::windows::HRESULT,
pub unsafe extern "system" fn(
this: ::windows::RawPtr,
result__: *mut ::windows::RawPtr,
) -> ::windows::HRESULT,
);
#[repr(transparent)]
#[derive(
:: std :: cmp :: PartialEq,
:: std :: cmp :: Eq,
:: std :: clone :: Clone,
:: std :: fmt :: Debug,
)]
#[doc(hidden)]
pub struct IGameModeUserConfigurationStatics(::windows::IInspectable);
unsafe impl ::windows::Interface for IGameModeUserConfigurationStatics {
type Vtable = IGameModeUserConfigurationStatics_abi;
const IID: ::windows::Guid = ::windows::Guid::from_values(
1850792316,
26346,
18318,
[164, 161, 245, 124, 14, 141, 0, 231],
);
}
#[repr(C)]
#[doc(hidden)]
pub struct IGameModeUserConfigurationStatics_abi(
pub unsafe extern "system" fn(
this: ::windows::RawPtr,
iid: &::windows::Guid,
interface: *mut ::windows::RawPtr,
) -> ::windows::HRESULT,
pub unsafe extern "system" fn(this: ::windows::RawPtr) -> u32,
pub unsafe extern "system" fn(this: ::windows::RawPtr) -> u32,
pub unsafe extern "system" fn(
this: ::windows::RawPtr,
count: *mut u32,
values: *mut *mut ::windows::Guid,
) -> ::windows::HRESULT,
pub unsafe extern "system" fn(
this: ::windows::RawPtr,
value: *mut ::windows::RawPtr,
) -> ::windows::HRESULT,
pub unsafe extern "system" fn(
this: ::windows::RawPtr,
value: *mut i32,
) -> ::windows::HRESULT,
pub unsafe extern "system" fn(
this: ::windows::RawPtr,
result__: *mut ::windows::RawPtr,
) -> ::windows::HRESULT,
);
}
#[repr(C)]
#[derive(
:: std :: clone :: Clone,
:: std :: default :: Default,
:: std :: fmt :: Debug,
:: std :: cmp :: PartialEq,
:: std :: cmp :: Eq,
:: std :: marker :: Copy,
)]
pub struct GamesEnumerationContract(pub u8);
}
pub mod UI {
pub struct GameBar {}
impl GameBar {
pub fn VisibilityChanged<
'a,
Param0: ::windows::IntoParam<'a, ::windows_foundation::EventHandler<::windows::IInspectable>>,
>(
handler: Param0,
) -> ::windows::Result<::windows_foundation::EventRegistrationToken> {
Self::IGameBarStatics(|this| unsafe {
let mut result__: ::windows_foundation::EventRegistrationToken =
::std::mem::zeroed();
(::windows::Interface::vtable(this).6)(
::std::mem::transmute_copy(this),
handler.into_param().abi(),
&mut result__,
)
.from_abi::<::windows_foundation::EventRegistrationToken>(result__)
})
}
pub fn RemoveVisibilityChanged<
'a,
Param0: ::windows::IntoParam<'a, ::windows_foundation::EventRegistrationToken>,
>(
token: Param0,
) -> ::windows::Result<()> {
Self::IGameBarStatics(|this| unsafe {
(::windows::Interface::vtable(this).7)(
::std::mem::transmute_copy(this),
token.into_param().abi(),
)
.ok()
})
}
pub fn IsInputRedirectedChanged<
'a,
Param0: ::windows::IntoParam<'a, ::windows_foundation::EventHandler<::windows::IInspectable>>,
>(
handler: Param0,
) -> ::windows::Result<::windows_foundation::EventRegistrationToken> {
Self::IGameBarStatics(|this| unsafe {
let mut result__: ::windows_foundation::EventRegistrationToken =
::std::mem::zeroed();
(::windows::Interface::vtable(this).8)(
::std::mem::transmute_copy(this),
handler.into_param().abi(),
&mut result__,
)
.from_abi::<::windows_foundation::EventRegistrationToken>(result__)
})
}
pub fn RemoveIsInputRedirectedChanged<
'a,
Param0: ::windows::IntoParam<'a, ::windows_foundation::EventRegistrationToken>,
>(
token: Param0,
) -> ::windows::Result<()> {
Self::IGameBarStatics(|this| unsafe {
(::windows::Interface::vtable(this).9)(
::std::mem::transmute_copy(this),
token.into_param().abi(),
)
.ok()
})
}
pub fn Visible() -> ::windows::Result<bool> {
Self::IGameBarStatics(|this| unsafe {
let mut result__: bool = ::std::mem::zeroed();
(::windows::Interface::vtable(this).10)(
::std::mem::transmute_copy(this),
&mut result__,
)
.from_abi::<bool>(result__)
})
}
pub fn IsInputRedirected() -> ::windows::Result<bool> {
Self::IGameBarStatics(|this| unsafe {
let mut result__: bool = ::std::mem::zeroed();
(::windows::Interface::vtable(this).11)(
::std::mem::transmute_copy(this),
&mut result__,
)
.from_abi::<bool>(result__)
})
}
pub fn IGameBarStatics<R, F: FnOnce(&IGameBarStatics) -> ::windows::Result<R>>(
callback: F,
) -> ::windows::Result<R> {
static mut SHARED: ::windows::FactoryCache<GameBar, IGameBarStatics> =
::windows::FactoryCache::new();
unsafe { SHARED.call(callback) }
}
}
impl ::windows::RuntimeName for GameBar {
const NAME: &'static str = "Windows.Gaming.UI.GameBar";
}
#[derive(
:: std :: cmp :: PartialEq,
:: std :: cmp :: Eq,
:: std :: marker :: Copy,
:: std :: clone :: Clone,
:: std :: default :: Default,
:: std :: fmt :: Debug,
)]
#[repr(transparent)]
pub struct GameChatMessageOrigin(pub i32);
impl GameChatMessageOrigin {
pub const Voice: GameChatMessageOrigin = GameChatMessageOrigin(0i32);
pub const Text: GameChatMessageOrigin = GameChatMessageOrigin(1i32);
}
impl ::std::convert::From<i32> for GameChatMessageOrigin {
fn from(value: i32) -> Self {
Self(value)
}
}
unsafe impl ::windows::Abi for GameChatMessageOrigin {
type Abi = Self;
type DefaultType = Self;
}
unsafe impl ::windows::RuntimeType for GameChatMessageOrigin {
const SIGNATURE: ::windows::ConstBuffer =
::windows::ConstBuffer::from_slice(b"enum(Windows.Gaming.UI.GameChatMessageOrigin;i4)");
}
#[repr(transparent)]
#[derive(
:: std :: cmp :: PartialEq,
:: std :: cmp :: Eq,
:: std :: clone :: Clone,
:: std :: fmt :: Debug,
)]
pub struct GameChatMessageReceivedEventArgs(::windows::IInspectable);
impl GameChatMessageReceivedEventArgs {
pub fn AppId(&self) -> ::windows::Result<::windows::HSTRING> {
let this = self;
unsafe {
let mut result__: ::std::mem::ManuallyDrop<::windows::HSTRING> =
::std::mem::zeroed();
(::windows::Interface::vtable(this).6)(
::std::mem::transmute_copy(this),
&mut result__,
)
.from_abi::<::windows::HSTRING>(result__)
}
}
pub fn AppDisplayName(&self) -> ::windows::Result<::windows::HSTRING> {
let this = self;
unsafe {
let mut result__: ::std::mem::ManuallyDrop<::windows::HSTRING> =
::std::mem::zeroed();
(::windows::Interface::vtable(this).7)(
::std::mem::transmute_copy(this),
&mut result__,
)
.from_abi::<::windows::HSTRING>(result__)
}
}
pub fn SenderName(&self) -> ::windows::Result<::windows::HSTRING> {
let this = self;
unsafe {
let mut result__: ::std::mem::ManuallyDrop<::windows::HSTRING> =
::std::mem::zeroed();
(::windows::Interface::vtable(this).8)(
::std::mem::transmute_copy(this),
&mut result__,
)
.from_abi::<::windows::HSTRING>(result__)
}
}
pub fn Message(&self) -> ::windows::Result<::windows::HSTRING> {
let this = self;
unsafe {
let mut result__: ::std::mem::ManuallyDrop<::windows::HSTRING> =
::std::mem::zeroed();
(::windows::Interface::vtable(this).9)(
::std::mem::transmute_copy(this),
&mut result__,
)
.from_abi::<::windows::HSTRING>(result__)
}
}
pub fn Origin(&self) -> ::windows::Result<GameChatMessageOrigin> {
let this = self;
unsafe {
let mut result__: GameChatMessageOrigin = ::std::mem::zeroed();
(::windows::Interface::vtable(this).10)(
::std::mem::transmute_copy(this),
&mut result__,
)
.from_abi::<GameChatMessageOrigin>(result__)
}
}
}
unsafe impl ::windows::RuntimeType for GameChatMessageReceivedEventArgs {
const SIGNATURE : :: windows :: ConstBuffer = :: windows :: ConstBuffer :: from_slice ( b"rc(Windows.Gaming.UI.GameChatMessageReceivedEventArgs;{a28201f1-3fb9-4e42-a403-7afce2023b1e})" ) ;
}
unsafe impl ::windows::Interface for GameChatMessageReceivedEventArgs {
type Vtable = IGameChatMessageReceivedEventArgs_abi;
const IID: ::windows::Guid = ::windows::Guid::from_values(
2726429169,
16313,
20034,
[164, 3, 122, 252, 226, 2, 59, 30],
);
}
impl ::windows::RuntimeName for GameChatMessageReceivedEventArgs {
const NAME: &'static str = "Windows.Gaming.UI.GameChatMessageReceivedEventArgs";
}
impl ::std::convert::From<GameChatMessageReceivedEventArgs> for ::windows::IUnknown {
fn from(value: GameChatMessageReceivedEventArgs) -> Self {
unsafe { ::std::mem::transmute(value) }
}
}
impl ::std::convert::From<&GameChatMessageReceivedEventArgs> for ::windows::IUnknown {
fn from(value: &GameChatMessageReceivedEventArgs) -> Self {
::std::convert::From::from(::std::clone::Clone::clone(value))
}
}
impl<'a> ::windows::IntoParam<'a, ::windows::IUnknown> for GameChatMessageReceivedEventArgs {
fn into_param(self) -> ::windows::Param<'a, ::windows::IUnknown> {
::windows::Param::Owned(::std::convert::Into::<::windows::IUnknown>::into(self))
}
}
impl<'a> ::windows::IntoParam<'a, ::windows::IUnknown> for &GameChatMessageReceivedEventArgs {
fn into_param(self) -> ::windows::Param<'a, ::windows::IUnknown> {
::windows::Param::Owned(::std::convert::Into::<::windows::IUnknown>::into(
::std::clone::Clone::clone(self),
))
}
}
impl ::std::convert::From<GameChatMessageReceivedEventArgs> for ::windows::IInspectable {
fn from(value: GameChatMessageReceivedEventArgs) -> Self {
value.0
}
}
impl ::std::convert::From<&GameChatMessageReceivedEventArgs> for ::windows::IInspectable {
fn from(value: &GameChatMessageReceivedEventArgs) -> Self {
value.0.clone()
}
}
impl<'a> ::windows::IntoParam<'a, ::windows::IInspectable> for GameChatMessageReceivedEventArgs {
fn into_param(self) -> ::windows::Param<'a, ::windows::IInspectable> {
::windows::Param::Owned(self.0)
}
}
impl<'a> ::windows::IntoParam<'a, ::windows::IInspectable>
for &'a GameChatMessageReceivedEventArgs
{
fn into_param(self) -> ::windows::Param<'a, ::windows::IInspectable> {
::windows::Param::Borrowed(&self.0)
}
}
unsafe impl ::std::marker::Send for GameChatMessageReceivedEventArgs {}
unsafe impl ::std::marker::Sync for GameChatMessageReceivedEventArgs {}
#[repr(transparent)]
#[derive(
:: std :: cmp :: PartialEq,
:: std :: cmp :: Eq,
:: std :: clone :: Clone,
:: std :: fmt :: Debug,
)]
pub struct GameChatOverlay(::windows::IInspectable);
impl GameChatOverlay {
pub fn DesiredPosition(&self) -> ::windows::Result<GameChatOverlayPosition> {
let this = self;
unsafe {
let mut result__: GameChatOverlayPosition = ::std::mem::zeroed();
(::windows::Interface::vtable(this).6)(
::std::mem::transmute_copy(this),
&mut result__,
)
.from_abi::<GameChatOverlayPosition>(result__)
}
}
pub fn SetDesiredPosition(&self, value: GameChatOverlayPosition) -> ::windows::Result<()> {
let this = self;
unsafe {
(::windows::Interface::vtable(this).7)(::std::mem::transmute_copy(this), value).ok()
}
}
pub fn AddMessage<
'a,
Param0: ::windows::IntoParam<'a, ::windows::HSTRING>,
Param1: ::windows::IntoParam<'a, ::windows::HSTRING>,
>(
&self,
sender: Param0,
message: Param1,
origin: GameChatMessageOrigin,
) -> ::windows::Result<()> {
let this = self;
unsafe {
(::windows::Interface::vtable(this).8)(
::std::mem::transmute_copy(this),
sender.into_param().abi(),
message.into_param().abi(),
origin,
)
.ok()
}
}
pub fn GetDefault() -> ::windows::Result<GameChatOverlay> {
Self::IGameChatOverlayStatics(|this| unsafe {
let mut result__: ::windows::RawPtr = ::std::mem::zeroed();
(::windows::Interface::vtable(this).6)(
::std::mem::transmute_copy(this),
&mut result__,
)
.from_abi::<GameChatOverlay>(result__)
})
}
pub fn IGameChatOverlayStatics<
R,
F: FnOnce(&IGameChatOverlayStatics) -> ::windows::Result<R>,
>(
callback: F,
) -> ::windows::Result<R> {
static mut SHARED: ::windows::FactoryCache<GameChatOverlay, IGameChatOverlayStatics> =
::windows::FactoryCache::new();
unsafe { SHARED.call(callback) }
}
}
unsafe impl ::windows::RuntimeType for GameChatOverlay {
const SIGNATURE: ::windows::ConstBuffer = ::windows::ConstBuffer::from_slice(
b"rc(Windows.Gaming.UI.GameChatOverlay;{fbc64865-f6fc-4a48-ae07-03ac6ed43704})",
);
}
unsafe impl ::windows::Interface for GameChatOverlay {
type Vtable = IGameChatOverlay_abi;
const IID: ::windows::Guid = ::windows::Guid::from_values(
4224075877,
63228,
19016,
[174, 7, 3, 172, 110, 212, 55, 4],
);
}
impl ::windows::RuntimeName for GameChatOverlay {
const NAME: &'static str = "Windows.Gaming.UI.GameChatOverlay";
}
impl ::std::convert::From<GameChatOverlay> for ::windows::IUnknown {
fn from(value: GameChatOverlay) -> Self {
unsafe { ::std::mem::transmute(value) }
}
}
impl ::std::convert::From<&GameChatOverlay> for ::windows::IUnknown {
fn from(value: &GameChatOverlay) -> Self {
::std::convert::From::from(::std::clone::Clone::clone(value))
}
}
impl<'a> ::windows::IntoParam<'a, ::windows::IUnknown> for GameChatOverlay {
fn into_param(self) -> ::windows::Param<'a, ::windows::IUnknown> {
::windows::Param::Owned(::std::convert::Into::<::windows::IUnknown>::into(self))
}
}
impl<'a> ::windows::IntoParam<'a, ::windows::IUnknown> for &GameChatOverlay {
fn into_param(self) -> ::windows::Param<'a, ::windows::IUnknown> {
::windows::Param::Owned(::std::convert::Into::<::windows::IUnknown>::into(
::std::clone::Clone::clone(self),
))
}
}
impl ::std::convert::From<GameChatOverlay> for ::windows::IInspectable {
fn from(value: GameChatOverlay) -> Self {
value.0
}
}
impl ::std::convert::From<&GameChatOverlay> for ::windows::IInspectable {
fn from(value: &GameChatOverlay) -> Self {
value.0.clone()
}
}
impl<'a> ::windows::IntoParam<'a, ::windows::IInspectable> for GameChatOverlay {
fn into_param(self) -> ::windows::Param<'a, ::windows::IInspectable> {
::windows::Param::Owned(self.0)
}
}
impl<'a> ::windows::IntoParam<'a, ::windows::IInspectable> for &'a GameChatOverlay {
fn into_param(self) -> ::windows::Param<'a, ::windows::IInspectable> {
::windows::Param::Borrowed(&self.0)
}
}
unsafe impl ::std::marker::Send for GameChatOverlay {}
unsafe impl ::std::marker::Sync for GameChatOverlay {}
#[repr(C)]
#[derive(
:: std :: clone :: Clone,
:: std :: default :: Default,
:: std :: fmt :: Debug,
:: std :: cmp :: PartialEq,
:: std :: cmp :: Eq,
:: std :: marker :: Copy,
)]
pub struct GameChatOverlayContract(pub u8);
#[repr(transparent)]
#[derive(
:: std :: cmp :: PartialEq,
:: std :: cmp :: Eq,
:: std :: clone :: Clone,
:: std :: fmt :: Debug,
)]
pub struct GameChatOverlayMessageSource(::windows::IInspectable);
impl GameChatOverlayMessageSource {
pub fn new() -> ::windows::Result<Self> {
Self::IActivationFactory(|f| f.activate_instance::<Self>())
}
fn IActivationFactory<
R,
F: FnOnce(&::windows::IActivationFactory) -> ::windows::Result<R>,
>(
callback: F,
) -> ::windows::Result<R> {
static mut SHARED: ::windows::FactoryCache<
GameChatOverlayMessageSource,
::windows::IActivationFactory,
> = ::windows::FactoryCache::new();
unsafe { SHARED.call(callback) }
}
pub fn MessageReceived<
'a,
Param0: ::windows::IntoParam<
'a,
::windows_foundation::TypedEventHandler<
GameChatOverlayMessageSource,
GameChatMessageReceivedEventArgs,
>,
>,
>(
&self,
handler: Param0,
) -> ::windows::Result<::windows_foundation::EventRegistrationToken> {
let this = self;
unsafe {
let mut result__: ::windows_foundation::EventRegistrationToken =
::std::mem::zeroed();
(::windows::Interface::vtable(this).6)(
::std::mem::transmute_copy(this),
handler.into_param().abi(),
&mut result__,
)
.from_abi::<::windows_foundation::EventRegistrationToken>(result__)
}
}
pub fn RemoveMessageReceived<
'a,
Param0: ::windows::IntoParam<'a, ::windows_foundation::EventRegistrationToken>,
>(
&self,
token: Param0,
) -> ::windows::Result<()> {
let this = self;
unsafe {
(::windows::Interface::vtable(this).7)(
::std::mem::transmute_copy(this),
token.into_param().abi(),
)
.ok()
}
}
pub fn SetDelayBeforeClosingAfterMessageReceived<
'a,
Param0: ::windows::IntoParam<'a, ::windows_foundation::TimeSpan>,
>(
&self,
value: Param0,
) -> ::windows::Result<()> {
let this = self;
unsafe {
(::windows::Interface::vtable(this).8)(
::std::mem::transmute_copy(this),
value.into_param().abi(),
)
.ok()
}
}
}
unsafe impl ::windows::RuntimeType for GameChatOverlayMessageSource {
const SIGNATURE : :: windows :: ConstBuffer = :: windows :: ConstBuffer :: from_slice ( b"rc(Windows.Gaming.UI.GameChatOverlayMessageSource;{1e177397-59fb-4f4f-8e9a-80acf817743c})" ) ;
}
unsafe impl ::windows::Interface for GameChatOverlayMessageSource {
type Vtable = IGameChatOverlayMessageSource_abi;
const IID: ::windows::Guid = ::windows::Guid::from_values(
504853399,
23035,
20303,
[142, 154, 128, 172, 248, 23, 116, 60],
);
}
impl ::windows::RuntimeName for GameChatOverlayMessageSource {
const NAME: &'static str = "Windows.Gaming.UI.GameChatOverlayMessageSource";
}
impl ::std::convert::From<GameChatOverlayMessageSource> for ::windows::IUnknown {
fn from(value: GameChatOverlayMessageSource) -> Self {
unsafe { ::std::mem::transmute(value) }
}
}
impl ::std::convert::From<&GameChatOverlayMessageSource> for ::windows::IUnknown {
fn from(value: &GameChatOverlayMessageSource) -> Self {
::std::convert::From::from(::std::clone::Clone::clone(value))
}
}
impl<'a> ::windows::IntoParam<'a, ::windows::IUnknown> for GameChatOverlayMessageSource {
fn into_param(self) -> ::windows::Param<'a, ::windows::IUnknown> {
::windows::Param::Owned(::std::convert::Into::<::windows::IUnknown>::into(self))
}
}
impl<'a> ::windows::IntoParam<'a, ::windows::IUnknown> for &GameChatOverlayMessageSource {
fn into_param(self) -> ::windows::Param<'a, ::windows::IUnknown> {
::windows::Param::Owned(::std::convert::Into::<::windows::IUnknown>::into(
::std::clone::Clone::clone(self),
))
}
}
impl ::std::convert::From<GameChatOverlayMessageSource> for ::windows::IInspectable {
fn from(value: GameChatOverlayMessageSource) -> Self {
value.0
}
}
impl ::std::convert::From<&GameChatOverlayMessageSource> for ::windows::IInspectable {
fn from(value: &GameChatOverlayMessageSource) -> Self {
value.0.clone()
}
}
impl<'a> ::windows::IntoParam<'a, ::windows::IInspectable> for GameChatOverlayMessageSource {
fn into_param(self) -> ::windows::Param<'a, ::windows::IInspectable> {
::windows::Param::Owned(self.0)
}
}
impl<'a> ::windows::IntoParam<'a, ::windows::IInspectable> for &'a GameChatOverlayMessageSource {
fn into_param(self) -> ::windows::Param<'a, ::windows::IInspectable> {
::windows::Param::Borrowed(&self.0)
}
}
unsafe impl ::std::marker::Send for GameChatOverlayMessageSource {}
unsafe impl ::std::marker::Sync for GameChatOverlayMessageSource {}
#[derive(
:: std :: cmp :: PartialEq,
:: std :: cmp :: Eq,
:: std :: marker :: Copy,
:: std :: clone :: Clone,
:: std :: default :: Default,
:: std :: fmt :: Debug,
)]
#[repr(transparent)]
pub struct GameChatOverlayPosition(pub i32);
impl GameChatOverlayPosition {
pub const BottomCenter: GameChatOverlayPosition = GameChatOverlayPosition(0i32);
pub const BottomLeft: GameChatOverlayPosition = GameChatOverlayPosition(1i32);
pub const BottomRight: GameChatOverlayPosition = GameChatOverlayPosition(2i32);
pub const MiddleRight: GameChatOverlayPosition = GameChatOverlayPosition(3i32);
pub const MiddleLeft: GameChatOverlayPosition = GameChatOverlayPosition(4i32);
pub const TopCenter: GameChatOverlayPosition = GameChatOverlayPosition(5i32);
pub const TopLeft: GameChatOverlayPosition = GameChatOverlayPosition(6i32);
pub const TopRight: GameChatOverlayPosition = GameChatOverlayPosition(7i32);
}
impl ::std::convert::From<i32> for GameChatOverlayPosition {
fn from(value: i32) -> Self {
Self(value)
}
}
unsafe impl ::windows::Abi for GameChatOverlayPosition {
type Abi = Self;
type DefaultType = Self;
}
unsafe impl ::windows::RuntimeType for GameChatOverlayPosition {
const SIGNATURE: ::windows::ConstBuffer = ::windows::ConstBuffer::from_slice(
b"enum(Windows.Gaming.UI.GameChatOverlayPosition;i4)",
);
}
#[repr(transparent)]
#[derive(
:: std :: cmp :: PartialEq,
:: std :: cmp :: Eq,
:: std :: clone :: Clone,
:: std :: fmt :: Debug,
)]
pub struct GameUIProviderActivatedEventArgs(::windows::IInspectable);
impl GameUIProviderActivatedEventArgs {
pub fn GameUIArgs(&self) -> ::windows::Result<::windows_foundation::Collections::ValueSet> {
let this = self;
unsafe {
let mut result__: ::windows::RawPtr = ::std::mem::zeroed();
(::windows::Interface::vtable(this).6)(
::std::mem::transmute_copy(this),
&mut result__,
)
.from_abi::<::windows_foundation::Collections::ValueSet>(result__)
}
}
pub fn ReportCompleted<
'a,
Param0: ::windows::IntoParam<'a, ::windows_foundation::Collections::ValueSet>,
>(
&self,
results: Param0,
) -> ::windows::Result<()> {
let this = self;
unsafe {
(::windows::Interface::vtable(this).7)(
::std::mem::transmute_copy(this),
results.into_param().abi(),
)
.ok()
}
}
pub fn Kind(
&self,
) -> ::windows::Result<::windows_applicationmodel::Activation::ActivationKind> {
let this = &::windows::Interface::cast::<
::windows_applicationmodel::Activation::IActivatedEventArgs,
>(self)?;
unsafe {
let mut result__: ::windows_applicationmodel::Activation::ActivationKind =
::std::mem::zeroed();
(::windows::Interface::vtable(this).6)(
::std::mem::transmute_copy(this),
&mut result__,
)
.from_abi::<::windows_applicationmodel::Activation::ActivationKind>(result__)
}
}
pub fn PreviousExecutionState(
&self,
) -> ::windows::Result<::windows_applicationmodel::Activation::ApplicationExecutionState>
{
let this = &::windows::Interface::cast::<
::windows_applicationmodel::Activation::IActivatedEventArgs,
>(self)?;
unsafe {
let mut result__ : ::windows_applicationmodel::Activation:: ApplicationExecutionState = :: std :: mem :: zeroed ( ) ;
(::windows::Interface::vtable(this).7)(
::std::mem::transmute_copy(this),
&mut result__,
)
.from_abi::<::windows_applicationmodel::Activation::ApplicationExecutionState>(
result__,
)
}
}
pub fn SplashScreen(
&self,
) -> ::windows::Result<::windows_applicationmodel::Activation::SplashScreen> {
let this = &::windows::Interface::cast::<
::windows_applicationmodel::Activation::IActivatedEventArgs,
>(self)?;
unsafe {
let mut result__: ::windows::RawPtr = ::std::mem::zeroed();
(::windows::Interface::vtable(this).8)(
::std::mem::transmute_copy(this),
&mut result__,
)
.from_abi::<::windows_applicationmodel::Activation::SplashScreen>(result__)
}
}
}
unsafe impl ::windows::RuntimeType for GameUIProviderActivatedEventArgs {
const SIGNATURE : :: windows :: ConstBuffer = :: windows :: ConstBuffer :: from_slice ( b"rc(Windows.Gaming.UI.GameUIProviderActivatedEventArgs;{a7b3203e-caf7-4ded-bbd2-47de43bb6dd5})" ) ;
}
unsafe impl ::windows::Interface for GameUIProviderActivatedEventArgs {
type Vtable = IGameUIProviderActivatedEventArgs_abi;
const IID: ::windows::Guid = ::windows::Guid::from_values(
2813534270,
51959,
19949,
[187, 210, 71, 222, 67, 187, 109, 213],
);
}
impl ::windows::RuntimeName for GameUIProviderActivatedEventArgs {
const NAME: &'static str = "Windows.Gaming.UI.GameUIProviderActivatedEventArgs";
}
impl ::std::convert::From<GameUIProviderActivatedEventArgs> for ::windows::IUnknown {
fn from(value: GameUIProviderActivatedEventArgs) -> Self {
unsafe { ::std::mem::transmute(value) }
}
}
impl ::std::convert::From<&GameUIProviderActivatedEventArgs> for ::windows::IUnknown {
fn from(value: &GameUIProviderActivatedEventArgs) -> Self {
::std::convert::From::from(::std::clone::Clone::clone(value))
}
}
impl<'a> ::windows::IntoParam<'a, ::windows::IUnknown> for GameUIProviderActivatedEventArgs {
fn into_param(self) -> ::windows::Param<'a, ::windows::IUnknown> {
::windows::Param::Owned(::std::convert::Into::<::windows::IUnknown>::into(self))
}
}
impl<'a> ::windows::IntoParam<'a, ::windows::IUnknown> for &GameUIProviderActivatedEventArgs {
fn into_param(self) -> ::windows::Param<'a, ::windows::IUnknown> {
::windows::Param::Owned(::std::convert::Into::<::windows::IUnknown>::into(
::std::clone::Clone::clone(self),
))
}
}
impl ::std::convert::From<GameUIProviderActivatedEventArgs> for ::windows::IInspectable {
fn from(value: GameUIProviderActivatedEventArgs) -> Self {
value.0
}
}
impl ::std::convert::From<&GameUIProviderActivatedEventArgs> for ::windows::IInspectable {
fn from(value: &GameUIProviderActivatedEventArgs) -> Self {
value.0.clone()
}
}
impl<'a> ::windows::IntoParam<'a, ::windows::IInspectable> for GameUIProviderActivatedEventArgs {
fn into_param(self) -> ::windows::Param<'a, ::windows::IInspectable> {
::windows::Param::Owned(self.0)
}
}
impl<'a> ::windows::IntoParam<'a, ::windows::IInspectable>
for &'a GameUIProviderActivatedEventArgs
{
fn into_param(self) -> ::windows::Param<'a, ::windows::IInspectable> {
::windows::Param::Borrowed(&self.0)
}
}
impl ::std::convert::TryFrom<GameUIProviderActivatedEventArgs>
for ::windows_applicationmodel::Activation::IActivatedEventArgs
{
type Error = ::windows::Error;
fn try_from(value: GameUIProviderActivatedEventArgs) -> ::windows::Result<Self> {
::std::convert::TryFrom::try_from(&value)
}
}
impl ::std::convert::TryFrom<&GameUIProviderActivatedEventArgs>
for ::windows_applicationmodel::Activation::IActivatedEventArgs
{
type Error = ::windows::Error;
fn try_from(value: &GameUIProviderActivatedEventArgs) -> ::windows::Result<Self> {
::windows::Interface::cast(value)
}
}
impl<'a> ::windows::IntoParam<'a, ::windows_applicationmodel::Activation::IActivatedEventArgs>
for GameUIProviderActivatedEventArgs
{
fn into_param(
self,
) -> ::windows::Param<'a, ::windows_applicationmodel::Activation::IActivatedEventArgs>
{
::windows::IntoParam::into_param(&self)
}
}
impl<'a> ::windows::IntoParam<'a, ::windows_applicationmodel::Activation::IActivatedEventArgs>
for &GameUIProviderActivatedEventArgs
{
fn into_param(
self,
) -> ::windows::Param<'a, ::windows_applicationmodel::Activation::IActivatedEventArgs>
{
:: std :: convert :: TryInto :: < ::windows_applicationmodel::Activation:: IActivatedEventArgs > :: try_into ( self ) . map ( :: windows :: Param :: Owned ) . unwrap_or ( :: windows :: Param :: None )
}
}
unsafe impl ::std::marker::Send for GameUIProviderActivatedEventArgs {}
unsafe impl ::std::marker::Sync for GameUIProviderActivatedEventArgs {}
#[repr(C)]
#[derive(
:: std :: clone :: Clone,
:: std :: default :: Default,
:: std :: fmt :: Debug,
:: std :: cmp :: PartialEq,
:: std :: cmp :: Eq,
:: std :: marker :: Copy,
)]
pub struct GamingUIProviderContract(pub u8);
#[repr(transparent)]
#[derive(
:: std :: cmp :: PartialEq,
:: std :: cmp :: Eq,
:: std :: clone :: Clone,
:: std :: fmt :: Debug,
)]
#[doc(hidden)]
pub struct IGameBarStatics(::windows::IInspectable);
unsafe impl ::windows::Interface for IGameBarStatics {
type Vtable = IGameBarStatics_abi;
const IID: ::windows::Guid = ::windows::Guid::from_values(
498705042,
52344,
16755,
[190, 69, 182, 30, 103, 40, 62, 167],
);
}
#[repr(C)]
#[doc(hidden)]
pub struct IGameBarStatics_abi(
pub unsafe extern "system" fn(
this: ::windows::RawPtr,
iid: &::windows::Guid,
interface: *mut ::windows::RawPtr,
) -> ::windows::HRESULT,
pub unsafe extern "system" fn(this: ::windows::RawPtr) -> u32,
pub unsafe extern "system" fn(this: ::windows::RawPtr) -> u32,
pub unsafe extern "system" fn(
this: ::windows::RawPtr,
count: *mut u32,
values: *mut *mut ::windows::Guid,
) -> ::windows::HRESULT,
pub unsafe extern "system" fn(
this: ::windows::RawPtr,
value: *mut ::windows::RawPtr,
) -> ::windows::HRESULT,
pub unsafe extern "system" fn(
this: ::windows::RawPtr,
value: *mut i32,
) -> ::windows::HRESULT,
pub unsafe extern "system" fn(
this: ::windows::RawPtr,
handler: ::windows::RawPtr,
result__: *mut ::windows_foundation::EventRegistrationToken,
) -> ::windows::HRESULT,
pub unsafe extern "system" fn(
this: ::windows::RawPtr,
token: ::windows_foundation::EventRegistrationToken,
) -> ::windows::HRESULT,
pub unsafe extern "system" fn(
this: ::windows::RawPtr,
handler: ::windows::RawPtr,
result__: *mut ::windows_foundation::EventRegistrationToken,
) -> ::windows::HRESULT,
pub unsafe extern "system" fn(
this: ::windows::RawPtr,
token: ::windows_foundation::EventRegistrationToken,
) -> ::windows::HRESULT,
pub unsafe extern "system" fn(
this: ::windows::RawPtr,
result__: *mut bool,
) -> ::windows::HRESULT,
pub unsafe extern "system" fn(
this: ::windows::RawPtr,
result__: *mut bool,
) -> ::windows::HRESULT,
);
#[repr(transparent)]
#[derive(
:: std :: cmp :: PartialEq,
:: std :: cmp :: Eq,
:: std :: clone :: Clone,
:: std :: fmt :: Debug,
)]
#[doc(hidden)]
pub struct IGameChatMessageReceivedEventArgs(::windows::IInspectable);
unsafe impl ::windows::Interface for IGameChatMessageReceivedEventArgs {
type Vtable = IGameChatMessageReceivedEventArgs_abi;
const IID: ::windows::Guid = ::windows::Guid::from_values(
2726429169,
16313,
20034,
[164, 3, 122, 252, 226, 2, 59, 30],
);
}
#[repr(C)]
#[doc(hidden)]
pub struct IGameChatMessageReceivedEventArgs_abi(
pub unsafe extern "system" fn(
this: ::windows::RawPtr,
iid: &::windows::Guid,
interface: *mut ::windows::RawPtr,
) -> ::windows::HRESULT,
pub unsafe extern "system" fn(this: ::windows::RawPtr) -> u32,
pub unsafe extern "system" fn(this: ::windows::RawPtr) -> u32,
pub unsafe extern "system" fn(
this: ::windows::RawPtr,
count: *mut u32,
values: *mut *mut ::windows::Guid,
) -> ::windows::HRESULT,
pub unsafe extern "system" fn(
this: ::windows::RawPtr,
value: *mut ::windows::RawPtr,
) -> ::windows::HRESULT,
pub unsafe extern "system" fn(
this: ::windows::RawPtr,
value: *mut i32,
) -> ::windows::HRESULT,
pub unsafe extern "system" fn(
this: ::windows::RawPtr,
result__: *mut ::std::mem::ManuallyDrop<::windows::HSTRING>,
) -> ::windows::HRESULT,
pub unsafe extern "system" fn(
this: ::windows::RawPtr,
result__: *mut ::std::mem::ManuallyDrop<::windows::HSTRING>,
) -> ::windows::HRESULT,
pub unsafe extern "system" fn(
this: ::windows::RawPtr,
result__: *mut ::std::mem::ManuallyDrop<::windows::HSTRING>,
) -> ::windows::HRESULT,
pub unsafe extern "system" fn(
this: ::windows::RawPtr,
result__: *mut ::std::mem::ManuallyDrop<::windows::HSTRING>,
) -> ::windows::HRESULT,
pub unsafe extern "system" fn(
this: ::windows::RawPtr,
result__: *mut GameChatMessageOrigin,
) -> ::windows::HRESULT,
);
#[repr(transparent)]
#[derive(
:: std :: cmp :: PartialEq,
:: std :: cmp :: Eq,
:: std :: clone :: Clone,
:: std :: fmt :: Debug,
)]
#[doc(hidden)]
pub struct IGameChatOverlay(::windows::IInspectable);
unsafe impl ::windows::Interface for IGameChatOverlay {
type Vtable = IGameChatOverlay_abi;
const IID: ::windows::Guid = ::windows::Guid::from_values(
4224075877,
63228,
19016,
[174, 7, 3, 172, 110, 212, 55, 4],
);
}
#[repr(C)]
#[doc(hidden)]
pub struct IGameChatOverlay_abi(
pub unsafe extern "system" fn(
this: ::windows::RawPtr,
iid: &::windows::Guid,
interface: *mut ::windows::RawPtr,
) -> ::windows::HRESULT,
pub unsafe extern "system" fn(this: ::windows::RawPtr) -> u32,
pub unsafe extern "system" fn(this: ::windows::RawPtr) -> u32,
pub unsafe extern "system" fn(
this: ::windows::RawPtr,
count: *mut u32,
values: *mut *mut ::windows::Guid,
) -> ::windows::HRESULT,
pub unsafe extern "system" fn(
this: ::windows::RawPtr,
value: *mut ::windows::RawPtr,
) -> ::windows::HRESULT,
pub unsafe extern "system" fn(
this: ::windows::RawPtr,
value: *mut i32,
) -> ::windows::HRESULT,
pub unsafe extern "system" fn(
this: ::windows::RawPtr,
result__: *mut GameChatOverlayPosition,
) -> ::windows::HRESULT,
pub unsafe extern "system" fn(
this: ::windows::RawPtr,
value: GameChatOverlayPosition,
) -> ::windows::HRESULT,
pub unsafe extern "system" fn(
this: ::windows::RawPtr,
sender: ::std::mem::ManuallyDrop<::windows::HSTRING>,
message: ::std::mem::ManuallyDrop<::windows::HSTRING>,
origin: GameChatMessageOrigin,
) -> ::windows::HRESULT,
);
#[repr(transparent)]
#[derive(
:: std :: cmp :: PartialEq,
:: std :: cmp :: Eq,
:: std :: clone :: Clone,
:: std :: fmt :: Debug,
)]
#[doc(hidden)]
pub struct IGameChatOverlayMessageSource(::windows::IInspectable);
unsafe impl ::windows::Interface for IGameChatOverlayMessageSource {
type Vtable = IGameChatOverlayMessageSource_abi;
const IID: ::windows::Guid = ::windows::Guid::from_values(
504853399,
23035,
20303,
[142, 154, 128, 172, 248, 23, 116, 60],
);
}
#[repr(C)]
#[doc(hidden)]
pub struct IGameChatOverlayMessageSource_abi(
pub unsafe extern "system" fn(
this: ::windows::RawPtr,
iid: &::windows::Guid,
interface: *mut ::windows::RawPtr,
) -> ::windows::HRESULT,
pub unsafe extern "system" fn(this: ::windows::RawPtr) -> u32,
pub unsafe extern "system" fn(this: ::windows::RawPtr) -> u32,
pub unsafe extern "system" fn(
this: ::windows::RawPtr,
count: *mut u32,
values: *mut *mut ::windows::Guid,
) -> ::windows::HRESULT,
pub unsafe extern "system" fn(
this: ::windows::RawPtr,
value: *mut ::windows::RawPtr,
) -> ::windows::HRESULT,
pub unsafe extern "system" fn(
this: ::windows::RawPtr,
value: *mut i32,
) -> ::windows::HRESULT,
pub unsafe extern "system" fn(
this: ::windows::RawPtr,
handler: ::windows::RawPtr,
result__: *mut ::windows_foundation::EventRegistrationToken,
) -> ::windows::HRESULT,
pub unsafe extern "system" fn(
this: ::windows::RawPtr,
token: ::windows_foundation::EventRegistrationToken,
) -> ::windows::HRESULT,
pub unsafe extern "system" fn(
this: ::windows::RawPtr,
value: ::windows_foundation::TimeSpan,
) -> ::windows::HRESULT,
);
#[repr(transparent)]
#[derive(
:: std :: cmp :: PartialEq,
:: std :: cmp :: Eq,
:: std :: clone :: Clone,
:: std :: fmt :: Debug,
)]
#[doc(hidden)]
pub struct IGameChatOverlayStatics(::windows::IInspectable);
unsafe impl ::windows::Interface for IGameChatOverlayStatics {
type Vtable = IGameChatOverlayStatics_abi;
const IID: ::windows::Guid = ::windows::Guid::from_values(
2309813780,
30823,
18935,
[150, 135, 37, 217, 219, 244, 68, 209],
);
}
#[repr(C)]
#[doc(hidden)]
pub struct IGameChatOverlayStatics_abi(
pub unsafe extern "system" fn(
this: ::windows::RawPtr,
iid: &::windows::Guid,
interface: *mut ::windows::RawPtr,
) -> ::windows::HRESULT,
pub unsafe extern "system" fn(this: ::windows::RawPtr) -> u32,
pub unsafe extern "system" fn(this: ::windows::RawPtr) -> u32,
pub unsafe extern "system" fn(
this: ::windows::RawPtr,
count: *mut u32,
values: *mut *mut ::windows::Guid,
) -> ::windows::HRESULT,
pub unsafe extern "system" fn(
this: ::windows::RawPtr,
value: *mut ::windows::RawPtr,
) -> ::windows::HRESULT,
pub unsafe extern "system" fn(
this: ::windows::RawPtr,
value: *mut i32,
) -> ::windows::HRESULT,
pub unsafe extern "system" fn(
this: ::windows::RawPtr,
result__: *mut ::windows::RawPtr,
) -> ::windows::HRESULT,
);
#[repr(transparent)]
#[derive(
:: std :: cmp :: PartialEq,
:: std :: cmp :: Eq,
:: std :: clone :: Clone,
:: std :: fmt :: Debug,
)]
#[doc(hidden)]
pub struct IGameUIProviderActivatedEventArgs(::windows::IInspectable);
unsafe impl ::windows::Interface for IGameUIProviderActivatedEventArgs {
type Vtable = IGameUIProviderActivatedEventArgs_abi;
const IID: ::windows::Guid = ::windows::Guid::from_values(
2813534270,
51959,
19949,
[187, 210, 71, 222, 67, 187, 109, 213],
);
}
#[repr(C)]
#[doc(hidden)]
pub struct IGameUIProviderActivatedEventArgs_abi(
pub unsafe extern "system" fn(
this: ::windows::RawPtr,
iid: &::windows::Guid,
interface: *mut ::windows::RawPtr,
) -> ::windows::HRESULT,
pub unsafe extern "system" fn(this: ::windows::RawPtr) -> u32,
pub unsafe extern "system" fn(this: ::windows::RawPtr) -> u32,
pub unsafe extern "system" fn(
this: ::windows::RawPtr,
count: *mut u32,
values: *mut *mut ::windows::Guid,
) -> ::windows::HRESULT,
pub unsafe extern "system" fn(
this: ::windows::RawPtr,
value: *mut ::windows::RawPtr,
) -> ::windows::HRESULT,
pub unsafe extern "system" fn(
this: ::windows::RawPtr,
value: *mut i32,
) -> ::windows::HRESULT,
pub unsafe extern "system" fn(
this: ::windows::RawPtr,
result__: *mut ::windows::RawPtr,
) -> ::windows::HRESULT,
pub unsafe extern "system" fn(
this: ::windows::RawPtr,
results: ::windows::RawPtr,
) -> ::windows::HRESULT,
);
}
pub mod XboxLive {
pub mod Storage {
#[repr(transparent)]
#[derive(
:: std :: cmp :: PartialEq,
:: std :: cmp :: Eq,
:: std :: clone :: Clone,
:: std :: fmt :: Debug,
)]
pub struct GameSaveBlobGetResult(::windows::IInspectable);
impl GameSaveBlobGetResult {
pub fn Status(&self) -> ::windows::Result<GameSaveErrorStatus> {
let this = self;
unsafe {
let mut result__: GameSaveErrorStatus = ::std::mem::zeroed();
(::windows::Interface::vtable(this).6)(
::std::mem::transmute_copy(this),
&mut result__,
)
.from_abi::<GameSaveErrorStatus>(result__)
}
}
pub fn Value(
&self,
) -> ::windows::Result<
::windows_foundation::Collections::IMapView<
::windows::HSTRING,
::windows_storage::Streams::IBuffer,
>,
> {
let this = self;
unsafe {
let mut result__: ::windows::RawPtr = ::std::mem::zeroed();
(::windows::Interface::vtable(this).7)(
::std::mem::transmute_copy(this),
&mut result__,
)
.from_abi::<::windows_foundation::Collections::IMapView<
::windows::HSTRING,
::windows_storage::Streams::IBuffer,
>>(result__)
}
}
}
unsafe impl ::windows::RuntimeType for GameSaveBlobGetResult {
const SIGNATURE : :: windows :: ConstBuffer = :: windows :: ConstBuffer :: from_slice ( b"rc(Windows.Gaming.XboxLive.Storage.GameSaveBlobGetResult;{917281e0-7201-4953-aa2c-4008f03aef45})" ) ;
}
unsafe impl ::windows::Interface for GameSaveBlobGetResult {
type Vtable = IGameSaveBlobGetResult_abi;
const IID: ::windows::Guid = ::windows::Guid::from_values(
2440200672,
29185,
18771,
[170, 44, 64, 8, 240, 58, 239, 69],
);
}
impl ::windows::RuntimeName for GameSaveBlobGetResult {
const NAME: &'static str = "Windows.Gaming.XboxLive.Storage.GameSaveBlobGetResult";
}
impl ::std::convert::From<GameSaveBlobGetResult> for ::windows::IUnknown {
fn from(value: GameSaveBlobGetResult) -> Self {
unsafe { ::std::mem::transmute(value) }
}
}
impl ::std::convert::From<&GameSaveBlobGetResult> for ::windows::IUnknown {
fn from(value: &GameSaveBlobGetResult) -> Self {
::std::convert::From::from(::std::clone::Clone::clone(value))
}
}
impl<'a> ::windows::IntoParam<'a, ::windows::IUnknown> for GameSaveBlobGetResult {
fn into_param(self) -> ::windows::Param<'a, ::windows::IUnknown> {
::windows::Param::Owned(::std::convert::Into::<::windows::IUnknown>::into(self))
}
}
impl<'a> ::windows::IntoParam<'a, ::windows::IUnknown> for &GameSaveBlobGetResult {
fn into_param(self) -> ::windows::Param<'a, ::windows::IUnknown> {
::windows::Param::Owned(::std::convert::Into::<::windows::IUnknown>::into(
::std::clone::Clone::clone(self),
))
}
}
impl ::std::convert::From<GameSaveBlobGetResult> for ::windows::IInspectable {
fn from(value: GameSaveBlobGetResult) -> Self {
value.0
}
}
impl ::std::convert::From<&GameSaveBlobGetResult> for ::windows::IInspectable {
fn from(value: &GameSaveBlobGetResult) -> Self {
value.0.clone()
}
}
impl<'a> ::windows::IntoParam<'a, ::windows::IInspectable> for GameSaveBlobGetResult {
fn into_param(self) -> ::windows::Param<'a, ::windows::IInspectable> {
::windows::Param::Owned(self.0)
}
}
impl<'a> ::windows::IntoParam<'a, ::windows::IInspectable> for &'a GameSaveBlobGetResult {
fn into_param(self) -> ::windows::Param<'a, ::windows::IInspectable> {
::windows::Param::Borrowed(&self.0)
}
}
unsafe impl ::std::marker::Send for GameSaveBlobGetResult {}
unsafe impl ::std::marker::Sync for GameSaveBlobGetResult {}
#[repr(transparent)]
#[derive(
:: std :: cmp :: PartialEq,
:: std :: cmp :: Eq,
:: std :: clone :: Clone,
:: std :: fmt :: Debug,
)]
pub struct GameSaveBlobInfo(::windows::IInspectable);
impl GameSaveBlobInfo {
pub fn Name(&self) -> ::windows::Result<::windows::HSTRING> {
let this = self;
unsafe {
let mut result__: ::std::mem::ManuallyDrop<::windows::HSTRING> =
::std::mem::zeroed();
(::windows::Interface::vtable(this).6)(
::std::mem::transmute_copy(this),
&mut result__,
)
.from_abi::<::windows::HSTRING>(result__)
}
}
pub fn Size(&self) -> ::windows::Result<u32> {
let this = self;
unsafe {
let mut result__: u32 = ::std::mem::zeroed();
(::windows::Interface::vtable(this).7)(
::std::mem::transmute_copy(this),
&mut result__,
)
.from_abi::<u32>(result__)
}
}
}
unsafe impl ::windows::RuntimeType for GameSaveBlobInfo {
const SIGNATURE : :: windows :: ConstBuffer = :: windows :: ConstBuffer :: from_slice ( b"rc(Windows.Gaming.XboxLive.Storage.GameSaveBlobInfo;{add38034-baf0-4645-b6d0-46edaffb3c2b})" ) ;
}
unsafe impl ::windows::Interface for GameSaveBlobInfo {
type Vtable = IGameSaveBlobInfo_abi;
const IID: ::windows::Guid = ::windows::Guid::from_values(
2916319284,
47856,
17989,
[182, 208, 70, 237, 175, 251, 60, 43],
);
}
impl ::windows::RuntimeName for GameSaveBlobInfo {
const NAME: &'static str = "Windows.Gaming.XboxLive.Storage.GameSaveBlobInfo";
}
impl ::std::convert::From<GameSaveBlobInfo> for ::windows::IUnknown {
fn from(value: GameSaveBlobInfo) -> Self {
unsafe { ::std::mem::transmute(value) }
}
}
impl ::std::convert::From<&GameSaveBlobInfo> for ::windows::IUnknown {
fn from(value: &GameSaveBlobInfo) -> Self {
::std::convert::From::from(::std::clone::Clone::clone(value))
}
}
impl<'a> ::windows::IntoParam<'a, ::windows::IUnknown> for GameSaveBlobInfo {
fn into_param(self) -> ::windows::Param<'a, ::windows::IUnknown> {
::windows::Param::Owned(::std::convert::Into::<::windows::IUnknown>::into(self))
}
}
impl<'a> ::windows::IntoParam<'a, ::windows::IUnknown> for &GameSaveBlobInfo {
fn into_param(self) -> ::windows::Param<'a, ::windows::IUnknown> {
::windows::Param::Owned(::std::convert::Into::<::windows::IUnknown>::into(
::std::clone::Clone::clone(self),
))
}
}
impl ::std::convert::From<GameSaveBlobInfo> for ::windows::IInspectable {
fn from(value: GameSaveBlobInfo) -> Self {
value.0
}
}
impl ::std::convert::From<&GameSaveBlobInfo> for ::windows::IInspectable {
fn from(value: &GameSaveBlobInfo) -> Self {
value.0.clone()
}
}
impl<'a> ::windows::IntoParam<'a, ::windows::IInspectable> for GameSaveBlobInfo {
fn into_param(self) -> ::windows::Param<'a, ::windows::IInspectable> {
::windows::Param::Owned(self.0)
}
}
impl<'a> ::windows::IntoParam<'a, ::windows::IInspectable> for &'a GameSaveBlobInfo {
fn into_param(self) -> ::windows::Param<'a, ::windows::IInspectable> {
::windows::Param::Borrowed(&self.0)
}
}
unsafe impl ::std::marker::Send for GameSaveBlobInfo {}
unsafe impl ::std::marker::Sync for GameSaveBlobInfo {}
#[repr(transparent)]
#[derive(
:: std :: cmp :: PartialEq,
:: std :: cmp :: Eq,
:: std :: clone :: Clone,
:: std :: fmt :: Debug,
)]
pub struct GameSaveBlobInfoGetResult(::windows::IInspectable);
impl GameSaveBlobInfoGetResult {
pub fn Status(&self) -> ::windows::Result<GameSaveErrorStatus> {
let this = self;
unsafe {
let mut result__: GameSaveErrorStatus = ::std::mem::zeroed();
(::windows::Interface::vtable(this).6)(
::std::mem::transmute_copy(this),
&mut result__,
)
.from_abi::<GameSaveErrorStatus>(result__)
}
}
pub fn Value(
&self,
) -> ::windows::Result<::windows_foundation::Collections::IVectorView<GameSaveBlobInfo>>
{
let this = self;
unsafe {
let mut result__: ::windows::RawPtr = ::std::mem::zeroed();
(::windows::Interface::vtable(this).7)(
::std::mem::transmute_copy(this),
&mut result__,
)
.from_abi::<::windows_foundation::Collections::IVectorView<
GameSaveBlobInfo,
>>(result__)
}
}
}
unsafe impl ::windows::RuntimeType for GameSaveBlobInfoGetResult {
const SIGNATURE : :: windows :: ConstBuffer = :: windows :: ConstBuffer :: from_slice ( b"rc(Windows.Gaming.XboxLive.Storage.GameSaveBlobInfoGetResult;{c7578582-3697-42bf-989c-665d923b5231})" ) ;
}
unsafe impl ::windows::Interface for GameSaveBlobInfoGetResult {
type Vtable = IGameSaveBlobInfoGetResult_abi;
const IID: ::windows::Guid = ::windows::Guid::from_values(
3344401794,
13975,
17087,
[152, 156, 102, 93, 146, 59, 82, 49],
);
}
impl ::windows::RuntimeName for GameSaveBlobInfoGetResult {
const NAME: &'static str = "Windows.Gaming.XboxLive.Storage.GameSaveBlobInfoGetResult";
}
impl ::std::convert::From<GameSaveBlobInfoGetResult> for ::windows::IUnknown {
fn from(value: GameSaveBlobInfoGetResult) -> Self {
unsafe { ::std::mem::transmute(value) }
}
}
impl ::std::convert::From<&GameSaveBlobInfoGetResult> for ::windows::IUnknown {
fn from(value: &GameSaveBlobInfoGetResult) -> Self {
::std::convert::From::from(::std::clone::Clone::clone(value))
}
}
impl<'a> ::windows::IntoParam<'a, ::windows::IUnknown> for GameSaveBlobInfoGetResult {
fn into_param(self) -> ::windows::Param<'a, ::windows::IUnknown> {
::windows::Param::Owned(::std::convert::Into::<::windows::IUnknown>::into(self))
}
}
impl<'a> ::windows::IntoParam<'a, ::windows::IUnknown> for &GameSaveBlobInfoGetResult {
fn into_param(self) -> ::windows::Param<'a, ::windows::IUnknown> {
::windows::Param::Owned(::std::convert::Into::<::windows::IUnknown>::into(
::std::clone::Clone::clone(self),
))
}
}
impl ::std::convert::From<GameSaveBlobInfoGetResult> for ::windows::IInspectable {
fn from(value: GameSaveBlobInfoGetResult) -> Self {
value.0
}
}
impl ::std::convert::From<&GameSaveBlobInfoGetResult> for ::windows::IInspectable {
fn from(value: &GameSaveBlobInfoGetResult) -> Self {
value.0.clone()
}
}
impl<'a> ::windows::IntoParam<'a, ::windows::IInspectable> for GameSaveBlobInfoGetResult {
fn into_param(self) -> ::windows::Param<'a, ::windows::IInspectable> {
::windows::Param::Owned(self.0)
}
}
impl<'a> ::windows::IntoParam<'a, ::windows::IInspectable> for &'a GameSaveBlobInfoGetResult {
fn into_param(self) -> ::windows::Param<'a, ::windows::IInspectable> {
::windows::Param::Borrowed(&self.0)
}
}
unsafe impl ::std::marker::Send for GameSaveBlobInfoGetResult {}
unsafe impl ::std::marker::Sync for GameSaveBlobInfoGetResult {}
#[repr(transparent)]
#[derive(
:: std :: cmp :: PartialEq,
:: std :: cmp :: Eq,
:: std :: clone :: Clone,
:: std :: fmt :: Debug,
)]
pub struct GameSaveBlobInfoQuery(::windows::IInspectable);
impl GameSaveBlobInfoQuery {
pub fn GetBlobInfoAsync(
&self,
) -> ::windows::Result<::windows_foundation::IAsyncOperation<GameSaveBlobInfoGetResult>>
{
let this = self;
unsafe {
let mut result__: ::windows::RawPtr = ::std::mem::zeroed();
(::windows::Interface::vtable(this).6)(
::std::mem::transmute_copy(this),
&mut result__,
)
.from_abi::<::windows_foundation::IAsyncOperation<
GameSaveBlobInfoGetResult,
>>(result__)
}
}
pub fn GetBlobInfoWithIndexAndMaxAsync(
&self,
startindex: u32,
maxnumberofitems: u32,
) -> ::windows::Result<::windows_foundation::IAsyncOperation<GameSaveBlobInfoGetResult>>
{
let this = self;
unsafe {
let mut result__: ::windows::RawPtr = ::std::mem::zeroed();
(::windows::Interface::vtable(this).7)(
::std::mem::transmute_copy(this),
startindex,
maxnumberofitems,
&mut result__,
)
.from_abi::<::windows_foundation::IAsyncOperation<
GameSaveBlobInfoGetResult,
>>(result__)
}
}
pub fn GetItemCountAsync(
&self,
) -> ::windows::Result<::windows_foundation::IAsyncOperation<u32>> {
let this = self;
unsafe {
let mut result__: ::windows::RawPtr = ::std::mem::zeroed();
(::windows::Interface::vtable(this).8)(
::std::mem::transmute_copy(this),
&mut result__,
)
.from_abi::<::windows_foundation::IAsyncOperation<u32>>(result__)
}
}
}
unsafe impl ::windows::RuntimeType for GameSaveBlobInfoQuery {
const SIGNATURE : :: windows :: ConstBuffer = :: windows :: ConstBuffer :: from_slice ( b"rc(Windows.Gaming.XboxLive.Storage.GameSaveBlobInfoQuery;{9fdd74b2-eeee-447b-a9d2-7f96c0f83208})" ) ;
}
unsafe impl ::windows::Interface for GameSaveBlobInfoQuery {
type Vtable = IGameSaveBlobInfoQuery_abi;
const IID: ::windows::Guid = ::windows::Guid::from_values(
2682090674,
61166,
17531,
[169, 210, 127, 150, 192, 248, 50, 8],
);
}
impl ::windows::RuntimeName for GameSaveBlobInfoQuery {
const NAME: &'static str = "Windows.Gaming.XboxLive.Storage.GameSaveBlobInfoQuery";
}
impl ::std::convert::From<GameSaveBlobInfoQuery> for ::windows::IUnknown {
fn from(value: GameSaveBlobInfoQuery) -> Self {
unsafe { ::std::mem::transmute(value) }
}
}
impl ::std::convert::From<&GameSaveBlobInfoQuery> for ::windows::IUnknown {
fn from(value: &GameSaveBlobInfoQuery) -> Self {
::std::convert::From::from(::std::clone::Clone::clone(value))
}
}
impl<'a> ::windows::IntoParam<'a, ::windows::IUnknown> for GameSaveBlobInfoQuery {
fn into_param(self) -> ::windows::Param<'a, ::windows::IUnknown> {
::windows::Param::Owned(::std::convert::Into::<::windows::IUnknown>::into(self))
}
}
impl<'a> ::windows::IntoParam<'a, ::windows::IUnknown> for &GameSaveBlobInfoQuery {
fn into_param(self) -> ::windows::Param<'a, ::windows::IUnknown> {
::windows::Param::Owned(::std::convert::Into::<::windows::IUnknown>::into(
::std::clone::Clone::clone(self),
))
}
}
impl ::std::convert::From<GameSaveBlobInfoQuery> for ::windows::IInspectable {
fn from(value: GameSaveBlobInfoQuery) -> Self {
value.0
}
}
impl ::std::convert::From<&GameSaveBlobInfoQuery> for ::windows::IInspectable {
fn from(value: &GameSaveBlobInfoQuery) -> Self {
value.0.clone()
}
}
impl<'a> ::windows::IntoParam<'a, ::windows::IInspectable> for GameSaveBlobInfoQuery {
fn into_param(self) -> ::windows::Param<'a, ::windows::IInspectable> {
::windows::Param::Owned(self.0)
}
}
impl<'a> ::windows::IntoParam<'a, ::windows::IInspectable> for &'a GameSaveBlobInfoQuery {
fn into_param(self) -> ::windows::Param<'a, ::windows::IInspectable> {
::windows::Param::Borrowed(&self.0)
}
}
unsafe impl ::std::marker::Send for GameSaveBlobInfoQuery {}
unsafe impl ::std::marker::Sync for GameSaveBlobInfoQuery {}
#[repr(transparent)]
#[derive(
:: std :: cmp :: PartialEq,
:: std :: cmp :: Eq,
:: std :: clone :: Clone,
:: std :: fmt :: Debug,
)]
pub struct GameSaveContainer(::windows::IInspectable);
impl GameSaveContainer {
pub fn Name(&self) -> ::windows::Result<::windows::HSTRING> {
let this = self;
unsafe {
let mut result__: ::std::mem::ManuallyDrop<::windows::HSTRING> =
::std::mem::zeroed();
(::windows::Interface::vtable(this).6)(
::std::mem::transmute_copy(this),
&mut result__,
)
.from_abi::<::windows::HSTRING>(result__)
}
}
pub fn Provider(&self) -> ::windows::Result<GameSaveProvider> {
let this = self;
unsafe {
let mut result__: ::windows::RawPtr = ::std::mem::zeroed();
(::windows::Interface::vtable(this).7)(
::std::mem::transmute_copy(this),
&mut result__,
)
.from_abi::<GameSaveProvider>(result__)
}
}
pub fn SubmitUpdatesAsync<
'a,
Param0: ::windows::IntoParam<
'a,
::windows_foundation::Collections::IMapView<
::windows::HSTRING,
::windows_storage::Streams::IBuffer,
>,
>,
Param1: ::windows::IntoParam<
'a,
::windows_foundation::Collections::IIterable<::windows::HSTRING>,
>,
Param2: ::windows::IntoParam<'a, ::windows::HSTRING>,
>(
&self,
blobstowrite: Param0,
blobstodelete: Param1,
displayname: Param2,
) -> ::windows::Result<::windows_foundation::IAsyncOperation<GameSaveOperationResult>>
{
let this = self;
unsafe {
let mut result__: ::windows::RawPtr = ::std::mem::zeroed();
(::windows::Interface::vtable(this).8)(
::std::mem::transmute_copy(this),
blobstowrite.into_param().abi(),
blobstodelete.into_param().abi(),
displayname.into_param().abi(),
&mut result__,
)
.from_abi::<::windows_foundation::IAsyncOperation<
GameSaveOperationResult,
>>(result__)
}
}
pub fn ReadAsync<
'a,
Param0: ::windows::IntoParam<
'a,
::windows_foundation::Collections::IMapView<
::windows::HSTRING,
::windows_storage::Streams::IBuffer,
>,
>,
>(
&self,
blobstoread: Param0,
) -> ::windows::Result<::windows_foundation::IAsyncOperation<GameSaveOperationResult>>
{
let this = self;
unsafe {
let mut result__: ::windows::RawPtr = ::std::mem::zeroed();
(::windows::Interface::vtable(this).9)(
::std::mem::transmute_copy(this),
blobstoread.into_param().abi(),
&mut result__,
)
.from_abi::<::windows_foundation::IAsyncOperation<
GameSaveOperationResult,
>>(result__)
}
}
pub fn GetAsync<
'a,
Param0: ::windows::IntoParam<
'a,
::windows_foundation::Collections::IIterable<::windows::HSTRING>,
>,
>(
&self,
blobstoread: Param0,
) -> ::windows::Result<::windows_foundation::IAsyncOperation<GameSaveBlobGetResult>>
{
let this = self;
unsafe {
let mut result__: ::windows::RawPtr = ::std::mem::zeroed();
(::windows::Interface::vtable(this).10)(
::std::mem::transmute_copy(this),
blobstoread.into_param().abi(),
&mut result__,
)
.from_abi::<::windows_foundation::IAsyncOperation<
GameSaveBlobGetResult,
>>(result__)
}
}
pub fn SubmitPropertySetUpdatesAsync<
'a,
Param0: ::windows::IntoParam<'a, ::windows_foundation::Collections::IPropertySet>,
Param1: ::windows::IntoParam<
'a,
::windows_foundation::Collections::IIterable<::windows::HSTRING>,
>,
Param2: ::windows::IntoParam<'a, ::windows::HSTRING>,
>(
&self,
blobstowrite: Param0,
blobstodelete: Param1,
displayname: Param2,
) -> ::windows::Result<::windows_foundation::IAsyncOperation<GameSaveOperationResult>>
{
let this = self;
unsafe {
let mut result__: ::windows::RawPtr = ::std::mem::zeroed();
(::windows::Interface::vtable(this).11)(
::std::mem::transmute_copy(this),
blobstowrite.into_param().abi(),
blobstodelete.into_param().abi(),
displayname.into_param().abi(),
&mut result__,
)
.from_abi::<::windows_foundation::IAsyncOperation<
GameSaveOperationResult,
>>(result__)
}
}
pub fn CreateBlobInfoQuery<'a, Param0: ::windows::IntoParam<'a, ::windows::HSTRING>>(
&self,
blobnameprefix: Param0,
) -> ::windows::Result<GameSaveBlobInfoQuery> {
let this = self;
unsafe {
let mut result__: ::windows::RawPtr = ::std::mem::zeroed();
(::windows::Interface::vtable(this).12)(
::std::mem::transmute_copy(this),
blobnameprefix.into_param().abi(),
&mut result__,
)
.from_abi::<GameSaveBlobInfoQuery>(result__)
}
}
}
unsafe impl ::windows::RuntimeType for GameSaveContainer {
const SIGNATURE : :: windows :: ConstBuffer = :: windows :: ConstBuffer :: from_slice ( b"rc(Windows.Gaming.XboxLive.Storage.GameSaveContainer;{c3c08f89-563f-4ecd-9c6f-33fd0e323d10})" ) ;
}
unsafe impl ::windows::Interface for GameSaveContainer {
type Vtable = IGameSaveContainer_abi;
const IID: ::windows::Guid = ::windows::Guid::from_values(
3284176777,
22079,
20173,
[156, 111, 51, 253, 14, 50, 61, 16],
);
}
impl ::windows::RuntimeName for GameSaveContainer {
const NAME: &'static str = "Windows.Gaming.XboxLive.Storage.GameSaveContainer";
}
impl ::std::convert::From<GameSaveContainer> for ::windows::IUnknown {
fn from(value: GameSaveContainer) -> Self {
unsafe { ::std::mem::transmute(value) }
}
}
impl ::std::convert::From<&GameSaveContainer> for ::windows::IUnknown {
fn from(value: &GameSaveContainer) -> Self {
::std::convert::From::from(::std::clone::Clone::clone(value))
}
}
impl<'a> ::windows::IntoParam<'a, ::windows::IUnknown> for GameSaveContainer {
fn into_param(self) -> ::windows::Param<'a, ::windows::IUnknown> {
::windows::Param::Owned(::std::convert::Into::<::windows::IUnknown>::into(self))
}
}
impl<'a> ::windows::IntoParam<'a, ::windows::IUnknown> for &GameSaveContainer {
fn into_param(self) -> ::windows::Param<'a, ::windows::IUnknown> {
::windows::Param::Owned(::std::convert::Into::<::windows::IUnknown>::into(
::std::clone::Clone::clone(self),
))
}
}
impl ::std::convert::From<GameSaveContainer> for ::windows::IInspectable {
fn from(value: GameSaveContainer) -> Self {
value.0
}
}
impl ::std::convert::From<&GameSaveContainer> for ::windows::IInspectable {
fn from(value: &GameSaveContainer) -> Self {
value.0.clone()
}
}
impl<'a> ::windows::IntoParam<'a, ::windows::IInspectable> for GameSaveContainer {
fn into_param(self) -> ::windows::Param<'a, ::windows::IInspectable> {
::windows::Param::Owned(self.0)
}
}
impl<'a> ::windows::IntoParam<'a, ::windows::IInspectable> for &'a GameSaveContainer {
fn into_param(self) -> ::windows::Param<'a, ::windows::IInspectable> {
::windows::Param::Borrowed(&self.0)
}
}
unsafe impl ::std::marker::Send for GameSaveContainer {}
unsafe impl ::std::marker::Sync for GameSaveContainer {}
#[repr(transparent)]
#[derive(
:: std :: cmp :: PartialEq,
:: std :: cmp :: Eq,
:: std :: clone :: Clone,
:: std :: fmt :: Debug,
)]
pub struct GameSaveContainerInfo(::windows::IInspectable);
impl GameSaveContainerInfo {
pub fn Name(&self) -> ::windows::Result<::windows::HSTRING> {
let this = self;
unsafe {
let mut result__: ::std::mem::ManuallyDrop<::windows::HSTRING> =
::std::mem::zeroed();
(::windows::Interface::vtable(this).6)(
::std::mem::transmute_copy(this),
&mut result__,
)
.from_abi::<::windows::HSTRING>(result__)
}
}
pub fn TotalSize(&self) -> ::windows::Result<u64> {
let this = self;
unsafe {
let mut result__: u64 = ::std::mem::zeroed();
(::windows::Interface::vtable(this).7)(
::std::mem::transmute_copy(this),
&mut result__,
)
.from_abi::<u64>(result__)
}
}
pub fn DisplayName(&self) -> ::windows::Result<::windows::HSTRING> {
let this = self;
unsafe {
let mut result__: ::std::mem::ManuallyDrop<::windows::HSTRING> =
::std::mem::zeroed();
(::windows::Interface::vtable(this).8)(
::std::mem::transmute_copy(this),
&mut result__,
)
.from_abi::<::windows::HSTRING>(result__)
}
}
pub fn LastModifiedTime(&self) -> ::windows::Result<::windows_foundation::DateTime> {
let this = self;
unsafe {
let mut result__: ::windows_foundation::DateTime = ::std::mem::zeroed();
(::windows::Interface::vtable(this).9)(
::std::mem::transmute_copy(this),
&mut result__,
)
.from_abi::<::windows_foundation::DateTime>(result__)
}
}
pub fn NeedsSync(&self) -> ::windows::Result<bool> {
let this = self;
unsafe {
let mut result__: bool = ::std::mem::zeroed();
(::windows::Interface::vtable(this).10)(
::std::mem::transmute_copy(this),
&mut result__,
)
.from_abi::<bool>(result__)
}
}
}
unsafe impl ::windows::RuntimeType for GameSaveContainerInfo {
const SIGNATURE : :: windows :: ConstBuffer = :: windows :: ConstBuffer :: from_slice ( b"rc(Windows.Gaming.XboxLive.Storage.GameSaveContainerInfo;{b7e27300-155d-4bb4-b2ba-930306f391b5})" ) ;
}
unsafe impl ::windows::Interface for GameSaveContainerInfo {
type Vtable = IGameSaveContainerInfo_abi;
const IID: ::windows::Guid = ::windows::Guid::from_values(
3085071104,
5469,
19380,
[178, 186, 147, 3, 6, 243, 145, 181],
);
}
impl ::windows::RuntimeName for GameSaveContainerInfo {
const NAME: &'static str = "Windows.Gaming.XboxLive.Storage.GameSaveContainerInfo";
}
impl ::std::convert::From<GameSaveContainerInfo> for ::windows::IUnknown {
fn from(value: GameSaveContainerInfo) -> Self {
unsafe { ::std::mem::transmute(value) }
}
}
impl ::std::convert::From<&GameSaveContainerInfo> for ::windows::IUnknown {
fn from(value: &GameSaveContainerInfo) -> Self {
::std::convert::From::from(::std::clone::Clone::clone(value))
}
}
impl<'a> ::windows::IntoParam<'a, ::windows::IUnknown> for GameSaveContainerInfo {
fn into_param(self) -> ::windows::Param<'a, ::windows::IUnknown> {
::windows::Param::Owned(::std::convert::Into::<::windows::IUnknown>::into(self))
}
}
impl<'a> ::windows::IntoParam<'a, ::windows::IUnknown> for &GameSaveContainerInfo {
fn into_param(self) -> ::windows::Param<'a, ::windows::IUnknown> {
::windows::Param::Owned(::std::convert::Into::<::windows::IUnknown>::into(
::std::clone::Clone::clone(self),
))
}
}
impl ::std::convert::From<GameSaveContainerInfo> for ::windows::IInspectable {
fn from(value: GameSaveContainerInfo) -> Self {
value.0
}
}
impl ::std::convert::From<&GameSaveContainerInfo> for ::windows::IInspectable {
fn from(value: &GameSaveContainerInfo) -> Self {
value.0.clone()
}
}
impl<'a> ::windows::IntoParam<'a, ::windows::IInspectable> for GameSaveContainerInfo {
fn into_param(self) -> ::windows::Param<'a, ::windows::IInspectable> {
::windows::Param::Owned(self.0)
}
}
impl<'a> ::windows::IntoParam<'a, ::windows::IInspectable> for &'a GameSaveContainerInfo {
fn into_param(self) -> ::windows::Param<'a, ::windows::IInspectable> {
::windows::Param::Borrowed(&self.0)
}
}
unsafe impl ::std::marker::Send for GameSaveContainerInfo {}
unsafe impl ::std::marker::Sync for GameSaveContainerInfo {}
#[repr(transparent)]
#[derive(
:: std :: cmp :: PartialEq,
:: std :: cmp :: Eq,
:: std :: clone :: Clone,
:: std :: fmt :: Debug,
)]
pub struct GameSaveContainerInfoGetResult(::windows::IInspectable);
impl GameSaveContainerInfoGetResult {
pub fn Status(&self) -> ::windows::Result<GameSaveErrorStatus> {
let this = self;
unsafe {
let mut result__: GameSaveErrorStatus = ::std::mem::zeroed();
(::windows::Interface::vtable(this).6)(
::std::mem::transmute_copy(this),
&mut result__,
)
.from_abi::<GameSaveErrorStatus>(result__)
}
}
pub fn Value(
&self,
) -> ::windows::Result<
::windows_foundation::Collections::IVectorView<GameSaveContainerInfo>,
> {
let this = self;
unsafe {
let mut result__: ::windows::RawPtr = ::std::mem::zeroed();
(::windows::Interface::vtable(this).7)(
::std::mem::transmute_copy(this),
&mut result__,
)
.from_abi::<::windows_foundation::Collections::IVectorView<
GameSaveContainerInfo,
>>(result__)
}
}
}
unsafe impl ::windows::RuntimeType for GameSaveContainerInfoGetResult {
const SIGNATURE : :: windows :: ConstBuffer = :: windows :: ConstBuffer :: from_slice ( b"rc(Windows.Gaming.XboxLive.Storage.GameSaveContainerInfoGetResult;{ffc50d74-c581-4f9d-9e39-30a10c1e4c50})" ) ;
}
unsafe impl ::windows::Interface for GameSaveContainerInfoGetResult {
type Vtable = IGameSaveContainerInfoGetResult_abi;
const IID: ::windows::Guid = ::windows::Guid::from_values(
4291104116,
50561,
20381,
[158, 57, 48, 161, 12, 30, 76, 80],
);
}
impl ::windows::RuntimeName for GameSaveContainerInfoGetResult {
const NAME: &'static str =
"Windows.Gaming.XboxLive.Storage.GameSaveContainerInfoGetResult";
}
impl ::std::convert::From<GameSaveContainerInfoGetResult> for ::windows::IUnknown {
fn from(value: GameSaveContainerInfoGetResult) -> Self {
unsafe { ::std::mem::transmute(value) }
}
}
impl ::std::convert::From<&GameSaveContainerInfoGetResult> for ::windows::IUnknown {
fn from(value: &GameSaveContainerInfoGetResult) -> Self {
::std::convert::From::from(::std::clone::Clone::clone(value))
}
}
impl<'a> ::windows::IntoParam<'a, ::windows::IUnknown> for GameSaveContainerInfoGetResult {
fn into_param(self) -> ::windows::Param<'a, ::windows::IUnknown> {
::windows::Param::Owned(::std::convert::Into::<::windows::IUnknown>::into(self))
}
}
impl<'a> ::windows::IntoParam<'a, ::windows::IUnknown> for &GameSaveContainerInfoGetResult {
fn into_param(self) -> ::windows::Param<'a, ::windows::IUnknown> {
::windows::Param::Owned(::std::convert::Into::<::windows::IUnknown>::into(
::std::clone::Clone::clone(self),
))
}
}
impl ::std::convert::From<GameSaveContainerInfoGetResult> for ::windows::IInspectable {
fn from(value: GameSaveContainerInfoGetResult) -> Self {
value.0
}
}
impl ::std::convert::From<&GameSaveContainerInfoGetResult> for ::windows::IInspectable {
fn from(value: &GameSaveContainerInfoGetResult) -> Self {
value.0.clone()
}
}
impl<'a> ::windows::IntoParam<'a, ::windows::IInspectable> for GameSaveContainerInfoGetResult {
fn into_param(self) -> ::windows::Param<'a, ::windows::IInspectable> {
::windows::Param::Owned(self.0)
}
}
impl<'a> ::windows::IntoParam<'a, ::windows::IInspectable> for &'a GameSaveContainerInfoGetResult {
fn into_param(self) -> ::windows::Param<'a, ::windows::IInspectable> {
::windows::Param::Borrowed(&self.0)
}
}
unsafe impl ::std::marker::Send for GameSaveContainerInfoGetResult {}
unsafe impl ::std::marker::Sync for GameSaveContainerInfoGetResult {}
#[repr(transparent)]
#[derive(
:: std :: cmp :: PartialEq,
:: std :: cmp :: Eq,
:: std :: clone :: Clone,
:: std :: fmt :: Debug,
)]
pub struct GameSaveContainerInfoQuery(::windows::IInspectable);
impl GameSaveContainerInfoQuery {
pub fn GetContainerInfoAsync(
&self,
) -> ::windows::Result<
::windows_foundation::IAsyncOperation<GameSaveContainerInfoGetResult>,
> {
let this = self;
unsafe {
let mut result__: ::windows::RawPtr = ::std::mem::zeroed();
(::windows::Interface::vtable(this).6)(
::std::mem::transmute_copy(this),
&mut result__,
)
.from_abi::<::windows_foundation::IAsyncOperation<
GameSaveContainerInfoGetResult,
>>(result__)
}
}
pub fn GetContainerInfoWithIndexAndMaxAsync(
&self,
startindex: u32,
maxnumberofitems: u32,
) -> ::windows::Result<
::windows_foundation::IAsyncOperation<GameSaveContainerInfoGetResult>,
> {
let this = self;
unsafe {
let mut result__: ::windows::RawPtr = ::std::mem::zeroed();
(::windows::Interface::vtable(this).7)(
::std::mem::transmute_copy(this),
startindex,
maxnumberofitems,
&mut result__,
)
.from_abi::<::windows_foundation::IAsyncOperation<
GameSaveContainerInfoGetResult,
>>(result__)
}
}
pub fn GetItemCountAsync(
&self,
) -> ::windows::Result<::windows_foundation::IAsyncOperation<u32>> {
let this = self;
unsafe {
let mut result__: ::windows::RawPtr = ::std::mem::zeroed();
(::windows::Interface::vtable(this).8)(
::std::mem::transmute_copy(this),
&mut result__,
)
.from_abi::<::windows_foundation::IAsyncOperation<u32>>(result__)
}
}
}
unsafe impl ::windows::RuntimeType for GameSaveContainerInfoQuery {
const SIGNATURE : :: windows :: ConstBuffer = :: windows :: ConstBuffer :: from_slice ( b"rc(Windows.Gaming.XboxLive.Storage.GameSaveContainerInfoQuery;{3c94e863-6f80-4327-9327-ffc11afd42b3})" ) ;
}
unsafe impl ::windows::Interface for GameSaveContainerInfoQuery {
type Vtable = IGameSaveContainerInfoQuery_abi;
const IID: ::windows::Guid = ::windows::Guid::from_values(
1016391779,
28544,
17191,
[147, 39, 255, 193, 26, 253, 66, 179],
);
}
impl ::windows::RuntimeName for GameSaveContainerInfoQuery {
const NAME: &'static str = "Windows.Gaming.XboxLive.Storage.GameSaveContainerInfoQuery";
}
impl ::std::convert::From<GameSaveContainerInfoQuery> for ::windows::IUnknown {
fn from(value: GameSaveContainerInfoQuery) -> Self {
unsafe { ::std::mem::transmute(value) }
}
}
impl ::std::convert::From<&GameSaveContainerInfoQuery> for ::windows::IUnknown {
fn from(value: &GameSaveContainerInfoQuery) -> Self {
::std::convert::From::from(::std::clone::Clone::clone(value))
}
}
impl<'a> ::windows::IntoParam<'a, ::windows::IUnknown> for GameSaveContainerInfoQuery {
fn into_param(self) -> ::windows::Param<'a, ::windows::IUnknown> {
::windows::Param::Owned(::std::convert::Into::<::windows::IUnknown>::into(self))
}
}
impl<'a> ::windows::IntoParam<'a, ::windows::IUnknown> for &GameSaveContainerInfoQuery {
fn into_param(self) -> ::windows::Param<'a, ::windows::IUnknown> {
::windows::Param::Owned(::std::convert::Into::<::windows::IUnknown>::into(
::std::clone::Clone::clone(self),
))
}
}
impl ::std::convert::From<GameSaveContainerInfoQuery> for ::windows::IInspectable {
fn from(value: GameSaveContainerInfoQuery) -> Self {
value.0
}
}
impl ::std::convert::From<&GameSaveContainerInfoQuery> for ::windows::IInspectable {
fn from(value: &GameSaveContainerInfoQuery) -> Self {
value.0.clone()
}
}
impl<'a> ::windows::IntoParam<'a, ::windows::IInspectable> for GameSaveContainerInfoQuery {
fn into_param(self) -> ::windows::Param<'a, ::windows::IInspectable> {
::windows::Param::Owned(self.0)
}
}
impl<'a> ::windows::IntoParam<'a, ::windows::IInspectable> for &'a GameSaveContainerInfoQuery {
fn into_param(self) -> ::windows::Param<'a, ::windows::IInspectable> {
::windows::Param::Borrowed(&self.0)
}
}
unsafe impl ::std::marker::Send for GameSaveContainerInfoQuery {}
unsafe impl ::std::marker::Sync for GameSaveContainerInfoQuery {}
#[derive(
:: std :: cmp :: PartialEq,
:: std :: cmp :: Eq,
:: std :: marker :: Copy,
:: std :: clone :: Clone,
:: std :: default :: Default,
:: std :: fmt :: Debug,
)]
#[repr(transparent)]
pub struct GameSaveErrorStatus(pub i32);
impl GameSaveErrorStatus {
pub const Ok: GameSaveErrorStatus = GameSaveErrorStatus(0i32);
pub const Abort: GameSaveErrorStatus = GameSaveErrorStatus(-2147467260i32);
pub const InvalidContainerName: GameSaveErrorStatus =
GameSaveErrorStatus(-2138898431i32);
pub const NoAccess: GameSaveErrorStatus = GameSaveErrorStatus(-2138898430i32);
pub const OutOfLocalStorage: GameSaveErrorStatus = GameSaveErrorStatus(-2138898429i32);
pub const UserCanceled: GameSaveErrorStatus = GameSaveErrorStatus(-2138898428i32);
pub const UpdateTooBig: GameSaveErrorStatus = GameSaveErrorStatus(-2138898427i32);
pub const QuotaExceeded: GameSaveErrorStatus = GameSaveErrorStatus(-2138898426i32);
pub const ProvidedBufferTooSmall: GameSaveErrorStatus =
GameSaveErrorStatus(-2138898425i32);
pub const BlobNotFound: GameSaveErrorStatus = GameSaveErrorStatus(-2138898424i32);
pub const NoXboxLiveInfo: GameSaveErrorStatus = GameSaveErrorStatus(-2138898423i32);
pub const ContainerNotInSync: GameSaveErrorStatus = GameSaveErrorStatus(-2138898422i32);
pub const ContainerSyncFailed: GameSaveErrorStatus =
GameSaveErrorStatus(-2138898421i32);
pub const UserHasNoXboxLiveInfo: GameSaveErrorStatus =
GameSaveErrorStatus(-2138898420i32);
pub const ObjectExpired: GameSaveErrorStatus = GameSaveErrorStatus(-2138898419i32);
}
impl ::std::convert::From<i32> for GameSaveErrorStatus {
fn from(value: i32) -> Self {
Self(value)
}
}
unsafe impl ::windows::Abi for GameSaveErrorStatus {
type Abi = Self;
type DefaultType = Self;
}
unsafe impl ::windows::RuntimeType for GameSaveErrorStatus {
const SIGNATURE: ::windows::ConstBuffer = ::windows::ConstBuffer::from_slice(
b"enum(Windows.Gaming.XboxLive.Storage.GameSaveErrorStatus;i4)",
);
}
#[repr(transparent)]
#[derive(
:: std :: cmp :: PartialEq,
:: std :: cmp :: Eq,
:: std :: clone :: Clone,
:: std :: fmt :: Debug,
)]
pub struct GameSaveOperationResult(::windows::IInspectable);
impl GameSaveOperationResult {
pub fn Status(&self) -> ::windows::Result<GameSaveErrorStatus> {
let this = self;
unsafe {
let mut result__: GameSaveErrorStatus = ::std::mem::zeroed();
(::windows::Interface::vtable(this).6)(
::std::mem::transmute_copy(this),
&mut result__,
)
.from_abi::<GameSaveErrorStatus>(result__)
}
}
}
unsafe impl ::windows::RuntimeType for GameSaveOperationResult {
const SIGNATURE : :: windows :: ConstBuffer = :: windows :: ConstBuffer :: from_slice ( b"rc(Windows.Gaming.XboxLive.Storage.GameSaveOperationResult;{cf0f1a05-24a0-4582-9a55-b1bbbb9388d8})" ) ;
}
unsafe impl ::windows::Interface for GameSaveOperationResult {
type Vtable = IGameSaveOperationResult_abi;
const IID: ::windows::Guid = ::windows::Guid::from_values(
3473873413,
9376,
17794,
[154, 85, 177, 187, 187, 147, 136, 216],
);
}
impl ::windows::RuntimeName for GameSaveOperationResult {
const NAME: &'static str = "Windows.Gaming.XboxLive.Storage.GameSaveOperationResult";
}
impl ::std::convert::From<GameSaveOperationResult> for ::windows::IUnknown {
fn from(value: GameSaveOperationResult) -> Self {
unsafe { ::std::mem::transmute(value) }
}
}
impl ::std::convert::From<&GameSaveOperationResult> for ::windows::IUnknown {
fn from(value: &GameSaveOperationResult) -> Self {
::std::convert::From::from(::std::clone::Clone::clone(value))
}
}
impl<'a> ::windows::IntoParam<'a, ::windows::IUnknown> for GameSaveOperationResult {
fn into_param(self) -> ::windows::Param<'a, ::windows::IUnknown> {
::windows::Param::Owned(::std::convert::Into::<::windows::IUnknown>::into(self))
}
}
impl<'a> ::windows::IntoParam<'a, ::windows::IUnknown> for &GameSaveOperationResult {
fn into_param(self) -> ::windows::Param<'a, ::windows::IUnknown> {
::windows::Param::Owned(::std::convert::Into::<::windows::IUnknown>::into(
::std::clone::Clone::clone(self),
))
}
}
impl ::std::convert::From<GameSaveOperationResult> for ::windows::IInspectable {
fn from(value: GameSaveOperationResult) -> Self {
value.0
}
}
impl ::std::convert::From<&GameSaveOperationResult> for ::windows::IInspectable {
fn from(value: &GameSaveOperationResult) -> Self {
value.0.clone()
}
}
impl<'a> ::windows::IntoParam<'a, ::windows::IInspectable> for GameSaveOperationResult {
fn into_param(self) -> ::windows::Param<'a, ::windows::IInspectable> {
::windows::Param::Owned(self.0)
}
}
impl<'a> ::windows::IntoParam<'a, ::windows::IInspectable> for &'a GameSaveOperationResult {
fn into_param(self) -> ::windows::Param<'a, ::windows::IInspectable> {
::windows::Param::Borrowed(&self.0)
}
}
unsafe impl ::std::marker::Send for GameSaveOperationResult {}
unsafe impl ::std::marker::Sync for GameSaveOperationResult {}
#[repr(transparent)]
#[derive(
:: std :: cmp :: PartialEq,
:: std :: cmp :: Eq,
:: std :: clone :: Clone,
:: std :: fmt :: Debug,
)]
pub struct GameSaveProvider(::windows::IInspectable);
impl GameSaveProvider {
pub fn User(&self) -> ::windows::Result<::windows_system::User> {
let this = self;
unsafe {
let mut result__: ::windows::RawPtr = ::std::mem::zeroed();
(::windows::Interface::vtable(this).6)(
::std::mem::transmute_copy(this),
&mut result__,
)
.from_abi::<::windows_system::User>(result__)
}
}
pub fn CreateContainer<'a, Param0: ::windows::IntoParam<'a, ::windows::HSTRING>>(
&self,
name: Param0,
) -> ::windows::Result<GameSaveContainer> {
let this = self;
unsafe {
let mut result__: ::windows::RawPtr = ::std::mem::zeroed();
(::windows::Interface::vtable(this).7)(
::std::mem::transmute_copy(this),
name.into_param().abi(),
&mut result__,
)
.from_abi::<GameSaveContainer>(result__)
}
}
pub fn DeleteContainerAsync<
'a,
Param0: ::windows::IntoParam<'a, ::windows::HSTRING>,
>(
&self,
name: Param0,
) -> ::windows::Result<::windows_foundation::IAsyncOperation<GameSaveOperationResult>>
{
let this = self;
unsafe {
let mut result__: ::windows::RawPtr = ::std::mem::zeroed();
(::windows::Interface::vtable(this).8)(
::std::mem::transmute_copy(this),
name.into_param().abi(),
&mut result__,
)
.from_abi::<::windows_foundation::IAsyncOperation<
GameSaveOperationResult,
>>(result__)
}
}
pub fn CreateContainerInfoQuery(
&self,
) -> ::windows::Result<GameSaveContainerInfoQuery> {
let this = self;
unsafe {
let mut result__: ::windows::RawPtr = ::std::mem::zeroed();
(::windows::Interface::vtable(this).9)(
::std::mem::transmute_copy(this),
&mut result__,
)
.from_abi::<GameSaveContainerInfoQuery>(result__)
}
}
pub fn CreateContainerInfoQueryWithName<
'a,
Param0: ::windows::IntoParam<'a, ::windows::HSTRING>,
>(
&self,
containernameprefix: Param0,
) -> ::windows::Result<GameSaveContainerInfoQuery> {
let this = self;
unsafe {
let mut result__: ::windows::RawPtr = ::std::mem::zeroed();
(::windows::Interface::vtable(this).10)(
::std::mem::transmute_copy(this),
containernameprefix.into_param().abi(),
&mut result__,
)
.from_abi::<GameSaveContainerInfoQuery>(result__)
}
}
pub fn GetRemainingBytesInQuotaAsync(
&self,
) -> ::windows::Result<::windows_foundation::IAsyncOperation<i64>> {
let this = self;
unsafe {
let mut result__: ::windows::RawPtr = ::std::mem::zeroed();
(::windows::Interface::vtable(this).11)(
::std::mem::transmute_copy(this),
&mut result__,
)
.from_abi::<::windows_foundation::IAsyncOperation<i64>>(result__)
}
}
pub fn ContainersChangedSinceLastSync(
&self,
) -> ::windows::Result<::windows_foundation::Collections::IVectorView<::windows::HSTRING>>
{
let this = self;
unsafe {
let mut result__: ::windows::RawPtr = ::std::mem::zeroed();
(::windows::Interface::vtable(this).12)(
::std::mem::transmute_copy(this),
&mut result__,
)
.from_abi::<::windows_foundation::Collections::IVectorView<
::windows::HSTRING,
>>(result__)
}
}
pub fn GetForUserAsync<
'a,
Param0: ::windows::IntoParam<'a, ::windows_system::User>,
Param1: ::windows::IntoParam<'a, ::windows::HSTRING>,
>(
user: Param0,
serviceconfigid: Param1,
) -> ::windows::Result<::windows_foundation::IAsyncOperation<GameSaveProviderGetResult>>
{
Self::IGameSaveProviderStatics(|this| unsafe {
let mut result__: ::windows::RawPtr = ::std::mem::zeroed();
(::windows::Interface::vtable(this).6)(
::std::mem::transmute_copy(this),
user.into_param().abi(),
serviceconfigid.into_param().abi(),
&mut result__,
)
.from_abi::<::windows_foundation::IAsyncOperation<
GameSaveProviderGetResult,
>>(result__)
})
}
pub fn GetSyncOnDemandForUserAsync<
'a,
Param0: ::windows::IntoParam<'a, ::windows_system::User>,
Param1: ::windows::IntoParam<'a, ::windows::HSTRING>,
>(
user: Param0,
serviceconfigid: Param1,
) -> ::windows::Result<::windows_foundation::IAsyncOperation<GameSaveProviderGetResult>>
{
Self::IGameSaveProviderStatics(|this| unsafe {
let mut result__: ::windows::RawPtr = ::std::mem::zeroed();
(::windows::Interface::vtable(this).7)(
::std::mem::transmute_copy(this),
user.into_param().abi(),
serviceconfigid.into_param().abi(),
&mut result__,
)
.from_abi::<::windows_foundation::IAsyncOperation<
GameSaveProviderGetResult,
>>(result__)
})
}
pub fn IGameSaveProviderStatics<
R,
F: FnOnce(&IGameSaveProviderStatics) -> ::windows::Result<R>,
>(
callback: F,
) -> ::windows::Result<R> {
static mut SHARED: ::windows::FactoryCache<
GameSaveProvider,
IGameSaveProviderStatics,
> = ::windows::FactoryCache::new();
unsafe { SHARED.call(callback) }
}
}
unsafe impl ::windows::RuntimeType for GameSaveProvider {
const SIGNATURE : :: windows :: ConstBuffer = :: windows :: ConstBuffer :: from_slice ( b"rc(Windows.Gaming.XboxLive.Storage.GameSaveProvider;{90a60394-80fe-4211-97f8-a5de14dd95d2})" ) ;
}
unsafe impl ::windows::Interface for GameSaveProvider {
type Vtable = IGameSaveProvider_abi;
const IID: ::windows::Guid = ::windows::Guid::from_values(
2426798996,
33022,
16913,
[151, 248, 165, 222, 20, 221, 149, 210],
);
}
impl ::windows::RuntimeName for GameSaveProvider {
const NAME: &'static str = "Windows.Gaming.XboxLive.Storage.GameSaveProvider";
}
impl ::std::convert::From<GameSaveProvider> for ::windows::IUnknown {
fn from(value: GameSaveProvider) -> Self {
unsafe { ::std::mem::transmute(value) }
}
}
impl ::std::convert::From<&GameSaveProvider> for ::windows::IUnknown {
fn from(value: &GameSaveProvider) -> Self {
::std::convert::From::from(::std::clone::Clone::clone(value))
}
}
impl<'a> ::windows::IntoParam<'a, ::windows::IUnknown> for GameSaveProvider {
fn into_param(self) -> ::windows::Param<'a, ::windows::IUnknown> {
::windows::Param::Owned(::std::convert::Into::<::windows::IUnknown>::into(self))
}
}
impl<'a> ::windows::IntoParam<'a, ::windows::IUnknown> for &GameSaveProvider {
fn into_param(self) -> ::windows::Param<'a, ::windows::IUnknown> {
::windows::Param::Owned(::std::convert::Into::<::windows::IUnknown>::into(
::std::clone::Clone::clone(self),
))
}
}
impl ::std::convert::From<GameSaveProvider> for ::windows::IInspectable {
fn from(value: GameSaveProvider) -> Self {
value.0
}
}
impl ::std::convert::From<&GameSaveProvider> for ::windows::IInspectable {
fn from(value: &GameSaveProvider) -> Self {
value.0.clone()
}
}
impl<'a> ::windows::IntoParam<'a, ::windows::IInspectable> for GameSaveProvider {
fn into_param(self) -> ::windows::Param<'a, ::windows::IInspectable> {
::windows::Param::Owned(self.0)
}
}
impl<'a> ::windows::IntoParam<'a, ::windows::IInspectable> for &'a GameSaveProvider {
fn into_param(self) -> ::windows::Param<'a, ::windows::IInspectable> {
::windows::Param::Borrowed(&self.0)
}
}
unsafe impl ::std::marker::Send for GameSaveProvider {}
unsafe impl ::std::marker::Sync for GameSaveProvider {}
#[repr(transparent)]
#[derive(
:: std :: cmp :: PartialEq,
:: std :: cmp :: Eq,
:: std :: clone :: Clone,
:: std :: fmt :: Debug,
)]
pub struct GameSaveProviderGetResult(::windows::IInspectable);
impl GameSaveProviderGetResult {
pub fn Status(&self) -> ::windows::Result<GameSaveErrorStatus> {
let this = self;
unsafe {
let mut result__: GameSaveErrorStatus = ::std::mem::zeroed();
(::windows::Interface::vtable(this).6)(
::std::mem::transmute_copy(this),
&mut result__,
)
.from_abi::<GameSaveErrorStatus>(result__)
}
}
pub fn Value(&self) -> ::windows::Result<GameSaveProvider> {
let this = self;
unsafe {
let mut result__: ::windows::RawPtr = ::std::mem::zeroed();
(::windows::Interface::vtable(this).7)(
::std::mem::transmute_copy(this),
&mut result__,
)
.from_abi::<GameSaveProvider>(result__)
}
}
}
unsafe impl ::windows::RuntimeType for GameSaveProviderGetResult {
const SIGNATURE : :: windows :: ConstBuffer = :: windows :: ConstBuffer :: from_slice ( b"rc(Windows.Gaming.XboxLive.Storage.GameSaveProviderGetResult;{3ab90816-d393-4d65-ac16-41c3e67ab945})" ) ;
}
unsafe impl ::windows::Interface for GameSaveProviderGetResult {
type Vtable = IGameSaveProviderGetResult_abi;
const IID: ::windows::Guid = ::windows::Guid::from_values(
985204758,
54163,
19813,
[172, 22, 65, 195, 230, 122, 185, 69],
);
}
impl ::windows::RuntimeName for GameSaveProviderGetResult {
const NAME: &'static str = "Windows.Gaming.XboxLive.Storage.GameSaveProviderGetResult";
}
impl ::std::convert::From<GameSaveProviderGetResult> for ::windows::IUnknown {
fn from(value: GameSaveProviderGetResult) -> Self {
unsafe { ::std::mem::transmute(value) }
}
}
impl ::std::convert::From<&GameSaveProviderGetResult> for ::windows::IUnknown {
fn from(value: &GameSaveProviderGetResult) -> Self {
::std::convert::From::from(::std::clone::Clone::clone(value))
}
}
impl<'a> ::windows::IntoParam<'a, ::windows::IUnknown> for GameSaveProviderGetResult {
fn into_param(self) -> ::windows::Param<'a, ::windows::IUnknown> {
::windows::Param::Owned(::std::convert::Into::<::windows::IUnknown>::into(self))
}
}
impl<'a> ::windows::IntoParam<'a, ::windows::IUnknown> for &GameSaveProviderGetResult {
fn into_param(self) -> ::windows::Param<'a, ::windows::IUnknown> {
::windows::Param::Owned(::std::convert::Into::<::windows::IUnknown>::into(
::std::clone::Clone::clone(self),
))
}
}
impl ::std::convert::From<GameSaveProviderGetResult> for ::windows::IInspectable {
fn from(value: GameSaveProviderGetResult) -> Self {
value.0
}
}
impl ::std::convert::From<&GameSaveProviderGetResult> for ::windows::IInspectable {
fn from(value: &GameSaveProviderGetResult) -> Self {
value.0.clone()
}
}
impl<'a> ::windows::IntoParam<'a, ::windows::IInspectable> for GameSaveProviderGetResult {
fn into_param(self) -> ::windows::Param<'a, ::windows::IInspectable> {
::windows::Param::Owned(self.0)
}
}
impl<'a> ::windows::IntoParam<'a, ::windows::IInspectable> for &'a GameSaveProviderGetResult {
fn into_param(self) -> ::windows::Param<'a, ::windows::IInspectable> {
::windows::Param::Borrowed(&self.0)
}
}
unsafe impl ::std::marker::Send for GameSaveProviderGetResult {}
unsafe impl ::std::marker::Sync for GameSaveProviderGetResult {}
#[repr(transparent)]
#[derive(
:: std :: cmp :: PartialEq,
:: std :: cmp :: Eq,
:: std :: clone :: Clone,
:: std :: fmt :: Debug,
)]
#[doc(hidden)]
pub struct IGameSaveBlobGetResult(::windows::IInspectable);
unsafe impl ::windows::Interface for IGameSaveBlobGetResult {
type Vtable = IGameSaveBlobGetResult_abi;
const IID: ::windows::Guid = ::windows::Guid::from_values(
2440200672,
29185,
18771,
[170, 44, 64, 8, 240, 58, 239, 69],
);
}
#[repr(C)]
#[doc(hidden)]
pub struct IGameSaveBlobGetResult_abi(
pub unsafe extern "system" fn(
this: ::windows::RawPtr,
iid: &::windows::Guid,
interface: *mut ::windows::RawPtr,
) -> ::windows::HRESULT,
pub unsafe extern "system" fn(this: ::windows::RawPtr) -> u32,
pub unsafe extern "system" fn(this: ::windows::RawPtr) -> u32,
pub unsafe extern "system" fn(
this: ::windows::RawPtr,
count: *mut u32,
values: *mut *mut ::windows::Guid,
) -> ::windows::HRESULT,
pub unsafe extern "system" fn(
this: ::windows::RawPtr,
value: *mut ::windows::RawPtr,
) -> ::windows::HRESULT,
pub unsafe extern "system" fn(
this: ::windows::RawPtr,
value: *mut i32,
) -> ::windows::HRESULT,
pub unsafe extern "system" fn(
this: ::windows::RawPtr,
result__: *mut GameSaveErrorStatus,
) -> ::windows::HRESULT,
pub unsafe extern "system" fn(
this: ::windows::RawPtr,
result__: *mut ::windows::RawPtr,
) -> ::windows::HRESULT,
);
#[repr(transparent)]
#[derive(
:: std :: cmp :: PartialEq,
:: std :: cmp :: Eq,
:: std :: clone :: Clone,
:: std :: fmt :: Debug,
)]
#[doc(hidden)]
pub struct IGameSaveBlobInfo(::windows::IInspectable);
unsafe impl ::windows::Interface for IGameSaveBlobInfo {
type Vtable = IGameSaveBlobInfo_abi;
const IID: ::windows::Guid = ::windows::Guid::from_values(
2916319284,
47856,
17989,
[182, 208, 70, 237, 175, 251, 60, 43],
);
}
#[repr(C)]
#[doc(hidden)]
pub struct IGameSaveBlobInfo_abi(
pub unsafe extern "system" fn(
this: ::windows::RawPtr,
iid: &::windows::Guid,
interface: *mut ::windows::RawPtr,
) -> ::windows::HRESULT,
pub unsafe extern "system" fn(this: ::windows::RawPtr) -> u32,
pub unsafe extern "system" fn(this: ::windows::RawPtr) -> u32,
pub unsafe extern "system" fn(
this: ::windows::RawPtr,
count: *mut u32,
values: *mut *mut ::windows::Guid,
) -> ::windows::HRESULT,
pub unsafe extern "system" fn(
this: ::windows::RawPtr,
value: *mut ::windows::RawPtr,
) -> ::windows::HRESULT,
pub unsafe extern "system" fn(
this: ::windows::RawPtr,
value: *mut i32,
) -> ::windows::HRESULT,
pub unsafe extern "system" fn(
this: ::windows::RawPtr,
result__: *mut ::std::mem::ManuallyDrop<::windows::HSTRING>,
) -> ::windows::HRESULT,
pub unsafe extern "system" fn(
this: ::windows::RawPtr,
result__: *mut u32,
) -> ::windows::HRESULT,
);
#[repr(transparent)]
#[derive(
:: std :: cmp :: PartialEq,
:: std :: cmp :: Eq,
:: std :: clone :: Clone,
:: std :: fmt :: Debug,
)]
#[doc(hidden)]
pub struct IGameSaveBlobInfoGetResult(::windows::IInspectable);
unsafe impl ::windows::Interface for IGameSaveBlobInfoGetResult {
type Vtable = IGameSaveBlobInfoGetResult_abi;
const IID: ::windows::Guid = ::windows::Guid::from_values(
3344401794,
13975,
17087,
[152, 156, 102, 93, 146, 59, 82, 49],
);
}
#[repr(C)]
#[doc(hidden)]
pub struct IGameSaveBlobInfoGetResult_abi(
pub unsafe extern "system" fn(
this: ::windows::RawPtr,
iid: &::windows::Guid,
interface: *mut ::windows::RawPtr,
) -> ::windows::HRESULT,
pub unsafe extern "system" fn(this: ::windows::RawPtr) -> u32,
pub unsafe extern "system" fn(this: ::windows::RawPtr) -> u32,
pub unsafe extern "system" fn(
this: ::windows::RawPtr,
count: *mut u32,
values: *mut *mut ::windows::Guid,
) -> ::windows::HRESULT,
pub unsafe extern "system" fn(
this: ::windows::RawPtr,
value: *mut ::windows::RawPtr,
) -> ::windows::HRESULT,
pub unsafe extern "system" fn(
this: ::windows::RawPtr,
value: *mut i32,
) -> ::windows::HRESULT,
pub unsafe extern "system" fn(
this: ::windows::RawPtr,
result__: *mut GameSaveErrorStatus,
) -> ::windows::HRESULT,
pub unsafe extern "system" fn(
this: ::windows::RawPtr,
result__: *mut ::windows::RawPtr,
) -> ::windows::HRESULT,
);
#[repr(transparent)]
#[derive(
:: std :: cmp :: PartialEq,
:: std :: cmp :: Eq,
:: std :: clone :: Clone,
:: std :: fmt :: Debug,
)]
#[doc(hidden)]
pub struct IGameSaveBlobInfoQuery(::windows::IInspectable);
unsafe impl ::windows::Interface for IGameSaveBlobInfoQuery {
type Vtable = IGameSaveBlobInfoQuery_abi;
const IID: ::windows::Guid = ::windows::Guid::from_values(
2682090674,
61166,
17531,
[169, 210, 127, 150, 192, 248, 50, 8],
);
}
#[repr(C)]
#[doc(hidden)]
pub struct IGameSaveBlobInfoQuery_abi(
pub unsafe extern "system" fn(
this: ::windows::RawPtr,
iid: &::windows::Guid,
interface: *mut ::windows::RawPtr,
) -> ::windows::HRESULT,
pub unsafe extern "system" fn(this: ::windows::RawPtr) -> u32,
pub unsafe extern "system" fn(this: ::windows::RawPtr) -> u32,
pub unsafe extern "system" fn(
this: ::windows::RawPtr,
count: *mut u32,
values: *mut *mut ::windows::Guid,
) -> ::windows::HRESULT,
pub unsafe extern "system" fn(
this: ::windows::RawPtr,
value: *mut ::windows::RawPtr,
) -> ::windows::HRESULT,
pub unsafe extern "system" fn(
this: ::windows::RawPtr,
value: *mut i32,
) -> ::windows::HRESULT,
pub unsafe extern "system" fn(
this: ::windows::RawPtr,
result__: *mut ::windows::RawPtr,
) -> ::windows::HRESULT,
pub unsafe extern "system" fn(
this: ::windows::RawPtr,
startindex: u32,
maxnumberofitems: u32,
result__: *mut ::windows::RawPtr,
) -> ::windows::HRESULT,
pub unsafe extern "system" fn(
this: ::windows::RawPtr,
result__: *mut ::windows::RawPtr,
) -> ::windows::HRESULT,
);
#[repr(transparent)]
#[derive(
:: std :: cmp :: PartialEq,
:: std :: cmp :: Eq,
:: std :: clone :: Clone,
:: std :: fmt :: Debug,
)]
#[doc(hidden)]
pub struct IGameSaveContainer(::windows::IInspectable);
unsafe impl ::windows::Interface for IGameSaveContainer {
type Vtable = IGameSaveContainer_abi;
const IID: ::windows::Guid = ::windows::Guid::from_values(
3284176777,
22079,
20173,
[156, 111, 51, 253, 14, 50, 61, 16],
);
}
#[repr(C)]
#[doc(hidden)]
pub struct IGameSaveContainer_abi(
pub unsafe extern "system" fn(
this: ::windows::RawPtr,
iid: &::windows::Guid,
interface: *mut ::windows::RawPtr,
) -> ::windows::HRESULT,
pub unsafe extern "system" fn(this: ::windows::RawPtr) -> u32,
pub unsafe extern "system" fn(this: ::windows::RawPtr) -> u32,
pub unsafe extern "system" fn(
this: ::windows::RawPtr,
count: *mut u32,
values: *mut *mut ::windows::Guid,
) -> ::windows::HRESULT,
pub unsafe extern "system" fn(
this: ::windows::RawPtr,
value: *mut ::windows::RawPtr,
) -> ::windows::HRESULT,
pub unsafe extern "system" fn(
this: ::windows::RawPtr,
value: *mut i32,
) -> ::windows::HRESULT,
pub unsafe extern "system" fn(
this: ::windows::RawPtr,
result__: *mut ::std::mem::ManuallyDrop<::windows::HSTRING>,
) -> ::windows::HRESULT,
pub unsafe extern "system" fn(
this: ::windows::RawPtr,
result__: *mut ::windows::RawPtr,
) -> ::windows::HRESULT,
pub unsafe extern "system" fn(
this: ::windows::RawPtr,
blobstowrite: ::windows::RawPtr,
blobstodelete: ::windows::RawPtr,
displayname: ::std::mem::ManuallyDrop<::windows::HSTRING>,
result__: *mut ::windows::RawPtr,
) -> ::windows::HRESULT,
pub unsafe extern "system" fn(
this: ::windows::RawPtr,
blobstoread: ::windows::RawPtr,
result__: *mut ::windows::RawPtr,
) -> ::windows::HRESULT,
pub unsafe extern "system" fn(
this: ::windows::RawPtr,
blobstoread: ::windows::RawPtr,
result__: *mut ::windows::RawPtr,
) -> ::windows::HRESULT,
pub unsafe extern "system" fn(
this: ::windows::RawPtr,
blobstowrite: ::windows::RawPtr,
blobstodelete: ::windows::RawPtr,
displayname: ::std::mem::ManuallyDrop<::windows::HSTRING>,
result__: *mut ::windows::RawPtr,
) -> ::windows::HRESULT,
pub unsafe extern "system" fn(
this: ::windows::RawPtr,
blobnameprefix: ::std::mem::ManuallyDrop<::windows::HSTRING>,
result__: *mut ::windows::RawPtr,
) -> ::windows::HRESULT,
);
#[repr(transparent)]
#[derive(
:: std :: cmp :: PartialEq,
:: std :: cmp :: Eq,
:: std :: clone :: Clone,
:: std :: fmt :: Debug,
)]
#[doc(hidden)]
pub struct IGameSaveContainerInfo(::windows::IInspectable);
unsafe impl ::windows::Interface for IGameSaveContainerInfo {
type Vtable = IGameSaveContainerInfo_abi;
const IID: ::windows::Guid = ::windows::Guid::from_values(
3085071104,
5469,
19380,
[178, 186, 147, 3, 6, 243, 145, 181],
);
}
#[repr(C)]
#[doc(hidden)]
pub struct IGameSaveContainerInfo_abi(
pub unsafe extern "system" fn(
this: ::windows::RawPtr,
iid: &::windows::Guid,
interface: *mut ::windows::RawPtr,
) -> ::windows::HRESULT,
pub unsafe extern "system" fn(this: ::windows::RawPtr) -> u32,
pub unsafe extern "system" fn(this: ::windows::RawPtr) -> u32,
pub unsafe extern "system" fn(
this: ::windows::RawPtr,
count: *mut u32,
values: *mut *mut ::windows::Guid,
) -> ::windows::HRESULT,
pub unsafe extern "system" fn(
this: ::windows::RawPtr,
value: *mut ::windows::RawPtr,
) -> ::windows::HRESULT,
pub unsafe extern "system" fn(
this: ::windows::RawPtr,
value: *mut i32,
) -> ::windows::HRESULT,
pub unsafe extern "system" fn(
this: ::windows::RawPtr,
result__: *mut ::std::mem::ManuallyDrop<::windows::HSTRING>,
) -> ::windows::HRESULT,
pub unsafe extern "system" fn(
this: ::windows::RawPtr,
result__: *mut u64,
) -> ::windows::HRESULT,
pub unsafe extern "system" fn(
this: ::windows::RawPtr,
result__: *mut ::std::mem::ManuallyDrop<::windows::HSTRING>,
) -> ::windows::HRESULT,
pub unsafe extern "system" fn(
this: ::windows::RawPtr,
result__: *mut ::windows_foundation::DateTime,
) -> ::windows::HRESULT,
pub unsafe extern "system" fn(
this: ::windows::RawPtr,
result__: *mut bool,
) -> ::windows::HRESULT,
);
#[repr(transparent)]
#[derive(
:: std :: cmp :: PartialEq,
:: std :: cmp :: Eq,
:: std :: clone :: Clone,
:: std :: fmt :: Debug,
)]
#[doc(hidden)]
pub struct IGameSaveContainerInfoGetResult(::windows::IInspectable);
unsafe impl ::windows::Interface for IGameSaveContainerInfoGetResult {
type Vtable = IGameSaveContainerInfoGetResult_abi;
const IID: ::windows::Guid = ::windows::Guid::from_values(
4291104116,
50561,
20381,
[158, 57, 48, 161, 12, 30, 76, 80],
);
}
#[repr(C)]
#[doc(hidden)]
pub struct IGameSaveContainerInfoGetResult_abi(
pub unsafe extern "system" fn(
this: ::windows::RawPtr,
iid: &::windows::Guid,
interface: *mut ::windows::RawPtr,
) -> ::windows::HRESULT,
pub unsafe extern "system" fn(this: ::windows::RawPtr) -> u32,
pub unsafe extern "system" fn(this: ::windows::RawPtr) -> u32,
pub unsafe extern "system" fn(
this: ::windows::RawPtr,
count: *mut u32,
values: *mut *mut ::windows::Guid,
) -> ::windows::HRESULT,
pub unsafe extern "system" fn(
this: ::windows::RawPtr,
value: *mut ::windows::RawPtr,
) -> ::windows::HRESULT,
pub unsafe extern "system" fn(
this: ::windows::RawPtr,
value: *mut i32,
) -> ::windows::HRESULT,
pub unsafe extern "system" fn(
this: ::windows::RawPtr,
result__: *mut GameSaveErrorStatus,
) -> ::windows::HRESULT,
pub unsafe extern "system" fn(
this: ::windows::RawPtr,
result__: *mut ::windows::RawPtr,
) -> ::windows::HRESULT,
);
#[repr(transparent)]
#[derive(
:: std :: cmp :: PartialEq,
:: std :: cmp :: Eq,
:: std :: clone :: Clone,
:: std :: fmt :: Debug,
)]
#[doc(hidden)]
pub struct IGameSaveContainerInfoQuery(::windows::IInspectable);
unsafe impl ::windows::Interface for IGameSaveContainerInfoQuery {
type Vtable = IGameSaveContainerInfoQuery_abi;
const IID: ::windows::Guid = ::windows::Guid::from_values(
1016391779,
28544,
17191,
[147, 39, 255, 193, 26, 253, 66, 179],
);
}
#[repr(C)]
#[doc(hidden)]
pub struct IGameSaveContainerInfoQuery_abi(
pub unsafe extern "system" fn(
this: ::windows::RawPtr,
iid: &::windows::Guid,
interface: *mut ::windows::RawPtr,
) -> ::windows::HRESULT,
pub unsafe extern "system" fn(this: ::windows::RawPtr) -> u32,
pub unsafe extern "system" fn(this: ::windows::RawPtr) -> u32,
pub unsafe extern "system" fn(
this: ::windows::RawPtr,
count: *mut u32,
values: *mut *mut ::windows::Guid,
) -> ::windows::HRESULT,
pub unsafe extern "system" fn(
this: ::windows::RawPtr,
value: *mut ::windows::RawPtr,
) -> ::windows::HRESULT,
pub unsafe extern "system" fn(
this: ::windows::RawPtr,
value: *mut i32,
) -> ::windows::HRESULT,
pub unsafe extern "system" fn(
this: ::windows::RawPtr,
result__: *mut ::windows::RawPtr,
) -> ::windows::HRESULT,
pub unsafe extern "system" fn(
this: ::windows::RawPtr,
startindex: u32,
maxnumberofitems: u32,
result__: *mut ::windows::RawPtr,
) -> ::windows::HRESULT,
pub unsafe extern "system" fn(
this: ::windows::RawPtr,
result__: *mut ::windows::RawPtr,
) -> ::windows::HRESULT,
);
#[repr(transparent)]
#[derive(
:: std :: cmp :: PartialEq,
:: std :: cmp :: Eq,
:: std :: clone :: Clone,
:: std :: fmt :: Debug,
)]
#[doc(hidden)]
pub struct IGameSaveOperationResult(::windows::IInspectable);
unsafe impl ::windows::Interface for IGameSaveOperationResult {
type Vtable = IGameSaveOperationResult_abi;
const IID: ::windows::Guid = ::windows::Guid::from_values(
3473873413,
9376,
17794,
[154, 85, 177, 187, 187, 147, 136, 216],
);
}
#[repr(C)]
#[doc(hidden)]
pub struct IGameSaveOperationResult_abi(
pub unsafe extern "system" fn(
this: ::windows::RawPtr,
iid: &::windows::Guid,
interface: *mut ::windows::RawPtr,
) -> ::windows::HRESULT,
pub unsafe extern "system" fn(this: ::windows::RawPtr) -> u32,
pub unsafe extern "system" fn(this: ::windows::RawPtr) -> u32,
pub unsafe extern "system" fn(
this: ::windows::RawPtr,
count: *mut u32,
values: *mut *mut ::windows::Guid,
) -> ::windows::HRESULT,
pub unsafe extern "system" fn(
this: ::windows::RawPtr,
value: *mut ::windows::RawPtr,
) -> ::windows::HRESULT,
pub unsafe extern "system" fn(
this: ::windows::RawPtr,
value: *mut i32,
) -> ::windows::HRESULT,
pub unsafe extern "system" fn(
this: ::windows::RawPtr,
result__: *mut GameSaveErrorStatus,
) -> ::windows::HRESULT,
);
#[repr(transparent)]
#[derive(
:: std :: cmp :: PartialEq,
:: std :: cmp :: Eq,
:: std :: clone :: Clone,
:: std :: fmt :: Debug,
)]
#[doc(hidden)]
pub struct IGameSaveProvider(::windows::IInspectable);
unsafe impl ::windows::Interface for IGameSaveProvider {
type Vtable = IGameSaveProvider_abi;
const IID: ::windows::Guid = ::windows::Guid::from_values(
2426798996,
33022,
16913,
[151, 248, 165, 222, 20, 221, 149, 210],
);
}
#[repr(C)]
#[doc(hidden)]
pub struct IGameSaveProvider_abi(
pub unsafe extern "system" fn(
this: ::windows::RawPtr,
iid: &::windows::Guid,
interface: *mut ::windows::RawPtr,
) -> ::windows::HRESULT,
pub unsafe extern "system" fn(this: ::windows::RawPtr) -> u32,
pub unsafe extern "system" fn(this: ::windows::RawPtr) -> u32,
pub unsafe extern "system" fn(
this: ::windows::RawPtr,
count: *mut u32,
values: *mut *mut ::windows::Guid,
) -> ::windows::HRESULT,
pub unsafe extern "system" fn(
this: ::windows::RawPtr,
value: *mut ::windows::RawPtr,
) -> ::windows::HRESULT,
pub unsafe extern "system" fn(
this: ::windows::RawPtr,
value: *mut i32,
) -> ::windows::HRESULT,
pub unsafe extern "system" fn(
this: ::windows::RawPtr,
result__: *mut ::windows::RawPtr,
) -> ::windows::HRESULT,
pub unsafe extern "system" fn(
this: ::windows::RawPtr,
name: ::std::mem::ManuallyDrop<::windows::HSTRING>,
result__: *mut ::windows::RawPtr,
) -> ::windows::HRESULT,
pub unsafe extern "system" fn(
this: ::windows::RawPtr,
name: ::std::mem::ManuallyDrop<::windows::HSTRING>,
result__: *mut ::windows::RawPtr,
) -> ::windows::HRESULT,
pub unsafe extern "system" fn(
this: ::windows::RawPtr,
result__: *mut ::windows::RawPtr,
) -> ::windows::HRESULT,
pub unsafe extern "system" fn(
this: ::windows::RawPtr,
containernameprefix: ::std::mem::ManuallyDrop<::windows::HSTRING>,
result__: *mut ::windows::RawPtr,
) -> ::windows::HRESULT,
pub unsafe extern "system" fn(
this: ::windows::RawPtr,
result__: *mut ::windows::RawPtr,
) -> ::windows::HRESULT,
pub unsafe extern "system" fn(
this: ::windows::RawPtr,
result__: *mut ::windows::RawPtr,
) -> ::windows::HRESULT,
);
#[repr(transparent)]
#[derive(
:: std :: cmp :: PartialEq,
:: std :: cmp :: Eq,
:: std :: clone :: Clone,
:: std :: fmt :: Debug,
)]
#[doc(hidden)]
pub struct IGameSaveProviderGetResult(::windows::IInspectable);
unsafe impl ::windows::Interface for IGameSaveProviderGetResult {
type Vtable = IGameSaveProviderGetResult_abi;
const IID: ::windows::Guid = ::windows::Guid::from_values(
985204758,
54163,
19813,
[172, 22, 65, 195, 230, 122, 185, 69],
);
}
#[repr(C)]
#[doc(hidden)]
pub struct IGameSaveProviderGetResult_abi(
pub unsafe extern "system" fn(
this: ::windows::RawPtr,
iid: &::windows::Guid,
interface: *mut ::windows::RawPtr,
) -> ::windows::HRESULT,
pub unsafe extern "system" fn(this: ::windows::RawPtr) -> u32,
pub unsafe extern "system" fn(this: ::windows::RawPtr) -> u32,
pub unsafe extern "system" fn(
this: ::windows::RawPtr,
count: *mut u32,
values: *mut *mut ::windows::Guid,
) -> ::windows::HRESULT,
pub unsafe extern "system" fn(
this: ::windows::RawPtr,
value: *mut ::windows::RawPtr,
) -> ::windows::HRESULT,
pub unsafe extern "system" fn(
this: ::windows::RawPtr,
value: *mut i32,
) -> ::windows::HRESULT,
pub unsafe extern "system" fn(
this: ::windows::RawPtr,
result__: *mut GameSaveErrorStatus,
) -> ::windows::HRESULT,
pub unsafe extern "system" fn(
this: ::windows::RawPtr,
result__: *mut ::windows::RawPtr,
) -> ::windows::HRESULT,
);
#[repr(transparent)]
#[derive(
:: std :: cmp :: PartialEq,
:: std :: cmp :: Eq,
:: std :: clone :: Clone,
:: std :: fmt :: Debug,
)]
#[doc(hidden)]
pub struct IGameSaveProviderStatics(::windows::IInspectable);
unsafe impl ::windows::Interface for IGameSaveProviderStatics {
type Vtable = IGameSaveProviderStatics_abi;
const IID: ::windows::Guid = ::windows::Guid::from_values(
3491577552,
31491,
17565,
[140, 189, 52, 2, 132, 42, 16, 72],
);
}
#[repr(C)]
#[doc(hidden)]
pub struct IGameSaveProviderStatics_abi(
pub unsafe extern "system" fn(
this: ::windows::RawPtr,
iid: &::windows::Guid,
interface: *mut ::windows::RawPtr,
) -> ::windows::HRESULT,
pub unsafe extern "system" fn(this: ::windows::RawPtr) -> u32,
pub unsafe extern "system" fn(this: ::windows::RawPtr) -> u32,
pub unsafe extern "system" fn(
this: ::windows::RawPtr,
count: *mut u32,
values: *mut *mut ::windows::Guid,
) -> ::windows::HRESULT,
pub unsafe extern "system" fn(
this: ::windows::RawPtr,
value: *mut ::windows::RawPtr,
) -> ::windows::HRESULT,
pub unsafe extern "system" fn(
this: ::windows::RawPtr,
value: *mut i32,
) -> ::windows::HRESULT,
pub unsafe extern "system" fn(
this: ::windows::RawPtr,
user: ::windows::RawPtr,
serviceconfigid: ::std::mem::ManuallyDrop<::windows::HSTRING>,
result__: *mut ::windows::RawPtr,
) -> ::windows::HRESULT,
pub unsafe extern "system" fn(
this: ::windows::RawPtr,
user: ::windows::RawPtr,
serviceconfigid: ::std::mem::ManuallyDrop<::windows::HSTRING>,
result__: *mut ::windows::RawPtr,
) -> ::windows::HRESULT,
);
}
#[repr(C)]
#[derive(
:: std :: clone :: Clone,
:: std :: default :: Default,
:: std :: fmt :: Debug,
:: std :: cmp :: PartialEq,
:: std :: cmp :: Eq,
:: std :: marker :: Copy,
)]
pub struct StorageApiContract(pub u8);
}