diff --git a/crates/libs/bindgen/default/Windows.winmd b/crates/libs/bindgen/default/Windows.winmd index 374a584ec3..567ae40362 100644 Binary files a/crates/libs/bindgen/default/Windows.winmd and b/crates/libs/bindgen/default/Windows.winmd differ diff --git a/crates/libs/bindgen/default/readme.md b/crates/libs/bindgen/default/readme.md index c2e82c6372..60d65ee500 100644 --- a/crates/libs/bindgen/default/readme.md +++ b/crates/libs/bindgen/default/readme.md @@ -12,7 +12,7 @@ like [ILSpy](https://github.com/icsharpcode/ILSpy). ## Windows.winmd - Source: https://www.nuget.org/packages/Microsoft.Windows.SDK.Contracts -- Version: 10.0.22621.755 +- Version: 10.0.22621.2428 The `Windows.winmd` file was created by merging the .winmd files from the last nuget package as follows: diff --git a/crates/libs/windows/Cargo.toml b/crates/libs/windows/Cargo.toml index e6eb683516..af633a2f98 100644 --- a/crates/libs/windows/Cargo.toml +++ b/crates/libs/windows/Cargo.toml @@ -316,6 +316,7 @@ System_Profile = ["System"] System_Profile_SystemManufacturers = ["System_Profile"] System_RemoteDesktop = ["System"] System_RemoteDesktop_Input = ["System_RemoteDesktop"] +System_RemoteDesktop_Provider = ["System_RemoteDesktop"] System_RemoteSystems = ["System"] System_Threading = ["System"] System_Threading_Core = ["System_Threading"] @@ -345,6 +346,7 @@ UI_Input_Preview_Injection = ["UI_Input_Preview"] UI_Input_Spatial = ["UI_Input"] UI_Notifications = ["UI"] UI_Notifications_Management = ["UI_Notifications"] +UI_Notifications_Preview = ["UI_Notifications"] UI_Popups = ["UI"] UI_Shell = ["UI"] UI_StartScreen = ["UI"] diff --git a/crates/libs/windows/src/Windows/Devices/Lights/mod.rs b/crates/libs/windows/src/Windows/Devices/Lights/mod.rs index 754f756827..99107b3d1f 100644 --- a/crates/libs/windows/src/Windows/Devices/Lights/mod.rs +++ b/crates/libs/windows/src/Windows/Devices/Lights/mod.rs @@ -109,6 +109,24 @@ pub struct ILampArray_Vtbl { #[doc(hidden)] #[repr(transparent)] #[derive(::core::cmp::PartialEq, ::core::cmp::Eq, ::core::fmt::Debug, ::core::clone::Clone)] +pub struct ILampArray2(::windows_core::IUnknown); +unsafe impl ::windows_core::Interface for ILampArray2 { + type Vtable = ILampArray2_Vtbl; +} +unsafe impl ::windows_core::ComInterface for ILampArray2 { + const IID: ::windows_core::GUID = ::windows_core::GUID::from_u128(0x050c181f_60a8_4711_a1af_1b1b4c658ea2); +} +#[repr(C)] +#[doc(hidden)] +pub struct ILampArray2_Vtbl { + pub base__: ::windows_core::IInspectable_Vtbl, + pub IsAvailable: unsafe extern "system" fn(this: *mut ::core::ffi::c_void, result__: *mut bool) -> ::windows_core::HRESULT, + pub AvailabilityChanged: unsafe extern "system" fn(this: *mut ::core::ffi::c_void, handler: *mut ::core::ffi::c_void, result__: *mut super::super::Foundation::EventRegistrationToken) -> ::windows_core::HRESULT, + pub RemoveAvailabilityChanged: unsafe extern "system" fn(this: *mut ::core::ffi::c_void, token: super::super::Foundation::EventRegistrationToken) -> ::windows_core::HRESULT, +} +#[doc(hidden)] +#[repr(transparent)] +#[derive(::core::cmp::PartialEq, ::core::cmp::Eq, ::core::fmt::Debug, ::core::clone::Clone)] pub struct ILampArrayStatics(::windows_core::IUnknown); unsafe impl ::windows_core::Interface for ILampArrayStatics { type Vtable = ILampArrayStatics_Vtbl; @@ -488,6 +506,27 @@ impl LampArray { (::windows_core::Interface::vtable(this).RequestMessageAsync)(::windows_core::Interface::as_raw(this), messageid, &mut result__).from_abi(result__) } } + pub fn IsAvailable(&self) -> ::windows_core::Result { + let this = &::windows_core::ComInterface::cast::(self)?; + unsafe { + let mut result__ = ::std::mem::zeroed(); + (::windows_core::Interface::vtable(this).IsAvailable)(::windows_core::Interface::as_raw(this), &mut result__).from_abi(result__) + } + } + pub fn AvailabilityChanged(&self, handler: P0) -> ::windows_core::Result + where + P0: ::windows_core::IntoParam>, + { + let this = &::windows_core::ComInterface::cast::(self)?; + unsafe { + let mut result__ = ::std::mem::zeroed(); + (::windows_core::Interface::vtable(this).AvailabilityChanged)(::windows_core::Interface::as_raw(this), handler.into_param().abi(), &mut result__).from_abi(result__) + } + } + pub fn RemoveAvailabilityChanged(&self, token: super::super::Foundation::EventRegistrationToken) -> ::windows_core::Result<()> { + let this = &::windows_core::ComInterface::cast::(self)?; + unsafe { (::windows_core::Interface::vtable(this).RemoveAvailabilityChanged)(::windows_core::Interface::as_raw(this), token).ok() } + } pub fn GetDeviceSelector() -> ::windows_core::Result<::windows_core::HSTRING> { Self::ILampArrayStatics(|this| unsafe { let mut result__ = ::std::mem::zeroed(); @@ -659,6 +698,7 @@ impl LampArrayKind { pub const Wearable: Self = Self(8i32); pub const Furniture: Self = Self(9i32); pub const Art: Self = Self(10i32); + pub const Headset: Self = Self(11i32); } impl ::core::marker::Copy for LampArrayKind {} impl ::core::clone::Clone for LampArrayKind { diff --git a/crates/libs/windows/src/Windows/Devices/Sensors/impl.rs b/crates/libs/windows/src/Windows/Devices/Sensors/impl.rs index 85a81d2efa..f06a974be4 100644 --- a/crates/libs/windows/src/Windows/Devices/Sensors/impl.rs +++ b/crates/libs/windows/src/Windows/Devices/Sensors/impl.rs @@ -1,3 +1,74 @@ +pub trait IHumanPresenceSensorExtension_Impl: Sized { + fn Initialize(&self, deviceinterface: &::windows_core::HSTRING) -> ::windows_core::Result<()>; + fn Start(&self) -> ::windows_core::Result<()>; + fn ProcessReading(&self, reading: ::core::option::Option<&HumanPresenceSensorReading>) -> ::windows_core::Result; + fn ProcessReadingTimeoutExpired(&self, reading: ::core::option::Option<&HumanPresenceSensorReading>) -> ::windows_core::Result<()>; + fn Stop(&self) -> ::windows_core::Result<()>; + fn Uninitialize(&self) -> ::windows_core::Result<()>; + fn Reset(&self) -> ::windows_core::Result<()>; +} +impl ::windows_core::RuntimeName for IHumanPresenceSensorExtension { + const NAME: &'static str = "Windows.Devices.Sensors.IHumanPresenceSensorExtension"; +} +impl IHumanPresenceSensorExtension_Vtbl { + pub const fn new, Impl: IHumanPresenceSensorExtension_Impl, const OFFSET: isize>() -> IHumanPresenceSensorExtension_Vtbl { + unsafe extern "system" fn Initialize, Impl: IHumanPresenceSensorExtension_Impl, const OFFSET: isize>(this: *mut ::core::ffi::c_void, deviceinterface: ::std::mem::MaybeUninit<::windows_core::HSTRING>) -> ::windows_core::HRESULT { + let this = (this as *const *const ()).offset(OFFSET) as *const Identity; + let this = (*this).get_impl(); + this.Initialize(::core::mem::transmute(&deviceinterface)).into() + } + unsafe extern "system" fn Start, Impl: IHumanPresenceSensorExtension_Impl, const OFFSET: isize>(this: *mut ::core::ffi::c_void) -> ::windows_core::HRESULT { + let this = (this as *const *const ()).offset(OFFSET) as *const Identity; + let this = (*this).get_impl(); + this.Start().into() + } + unsafe extern "system" fn ProcessReading, Impl: IHumanPresenceSensorExtension_Impl, const OFFSET: isize>(this: *mut ::core::ffi::c_void, reading: *mut ::core::ffi::c_void, result__: *mut *mut ::core::ffi::c_void) -> ::windows_core::HRESULT { + let this = (this as *const *const ()).offset(OFFSET) as *const Identity; + let this = (*this).get_impl(); + match this.ProcessReading(::windows_core::from_raw_borrowed(&reading)) { + ::core::result::Result::Ok(ok__) => { + ::core::ptr::write(result__, ::core::mem::transmute_copy(&ok__)); + ::core::mem::forget(ok__); + ::windows_core::HRESULT(0) + } + ::core::result::Result::Err(err) => err.into(), + } + } + unsafe extern "system" fn ProcessReadingTimeoutExpired, Impl: IHumanPresenceSensorExtension_Impl, const OFFSET: isize>(this: *mut ::core::ffi::c_void, reading: *mut ::core::ffi::c_void) -> ::windows_core::HRESULT { + let this = (this as *const *const ()).offset(OFFSET) as *const Identity; + let this = (*this).get_impl(); + this.ProcessReadingTimeoutExpired(::windows_core::from_raw_borrowed(&reading)).into() + } + unsafe extern "system" fn Stop, Impl: IHumanPresenceSensorExtension_Impl, const OFFSET: isize>(this: *mut ::core::ffi::c_void) -> ::windows_core::HRESULT { + let this = (this as *const *const ()).offset(OFFSET) as *const Identity; + let this = (*this).get_impl(); + this.Stop().into() + } + unsafe extern "system" fn Uninitialize, Impl: IHumanPresenceSensorExtension_Impl, const OFFSET: isize>(this: *mut ::core::ffi::c_void) -> ::windows_core::HRESULT { + let this = (this as *const *const ()).offset(OFFSET) as *const Identity; + let this = (*this).get_impl(); + this.Uninitialize().into() + } + unsafe extern "system" fn Reset, Impl: IHumanPresenceSensorExtension_Impl, const OFFSET: isize>(this: *mut ::core::ffi::c_void) -> ::windows_core::HRESULT { + let this = (this as *const *const ()).offset(OFFSET) as *const Identity; + let this = (*this).get_impl(); + this.Reset().into() + } + Self { + base__: ::windows_core::IInspectable_Vtbl::new::(), + Initialize: Initialize::, + Start: Start::, + ProcessReading: ProcessReading::, + ProcessReadingTimeoutExpired: ProcessReadingTimeoutExpired::, + Stop: Stop::, + Uninitialize: Uninitialize::, + Reset: Reset::, + } + } + pub unsafe fn matches(iid: *const ::windows_core::GUID) -> bool { + *iid == ::IID + } +} pub trait ISensorDataThreshold_Impl: Sized {} impl ::windows_core::RuntimeName for ISensorDataThreshold { const NAME: &'static str = "Windows.Devices.Sensors.ISensorDataThreshold"; diff --git a/crates/libs/windows/src/Windows/Devices/Sensors/mod.rs b/crates/libs/windows/src/Windows/Devices/Sensors/mod.rs index 7fec42f606..86c7d708de 100644 --- a/crates/libs/windows/src/Windows/Devices/Sensors/mod.rs +++ b/crates/libs/windows/src/Windows/Devices/Sensors/mod.rs @@ -381,6 +381,23 @@ pub struct IActivitySensorTriggerDetails_Vtbl { #[doc(hidden)] #[repr(transparent)] #[derive(::core::cmp::PartialEq, ::core::cmp::Eq, ::core::fmt::Debug, ::core::clone::Clone)] +pub struct IAdaptiveDimmingOptions(::windows_core::IUnknown); +unsafe impl ::windows_core::Interface for IAdaptiveDimmingOptions { + type Vtable = IAdaptiveDimmingOptions_Vtbl; +} +unsafe impl ::windows_core::ComInterface for IAdaptiveDimmingOptions { + const IID: ::windows_core::GUID = ::windows_core::GUID::from_u128(0xd3213cf7_89b5_5732_b2a0_aefe324f54e6); +} +#[repr(C)] +#[doc(hidden)] +pub struct IAdaptiveDimmingOptions_Vtbl { + pub base__: ::windows_core::IInspectable_Vtbl, + pub AllowWhenExternalDisplayConnected: unsafe extern "system" fn(this: *mut ::core::ffi::c_void, result__: *mut bool) -> ::windows_core::HRESULT, + pub SetAllowWhenExternalDisplayConnected: unsafe extern "system" fn(this: *mut ::core::ffi::c_void, value: bool) -> ::windows_core::HRESULT, +} +#[doc(hidden)] +#[repr(transparent)] +#[derive(::core::cmp::PartialEq, ::core::cmp::Eq, ::core::fmt::Debug, ::core::clone::Clone)] pub struct IAltimeter(::windows_core::IUnknown); unsafe impl ::windows_core::Interface for IAltimeter { type Vtable = IAltimeter_Vtbl; @@ -1162,7 +1179,26 @@ pub struct IHumanPresenceFeatures_Vtbl { SupportedWakeOrLockDistancesInMillimeters: usize, pub IsWakeOnApproachSupported: unsafe extern "system" fn(this: *mut ::core::ffi::c_void, result__: *mut bool) -> ::windows_core::HRESULT, pub IsLockOnLeaveSupported: unsafe extern "system" fn(this: *mut ::core::ffi::c_void, result__: *mut bool) -> ::windows_core::HRESULT, + #[cfg(feature = "deprecated")] pub IsAttentionAwareDimmingSupported: unsafe extern "system" fn(this: *mut ::core::ffi::c_void, result__: *mut bool) -> ::windows_core::HRESULT, + #[cfg(not(feature = "deprecated"))] + IsAttentionAwareDimmingSupported: usize, +} +#[doc(hidden)] +#[repr(transparent)] +#[derive(::core::cmp::PartialEq, ::core::cmp::Eq, ::core::fmt::Debug, ::core::clone::Clone)] +pub struct IHumanPresenceFeatures2(::windows_core::IUnknown); +unsafe impl ::windows_core::Interface for IHumanPresenceFeatures2 { + type Vtable = IHumanPresenceFeatures2_Vtbl; +} +unsafe impl ::windows_core::ComInterface for IHumanPresenceFeatures2 { + const IID: ::windows_core::GUID = ::windows_core::GUID::from_u128(0x08a9cdda_d929_5ec2_81e2_940bafa089cf); +} +#[repr(C)] +#[doc(hidden)] +pub struct IHumanPresenceFeatures2_Vtbl { + pub base__: ::windows_core::IInspectable_Vtbl, + pub IsAdaptiveDimmingSupported: unsafe extern "system" fn(this: *mut ::core::ffi::c_void, result__: *mut bool) -> ::windows_core::HRESULT, } #[doc(hidden)] #[repr(transparent)] @@ -1188,6 +1224,87 @@ pub struct IHumanPresenceSensor_Vtbl { #[doc(hidden)] #[repr(transparent)] #[derive(::core::cmp::PartialEq, ::core::cmp::Eq, ::core::fmt::Debug, ::core::clone::Clone)] +pub struct IHumanPresenceSensor2(::windows_core::IUnknown); +unsafe impl ::windows_core::Interface for IHumanPresenceSensor2 { + type Vtable = IHumanPresenceSensor2_Vtbl; +} +unsafe impl ::windows_core::ComInterface for IHumanPresenceSensor2 { + const IID: ::windows_core::GUID = ::windows_core::GUID::from_u128(0xf8833779_65fe_541a_b9d6_1e474a485e7a); +} +#[repr(C)] +#[doc(hidden)] +pub struct IHumanPresenceSensor2_Vtbl { + pub base__: ::windows_core::IInspectable_Vtbl, + pub IsPresenceSupported: unsafe extern "system" fn(this: *mut ::core::ffi::c_void, result__: *mut bool) -> ::windows_core::HRESULT, + pub IsEngagementSupported: unsafe extern "system" fn(this: *mut ::core::ffi::c_void, result__: *mut bool) -> ::windows_core::HRESULT, +} +#[repr(transparent)] +#[derive(::core::cmp::PartialEq, ::core::cmp::Eq, ::core::fmt::Debug, ::core::clone::Clone)] +pub struct IHumanPresenceSensorExtension(::windows_core::IUnknown); +impl IHumanPresenceSensorExtension { + pub fn Initialize(&self, deviceinterface: &::windows_core::HSTRING) -> ::windows_core::Result<()> { + let this = self; + unsafe { (::windows_core::Interface::vtable(this).Initialize)(::windows_core::Interface::as_raw(this), ::core::mem::transmute_copy(deviceinterface)).ok() } + } + pub fn Start(&self) -> ::windows_core::Result<()> { + let this = self; + unsafe { (::windows_core::Interface::vtable(this).Start)(::windows_core::Interface::as_raw(this)).ok() } + } + pub fn ProcessReading(&self, reading: P0) -> ::windows_core::Result + where + P0: ::windows_core::IntoParam, + { + let this = self; + unsafe { + let mut result__ = ::std::mem::zeroed(); + (::windows_core::Interface::vtable(this).ProcessReading)(::windows_core::Interface::as_raw(this), reading.into_param().abi(), &mut result__).from_abi(result__) + } + } + pub fn ProcessReadingTimeoutExpired(&self, reading: P0) -> ::windows_core::Result<()> + where + P0: ::windows_core::IntoParam, + { + let this = self; + unsafe { (::windows_core::Interface::vtable(this).ProcessReadingTimeoutExpired)(::windows_core::Interface::as_raw(this), reading.into_param().abi()).ok() } + } + pub fn Stop(&self) -> ::windows_core::Result<()> { + let this = self; + unsafe { (::windows_core::Interface::vtable(this).Stop)(::windows_core::Interface::as_raw(this)).ok() } + } + pub fn Uninitialize(&self) -> ::windows_core::Result<()> { + let this = self; + unsafe { (::windows_core::Interface::vtable(this).Uninitialize)(::windows_core::Interface::as_raw(this)).ok() } + } + pub fn Reset(&self) -> ::windows_core::Result<()> { + let this = self; + unsafe { (::windows_core::Interface::vtable(this).Reset)(::windows_core::Interface::as_raw(this)).ok() } + } +} +::windows_core::imp::interface_hierarchy!(IHumanPresenceSensorExtension, ::windows_core::IUnknown, ::windows_core::IInspectable); +impl ::windows_core::RuntimeType for IHumanPresenceSensorExtension { + const SIGNATURE: ::windows_core::imp::ConstBuffer = ::windows_core::imp::ConstBuffer::for_interface::(); +} +unsafe impl ::windows_core::Interface for IHumanPresenceSensorExtension { + type Vtable = IHumanPresenceSensorExtension_Vtbl; +} +unsafe impl ::windows_core::ComInterface for IHumanPresenceSensorExtension { + const IID: ::windows_core::GUID = ::windows_core::GUID::from_u128(0x3e526a71_2d1d_5d43_8a8e_a434a8242ef0); +} +#[repr(C)] +#[doc(hidden)] +pub struct IHumanPresenceSensorExtension_Vtbl { + pub base__: ::windows_core::IInspectable_Vtbl, + pub Initialize: unsafe extern "system" fn(this: *mut ::core::ffi::c_void, deviceinterface: ::std::mem::MaybeUninit<::windows_core::HSTRING>) -> ::windows_core::HRESULT, + pub Start: unsafe extern "system" fn(this: *mut ::core::ffi::c_void) -> ::windows_core::HRESULT, + pub ProcessReading: unsafe extern "system" fn(this: *mut ::core::ffi::c_void, reading: *mut ::core::ffi::c_void, result__: *mut *mut ::core::ffi::c_void) -> ::windows_core::HRESULT, + pub ProcessReadingTimeoutExpired: unsafe extern "system" fn(this: *mut ::core::ffi::c_void, reading: *mut ::core::ffi::c_void) -> ::windows_core::HRESULT, + pub Stop: unsafe extern "system" fn(this: *mut ::core::ffi::c_void) -> ::windows_core::HRESULT, + pub Uninitialize: unsafe extern "system" fn(this: *mut ::core::ffi::c_void) -> ::windows_core::HRESULT, + pub Reset: unsafe extern "system" fn(this: *mut ::core::ffi::c_void) -> ::windows_core::HRESULT, +} +#[doc(hidden)] +#[repr(transparent)] +#[derive(::core::cmp::PartialEq, ::core::cmp::Eq, ::core::fmt::Debug, ::core::clone::Clone)] pub struct IHumanPresenceSensorReading(::windows_core::IUnknown); unsafe impl ::windows_core::Interface for IHumanPresenceSensorReading { type Vtable = IHumanPresenceSensorReading_Vtbl; @@ -1207,6 +1324,25 @@ pub struct IHumanPresenceSensorReading_Vtbl { #[doc(hidden)] #[repr(transparent)] #[derive(::core::cmp::PartialEq, ::core::cmp::Eq, ::core::fmt::Debug, ::core::clone::Clone)] +pub struct IHumanPresenceSensorReading2(::windows_core::IUnknown); +unsafe impl ::windows_core::Interface for IHumanPresenceSensorReading2 { + type Vtable = IHumanPresenceSensorReading2_Vtbl; +} +unsafe impl ::windows_core::ComInterface for IHumanPresenceSensorReading2 { + const IID: ::windows_core::GUID = ::windows_core::GUID::from_u128(0xc4f0e950_3bff_53d6_a0f8_514ea3705c66); +} +#[repr(C)] +#[doc(hidden)] +pub struct IHumanPresenceSensorReading2_Vtbl { + pub base__: ::windows_core::IInspectable_Vtbl, + #[cfg(feature = "Foundation_Collections")] + pub Properties: unsafe extern "system" fn(this: *mut ::core::ffi::c_void, result__: *mut *mut ::core::ffi::c_void) -> ::windows_core::HRESULT, + #[cfg(not(feature = "Foundation_Collections"))] + Properties: usize, +} +#[doc(hidden)] +#[repr(transparent)] +#[derive(::core::cmp::PartialEq, ::core::cmp::Eq, ::core::fmt::Debug, ::core::clone::Clone)] pub struct IHumanPresenceSensorReadingChangedEventArgs(::windows_core::IUnknown); unsafe impl ::windows_core::Interface for IHumanPresenceSensorReadingChangedEventArgs { type Vtable = IHumanPresenceSensorReadingChangedEventArgs_Vtbl; @@ -1223,6 +1359,29 @@ pub struct IHumanPresenceSensorReadingChangedEventArgs_Vtbl { #[doc(hidden)] #[repr(transparent)] #[derive(::core::cmp::PartialEq, ::core::cmp::Eq, ::core::fmt::Debug, ::core::clone::Clone)] +pub struct IHumanPresenceSensorReadingUpdate(::windows_core::IUnknown); +unsafe impl ::windows_core::Interface for IHumanPresenceSensorReadingUpdate { + type Vtable = IHumanPresenceSensorReadingUpdate_Vtbl; +} +unsafe impl ::windows_core::ComInterface for IHumanPresenceSensorReadingUpdate { + const IID: ::windows_core::GUID = ::windows_core::GUID::from_u128(0x42419c77_6d2f_55a0_9e01_c9cbe7b2d6df); +} +#[repr(C)] +#[doc(hidden)] +pub struct IHumanPresenceSensorReadingUpdate_Vtbl { + pub base__: ::windows_core::IInspectable_Vtbl, + pub Timestamp: unsafe extern "system" fn(this: *mut ::core::ffi::c_void, result__: *mut *mut ::core::ffi::c_void) -> ::windows_core::HRESULT, + pub SetTimestamp: unsafe extern "system" fn(this: *mut ::core::ffi::c_void, value: *mut ::core::ffi::c_void) -> ::windows_core::HRESULT, + pub Presence: unsafe extern "system" fn(this: *mut ::core::ffi::c_void, result__: *mut *mut ::core::ffi::c_void) -> ::windows_core::HRESULT, + pub SetPresence: unsafe extern "system" fn(this: *mut ::core::ffi::c_void, value: *mut ::core::ffi::c_void) -> ::windows_core::HRESULT, + pub Engagement: unsafe extern "system" fn(this: *mut ::core::ffi::c_void, result__: *mut *mut ::core::ffi::c_void) -> ::windows_core::HRESULT, + pub SetEngagement: unsafe extern "system" fn(this: *mut ::core::ffi::c_void, value: *mut ::core::ffi::c_void) -> ::windows_core::HRESULT, + pub DistanceInMillimeters: unsafe extern "system" fn(this: *mut ::core::ffi::c_void, result__: *mut *mut ::core::ffi::c_void) -> ::windows_core::HRESULT, + pub SetDistanceInMillimeters: unsafe extern "system" fn(this: *mut ::core::ffi::c_void, value: *mut ::core::ffi::c_void) -> ::windows_core::HRESULT, +} +#[doc(hidden)] +#[repr(transparent)] +#[derive(::core::cmp::PartialEq, ::core::cmp::Eq, ::core::fmt::Debug, ::core::clone::Clone)] pub struct IHumanPresenceSensorStatics(::windows_core::IUnknown); unsafe impl ::windows_core::Interface for IHumanPresenceSensorStatics { type Vtable = IHumanPresenceSensorStatics_Vtbl; @@ -1241,6 +1400,23 @@ pub struct IHumanPresenceSensorStatics_Vtbl { #[doc(hidden)] #[repr(transparent)] #[derive(::core::cmp::PartialEq, ::core::cmp::Eq, ::core::fmt::Debug, ::core::clone::Clone)] +pub struct IHumanPresenceSensorStatics2(::windows_core::IUnknown); +unsafe impl ::windows_core::Interface for IHumanPresenceSensorStatics2 { + type Vtable = IHumanPresenceSensorStatics2_Vtbl; +} +unsafe impl ::windows_core::ComInterface for IHumanPresenceSensorStatics2 { + const IID: ::windows_core::GUID = ::windows_core::GUID::from_u128(0x5de35843_d260_5a87_995e_ace91326e1c4); +} +#[repr(C)] +#[doc(hidden)] +pub struct IHumanPresenceSensorStatics2_Vtbl { + pub base__: ::windows_core::IInspectable_Vtbl, + pub FromId: unsafe extern "system" fn(this: *mut ::core::ffi::c_void, sensorid: ::std::mem::MaybeUninit<::windows_core::HSTRING>, result__: *mut *mut ::core::ffi::c_void) -> ::windows_core::HRESULT, + pub GetDefault: unsafe extern "system" fn(this: *mut ::core::ffi::c_void, result__: *mut *mut ::core::ffi::c_void) -> ::windows_core::HRESULT, +} +#[doc(hidden)] +#[repr(transparent)] +#[derive(::core::cmp::PartialEq, ::core::cmp::Eq, ::core::fmt::Debug, ::core::clone::Clone)] pub struct IHumanPresenceSettings(::windows_core::IUnknown); unsafe impl ::windows_core::Interface for IHumanPresenceSettings { type Vtable = IHumanPresenceSettings_Vtbl; @@ -1264,8 +1440,34 @@ pub struct IHumanPresenceSettings_Vtbl { pub SetLockOnLeaveDistanceInMillimeters: unsafe extern "system" fn(this: *mut ::core::ffi::c_void, value: *mut ::core::ffi::c_void) -> ::windows_core::HRESULT, pub LockOnLeaveTimeout: unsafe extern "system" fn(this: *mut ::core::ffi::c_void, result__: *mut super::super::Foundation::TimeSpan) -> ::windows_core::HRESULT, pub SetLockOnLeaveTimeout: unsafe extern "system" fn(this: *mut ::core::ffi::c_void, value: super::super::Foundation::TimeSpan) -> ::windows_core::HRESULT, + #[cfg(feature = "deprecated")] pub IsAttentionAwareDimmingEnabled: unsafe extern "system" fn(this: *mut ::core::ffi::c_void, result__: *mut bool) -> ::windows_core::HRESULT, + #[cfg(not(feature = "deprecated"))] + IsAttentionAwareDimmingEnabled: usize, + #[cfg(feature = "deprecated")] pub SetIsAttentionAwareDimmingEnabled: unsafe extern "system" fn(this: *mut ::core::ffi::c_void, value: bool) -> ::windows_core::HRESULT, + #[cfg(not(feature = "deprecated"))] + SetIsAttentionAwareDimmingEnabled: usize, +} +#[doc(hidden)] +#[repr(transparent)] +#[derive(::core::cmp::PartialEq, ::core::cmp::Eq, ::core::fmt::Debug, ::core::clone::Clone)] +pub struct IHumanPresenceSettings2(::windows_core::IUnknown); +unsafe impl ::windows_core::Interface for IHumanPresenceSettings2 { + type Vtable = IHumanPresenceSettings2_Vtbl; +} +unsafe impl ::windows_core::ComInterface for IHumanPresenceSettings2 { + const IID: ::windows_core::GUID = ::windows_core::GUID::from_u128(0xa26f705e_8696_5eb4_b9e1_26a508de1cd4); +} +#[repr(C)] +#[doc(hidden)] +pub struct IHumanPresenceSettings2_Vtbl { + pub base__: ::windows_core::IInspectable_Vtbl, + pub IsAdaptiveDimmingEnabled: unsafe extern "system" fn(this: *mut ::core::ffi::c_void, result__: *mut bool) -> ::windows_core::HRESULT, + pub SetIsAdaptiveDimmingEnabled: unsafe extern "system" fn(this: *mut ::core::ffi::c_void, value: bool) -> ::windows_core::HRESULT, + pub WakeOptions: unsafe extern "system" fn(this: *mut ::core::ffi::c_void, result__: *mut *mut ::core::ffi::c_void) -> ::windows_core::HRESULT, + pub DimmingOptions: unsafe extern "system" fn(this: *mut ::core::ffi::c_void, result__: *mut *mut ::core::ffi::c_void) -> ::windows_core::HRESULT, + pub LockOptions: unsafe extern "system" fn(this: *mut ::core::ffi::c_void, result__: *mut *mut ::core::ffi::c_void) -> ::windows_core::HRESULT, } #[doc(hidden)] #[repr(transparent)] @@ -1725,6 +1927,23 @@ pub struct ILightSensorStatics2_Vtbl { #[doc(hidden)] #[repr(transparent)] #[derive(::core::cmp::PartialEq, ::core::cmp::Eq, ::core::fmt::Debug, ::core::clone::Clone)] +pub struct ILockOnLeaveOptions(::windows_core::IUnknown); +unsafe impl ::windows_core::Interface for ILockOnLeaveOptions { + type Vtable = ILockOnLeaveOptions_Vtbl; +} +unsafe impl ::windows_core::ComInterface for ILockOnLeaveOptions { + const IID: ::windows_core::GUID = ::windows_core::GUID::from_u128(0x3c6bf8bd_04c1_5829_8d4e_70521755b8be); +} +#[repr(C)] +#[doc(hidden)] +pub struct ILockOnLeaveOptions_Vtbl { + pub base__: ::windows_core::IInspectable_Vtbl, + pub AllowWhenExternalDisplayConnected: unsafe extern "system" fn(this: *mut ::core::ffi::c_void, result__: *mut bool) -> ::windows_core::HRESULT, + pub SetAllowWhenExternalDisplayConnected: unsafe extern "system" fn(this: *mut ::core::ffi::c_void, value: bool) -> ::windows_core::HRESULT, +} +#[doc(hidden)] +#[repr(transparent)] +#[derive(::core::cmp::PartialEq, ::core::cmp::Eq, ::core::fmt::Debug, ::core::clone::Clone)] pub struct IMagnetometer(::windows_core::IUnknown); unsafe impl ::windows_core::Interface for IMagnetometer { type Vtable = IMagnetometer_Vtbl; @@ -2573,6 +2792,25 @@ pub struct ISimpleOrientationSensorStatics2_Vtbl { pub GetDeviceSelector: unsafe extern "system" fn(this: *mut ::core::ffi::c_void, result__: *mut ::std::mem::MaybeUninit<::windows_core::HSTRING>) -> ::windows_core::HRESULT, pub FromIdAsync: unsafe extern "system" fn(this: *mut ::core::ffi::c_void, deviceid: ::std::mem::MaybeUninit<::windows_core::HSTRING>, result__: *mut *mut ::core::ffi::c_void) -> ::windows_core::HRESULT, } +#[doc(hidden)] +#[repr(transparent)] +#[derive(::core::cmp::PartialEq, ::core::cmp::Eq, ::core::fmt::Debug, ::core::clone::Clone)] +pub struct IWakeOnApproachOptions(::windows_core::IUnknown); +unsafe impl ::windows_core::Interface for IWakeOnApproachOptions { + type Vtable = IWakeOnApproachOptions_Vtbl; +} +unsafe impl ::windows_core::ComInterface for IWakeOnApproachOptions { + const IID: ::windows_core::GUID = ::windows_core::GUID::from_u128(0xf0b87ae7_7e1f_5ea5_814d_6b7e07defc2b); +} +#[repr(C)] +#[doc(hidden)] +pub struct IWakeOnApproachOptions_Vtbl { + pub base__: ::windows_core::IInspectable_Vtbl, + pub AllowWhenExternalDisplayConnected: unsafe extern "system" fn(this: *mut ::core::ffi::c_void, result__: *mut bool) -> ::windows_core::HRESULT, + pub SetAllowWhenExternalDisplayConnected: unsafe extern "system" fn(this: *mut ::core::ffi::c_void, value: bool) -> ::windows_core::HRESULT, + pub DisableWhenBatterySaverOn: unsafe extern "system" fn(this: *mut ::core::ffi::c_void, result__: *mut bool) -> ::windows_core::HRESULT, + pub SetDisableWhenBatterySaverOn: unsafe extern "system" fn(this: *mut ::core::ffi::c_void, value: bool) -> ::windows_core::HRESULT, +} #[repr(transparent)] #[derive(::core::cmp::PartialEq, ::core::cmp::Eq, ::core::fmt::Debug, ::core::clone::Clone)] pub struct Accelerometer(::windows_core::IUnknown); @@ -3155,6 +3393,37 @@ unsafe impl ::core::marker::Send for ActivitySensorTriggerDetails {} unsafe impl ::core::marker::Sync for ActivitySensorTriggerDetails {} #[repr(transparent)] #[derive(::core::cmp::PartialEq, ::core::cmp::Eq, ::core::fmt::Debug, ::core::clone::Clone)] +pub struct AdaptiveDimmingOptions(::windows_core::IUnknown); +impl AdaptiveDimmingOptions { + pub fn AllowWhenExternalDisplayConnected(&self) -> ::windows_core::Result { + let this = self; + unsafe { + let mut result__ = ::std::mem::zeroed(); + (::windows_core::Interface::vtable(this).AllowWhenExternalDisplayConnected)(::windows_core::Interface::as_raw(this), &mut result__).from_abi(result__) + } + } + pub fn SetAllowWhenExternalDisplayConnected(&self, value: bool) -> ::windows_core::Result<()> { + let this = self; + unsafe { (::windows_core::Interface::vtable(this).SetAllowWhenExternalDisplayConnected)(::windows_core::Interface::as_raw(this), value).ok() } + } +} +impl ::windows_core::RuntimeType for AdaptiveDimmingOptions { + const SIGNATURE: ::windows_core::imp::ConstBuffer = ::windows_core::imp::ConstBuffer::for_class::(); +} +unsafe impl ::windows_core::Interface for AdaptiveDimmingOptions { + type Vtable = IAdaptiveDimmingOptions_Vtbl; +} +unsafe impl ::windows_core::ComInterface for AdaptiveDimmingOptions { + const IID: ::windows_core::GUID = ::IID; +} +impl ::windows_core::RuntimeName for AdaptiveDimmingOptions { + const NAME: &'static str = "Windows.Devices.Sensors.AdaptiveDimmingOptions"; +} +::windows_core::imp::interface_hierarchy!(AdaptiveDimmingOptions, ::windows_core::IUnknown, ::windows_core::IInspectable); +unsafe impl ::core::marker::Send for AdaptiveDimmingOptions {} +unsafe impl ::core::marker::Sync for AdaptiveDimmingOptions {} +#[repr(transparent)] +#[derive(::core::cmp::PartialEq, ::core::cmp::Eq, ::core::fmt::Debug, ::core::clone::Clone)] pub struct Altimeter(::windows_core::IUnknown); impl Altimeter { pub fn GetCurrentReading(&self) -> ::windows_core::Result { @@ -4285,6 +4554,8 @@ impl HumanPresenceFeatures { (::windows_core::Interface::vtable(this).IsLockOnLeaveSupported)(::windows_core::Interface::as_raw(this), &mut result__).from_abi(result__) } } + #[doc = "Required features: `\"deprecated\"`"] + #[cfg(feature = "deprecated")] pub fn IsAttentionAwareDimmingSupported(&self) -> ::windows_core::Result { let this = self; unsafe { @@ -4292,6 +4563,13 @@ impl HumanPresenceFeatures { (::windows_core::Interface::vtable(this).IsAttentionAwareDimmingSupported)(::windows_core::Interface::as_raw(this), &mut result__).from_abi(result__) } } + pub fn IsAdaptiveDimmingSupported(&self) -> ::windows_core::Result { + let this = &::windows_core::ComInterface::cast::(self)?; + unsafe { + let mut result__ = ::std::mem::zeroed(); + (::windows_core::Interface::vtable(this).IsAdaptiveDimmingSupported)(::windows_core::Interface::as_raw(this), &mut result__).from_abi(result__) + } + } } impl ::windows_core::RuntimeType for HumanPresenceFeatures { const SIGNATURE: ::windows_core::imp::ConstBuffer = ::windows_core::imp::ConstBuffer::for_class::(); @@ -4354,6 +4632,20 @@ impl HumanPresenceSensor { let this = self; unsafe { (::windows_core::Interface::vtable(this).RemoveReadingChanged)(::windows_core::Interface::as_raw(this), token).ok() } } + pub fn IsPresenceSupported(&self) -> ::windows_core::Result { + let this = &::windows_core::ComInterface::cast::(self)?; + unsafe { + let mut result__ = ::std::mem::zeroed(); + (::windows_core::Interface::vtable(this).IsPresenceSupported)(::windows_core::Interface::as_raw(this), &mut result__).from_abi(result__) + } + } + pub fn IsEngagementSupported(&self) -> ::windows_core::Result { + let this = &::windows_core::ComInterface::cast::(self)?; + unsafe { + let mut result__ = ::std::mem::zeroed(); + (::windows_core::Interface::vtable(this).IsEngagementSupported)(::windows_core::Interface::as_raw(this), &mut result__).from_abi(result__) + } + } pub fn GetDeviceSelector() -> ::windows_core::Result<::windows_core::HSTRING> { Self::IHumanPresenceSensorStatics(|this| unsafe { let mut result__ = ::std::mem::zeroed(); @@ -4372,11 +4664,28 @@ impl HumanPresenceSensor { (::windows_core::Interface::vtable(this).GetDefaultAsync)(::windows_core::Interface::as_raw(this), &mut result__).from_abi(result__) }) } + pub fn FromId(sensorid: &::windows_core::HSTRING) -> ::windows_core::Result { + Self::IHumanPresenceSensorStatics2(|this| unsafe { + let mut result__ = ::std::mem::zeroed(); + (::windows_core::Interface::vtable(this).FromId)(::windows_core::Interface::as_raw(this), ::core::mem::transmute_copy(sensorid), &mut result__).from_abi(result__) + }) + } + pub fn GetDefault() -> ::windows_core::Result { + Self::IHumanPresenceSensorStatics2(|this| unsafe { + let mut result__ = ::std::mem::zeroed(); + (::windows_core::Interface::vtable(this).GetDefault)(::windows_core::Interface::as_raw(this), &mut result__).from_abi(result__) + }) + } #[doc(hidden)] pub fn IHumanPresenceSensorStatics ::windows_core::Result>(callback: F) -> ::windows_core::Result { static SHARED: ::windows_core::imp::FactoryCache = ::windows_core::imp::FactoryCache::new(); SHARED.call(callback) } + #[doc(hidden)] + pub fn IHumanPresenceSensorStatics2 ::windows_core::Result>(callback: F) -> ::windows_core::Result { + static SHARED: ::windows_core::imp::FactoryCache = ::windows_core::imp::FactoryCache::new(); + SHARED.call(callback) + } } impl ::windows_core::RuntimeType for HumanPresenceSensor { const SIGNATURE: ::windows_core::imp::ConstBuffer = ::windows_core::imp::ConstBuffer::for_class::(); @@ -4425,6 +4734,15 @@ impl HumanPresenceSensorReading { (::windows_core::Interface::vtable(this).DistanceInMillimeters)(::windows_core::Interface::as_raw(this), &mut result__).from_abi(result__) } } + #[doc = "Required features: `\"Foundation_Collections\"`"] + #[cfg(feature = "Foundation_Collections")] + pub fn Properties(&self) -> ::windows_core::Result> { + let this = &::windows_core::ComInterface::cast::(self)?; + unsafe { + let mut result__ = ::std::mem::zeroed(); + (::windows_core::Interface::vtable(this).Properties)(::windows_core::Interface::as_raw(this), &mut result__).from_abi(result__) + } + } } impl ::windows_core::RuntimeType for HumanPresenceSensorReading { const SIGNATURE: ::windows_core::imp::ConstBuffer = ::windows_core::imp::ConstBuffer::for_class::(); @@ -4470,6 +4788,89 @@ unsafe impl ::core::marker::Send for HumanPresenceSensorReadingChangedEventArgs unsafe impl ::core::marker::Sync for HumanPresenceSensorReadingChangedEventArgs {} #[repr(transparent)] #[derive(::core::cmp::PartialEq, ::core::cmp::Eq, ::core::fmt::Debug, ::core::clone::Clone)] +pub struct HumanPresenceSensorReadingUpdate(::windows_core::IUnknown); +impl HumanPresenceSensorReadingUpdate { + pub fn new() -> ::windows_core::Result { + Self::IActivationFactory(|f| f.ActivateInstance::()) + } + fn IActivationFactory ::windows_core::Result>(callback: F) -> ::windows_core::Result { + static SHARED: ::windows_core::imp::FactoryCache = ::windows_core::imp::FactoryCache::new(); + SHARED.call(callback) + } + pub fn Timestamp(&self) -> ::windows_core::Result> { + let this = self; + unsafe { + let mut result__ = ::std::mem::zeroed(); + (::windows_core::Interface::vtable(this).Timestamp)(::windows_core::Interface::as_raw(this), &mut result__).from_abi(result__) + } + } + pub fn SetTimestamp(&self, value: P0) -> ::windows_core::Result<()> + where + P0: ::windows_core::TryIntoParam>, + { + let this = self; + unsafe { (::windows_core::Interface::vtable(this).SetTimestamp)(::windows_core::Interface::as_raw(this), value.try_into_param()?.abi()).ok() } + } + pub fn Presence(&self) -> ::windows_core::Result> { + let this = self; + unsafe { + let mut result__ = ::std::mem::zeroed(); + (::windows_core::Interface::vtable(this).Presence)(::windows_core::Interface::as_raw(this), &mut result__).from_abi(result__) + } + } + pub fn SetPresence(&self, value: P0) -> ::windows_core::Result<()> + where + P0: ::windows_core::TryIntoParam>, + { + let this = self; + unsafe { (::windows_core::Interface::vtable(this).SetPresence)(::windows_core::Interface::as_raw(this), value.try_into_param()?.abi()).ok() } + } + pub fn Engagement(&self) -> ::windows_core::Result> { + let this = self; + unsafe { + let mut result__ = ::std::mem::zeroed(); + (::windows_core::Interface::vtable(this).Engagement)(::windows_core::Interface::as_raw(this), &mut result__).from_abi(result__) + } + } + pub fn SetEngagement(&self, value: P0) -> ::windows_core::Result<()> + where + P0: ::windows_core::TryIntoParam>, + { + let this = self; + unsafe { (::windows_core::Interface::vtable(this).SetEngagement)(::windows_core::Interface::as_raw(this), value.try_into_param()?.abi()).ok() } + } + pub fn DistanceInMillimeters(&self) -> ::windows_core::Result> { + let this = self; + unsafe { + let mut result__ = ::std::mem::zeroed(); + (::windows_core::Interface::vtable(this).DistanceInMillimeters)(::windows_core::Interface::as_raw(this), &mut result__).from_abi(result__) + } + } + pub fn SetDistanceInMillimeters(&self, value: P0) -> ::windows_core::Result<()> + where + P0: ::windows_core::TryIntoParam>, + { + let this = self; + unsafe { (::windows_core::Interface::vtable(this).SetDistanceInMillimeters)(::windows_core::Interface::as_raw(this), value.try_into_param()?.abi()).ok() } + } +} +impl ::windows_core::RuntimeType for HumanPresenceSensorReadingUpdate { + const SIGNATURE: ::windows_core::imp::ConstBuffer = ::windows_core::imp::ConstBuffer::for_class::(); +} +unsafe impl ::windows_core::Interface for HumanPresenceSensorReadingUpdate { + type Vtable = IHumanPresenceSensorReadingUpdate_Vtbl; +} +unsafe impl ::windows_core::ComInterface for HumanPresenceSensorReadingUpdate { + const IID: ::windows_core::GUID = ::IID; +} +impl ::windows_core::RuntimeName for HumanPresenceSensorReadingUpdate { + const NAME: &'static str = "Windows.Devices.Sensors.HumanPresenceSensorReadingUpdate"; +} +::windows_core::imp::interface_hierarchy!(HumanPresenceSensorReadingUpdate, ::windows_core::IUnknown, ::windows_core::IInspectable); +unsafe impl ::core::marker::Send for HumanPresenceSensorReadingUpdate {} +unsafe impl ::core::marker::Sync for HumanPresenceSensorReadingUpdate {} +#[repr(transparent)] +#[derive(::core::cmp::PartialEq, ::core::cmp::Eq, ::core::fmt::Debug, ::core::clone::Clone)] pub struct HumanPresenceSettings(::windows_core::IUnknown); impl HumanPresenceSettings { pub fn SensorId(&self) -> ::windows_core::Result<::windows_core::HSTRING> { @@ -4544,6 +4945,8 @@ impl HumanPresenceSettings { let this = self; unsafe { (::windows_core::Interface::vtable(this).SetLockOnLeaveTimeout)(::windows_core::Interface::as_raw(this), value).ok() } } + #[doc = "Required features: `\"deprecated\"`"] + #[cfg(feature = "deprecated")] pub fn IsAttentionAwareDimmingEnabled(&self) -> ::windows_core::Result { let this = self; unsafe { @@ -4551,10 +4954,44 @@ impl HumanPresenceSettings { (::windows_core::Interface::vtable(this).IsAttentionAwareDimmingEnabled)(::windows_core::Interface::as_raw(this), &mut result__).from_abi(result__) } } + #[doc = "Required features: `\"deprecated\"`"] + #[cfg(feature = "deprecated")] pub fn SetIsAttentionAwareDimmingEnabled(&self, value: bool) -> ::windows_core::Result<()> { let this = self; unsafe { (::windows_core::Interface::vtable(this).SetIsAttentionAwareDimmingEnabled)(::windows_core::Interface::as_raw(this), value).ok() } } + pub fn IsAdaptiveDimmingEnabled(&self) -> ::windows_core::Result { + let this = &::windows_core::ComInterface::cast::(self)?; + unsafe { + let mut result__ = ::std::mem::zeroed(); + (::windows_core::Interface::vtable(this).IsAdaptiveDimmingEnabled)(::windows_core::Interface::as_raw(this), &mut result__).from_abi(result__) + } + } + pub fn SetIsAdaptiveDimmingEnabled(&self, value: bool) -> ::windows_core::Result<()> { + let this = &::windows_core::ComInterface::cast::(self)?; + unsafe { (::windows_core::Interface::vtable(this).SetIsAdaptiveDimmingEnabled)(::windows_core::Interface::as_raw(this), value).ok() } + } + pub fn WakeOptions(&self) -> ::windows_core::Result { + let this = &::windows_core::ComInterface::cast::(self)?; + unsafe { + let mut result__ = ::std::mem::zeroed(); + (::windows_core::Interface::vtable(this).WakeOptions)(::windows_core::Interface::as_raw(this), &mut result__).from_abi(result__) + } + } + pub fn DimmingOptions(&self) -> ::windows_core::Result { + let this = &::windows_core::ComInterface::cast::(self)?; + unsafe { + let mut result__ = ::std::mem::zeroed(); + (::windows_core::Interface::vtable(this).DimmingOptions)(::windows_core::Interface::as_raw(this), &mut result__).from_abi(result__) + } + } + pub fn LockOptions(&self) -> ::windows_core::Result { + let this = &::windows_core::ComInterface::cast::(self)?; + unsafe { + let mut result__ = ::std::mem::zeroed(); + (::windows_core::Interface::vtable(this).LockOptions)(::windows_core::Interface::as_raw(this), &mut result__).from_abi(result__) + } + } pub fn GetCurrentSettingsAsync() -> ::windows_core::Result> { Self::IHumanPresenceSettingsStatics(|this| unsafe { let mut result__ = ::std::mem::zeroed(); @@ -5189,6 +5626,37 @@ unsafe impl ::core::marker::Send for LightSensorReadingChangedEventArgs {} unsafe impl ::core::marker::Sync for LightSensorReadingChangedEventArgs {} #[repr(transparent)] #[derive(::core::cmp::PartialEq, ::core::cmp::Eq, ::core::fmt::Debug, ::core::clone::Clone)] +pub struct LockOnLeaveOptions(::windows_core::IUnknown); +impl LockOnLeaveOptions { + pub fn AllowWhenExternalDisplayConnected(&self) -> ::windows_core::Result { + let this = self; + unsafe { + let mut result__ = ::std::mem::zeroed(); + (::windows_core::Interface::vtable(this).AllowWhenExternalDisplayConnected)(::windows_core::Interface::as_raw(this), &mut result__).from_abi(result__) + } + } + pub fn SetAllowWhenExternalDisplayConnected(&self, value: bool) -> ::windows_core::Result<()> { + let this = self; + unsafe { (::windows_core::Interface::vtable(this).SetAllowWhenExternalDisplayConnected)(::windows_core::Interface::as_raw(this), value).ok() } + } +} +impl ::windows_core::RuntimeType for LockOnLeaveOptions { + const SIGNATURE: ::windows_core::imp::ConstBuffer = ::windows_core::imp::ConstBuffer::for_class::(); +} +unsafe impl ::windows_core::Interface for LockOnLeaveOptions { + type Vtable = ILockOnLeaveOptions_Vtbl; +} +unsafe impl ::windows_core::ComInterface for LockOnLeaveOptions { + const IID: ::windows_core::GUID = ::IID; +} +impl ::windows_core::RuntimeName for LockOnLeaveOptions { + const NAME: &'static str = "Windows.Devices.Sensors.LockOnLeaveOptions"; +} +::windows_core::imp::interface_hierarchy!(LockOnLeaveOptions, ::windows_core::IUnknown, ::windows_core::IInspectable); +unsafe impl ::core::marker::Send for LockOnLeaveOptions {} +unsafe impl ::core::marker::Sync for LockOnLeaveOptions {} +#[repr(transparent)] +#[derive(::core::cmp::PartialEq, ::core::cmp::Eq, ::core::fmt::Debug, ::core::clone::Clone)] pub struct Magnetometer(::windows_core::IUnknown); impl Magnetometer { pub fn GetCurrentReading(&self) -> ::windows_core::Result { @@ -6492,6 +6960,48 @@ impl ::windows_core::RuntimeName for SimpleOrientationSensorOrientationChangedEv unsafe impl ::core::marker::Send for SimpleOrientationSensorOrientationChangedEventArgs {} unsafe impl ::core::marker::Sync for SimpleOrientationSensorOrientationChangedEventArgs {} #[repr(transparent)] +#[derive(::core::cmp::PartialEq, ::core::cmp::Eq, ::core::fmt::Debug, ::core::clone::Clone)] +pub struct WakeOnApproachOptions(::windows_core::IUnknown); +impl WakeOnApproachOptions { + pub fn AllowWhenExternalDisplayConnected(&self) -> ::windows_core::Result { + let this = self; + unsafe { + let mut result__ = ::std::mem::zeroed(); + (::windows_core::Interface::vtable(this).AllowWhenExternalDisplayConnected)(::windows_core::Interface::as_raw(this), &mut result__).from_abi(result__) + } + } + pub fn SetAllowWhenExternalDisplayConnected(&self, value: bool) -> ::windows_core::Result<()> { + let this = self; + unsafe { (::windows_core::Interface::vtable(this).SetAllowWhenExternalDisplayConnected)(::windows_core::Interface::as_raw(this), value).ok() } + } + pub fn DisableWhenBatterySaverOn(&self) -> ::windows_core::Result { + let this = self; + unsafe { + let mut result__ = ::std::mem::zeroed(); + (::windows_core::Interface::vtable(this).DisableWhenBatterySaverOn)(::windows_core::Interface::as_raw(this), &mut result__).from_abi(result__) + } + } + pub fn SetDisableWhenBatterySaverOn(&self, value: bool) -> ::windows_core::Result<()> { + let this = self; + unsafe { (::windows_core::Interface::vtable(this).SetDisableWhenBatterySaverOn)(::windows_core::Interface::as_raw(this), value).ok() } + } +} +impl ::windows_core::RuntimeType for WakeOnApproachOptions { + const SIGNATURE: ::windows_core::imp::ConstBuffer = ::windows_core::imp::ConstBuffer::for_class::(); +} +unsafe impl ::windows_core::Interface for WakeOnApproachOptions { + type Vtable = IWakeOnApproachOptions_Vtbl; +} +unsafe impl ::windows_core::ComInterface for WakeOnApproachOptions { + const IID: ::windows_core::GUID = ::IID; +} +impl ::windows_core::RuntimeName for WakeOnApproachOptions { + const NAME: &'static str = "Windows.Devices.Sensors.WakeOnApproachOptions"; +} +::windows_core::imp::interface_hierarchy!(WakeOnApproachOptions, ::windows_core::IUnknown, ::windows_core::IInspectable); +unsafe impl ::core::marker::Send for WakeOnApproachOptions {} +unsafe impl ::core::marker::Sync for WakeOnApproachOptions {} +#[repr(transparent)] #[derive(::core::cmp::PartialEq, ::core::cmp::Eq)] pub struct AccelerometerReadingType(pub i32); impl AccelerometerReadingType { diff --git a/crates/libs/windows/src/Windows/Media/ClosedCaptioning/mod.rs b/crates/libs/windows/src/Windows/Media/ClosedCaptioning/mod.rs index 099ff32e39..af99d2c8a9 100644 --- a/crates/libs/windows/src/Windows/Media/ClosedCaptioning/mod.rs +++ b/crates/libs/windows/src/Windows/Media/ClosedCaptioning/mod.rs @@ -34,6 +34,23 @@ pub struct IClosedCaptionPropertiesStatics_Vtbl { ComputedRegionColor: usize, pub RegionOpacity: unsafe extern "system" fn(this: *mut ::core::ffi::c_void, result__: *mut ClosedCaptionOpacity) -> ::windows_core::HRESULT, } +#[doc(hidden)] +#[repr(transparent)] +#[derive(::core::cmp::PartialEq, ::core::cmp::Eq, ::core::fmt::Debug, ::core::clone::Clone)] +pub struct IClosedCaptionPropertiesStatics2(::windows_core::IUnknown); +unsafe impl ::windows_core::Interface for IClosedCaptionPropertiesStatics2 { + type Vtable = IClosedCaptionPropertiesStatics2_Vtbl; +} +unsafe impl ::windows_core::ComInterface for IClosedCaptionPropertiesStatics2 { + const IID: ::windows_core::GUID = ::windows_core::GUID::from_u128(0x9de26870_37de_4197_8845_9a48dc5ac317); +} +#[repr(C)] +#[doc(hidden)] +pub struct IClosedCaptionPropertiesStatics2_Vtbl { + pub base__: ::windows_core::IInspectable_Vtbl, + pub PropertiesChanged: unsafe extern "system" fn(this: *mut ::core::ffi::c_void, handler: *mut ::core::ffi::c_void, result__: *mut super::super::Foundation::EventRegistrationToken) -> ::windows_core::HRESULT, + pub RemovePropertiesChanged: unsafe extern "system" fn(this: *mut ::core::ffi::c_void, token: super::super::Foundation::EventRegistrationToken) -> ::windows_core::HRESULT, +} pub struct ClosedCaptionProperties; impl ClosedCaptionProperties { pub fn FontColor() -> ::windows_core::Result { @@ -114,11 +131,28 @@ impl ClosedCaptionProperties { (::windows_core::Interface::vtable(this).RegionOpacity)(::windows_core::Interface::as_raw(this), &mut result__).from_abi(result__) }) } + pub fn PropertiesChanged(handler: P0) -> ::windows_core::Result + where + P0: ::windows_core::IntoParam>, + { + Self::IClosedCaptionPropertiesStatics2(|this| unsafe { + let mut result__ = ::std::mem::zeroed(); + (::windows_core::Interface::vtable(this).PropertiesChanged)(::windows_core::Interface::as_raw(this), handler.into_param().abi(), &mut result__).from_abi(result__) + }) + } + pub fn RemovePropertiesChanged(token: super::super::Foundation::EventRegistrationToken) -> ::windows_core::Result<()> { + Self::IClosedCaptionPropertiesStatics2(|this| unsafe { (::windows_core::Interface::vtable(this).RemovePropertiesChanged)(::windows_core::Interface::as_raw(this), token).ok() }) + } #[doc(hidden)] pub fn IClosedCaptionPropertiesStatics ::windows_core::Result>(callback: F) -> ::windows_core::Result { static SHARED: ::windows_core::imp::FactoryCache = ::windows_core::imp::FactoryCache::new(); SHARED.call(callback) } + #[doc(hidden)] + pub fn IClosedCaptionPropertiesStatics2 ::windows_core::Result>(callback: F) -> ::windows_core::Result { + static SHARED: ::windows_core::imp::FactoryCache = ::windows_core::imp::FactoryCache::new(); + SHARED.call(callback) + } } impl ::windows_core::RuntimeName for ClosedCaptionProperties { const NAME: &'static str = "Windows.Media.ClosedCaptioning.ClosedCaptionProperties"; diff --git a/crates/libs/windows/src/Windows/Media/MediaProperties/mod.rs b/crates/libs/windows/src/Windows/Media/MediaProperties/mod.rs index c604dc33ca..ad38ba7d06 100644 --- a/crates/libs/windows/src/Windows/Media/MediaProperties/mod.rs +++ b/crates/libs/windows/src/Windows/Media/MediaProperties/mod.rs @@ -110,6 +110,33 @@ pub struct IAudioEncodingPropertiesWithFormatUserData_Vtbl { #[doc(hidden)] #[repr(transparent)] #[derive(::core::cmp::PartialEq, ::core::cmp::Eq, ::core::fmt::Debug, ::core::clone::Clone)] +pub struct IAv1ProfileIdsStatics(::windows_core::IUnknown); +unsafe impl ::windows_core::Interface for IAv1ProfileIdsStatics { + type Vtable = IAv1ProfileIdsStatics_Vtbl; +} +unsafe impl ::windows_core::ComInterface for IAv1ProfileIdsStatics { + const IID: ::windows_core::GUID = ::windows_core::GUID::from_u128(0x9105812b_7c09_5882_88a4_678008a5174d); +} +#[repr(C)] +#[doc(hidden)] +pub struct IAv1ProfileIdsStatics_Vtbl { + pub base__: ::windows_core::IInspectable_Vtbl, + pub MainChromaSubsampling420BitDepth8: unsafe extern "system" fn(this: *mut ::core::ffi::c_void, result__: *mut i32) -> ::windows_core::HRESULT, + pub MainChromaSubsampling420BitDepth10: unsafe extern "system" fn(this: *mut ::core::ffi::c_void, result__: *mut i32) -> ::windows_core::HRESULT, + pub MainChromaSubsampling400BitDepth8: unsafe extern "system" fn(this: *mut ::core::ffi::c_void, result__: *mut i32) -> ::windows_core::HRESULT, + pub MainChromaSubsampling400BitDepth10: unsafe extern "system" fn(this: *mut ::core::ffi::c_void, result__: *mut i32) -> ::windows_core::HRESULT, + pub HighChromaSubsampling444BitDepth8: unsafe extern "system" fn(this: *mut ::core::ffi::c_void, result__: *mut i32) -> ::windows_core::HRESULT, + pub HighChromaSubsampling444BitDepth10: unsafe extern "system" fn(this: *mut ::core::ffi::c_void, result__: *mut i32) -> ::windows_core::HRESULT, + pub ProfessionalChromaSubsampling420BitDepth12: unsafe extern "system" fn(this: *mut ::core::ffi::c_void, result__: *mut i32) -> ::windows_core::HRESULT, + pub ProfessionalChromaSubsampling400BitDepth12: unsafe extern "system" fn(this: *mut ::core::ffi::c_void, result__: *mut i32) -> ::windows_core::HRESULT, + pub ProfessionalChromaSubsampling444BitDepth12: unsafe extern "system" fn(this: *mut ::core::ffi::c_void, result__: *mut i32) -> ::windows_core::HRESULT, + pub ProfessionalChromaSubsampling422BitDepth8: unsafe extern "system" fn(this: *mut ::core::ffi::c_void, result__: *mut i32) -> ::windows_core::HRESULT, + pub ProfessionalChromaSubsampling422BitDepth10: unsafe extern "system" fn(this: *mut ::core::ffi::c_void, result__: *mut i32) -> ::windows_core::HRESULT, + pub ProfessionalChromaSubsampling422BitDepth12: unsafe extern "system" fn(this: *mut ::core::ffi::c_void, result__: *mut i32) -> ::windows_core::HRESULT, +} +#[doc(hidden)] +#[repr(transparent)] +#[derive(::core::cmp::PartialEq, ::core::cmp::Eq, ::core::fmt::Debug, ::core::clone::Clone)] pub struct IContainerEncodingProperties(::windows_core::IUnknown); unsafe impl ::windows_core::Interface for IContainerEncodingProperties { type Vtable = IContainerEncodingProperties_Vtbl; @@ -166,6 +193,43 @@ pub struct IH264ProfileIdsStatics_Vtbl { #[doc(hidden)] #[repr(transparent)] #[derive(::core::cmp::PartialEq, ::core::cmp::Eq, ::core::fmt::Debug, ::core::clone::Clone)] +pub struct IHevcProfileIdsStatics(::windows_core::IUnknown); +unsafe impl ::windows_core::Interface for IHevcProfileIdsStatics { + type Vtable = IHevcProfileIdsStatics_Vtbl; +} +unsafe impl ::windows_core::ComInterface for IHevcProfileIdsStatics { + const IID: ::windows_core::GUID = ::windows_core::GUID::from_u128(0x1e50d280_2aa7_53c1_973f_2189fa656f53); +} +#[repr(C)] +#[doc(hidden)] +pub struct IHevcProfileIdsStatics_Vtbl { + pub base__: ::windows_core::IInspectable_Vtbl, + pub MainChromaSubsampling420BitDepth8: unsafe extern "system" fn(this: *mut ::core::ffi::c_void, result__: *mut i32) -> ::windows_core::HRESULT, + pub MainChromaSubsampling420BitDepth10: unsafe extern "system" fn(this: *mut ::core::ffi::c_void, result__: *mut i32) -> ::windows_core::HRESULT, + pub MainChromaSubsampling420BitDepth12: unsafe extern "system" fn(this: *mut ::core::ffi::c_void, result__: *mut i32) -> ::windows_core::HRESULT, + pub MainChromaSubsampling422BitDepth10: unsafe extern "system" fn(this: *mut ::core::ffi::c_void, result__: *mut i32) -> ::windows_core::HRESULT, + pub MainChromaSubsampling422BitDepth12: unsafe extern "system" fn(this: *mut ::core::ffi::c_void, result__: *mut i32) -> ::windows_core::HRESULT, + pub MainChromaSubsampling444BitDepth8: unsafe extern "system" fn(this: *mut ::core::ffi::c_void, result__: *mut i32) -> ::windows_core::HRESULT, + pub MainChromaSubsampling444BitDepth10: unsafe extern "system" fn(this: *mut ::core::ffi::c_void, result__: *mut i32) -> ::windows_core::HRESULT, + pub MainChromaSubsampling444BitDepth12: unsafe extern "system" fn(this: *mut ::core::ffi::c_void, result__: *mut i32) -> ::windows_core::HRESULT, + pub MonochromeBitDepth12: unsafe extern "system" fn(this: *mut ::core::ffi::c_void, result__: *mut i32) -> ::windows_core::HRESULT, + pub MonochromeBitDepth16: unsafe extern "system" fn(this: *mut ::core::ffi::c_void, result__: *mut i32) -> ::windows_core::HRESULT, + pub MainIntraChromaSubsampling420BitDepth8: unsafe extern "system" fn(this: *mut ::core::ffi::c_void, result__: *mut i32) -> ::windows_core::HRESULT, + pub MainIntraChromaSubsampling420BitDepth10: unsafe extern "system" fn(this: *mut ::core::ffi::c_void, result__: *mut i32) -> ::windows_core::HRESULT, + pub MainIntraChromaSubsampling420BitDepth12: unsafe extern "system" fn(this: *mut ::core::ffi::c_void, result__: *mut i32) -> ::windows_core::HRESULT, + pub MainIntraChromaSubsampling422BitDepth10: unsafe extern "system" fn(this: *mut ::core::ffi::c_void, result__: *mut i32) -> ::windows_core::HRESULT, + pub MainIntraChromaSubsampling422BitDepth12: unsafe extern "system" fn(this: *mut ::core::ffi::c_void, result__: *mut i32) -> ::windows_core::HRESULT, + pub MainIntraChromaSubsampling444BitDepth8: unsafe extern "system" fn(this: *mut ::core::ffi::c_void, result__: *mut i32) -> ::windows_core::HRESULT, + pub MainIntraChromaSubsampling444BitDepth10: unsafe extern "system" fn(this: *mut ::core::ffi::c_void, result__: *mut i32) -> ::windows_core::HRESULT, + pub MainIntraChromaSubsampling444BitDepth12: unsafe extern "system" fn(this: *mut ::core::ffi::c_void, result__: *mut i32) -> ::windows_core::HRESULT, + pub MainIntraChromaSubsampling444BitDepth16: unsafe extern "system" fn(this: *mut ::core::ffi::c_void, result__: *mut i32) -> ::windows_core::HRESULT, + pub MainStillChromaSubsampling420BitDepth8: unsafe extern "system" fn(this: *mut ::core::ffi::c_void, result__: *mut i32) -> ::windows_core::HRESULT, + pub MainStillChromaSubsampling444BitDepth8: unsafe extern "system" fn(this: *mut ::core::ffi::c_void, result__: *mut i32) -> ::windows_core::HRESULT, + pub MainStillChromaSubsampling444BitDepth16: unsafe extern "system" fn(this: *mut ::core::ffi::c_void, result__: *mut i32) -> ::windows_core::HRESULT, +} +#[doc(hidden)] +#[repr(transparent)] +#[derive(::core::cmp::PartialEq, ::core::cmp::Eq, ::core::fmt::Debug, ::core::clone::Clone)] pub struct IImageEncodingProperties(::windows_core::IUnknown); unsafe impl ::windows_core::Interface for IImageEncodingProperties { type Vtable = IImageEncodingProperties_Vtbl; @@ -387,6 +451,23 @@ pub struct IMediaEncodingProfileStatics3_Vtbl { pub CreateFlac: unsafe extern "system" fn(this: *mut ::core::ffi::c_void, quality: AudioEncodingQuality, result__: *mut *mut ::core::ffi::c_void) -> ::windows_core::HRESULT, pub CreateHevc: unsafe extern "system" fn(this: *mut ::core::ffi::c_void, quality: VideoEncodingQuality, result__: *mut *mut ::core::ffi::c_void) -> ::windows_core::HRESULT, } +#[doc(hidden)] +#[repr(transparent)] +#[derive(::core::cmp::PartialEq, ::core::cmp::Eq, ::core::fmt::Debug, ::core::clone::Clone)] +pub struct IMediaEncodingProfileStatics4(::windows_core::IUnknown); +unsafe impl ::windows_core::Interface for IMediaEncodingProfileStatics4 { + type Vtable = IMediaEncodingProfileStatics4_Vtbl; +} +unsafe impl ::windows_core::ComInterface for IMediaEncodingProfileStatics4 { + const IID: ::windows_core::GUID = ::windows_core::GUID::from_u128(0x6fafd7b5_9404_514a_81dd_c9444d648af0); +} +#[repr(C)] +#[doc(hidden)] +pub struct IMediaEncodingProfileStatics4_Vtbl { + pub base__: ::windows_core::IInspectable_Vtbl, + pub CreateVp9: unsafe extern "system" fn(this: *mut ::core::ffi::c_void, quality: VideoEncodingQuality, result__: *mut *mut ::core::ffi::c_void) -> ::windows_core::HRESULT, + pub CreateAv1: unsafe extern "system" fn(this: *mut ::core::ffi::c_void, quality: VideoEncodingQuality, result__: *mut *mut ::core::ffi::c_void) -> ::windows_core::HRESULT, +} #[repr(transparent)] #[derive(::core::cmp::PartialEq, ::core::cmp::Eq, ::core::fmt::Debug, ::core::clone::Clone)] pub struct IMediaEncodingProperties(::windows_core::IUnknown); @@ -586,6 +667,22 @@ pub struct IMediaEncodingSubtypesStatics6_Vtbl { #[doc(hidden)] #[repr(transparent)] #[derive(::core::cmp::PartialEq, ::core::cmp::Eq, ::core::fmt::Debug, ::core::clone::Clone)] +pub struct IMediaEncodingSubtypesStatics7(::windows_core::IUnknown); +unsafe impl ::windows_core::Interface for IMediaEncodingSubtypesStatics7 { + type Vtable = IMediaEncodingSubtypesStatics7_Vtbl; +} +unsafe impl ::windows_core::ComInterface for IMediaEncodingSubtypesStatics7 { + const IID: ::windows_core::GUID = ::windows_core::GUID::from_u128(0x92f2dca7_9937_52a1_b619_ddfad81cd99c); +} +#[repr(C)] +#[doc(hidden)] +pub struct IMediaEncodingSubtypesStatics7_Vtbl { + pub base__: ::windows_core::IInspectable_Vtbl, + pub Av1: unsafe extern "system" fn(this: *mut ::core::ffi::c_void, result__: *mut ::std::mem::MaybeUninit<::windows_core::HSTRING>) -> ::windows_core::HRESULT, +} +#[doc(hidden)] +#[repr(transparent)] +#[derive(::core::cmp::PartialEq, ::core::cmp::Eq, ::core::fmt::Debug, ::core::clone::Clone)] pub struct IMediaRatio(::windows_core::IUnknown); unsafe impl ::windows_core::Interface for IMediaRatio { type Vtable = IMediaRatio_Vtbl; @@ -783,6 +880,41 @@ pub struct IVideoEncodingPropertiesStatics2_Vtbl { pub base__: ::windows_core::IInspectable_Vtbl, pub CreateHevc: unsafe extern "system" fn(this: *mut ::core::ffi::c_void, result__: *mut *mut ::core::ffi::c_void) -> ::windows_core::HRESULT, } +#[doc(hidden)] +#[repr(transparent)] +#[derive(::core::cmp::PartialEq, ::core::cmp::Eq, ::core::fmt::Debug, ::core::clone::Clone)] +pub struct IVideoEncodingPropertiesStatics3(::windows_core::IUnknown); +unsafe impl ::windows_core::Interface for IVideoEncodingPropertiesStatics3 { + type Vtable = IVideoEncodingPropertiesStatics3_Vtbl; +} +unsafe impl ::windows_core::ComInterface for IVideoEncodingPropertiesStatics3 { + const IID: ::windows_core::GUID = ::windows_core::GUID::from_u128(0x65b46685_60da_5e51_91a2_b38c4763b872); +} +#[repr(C)] +#[doc(hidden)] +pub struct IVideoEncodingPropertiesStatics3_Vtbl { + pub base__: ::windows_core::IInspectable_Vtbl, + pub CreateVp9: unsafe extern "system" fn(this: *mut ::core::ffi::c_void, result__: *mut *mut ::core::ffi::c_void) -> ::windows_core::HRESULT, + pub CreateAv1: unsafe extern "system" fn(this: *mut ::core::ffi::c_void, result__: *mut *mut ::core::ffi::c_void) -> ::windows_core::HRESULT, +} +#[doc(hidden)] +#[repr(transparent)] +#[derive(::core::cmp::PartialEq, ::core::cmp::Eq, ::core::fmt::Debug, ::core::clone::Clone)] +pub struct IVp9ProfileIdsStatics(::windows_core::IUnknown); +unsafe impl ::windows_core::Interface for IVp9ProfileIdsStatics { + type Vtable = IVp9ProfileIdsStatics_Vtbl; +} +unsafe impl ::windows_core::ComInterface for IVp9ProfileIdsStatics { + const IID: ::windows_core::GUID = ::windows_core::GUID::from_u128(0x20311a55_fe06_5883_92d9_6080c97743e5); +} +#[repr(C)] +#[doc(hidden)] +pub struct IVp9ProfileIdsStatics_Vtbl { + pub base__: ::windows_core::IInspectable_Vtbl, + pub Profile0ChromaSubsampling420BitDepth8: unsafe extern "system" fn(this: *mut ::core::ffi::c_void, result__: *mut i32) -> ::windows_core::HRESULT, + pub Profile2ChromaSubsampling420BitDepth10: unsafe extern "system" fn(this: *mut ::core::ffi::c_void, result__: *mut i32) -> ::windows_core::HRESULT, + pub Profile2ChromaSubsampling420BitDepth12: unsafe extern "system" fn(this: *mut ::core::ffi::c_void, result__: *mut i32) -> ::windows_core::HRESULT, +} #[repr(transparent)] #[derive(::core::cmp::PartialEq, ::core::cmp::Eq, ::core::fmt::Debug, ::core::clone::Clone)] pub struct AudioEncodingProperties(::windows_core::IUnknown); @@ -956,6 +1088,89 @@ impl ::windows_core::RuntimeName for AudioEncodingProperties { impl ::windows_core::CanTryInto for AudioEncodingProperties {} unsafe impl ::core::marker::Send for AudioEncodingProperties {} unsafe impl ::core::marker::Sync for AudioEncodingProperties {} +pub struct Av1ProfileIds; +impl Av1ProfileIds { + pub fn MainChromaSubsampling420BitDepth8() -> ::windows_core::Result { + Self::IAv1ProfileIdsStatics(|this| unsafe { + let mut result__ = ::std::mem::zeroed(); + (::windows_core::Interface::vtable(this).MainChromaSubsampling420BitDepth8)(::windows_core::Interface::as_raw(this), &mut result__).from_abi(result__) + }) + } + pub fn MainChromaSubsampling420BitDepth10() -> ::windows_core::Result { + Self::IAv1ProfileIdsStatics(|this| unsafe { + let mut result__ = ::std::mem::zeroed(); + (::windows_core::Interface::vtable(this).MainChromaSubsampling420BitDepth10)(::windows_core::Interface::as_raw(this), &mut result__).from_abi(result__) + }) + } + pub fn MainChromaSubsampling400BitDepth8() -> ::windows_core::Result { + Self::IAv1ProfileIdsStatics(|this| unsafe { + let mut result__ = ::std::mem::zeroed(); + (::windows_core::Interface::vtable(this).MainChromaSubsampling400BitDepth8)(::windows_core::Interface::as_raw(this), &mut result__).from_abi(result__) + }) + } + pub fn MainChromaSubsampling400BitDepth10() -> ::windows_core::Result { + Self::IAv1ProfileIdsStatics(|this| unsafe { + let mut result__ = ::std::mem::zeroed(); + (::windows_core::Interface::vtable(this).MainChromaSubsampling400BitDepth10)(::windows_core::Interface::as_raw(this), &mut result__).from_abi(result__) + }) + } + pub fn HighChromaSubsampling444BitDepth8() -> ::windows_core::Result { + Self::IAv1ProfileIdsStatics(|this| unsafe { + let mut result__ = ::std::mem::zeroed(); + (::windows_core::Interface::vtable(this).HighChromaSubsampling444BitDepth8)(::windows_core::Interface::as_raw(this), &mut result__).from_abi(result__) + }) + } + pub fn HighChromaSubsampling444BitDepth10() -> ::windows_core::Result { + Self::IAv1ProfileIdsStatics(|this| unsafe { + let mut result__ = ::std::mem::zeroed(); + (::windows_core::Interface::vtable(this).HighChromaSubsampling444BitDepth10)(::windows_core::Interface::as_raw(this), &mut result__).from_abi(result__) + }) + } + pub fn ProfessionalChromaSubsampling420BitDepth12() -> ::windows_core::Result { + Self::IAv1ProfileIdsStatics(|this| unsafe { + let mut result__ = ::std::mem::zeroed(); + (::windows_core::Interface::vtable(this).ProfessionalChromaSubsampling420BitDepth12)(::windows_core::Interface::as_raw(this), &mut result__).from_abi(result__) + }) + } + pub fn ProfessionalChromaSubsampling400BitDepth12() -> ::windows_core::Result { + Self::IAv1ProfileIdsStatics(|this| unsafe { + let mut result__ = ::std::mem::zeroed(); + (::windows_core::Interface::vtable(this).ProfessionalChromaSubsampling400BitDepth12)(::windows_core::Interface::as_raw(this), &mut result__).from_abi(result__) + }) + } + pub fn ProfessionalChromaSubsampling444BitDepth12() -> ::windows_core::Result { + Self::IAv1ProfileIdsStatics(|this| unsafe { + let mut result__ = ::std::mem::zeroed(); + (::windows_core::Interface::vtable(this).ProfessionalChromaSubsampling444BitDepth12)(::windows_core::Interface::as_raw(this), &mut result__).from_abi(result__) + }) + } + pub fn ProfessionalChromaSubsampling422BitDepth8() -> ::windows_core::Result { + Self::IAv1ProfileIdsStatics(|this| unsafe { + let mut result__ = ::std::mem::zeroed(); + (::windows_core::Interface::vtable(this).ProfessionalChromaSubsampling422BitDepth8)(::windows_core::Interface::as_raw(this), &mut result__).from_abi(result__) + }) + } + pub fn ProfessionalChromaSubsampling422BitDepth10() -> ::windows_core::Result { + Self::IAv1ProfileIdsStatics(|this| unsafe { + let mut result__ = ::std::mem::zeroed(); + (::windows_core::Interface::vtable(this).ProfessionalChromaSubsampling422BitDepth10)(::windows_core::Interface::as_raw(this), &mut result__).from_abi(result__) + }) + } + pub fn ProfessionalChromaSubsampling422BitDepth12() -> ::windows_core::Result { + Self::IAv1ProfileIdsStatics(|this| unsafe { + let mut result__ = ::std::mem::zeroed(); + (::windows_core::Interface::vtable(this).ProfessionalChromaSubsampling422BitDepth12)(::windows_core::Interface::as_raw(this), &mut result__).from_abi(result__) + }) + } + #[doc(hidden)] + pub fn IAv1ProfileIdsStatics ::windows_core::Result>(callback: F) -> ::windows_core::Result { + static SHARED: ::windows_core::imp::FactoryCache = ::windows_core::imp::FactoryCache::new(); + SHARED.call(callback) + } +} +impl ::windows_core::RuntimeName for Av1ProfileIds { + const NAME: &'static str = "Windows.Media.MediaProperties.Av1ProfileIds"; +} #[repr(transparent)] #[derive(::core::cmp::PartialEq, ::core::cmp::Eq, ::core::fmt::Debug, ::core::clone::Clone)] pub struct ContainerEncodingProperties(::windows_core::IUnknown); @@ -1089,6 +1304,149 @@ impl H264ProfileIds { impl ::windows_core::RuntimeName for H264ProfileIds { const NAME: &'static str = "Windows.Media.MediaProperties.H264ProfileIds"; } +pub struct HevcProfileIds; +impl HevcProfileIds { + pub fn MainChromaSubsampling420BitDepth8() -> ::windows_core::Result { + Self::IHevcProfileIdsStatics(|this| unsafe { + let mut result__ = ::std::mem::zeroed(); + (::windows_core::Interface::vtable(this).MainChromaSubsampling420BitDepth8)(::windows_core::Interface::as_raw(this), &mut result__).from_abi(result__) + }) + } + pub fn MainChromaSubsampling420BitDepth10() -> ::windows_core::Result { + Self::IHevcProfileIdsStatics(|this| unsafe { + let mut result__ = ::std::mem::zeroed(); + (::windows_core::Interface::vtable(this).MainChromaSubsampling420BitDepth10)(::windows_core::Interface::as_raw(this), &mut result__).from_abi(result__) + }) + } + pub fn MainChromaSubsampling420BitDepth12() -> ::windows_core::Result { + Self::IHevcProfileIdsStatics(|this| unsafe { + let mut result__ = ::std::mem::zeroed(); + (::windows_core::Interface::vtable(this).MainChromaSubsampling420BitDepth12)(::windows_core::Interface::as_raw(this), &mut result__).from_abi(result__) + }) + } + pub fn MainChromaSubsampling422BitDepth10() -> ::windows_core::Result { + Self::IHevcProfileIdsStatics(|this| unsafe { + let mut result__ = ::std::mem::zeroed(); + (::windows_core::Interface::vtable(this).MainChromaSubsampling422BitDepth10)(::windows_core::Interface::as_raw(this), &mut result__).from_abi(result__) + }) + } + pub fn MainChromaSubsampling422BitDepth12() -> ::windows_core::Result { + Self::IHevcProfileIdsStatics(|this| unsafe { + let mut result__ = ::std::mem::zeroed(); + (::windows_core::Interface::vtable(this).MainChromaSubsampling422BitDepth12)(::windows_core::Interface::as_raw(this), &mut result__).from_abi(result__) + }) + } + pub fn MainChromaSubsampling444BitDepth8() -> ::windows_core::Result { + Self::IHevcProfileIdsStatics(|this| unsafe { + let mut result__ = ::std::mem::zeroed(); + (::windows_core::Interface::vtable(this).MainChromaSubsampling444BitDepth8)(::windows_core::Interface::as_raw(this), &mut result__).from_abi(result__) + }) + } + pub fn MainChromaSubsampling444BitDepth10() -> ::windows_core::Result { + Self::IHevcProfileIdsStatics(|this| unsafe { + let mut result__ = ::std::mem::zeroed(); + (::windows_core::Interface::vtable(this).MainChromaSubsampling444BitDepth10)(::windows_core::Interface::as_raw(this), &mut result__).from_abi(result__) + }) + } + pub fn MainChromaSubsampling444BitDepth12() -> ::windows_core::Result { + Self::IHevcProfileIdsStatics(|this| unsafe { + let mut result__ = ::std::mem::zeroed(); + (::windows_core::Interface::vtable(this).MainChromaSubsampling444BitDepth12)(::windows_core::Interface::as_raw(this), &mut result__).from_abi(result__) + }) + } + pub fn MonochromeBitDepth12() -> ::windows_core::Result { + Self::IHevcProfileIdsStatics(|this| unsafe { + let mut result__ = ::std::mem::zeroed(); + (::windows_core::Interface::vtable(this).MonochromeBitDepth12)(::windows_core::Interface::as_raw(this), &mut result__).from_abi(result__) + }) + } + pub fn MonochromeBitDepth16() -> ::windows_core::Result { + Self::IHevcProfileIdsStatics(|this| unsafe { + let mut result__ = ::std::mem::zeroed(); + (::windows_core::Interface::vtable(this).MonochromeBitDepth16)(::windows_core::Interface::as_raw(this), &mut result__).from_abi(result__) + }) + } + pub fn MainIntraChromaSubsampling420BitDepth8() -> ::windows_core::Result { + Self::IHevcProfileIdsStatics(|this| unsafe { + let mut result__ = ::std::mem::zeroed(); + (::windows_core::Interface::vtable(this).MainIntraChromaSubsampling420BitDepth8)(::windows_core::Interface::as_raw(this), &mut result__).from_abi(result__) + }) + } + pub fn MainIntraChromaSubsampling420BitDepth10() -> ::windows_core::Result { + Self::IHevcProfileIdsStatics(|this| unsafe { + let mut result__ = ::std::mem::zeroed(); + (::windows_core::Interface::vtable(this).MainIntraChromaSubsampling420BitDepth10)(::windows_core::Interface::as_raw(this), &mut result__).from_abi(result__) + }) + } + pub fn MainIntraChromaSubsampling420BitDepth12() -> ::windows_core::Result { + Self::IHevcProfileIdsStatics(|this| unsafe { + let mut result__ = ::std::mem::zeroed(); + (::windows_core::Interface::vtable(this).MainIntraChromaSubsampling420BitDepth12)(::windows_core::Interface::as_raw(this), &mut result__).from_abi(result__) + }) + } + pub fn MainIntraChromaSubsampling422BitDepth10() -> ::windows_core::Result { + Self::IHevcProfileIdsStatics(|this| unsafe { + let mut result__ = ::std::mem::zeroed(); + (::windows_core::Interface::vtable(this).MainIntraChromaSubsampling422BitDepth10)(::windows_core::Interface::as_raw(this), &mut result__).from_abi(result__) + }) + } + pub fn MainIntraChromaSubsampling422BitDepth12() -> ::windows_core::Result { + Self::IHevcProfileIdsStatics(|this| unsafe { + let mut result__ = ::std::mem::zeroed(); + (::windows_core::Interface::vtable(this).MainIntraChromaSubsampling422BitDepth12)(::windows_core::Interface::as_raw(this), &mut result__).from_abi(result__) + }) + } + pub fn MainIntraChromaSubsampling444BitDepth8() -> ::windows_core::Result { + Self::IHevcProfileIdsStatics(|this| unsafe { + let mut result__ = ::std::mem::zeroed(); + (::windows_core::Interface::vtable(this).MainIntraChromaSubsampling444BitDepth8)(::windows_core::Interface::as_raw(this), &mut result__).from_abi(result__) + }) + } + pub fn MainIntraChromaSubsampling444BitDepth10() -> ::windows_core::Result { + Self::IHevcProfileIdsStatics(|this| unsafe { + let mut result__ = ::std::mem::zeroed(); + (::windows_core::Interface::vtable(this).MainIntraChromaSubsampling444BitDepth10)(::windows_core::Interface::as_raw(this), &mut result__).from_abi(result__) + }) + } + pub fn MainIntraChromaSubsampling444BitDepth12() -> ::windows_core::Result { + Self::IHevcProfileIdsStatics(|this| unsafe { + let mut result__ = ::std::mem::zeroed(); + (::windows_core::Interface::vtable(this).MainIntraChromaSubsampling444BitDepth12)(::windows_core::Interface::as_raw(this), &mut result__).from_abi(result__) + }) + } + pub fn MainIntraChromaSubsampling444BitDepth16() -> ::windows_core::Result { + Self::IHevcProfileIdsStatics(|this| unsafe { + let mut result__ = ::std::mem::zeroed(); + (::windows_core::Interface::vtable(this).MainIntraChromaSubsampling444BitDepth16)(::windows_core::Interface::as_raw(this), &mut result__).from_abi(result__) + }) + } + pub fn MainStillChromaSubsampling420BitDepth8() -> ::windows_core::Result { + Self::IHevcProfileIdsStatics(|this| unsafe { + let mut result__ = ::std::mem::zeroed(); + (::windows_core::Interface::vtable(this).MainStillChromaSubsampling420BitDepth8)(::windows_core::Interface::as_raw(this), &mut result__).from_abi(result__) + }) + } + pub fn MainStillChromaSubsampling444BitDepth8() -> ::windows_core::Result { + Self::IHevcProfileIdsStatics(|this| unsafe { + let mut result__ = ::std::mem::zeroed(); + (::windows_core::Interface::vtable(this).MainStillChromaSubsampling444BitDepth8)(::windows_core::Interface::as_raw(this), &mut result__).from_abi(result__) + }) + } + pub fn MainStillChromaSubsampling444BitDepth16() -> ::windows_core::Result { + Self::IHevcProfileIdsStatics(|this| unsafe { + let mut result__ = ::std::mem::zeroed(); + (::windows_core::Interface::vtable(this).MainStillChromaSubsampling444BitDepth16)(::windows_core::Interface::as_raw(this), &mut result__).from_abi(result__) + }) + } + #[doc(hidden)] + pub fn IHevcProfileIdsStatics ::windows_core::Result>(callback: F) -> ::windows_core::Result { + static SHARED: ::windows_core::imp::FactoryCache = ::windows_core::imp::FactoryCache::new(); + SHARED.call(callback) + } +} +impl ::windows_core::RuntimeName for HevcProfileIds { + const NAME: &'static str = "Windows.Media.MediaProperties.HevcProfileIds"; +} #[repr(transparent)] #[derive(::core::cmp::PartialEq, ::core::cmp::Eq, ::core::fmt::Debug, ::core::clone::Clone)] pub struct ImageEncodingProperties(::windows_core::IUnknown); @@ -1413,6 +1771,18 @@ impl MediaEncodingProfile { (::windows_core::Interface::vtable(this).CreateHevc)(::windows_core::Interface::as_raw(this), quality, &mut result__).from_abi(result__) }) } + pub fn CreateVp9(quality: VideoEncodingQuality) -> ::windows_core::Result { + Self::IMediaEncodingProfileStatics4(|this| unsafe { + let mut result__ = ::std::mem::zeroed(); + (::windows_core::Interface::vtable(this).CreateVp9)(::windows_core::Interface::as_raw(this), quality, &mut result__).from_abi(result__) + }) + } + pub fn CreateAv1(quality: VideoEncodingQuality) -> ::windows_core::Result { + Self::IMediaEncodingProfileStatics4(|this| unsafe { + let mut result__ = ::std::mem::zeroed(); + (::windows_core::Interface::vtable(this).CreateAv1)(::windows_core::Interface::as_raw(this), quality, &mut result__).from_abi(result__) + }) + } #[doc(hidden)] pub fn IMediaEncodingProfileStatics ::windows_core::Result>(callback: F) -> ::windows_core::Result { static SHARED: ::windows_core::imp::FactoryCache = ::windows_core::imp::FactoryCache::new(); @@ -1428,6 +1798,11 @@ impl MediaEncodingProfile { static SHARED: ::windows_core::imp::FactoryCache = ::windows_core::imp::FactoryCache::new(); SHARED.call(callback) } + #[doc(hidden)] + pub fn IMediaEncodingProfileStatics4 ::windows_core::Result>(callback: F) -> ::windows_core::Result { + static SHARED: ::windows_core::imp::FactoryCache = ::windows_core::imp::FactoryCache::new(); + SHARED.call(callback) + } } impl ::windows_core::RuntimeType for MediaEncodingProfile { const SIGNATURE: ::windows_core::imp::ConstBuffer = ::windows_core::imp::ConstBuffer::for_class::(); @@ -1758,6 +2133,12 @@ impl MediaEncodingSubtypes { (::windows_core::Interface::vtable(this).VobSub)(::windows_core::Interface::as_raw(this), &mut result__).from_abi(result__) }) } + pub fn Av1() -> ::windows_core::Result<::windows_core::HSTRING> { + Self::IMediaEncodingSubtypesStatics7(|this| unsafe { + let mut result__ = ::std::mem::zeroed(); + (::windows_core::Interface::vtable(this).Av1)(::windows_core::Interface::as_raw(this), &mut result__).from_abi(result__) + }) + } #[doc(hidden)] pub fn IMediaEncodingSubtypesStatics ::windows_core::Result>(callback: F) -> ::windows_core::Result { static SHARED: ::windows_core::imp::FactoryCache = ::windows_core::imp::FactoryCache::new(); @@ -1788,6 +2169,11 @@ impl MediaEncodingSubtypes { static SHARED: ::windows_core::imp::FactoryCache = ::windows_core::imp::FactoryCache::new(); SHARED.call(callback) } + #[doc(hidden)] + pub fn IMediaEncodingSubtypesStatics7 ::windows_core::Result>(callback: F) -> ::windows_core::Result { + static SHARED: ::windows_core::imp::FactoryCache = ::windows_core::imp::FactoryCache::new(); + SHARED.call(callback) + } } impl ::windows_core::RuntimeName for MediaEncodingSubtypes { const NAME: &'static str = "Windows.Media.MediaProperties.MediaEncodingSubtypes"; @@ -2249,6 +2635,18 @@ impl VideoEncodingProperties { (::windows_core::Interface::vtable(this).CreateHevc)(::windows_core::Interface::as_raw(this), &mut result__).from_abi(result__) }) } + pub fn CreateVp9() -> ::windows_core::Result { + Self::IVideoEncodingPropertiesStatics3(|this| unsafe { + let mut result__ = ::std::mem::zeroed(); + (::windows_core::Interface::vtable(this).CreateVp9)(::windows_core::Interface::as_raw(this), &mut result__).from_abi(result__) + }) + } + pub fn CreateAv1() -> ::windows_core::Result { + Self::IVideoEncodingPropertiesStatics3(|this| unsafe { + let mut result__ = ::std::mem::zeroed(); + (::windows_core::Interface::vtable(this).CreateAv1)(::windows_core::Interface::as_raw(this), &mut result__).from_abi(result__) + }) + } #[doc(hidden)] pub fn IVideoEncodingPropertiesStatics ::windows_core::Result>(callback: F) -> ::windows_core::Result { static SHARED: ::windows_core::imp::FactoryCache = ::windows_core::imp::FactoryCache::new(); @@ -2259,6 +2657,11 @@ impl VideoEncodingProperties { static SHARED: ::windows_core::imp::FactoryCache = ::windows_core::imp::FactoryCache::new(); SHARED.call(callback) } + #[doc(hidden)] + pub fn IVideoEncodingPropertiesStatics3 ::windows_core::Result>(callback: F) -> ::windows_core::Result { + static SHARED: ::windows_core::imp::FactoryCache = ::windows_core::imp::FactoryCache::new(); + SHARED.call(callback) + } } impl ::windows_core::RuntimeType for VideoEncodingProperties { const SIGNATURE: ::windows_core::imp::ConstBuffer = ::windows_core::imp::ConstBuffer::for_class::(); @@ -2276,6 +2679,35 @@ impl ::windows_core::RuntimeName for VideoEncodingProperties { impl ::windows_core::CanTryInto for VideoEncodingProperties {} unsafe impl ::core::marker::Send for VideoEncodingProperties {} unsafe impl ::core::marker::Sync for VideoEncodingProperties {} +pub struct Vp9ProfileIds; +impl Vp9ProfileIds { + pub fn Profile0ChromaSubsampling420BitDepth8() -> ::windows_core::Result { + Self::IVp9ProfileIdsStatics(|this| unsafe { + let mut result__ = ::std::mem::zeroed(); + (::windows_core::Interface::vtable(this).Profile0ChromaSubsampling420BitDepth8)(::windows_core::Interface::as_raw(this), &mut result__).from_abi(result__) + }) + } + pub fn Profile2ChromaSubsampling420BitDepth10() -> ::windows_core::Result { + Self::IVp9ProfileIdsStatics(|this| unsafe { + let mut result__ = ::std::mem::zeroed(); + (::windows_core::Interface::vtable(this).Profile2ChromaSubsampling420BitDepth10)(::windows_core::Interface::as_raw(this), &mut result__).from_abi(result__) + }) + } + pub fn Profile2ChromaSubsampling420BitDepth12() -> ::windows_core::Result { + Self::IVp9ProfileIdsStatics(|this| unsafe { + let mut result__ = ::std::mem::zeroed(); + (::windows_core::Interface::vtable(this).Profile2ChromaSubsampling420BitDepth12)(::windows_core::Interface::as_raw(this), &mut result__).from_abi(result__) + }) + } + #[doc(hidden)] + pub fn IVp9ProfileIdsStatics ::windows_core::Result>(callback: F) -> ::windows_core::Result { + static SHARED: ::windows_core::imp::FactoryCache = ::windows_core::imp::FactoryCache::new(); + SHARED.call(callback) + } +} +impl ::windows_core::RuntimeName for Vp9ProfileIds { + const NAME: &'static str = "Windows.Media.MediaProperties.Vp9ProfileIds"; +} #[repr(transparent)] #[derive(::core::cmp::PartialEq, ::core::cmp::Eq)] pub struct AudioEncodingQuality(pub i32); diff --git a/crates/libs/windows/src/Windows/Services/Store/mod.rs b/crates/libs/windows/src/Windows/Services/Store/mod.rs index e4c6b21be6..0000a30efb 100644 --- a/crates/libs/windows/src/Windows/Services/Store/mod.rs +++ b/crates/libs/windows/src/Windows/Services/Store/mod.rs @@ -309,6 +309,30 @@ pub struct IStoreContext4_Vtbl { #[doc(hidden)] #[repr(transparent)] #[derive(::core::cmp::PartialEq, ::core::cmp::Eq, ::core::fmt::Debug, ::core::clone::Clone)] +pub struct IStoreContext5(::windows_core::IUnknown); +unsafe impl ::windows_core::Interface for IStoreContext5 { + type Vtable = IStoreContext5_Vtbl; +} +unsafe impl ::windows_core::ComInterface for IStoreContext5 { + const IID: ::windows_core::GUID = ::windows_core::GUID::from_u128(0x6de6c52b_c43a_5953_b39a_71643c57d96e); +} +#[repr(C)] +#[doc(hidden)] +pub struct IStoreContext5_Vtbl { + pub base__: ::windows_core::IInspectable_Vtbl, + #[cfg(feature = "Foundation_Collections")] + pub GetUserPurchaseHistoryAsync: unsafe extern "system" fn(this: *mut ::core::ffi::c_void, productkinds: *mut ::core::ffi::c_void, result__: *mut *mut ::core::ffi::c_void) -> ::windows_core::HRESULT, + #[cfg(not(feature = "Foundation_Collections"))] + GetUserPurchaseHistoryAsync: usize, + #[cfg(feature = "Foundation_Collections")] + pub GetAssociatedStoreProductsByInAppOfferTokenAsync: unsafe extern "system" fn(this: *mut ::core::ffi::c_void, inappoffertokens: *mut ::core::ffi::c_void, result__: *mut *mut ::core::ffi::c_void) -> ::windows_core::HRESULT, + #[cfg(not(feature = "Foundation_Collections"))] + GetAssociatedStoreProductsByInAppOfferTokenAsync: usize, + pub RequestPurchaseByInAppOfferTokenAsync: unsafe extern "system" fn(this: *mut ::core::ffi::c_void, inappoffertoken: ::std::mem::MaybeUninit<::windows_core::HSTRING>, result__: *mut *mut ::core::ffi::c_void) -> ::windows_core::HRESULT, +} +#[doc(hidden)] +#[repr(transparent)] +#[derive(::core::cmp::PartialEq, ::core::cmp::Eq, ::core::fmt::Debug, ::core::clone::Clone)] pub struct IStoreContextStatics(::windows_core::IUnknown); unsafe impl ::windows_core::Interface for IStoreContextStatics { type Vtable = IStoreContextStatics_Vtbl; @@ -489,6 +513,24 @@ pub struct IStorePrice_Vtbl { #[doc(hidden)] #[repr(transparent)] #[derive(::core::cmp::PartialEq, ::core::cmp::Eq, ::core::fmt::Debug, ::core::clone::Clone)] +pub struct IStorePrice2(::windows_core::IUnknown); +unsafe impl ::windows_core::Interface for IStorePrice2 { + type Vtable = IStorePrice2_Vtbl; +} +unsafe impl ::windows_core::ComInterface for IStorePrice2 { + const IID: ::windows_core::GUID = ::windows_core::GUID::from_u128(0xf711573c_40e6_5641_b063_f1df42b2b12a); +} +#[repr(C)] +#[doc(hidden)] +pub struct IStorePrice2_Vtbl { + pub base__: ::windows_core::IInspectable_Vtbl, + pub UnformattedBasePrice: unsafe extern "system" fn(this: *mut ::core::ffi::c_void, result__: *mut ::std::mem::MaybeUninit<::windows_core::HSTRING>) -> ::windows_core::HRESULT, + pub UnformattedPrice: unsafe extern "system" fn(this: *mut ::core::ffi::c_void, result__: *mut ::std::mem::MaybeUninit<::windows_core::HSTRING>) -> ::windows_core::HRESULT, + pub UnformattedRecurrencePrice: unsafe extern "system" fn(this: *mut ::core::ffi::c_void, result__: *mut ::std::mem::MaybeUninit<::windows_core::HSTRING>) -> ::windows_core::HRESULT, +} +#[doc(hidden)] +#[repr(transparent)] +#[derive(::core::cmp::PartialEq, ::core::cmp::Eq, ::core::fmt::Debug, ::core::clone::Clone)] pub struct IStoreProduct(::windows_core::IUnknown); unsafe impl ::windows_core::Interface for IStoreProduct { type Vtable = IStoreProduct_Vtbl; @@ -1652,6 +1694,37 @@ impl StoreContext { (::windows_core::Interface::vtable(this).SetInstallOrderForAssociatedStoreQueueItemsAsync)(::windows_core::Interface::as_raw(this), items.try_into_param()?.abi(), &mut result__).from_abi(result__) } } + #[doc = "Required features: `\"Foundation_Collections\"`"] + #[cfg(feature = "Foundation_Collections")] + pub fn GetUserPurchaseHistoryAsync(&self, productkinds: P0) -> ::windows_core::Result> + where + P0: ::windows_core::TryIntoParam>, + { + let this = &::windows_core::ComInterface::cast::(self)?; + unsafe { + let mut result__ = ::std::mem::zeroed(); + (::windows_core::Interface::vtable(this).GetUserPurchaseHistoryAsync)(::windows_core::Interface::as_raw(this), productkinds.try_into_param()?.abi(), &mut result__).from_abi(result__) + } + } + #[doc = "Required features: `\"Foundation_Collections\"`"] + #[cfg(feature = "Foundation_Collections")] + pub fn GetAssociatedStoreProductsByInAppOfferTokenAsync(&self, inappoffertokens: P0) -> ::windows_core::Result> + where + P0: ::windows_core::TryIntoParam>, + { + let this = &::windows_core::ComInterface::cast::(self)?; + unsafe { + let mut result__ = ::std::mem::zeroed(); + (::windows_core::Interface::vtable(this).GetAssociatedStoreProductsByInAppOfferTokenAsync)(::windows_core::Interface::as_raw(this), inappoffertokens.try_into_param()?.abi(), &mut result__).from_abi(result__) + } + } + pub fn RequestPurchaseByInAppOfferTokenAsync(&self, inappoffertoken: &::windows_core::HSTRING) -> ::windows_core::Result> { + let this = &::windows_core::ComInterface::cast::(self)?; + unsafe { + let mut result__ = ::std::mem::zeroed(); + (::windows_core::Interface::vtable(this).RequestPurchaseByInAppOfferTokenAsync)(::windows_core::Interface::as_raw(this), ::core::mem::transmute_copy(inappoffertoken), &mut result__).from_abi(result__) + } + } pub fn GetDefault() -> ::windows_core::Result { Self::IStoreContextStatics(|this| unsafe { let mut result__ = ::std::mem::zeroed(); @@ -2024,6 +2097,27 @@ impl StorePrice { (::windows_core::Interface::vtable(this).FormattedRecurrencePrice)(::windows_core::Interface::as_raw(this), &mut result__).from_abi(result__) } } + pub fn UnformattedBasePrice(&self) -> ::windows_core::Result<::windows_core::HSTRING> { + let this = &::windows_core::ComInterface::cast::(self)?; + unsafe { + let mut result__ = ::std::mem::zeroed(); + (::windows_core::Interface::vtable(this).UnformattedBasePrice)(::windows_core::Interface::as_raw(this), &mut result__).from_abi(result__) + } + } + pub fn UnformattedPrice(&self) -> ::windows_core::Result<::windows_core::HSTRING> { + let this = &::windows_core::ComInterface::cast::(self)?; + unsafe { + let mut result__ = ::std::mem::zeroed(); + (::windows_core::Interface::vtable(this).UnformattedPrice)(::windows_core::Interface::as_raw(this), &mut result__).from_abi(result__) + } + } + pub fn UnformattedRecurrencePrice(&self) -> ::windows_core::Result<::windows_core::HSTRING> { + let this = &::windows_core::ComInterface::cast::(self)?; + unsafe { + let mut result__ = ::std::mem::zeroed(); + (::windows_core::Interface::vtable(this).UnformattedRecurrencePrice)(::windows_core::Interface::as_raw(this), &mut result__).from_abi(result__) + } + } } impl ::windows_core::RuntimeType for StorePrice { const SIGNATURE: ::windows_core::imp::ConstBuffer = ::windows_core::imp::ConstBuffer::for_class::(); diff --git a/crates/libs/windows/src/Windows/Storage/Provider/impl.rs b/crates/libs/windows/src/Windows/Storage/Provider/impl.rs index df4a62a4da..1d32037207 100644 --- a/crates/libs/windows/src/Windows/Storage/Provider/impl.rs +++ b/crates/libs/windows/src/Windows/Storage/Provider/impl.rs @@ -31,6 +31,84 @@ impl IStorageProviderItemPropertySource_Vtbl { *iid == ::IID } } +pub trait IStorageProviderKnownFolderSyncInfoSource_Impl: Sized { + fn GetKnownFolderSyncInfo(&self) -> ::windows_core::Result; + fn KnownFolderSyncInfoChanged(&self, handler: ::core::option::Option<&super::super::Foundation::TypedEventHandler>) -> ::windows_core::Result; + fn RemoveKnownFolderSyncInfoChanged(&self, token: &super::super::Foundation::EventRegistrationToken) -> ::windows_core::Result<()>; +} +impl ::windows_core::RuntimeName for IStorageProviderKnownFolderSyncInfoSource { + const NAME: &'static str = "Windows.Storage.Provider.IStorageProviderKnownFolderSyncInfoSource"; +} +impl IStorageProviderKnownFolderSyncInfoSource_Vtbl { + pub const fn new, Impl: IStorageProviderKnownFolderSyncInfoSource_Impl, const OFFSET: isize>() -> IStorageProviderKnownFolderSyncInfoSource_Vtbl { + unsafe extern "system" fn GetKnownFolderSyncInfo, Impl: IStorageProviderKnownFolderSyncInfoSource_Impl, const OFFSET: isize>(this: *mut ::core::ffi::c_void, result__: *mut *mut ::core::ffi::c_void) -> ::windows_core::HRESULT { + let this = (this as *const *const ()).offset(OFFSET) as *const Identity; + let this = (*this).get_impl(); + match this.GetKnownFolderSyncInfo() { + ::core::result::Result::Ok(ok__) => { + ::core::ptr::write(result__, ::core::mem::transmute_copy(&ok__)); + ::core::mem::forget(ok__); + ::windows_core::HRESULT(0) + } + ::core::result::Result::Err(err) => err.into(), + } + } + unsafe extern "system" fn KnownFolderSyncInfoChanged, Impl: IStorageProviderKnownFolderSyncInfoSource_Impl, const OFFSET: isize>(this: *mut ::core::ffi::c_void, handler: *mut ::core::ffi::c_void, result__: *mut super::super::Foundation::EventRegistrationToken) -> ::windows_core::HRESULT { + let this = (this as *const *const ()).offset(OFFSET) as *const Identity; + let this = (*this).get_impl(); + match this.KnownFolderSyncInfoChanged(::windows_core::from_raw_borrowed(&handler)) { + ::core::result::Result::Ok(ok__) => { + ::core::ptr::write(result__, ::core::mem::transmute_copy(&ok__)); + ::windows_core::HRESULT(0) + } + ::core::result::Result::Err(err) => err.into(), + } + } + unsafe extern "system" fn RemoveKnownFolderSyncInfoChanged, Impl: IStorageProviderKnownFolderSyncInfoSource_Impl, const OFFSET: isize>(this: *mut ::core::ffi::c_void, token: super::super::Foundation::EventRegistrationToken) -> ::windows_core::HRESULT { + let this = (this as *const *const ()).offset(OFFSET) as *const Identity; + let this = (*this).get_impl(); + this.RemoveKnownFolderSyncInfoChanged(::core::mem::transmute(&token)).into() + } + Self { + base__: ::windows_core::IInspectable_Vtbl::new::(), + GetKnownFolderSyncInfo: GetKnownFolderSyncInfo::, + KnownFolderSyncInfoChanged: KnownFolderSyncInfoChanged::, + RemoveKnownFolderSyncInfoChanged: RemoveKnownFolderSyncInfoChanged::, + } + } + pub unsafe fn matches(iid: *const ::windows_core::GUID) -> bool { + *iid == ::IID + } +} +pub trait IStorageProviderKnownFolderSyncInfoSourceFactory_Impl: Sized { + fn GetKnownFolderSyncInfoSource(&self) -> ::windows_core::Result; +} +impl ::windows_core::RuntimeName for IStorageProviderKnownFolderSyncInfoSourceFactory { + const NAME: &'static str = "Windows.Storage.Provider.IStorageProviderKnownFolderSyncInfoSourceFactory"; +} +impl IStorageProviderKnownFolderSyncInfoSourceFactory_Vtbl { + pub const fn new, Impl: IStorageProviderKnownFolderSyncInfoSourceFactory_Impl, const OFFSET: isize>() -> IStorageProviderKnownFolderSyncInfoSourceFactory_Vtbl { + unsafe extern "system" fn GetKnownFolderSyncInfoSource, Impl: IStorageProviderKnownFolderSyncInfoSourceFactory_Impl, const OFFSET: isize>(this: *mut ::core::ffi::c_void, result__: *mut *mut ::core::ffi::c_void) -> ::windows_core::HRESULT { + let this = (this as *const *const ()).offset(OFFSET) as *const Identity; + let this = (*this).get_impl(); + match this.GetKnownFolderSyncInfoSource() { + ::core::result::Result::Ok(ok__) => { + ::core::ptr::write(result__, ::core::mem::transmute_copy(&ok__)); + ::core::mem::forget(ok__); + ::windows_core::HRESULT(0) + } + ::core::result::Result::Err(err) => err.into(), + } + } + Self { + base__: ::windows_core::IInspectable_Vtbl::new::(), + GetKnownFolderSyncInfoSource: GetKnownFolderSyncInfoSource::, + } + } + pub unsafe fn matches(iid: *const ::windows_core::GUID) -> bool { + *iid == ::IID + } +} pub trait IStorageProviderPropertyCapabilities_Impl: Sized { fn IsPropertySupported(&self, propertycanonicalname: &::windows_core::HSTRING) -> ::windows_core::Result; } diff --git a/crates/libs/windows/src/Windows/Storage/Provider/mod.rs b/crates/libs/windows/src/Windows/Storage/Provider/mod.rs index 24413875e9..f3429f28da 100644 --- a/crates/libs/windows/src/Windows/Storage/Provider/mod.rs +++ b/crates/libs/windows/src/Windows/Storage/Provider/mod.rs @@ -292,6 +292,140 @@ pub struct IStorageProviderItemPropertySource_Vtbl { #[doc(hidden)] #[repr(transparent)] #[derive(::core::cmp::PartialEq, ::core::cmp::Eq, ::core::fmt::Debug, ::core::clone::Clone)] +pub struct IStorageProviderKnownFolderEntry(::windows_core::IUnknown); +unsafe impl ::windows_core::Interface for IStorageProviderKnownFolderEntry { + type Vtable = IStorageProviderKnownFolderEntry_Vtbl; +} +unsafe impl ::windows_core::ComInterface for IStorageProviderKnownFolderEntry { + const IID: ::windows_core::GUID = ::windows_core::GUID::from_u128(0xeffa7db0_1d44_596b_8464_928800c5e2d8); +} +#[repr(C)] +#[doc(hidden)] +pub struct IStorageProviderKnownFolderEntry_Vtbl { + pub base__: ::windows_core::IInspectable_Vtbl, + pub KnownFolderId: unsafe extern "system" fn(this: *mut ::core::ffi::c_void, result__: *mut ::windows_core::GUID) -> ::windows_core::HRESULT, + pub SetKnownFolderId: unsafe extern "system" fn(this: *mut ::core::ffi::c_void, value: ::windows_core::GUID) -> ::windows_core::HRESULT, + pub Status: unsafe extern "system" fn(this: *mut ::core::ffi::c_void, result__: *mut StorageProviderKnownFolderSyncStatus) -> ::windows_core::HRESULT, + pub SetStatus: unsafe extern "system" fn(this: *mut ::core::ffi::c_void, value: StorageProviderKnownFolderSyncStatus) -> ::windows_core::HRESULT, +} +#[doc(hidden)] +#[repr(transparent)] +#[derive(::core::cmp::PartialEq, ::core::cmp::Eq, ::core::fmt::Debug, ::core::clone::Clone)] +pub struct IStorageProviderKnownFolderSyncInfo(::windows_core::IUnknown); +unsafe impl ::windows_core::Interface for IStorageProviderKnownFolderSyncInfo { + type Vtable = IStorageProviderKnownFolderSyncInfo_Vtbl; +} +unsafe impl ::windows_core::ComInterface for IStorageProviderKnownFolderSyncInfo { + const IID: ::windows_core::GUID = ::windows_core::GUID::from_u128(0x98b017ce_ffc1_5b11_ae77_cc17afec1049); +} +#[repr(C)] +#[doc(hidden)] +pub struct IStorageProviderKnownFolderSyncInfo_Vtbl { + pub base__: ::windows_core::IInspectable_Vtbl, + pub ProviderDisplayName: unsafe extern "system" fn(this: *mut ::core::ffi::c_void, result__: *mut ::std::mem::MaybeUninit<::windows_core::HSTRING>) -> ::windows_core::HRESULT, + pub SetProviderDisplayName: unsafe extern "system" fn(this: *mut ::core::ffi::c_void, value: ::std::mem::MaybeUninit<::windows_core::HSTRING>) -> ::windows_core::HRESULT, + #[cfg(feature = "Foundation_Collections")] + pub KnownFolderEntries: unsafe extern "system" fn(this: *mut ::core::ffi::c_void, result__: *mut *mut ::core::ffi::c_void) -> ::windows_core::HRESULT, + #[cfg(not(feature = "Foundation_Collections"))] + KnownFolderEntries: usize, + pub SyncRequested: unsafe extern "system" fn(this: *mut ::core::ffi::c_void, result__: *mut *mut ::core::ffi::c_void) -> ::windows_core::HRESULT, + pub SetSyncRequested: unsafe extern "system" fn(this: *mut ::core::ffi::c_void, value: *mut ::core::ffi::c_void) -> ::windows_core::HRESULT, +} +#[repr(transparent)] +#[derive(::core::cmp::PartialEq, ::core::cmp::Eq, ::core::fmt::Debug, ::core::clone::Clone)] +pub struct IStorageProviderKnownFolderSyncInfoSource(::windows_core::IUnknown); +impl IStorageProviderKnownFolderSyncInfoSource { + pub fn GetKnownFolderSyncInfo(&self) -> ::windows_core::Result { + let this = self; + unsafe { + let mut result__ = ::std::mem::zeroed(); + (::windows_core::Interface::vtable(this).GetKnownFolderSyncInfo)(::windows_core::Interface::as_raw(this), &mut result__).from_abi(result__) + } + } + pub fn KnownFolderSyncInfoChanged(&self, handler: P0) -> ::windows_core::Result + where + P0: ::windows_core::IntoParam>, + { + let this = self; + unsafe { + let mut result__ = ::std::mem::zeroed(); + (::windows_core::Interface::vtable(this).KnownFolderSyncInfoChanged)(::windows_core::Interface::as_raw(this), handler.into_param().abi(), &mut result__).from_abi(result__) + } + } + pub fn RemoveKnownFolderSyncInfoChanged(&self, token: super::super::Foundation::EventRegistrationToken) -> ::windows_core::Result<()> { + let this = self; + unsafe { (::windows_core::Interface::vtable(this).RemoveKnownFolderSyncInfoChanged)(::windows_core::Interface::as_raw(this), token).ok() } + } +} +::windows_core::imp::interface_hierarchy!(IStorageProviderKnownFolderSyncInfoSource, ::windows_core::IUnknown, ::windows_core::IInspectable); +impl ::windows_core::RuntimeType for IStorageProviderKnownFolderSyncInfoSource { + const SIGNATURE: ::windows_core::imp::ConstBuffer = ::windows_core::imp::ConstBuffer::for_interface::(); +} +unsafe impl ::windows_core::Interface for IStorageProviderKnownFolderSyncInfoSource { + type Vtable = IStorageProviderKnownFolderSyncInfoSource_Vtbl; +} +unsafe impl ::windows_core::ComInterface for IStorageProviderKnownFolderSyncInfoSource { + const IID: ::windows_core::GUID = ::windows_core::GUID::from_u128(0x51359342_f7c0_53d0_bbb6_1cdc098ebda9); +} +#[repr(C)] +#[doc(hidden)] +pub struct IStorageProviderKnownFolderSyncInfoSource_Vtbl { + pub base__: ::windows_core::IInspectable_Vtbl, + pub GetKnownFolderSyncInfo: unsafe extern "system" fn(this: *mut ::core::ffi::c_void, result__: *mut *mut ::core::ffi::c_void) -> ::windows_core::HRESULT, + pub KnownFolderSyncInfoChanged: unsafe extern "system" fn(this: *mut ::core::ffi::c_void, handler: *mut ::core::ffi::c_void, result__: *mut super::super::Foundation::EventRegistrationToken) -> ::windows_core::HRESULT, + pub RemoveKnownFolderSyncInfoChanged: unsafe extern "system" fn(this: *mut ::core::ffi::c_void, token: super::super::Foundation::EventRegistrationToken) -> ::windows_core::HRESULT, +} +#[repr(transparent)] +#[derive(::core::cmp::PartialEq, ::core::cmp::Eq, ::core::fmt::Debug, ::core::clone::Clone)] +pub struct IStorageProviderKnownFolderSyncInfoSourceFactory(::windows_core::IUnknown); +impl IStorageProviderKnownFolderSyncInfoSourceFactory { + pub fn GetKnownFolderSyncInfoSource(&self) -> ::windows_core::Result { + let this = self; + unsafe { + let mut result__ = ::std::mem::zeroed(); + (::windows_core::Interface::vtable(this).GetKnownFolderSyncInfoSource)(::windows_core::Interface::as_raw(this), &mut result__).from_abi(result__) + } + } +} +::windows_core::imp::interface_hierarchy!(IStorageProviderKnownFolderSyncInfoSourceFactory, ::windows_core::IUnknown, ::windows_core::IInspectable); +impl ::windows_core::RuntimeType for IStorageProviderKnownFolderSyncInfoSourceFactory { + const SIGNATURE: ::windows_core::imp::ConstBuffer = ::windows_core::imp::ConstBuffer::for_interface::(); +} +unsafe impl ::windows_core::Interface for IStorageProviderKnownFolderSyncInfoSourceFactory { + type Vtable = IStorageProviderKnownFolderSyncInfoSourceFactory_Vtbl; +} +unsafe impl ::windows_core::ComInterface for IStorageProviderKnownFolderSyncInfoSourceFactory { + const IID: ::windows_core::GUID = ::windows_core::GUID::from_u128(0xaaee03a7_a7f6_50be_a9b0_8e82d0c81082); +} +#[repr(C)] +#[doc(hidden)] +pub struct IStorageProviderKnownFolderSyncInfoSourceFactory_Vtbl { + pub base__: ::windows_core::IInspectable_Vtbl, + pub GetKnownFolderSyncInfoSource: unsafe extern "system" fn(this: *mut ::core::ffi::c_void, result__: *mut *mut ::core::ffi::c_void) -> ::windows_core::HRESULT, +} +#[doc(hidden)] +#[repr(transparent)] +#[derive(::core::cmp::PartialEq, ::core::cmp::Eq, ::core::fmt::Debug, ::core::clone::Clone)] +pub struct IStorageProviderKnownFolderSyncRequestArgs(::windows_core::IUnknown); +unsafe impl ::windows_core::Interface for IStorageProviderKnownFolderSyncRequestArgs { + type Vtable = IStorageProviderKnownFolderSyncRequestArgs_Vtbl; +} +unsafe impl ::windows_core::ComInterface for IStorageProviderKnownFolderSyncRequestArgs { + const IID: ::windows_core::GUID = ::windows_core::GUID::from_u128(0xeda6d569_b4e8_542f_ab8d_f3613f250a4a); +} +#[repr(C)] +#[doc(hidden)] +pub struct IStorageProviderKnownFolderSyncRequestArgs_Vtbl { + pub base__: ::windows_core::IInspectable_Vtbl, + #[cfg(feature = "Foundation_Collections")] + pub KnownFolders: unsafe extern "system" fn(this: *mut ::core::ffi::c_void, result__: *mut *mut ::core::ffi::c_void) -> ::windows_core::HRESULT, + #[cfg(not(feature = "Foundation_Collections"))] + KnownFolders: usize, + pub Source: unsafe extern "system" fn(this: *mut ::core::ffi::c_void, result__: *mut *mut ::core::ffi::c_void) -> ::windows_core::HRESULT, +} +#[doc(hidden)] +#[repr(transparent)] +#[derive(::core::cmp::PartialEq, ::core::cmp::Eq, ::core::fmt::Debug, ::core::clone::Clone)] pub struct IStorageProviderMoreInfoUI(::windows_core::IUnknown); unsafe impl ::windows_core::Interface for IStorageProviderMoreInfoUI { type Vtable = IStorageProviderMoreInfoUI_Vtbl; @@ -1202,6 +1336,152 @@ unsafe impl ::core::marker::Send for StorageProviderItemPropertyDefinition {} unsafe impl ::core::marker::Sync for StorageProviderItemPropertyDefinition {} #[repr(transparent)] #[derive(::core::cmp::PartialEq, ::core::cmp::Eq, ::core::fmt::Debug, ::core::clone::Clone)] +pub struct StorageProviderKnownFolderEntry(::windows_core::IUnknown); +impl StorageProviderKnownFolderEntry { + pub fn new() -> ::windows_core::Result { + Self::IActivationFactory(|f| f.ActivateInstance::()) + } + fn IActivationFactory ::windows_core::Result>(callback: F) -> ::windows_core::Result { + static SHARED: ::windows_core::imp::FactoryCache = ::windows_core::imp::FactoryCache::new(); + SHARED.call(callback) + } + pub fn KnownFolderId(&self) -> ::windows_core::Result<::windows_core::GUID> { + let this = self; + unsafe { + let mut result__ = ::std::mem::zeroed(); + (::windows_core::Interface::vtable(this).KnownFolderId)(::windows_core::Interface::as_raw(this), &mut result__).from_abi(result__) + } + } + pub fn SetKnownFolderId(&self, value: ::windows_core::GUID) -> ::windows_core::Result<()> { + let this = self; + unsafe { (::windows_core::Interface::vtable(this).SetKnownFolderId)(::windows_core::Interface::as_raw(this), value).ok() } + } + pub fn Status(&self) -> ::windows_core::Result { + let this = self; + unsafe { + let mut result__ = ::std::mem::zeroed(); + (::windows_core::Interface::vtable(this).Status)(::windows_core::Interface::as_raw(this), &mut result__).from_abi(result__) + } + } + pub fn SetStatus(&self, value: StorageProviderKnownFolderSyncStatus) -> ::windows_core::Result<()> { + let this = self; + unsafe { (::windows_core::Interface::vtable(this).SetStatus)(::windows_core::Interface::as_raw(this), value).ok() } + } +} +impl ::windows_core::RuntimeType for StorageProviderKnownFolderEntry { + const SIGNATURE: ::windows_core::imp::ConstBuffer = ::windows_core::imp::ConstBuffer::for_class::(); +} +unsafe impl ::windows_core::Interface for StorageProviderKnownFolderEntry { + type Vtable = IStorageProviderKnownFolderEntry_Vtbl; +} +unsafe impl ::windows_core::ComInterface for StorageProviderKnownFolderEntry { + const IID: ::windows_core::GUID = ::IID; +} +impl ::windows_core::RuntimeName for StorageProviderKnownFolderEntry { + const NAME: &'static str = "Windows.Storage.Provider.StorageProviderKnownFolderEntry"; +} +::windows_core::imp::interface_hierarchy!(StorageProviderKnownFolderEntry, ::windows_core::IUnknown, ::windows_core::IInspectable); +unsafe impl ::core::marker::Send for StorageProviderKnownFolderEntry {} +unsafe impl ::core::marker::Sync for StorageProviderKnownFolderEntry {} +#[repr(transparent)] +#[derive(::core::cmp::PartialEq, ::core::cmp::Eq, ::core::fmt::Debug, ::core::clone::Clone)] +pub struct StorageProviderKnownFolderSyncInfo(::windows_core::IUnknown); +impl StorageProviderKnownFolderSyncInfo { + pub fn new() -> ::windows_core::Result { + Self::IActivationFactory(|f| f.ActivateInstance::()) + } + fn IActivationFactory ::windows_core::Result>(callback: F) -> ::windows_core::Result { + static SHARED: ::windows_core::imp::FactoryCache = ::windows_core::imp::FactoryCache::new(); + SHARED.call(callback) + } + pub fn ProviderDisplayName(&self) -> ::windows_core::Result<::windows_core::HSTRING> { + let this = self; + unsafe { + let mut result__ = ::std::mem::zeroed(); + (::windows_core::Interface::vtable(this).ProviderDisplayName)(::windows_core::Interface::as_raw(this), &mut result__).from_abi(result__) + } + } + pub fn SetProviderDisplayName(&self, value: &::windows_core::HSTRING) -> ::windows_core::Result<()> { + let this = self; + unsafe { (::windows_core::Interface::vtable(this).SetProviderDisplayName)(::windows_core::Interface::as_raw(this), ::core::mem::transmute_copy(value)).ok() } + } + #[doc = "Required features: `\"Foundation_Collections\"`"] + #[cfg(feature = "Foundation_Collections")] + pub fn KnownFolderEntries(&self) -> ::windows_core::Result> { + let this = self; + unsafe { + let mut result__ = ::std::mem::zeroed(); + (::windows_core::Interface::vtable(this).KnownFolderEntries)(::windows_core::Interface::as_raw(this), &mut result__).from_abi(result__) + } + } + pub fn SyncRequested(&self) -> ::windows_core::Result { + let this = self; + unsafe { + let mut result__ = ::std::mem::zeroed(); + (::windows_core::Interface::vtable(this).SyncRequested)(::windows_core::Interface::as_raw(this), &mut result__).from_abi(result__) + } + } + pub fn SetSyncRequested(&self, value: P0) -> ::windows_core::Result<()> + where + P0: ::windows_core::IntoParam, + { + let this = self; + unsafe { (::windows_core::Interface::vtable(this).SetSyncRequested)(::windows_core::Interface::as_raw(this), value.into_param().abi()).ok() } + } +} +impl ::windows_core::RuntimeType for StorageProviderKnownFolderSyncInfo { + const SIGNATURE: ::windows_core::imp::ConstBuffer = ::windows_core::imp::ConstBuffer::for_class::(); +} +unsafe impl ::windows_core::Interface for StorageProviderKnownFolderSyncInfo { + type Vtable = IStorageProviderKnownFolderSyncInfo_Vtbl; +} +unsafe impl ::windows_core::ComInterface for StorageProviderKnownFolderSyncInfo { + const IID: ::windows_core::GUID = ::IID; +} +impl ::windows_core::RuntimeName for StorageProviderKnownFolderSyncInfo { + const NAME: &'static str = "Windows.Storage.Provider.StorageProviderKnownFolderSyncInfo"; +} +::windows_core::imp::interface_hierarchy!(StorageProviderKnownFolderSyncInfo, ::windows_core::IUnknown, ::windows_core::IInspectable); +unsafe impl ::core::marker::Send for StorageProviderKnownFolderSyncInfo {} +unsafe impl ::core::marker::Sync for StorageProviderKnownFolderSyncInfo {} +#[repr(transparent)] +#[derive(::core::cmp::PartialEq, ::core::cmp::Eq, ::core::fmt::Debug, ::core::clone::Clone)] +pub struct StorageProviderKnownFolderSyncRequestArgs(::windows_core::IUnknown); +impl StorageProviderKnownFolderSyncRequestArgs { + #[doc = "Required features: `\"Foundation_Collections\"`"] + #[cfg(feature = "Foundation_Collections")] + pub fn KnownFolders(&self) -> ::windows_core::Result> { + let this = self; + unsafe { + let mut result__ = ::std::mem::zeroed(); + (::windows_core::Interface::vtable(this).KnownFolders)(::windows_core::Interface::as_raw(this), &mut result__).from_abi(result__) + } + } + pub fn Source(&self) -> ::windows_core::Result { + let this = self; + unsafe { + let mut result__ = ::std::mem::zeroed(); + (::windows_core::Interface::vtable(this).Source)(::windows_core::Interface::as_raw(this), &mut result__).from_abi(result__) + } + } +} +impl ::windows_core::RuntimeType for StorageProviderKnownFolderSyncRequestArgs { + const SIGNATURE: ::windows_core::imp::ConstBuffer = ::windows_core::imp::ConstBuffer::for_class::(); +} +unsafe impl ::windows_core::Interface for StorageProviderKnownFolderSyncRequestArgs { + type Vtable = IStorageProviderKnownFolderSyncRequestArgs_Vtbl; +} +unsafe impl ::windows_core::ComInterface for StorageProviderKnownFolderSyncRequestArgs { + const IID: ::windows_core::GUID = ::IID; +} +impl ::windows_core::RuntimeName for StorageProviderKnownFolderSyncRequestArgs { + const NAME: &'static str = "Windows.Storage.Provider.StorageProviderKnownFolderSyncRequestArgs"; +} +::windows_core::imp::interface_hierarchy!(StorageProviderKnownFolderSyncRequestArgs, ::windows_core::IUnknown, ::windows_core::IInspectable); +unsafe impl ::core::marker::Send for StorageProviderKnownFolderSyncRequestArgs {} +unsafe impl ::core::marker::Sync for StorageProviderKnownFolderSyncRequestArgs {} +#[repr(transparent)] +#[derive(::core::cmp::PartialEq, ::core::cmp::Eq, ::core::fmt::Debug, ::core::clone::Clone)] pub struct StorageProviderMoreInfoUI(::windows_core::IUnknown); impl StorageProviderMoreInfoUI { pub fn new() -> ::windows_core::Result { @@ -2142,6 +2422,36 @@ impl ::windows_core::RuntimeType for StorageProviderInSyncPolicy { } #[repr(transparent)] #[derive(::core::cmp::PartialEq, ::core::cmp::Eq)] +pub struct StorageProviderKnownFolderSyncStatus(pub i32); +impl StorageProviderKnownFolderSyncStatus { + pub const Available: Self = Self(0i32); + pub const Enrolling: Self = Self(1i32); + pub const Enrolled: Self = Self(2i32); +} +impl ::core::marker::Copy for StorageProviderKnownFolderSyncStatus {} +impl ::core::clone::Clone for StorageProviderKnownFolderSyncStatus { + fn clone(&self) -> Self { + *self + } +} +impl ::core::default::Default for StorageProviderKnownFolderSyncStatus { + fn default() -> Self { + Self(0) + } +} +impl ::windows_core::TypeKind for StorageProviderKnownFolderSyncStatus { + type TypeKind = ::windows_core::CopyType; +} +impl ::core::fmt::Debug for StorageProviderKnownFolderSyncStatus { + fn fmt(&self, f: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result { + f.debug_tuple("StorageProviderKnownFolderSyncStatus").field(&self.0).finish() + } +} +impl ::windows_core::RuntimeType for StorageProviderKnownFolderSyncStatus { + const SIGNATURE: ::windows_core::imp::ConstBuffer = ::windows_core::imp::ConstBuffer::from_slice(b"enum(Windows.Storage.Provider.StorageProviderKnownFolderSyncStatus;i4)"); +} +#[repr(transparent)] +#[derive(::core::cmp::PartialEq, ::core::cmp::Eq)] pub struct StorageProviderPopulationPolicy(pub i32); impl StorageProviderPopulationPolicy { pub const Full: Self = Self(1i32); @@ -2352,5 +2662,77 @@ impl ::core::fmt::Debug for WriteActivationMode { impl ::windows_core::RuntimeType for WriteActivationMode { const SIGNATURE: ::windows_core::imp::ConstBuffer = ::windows_core::imp::ConstBuffer::from_slice(b"enum(Windows.Storage.Provider.WriteActivationMode;i4)"); } +#[repr(transparent)] +#[derive(::core::cmp::PartialEq, ::core::cmp::Eq, ::core::fmt::Debug, ::core::clone::Clone)] +pub struct StorageProviderKnownFolderSyncRequestedHandler(pub ::windows_core::IUnknown); +impl StorageProviderKnownFolderSyncRequestedHandler { + pub fn new) -> ::windows_core::Result<()> + ::core::marker::Send + 'static>(invoke: F) -> Self { + let com = StorageProviderKnownFolderSyncRequestedHandlerBox:: { vtable: &StorageProviderKnownFolderSyncRequestedHandlerBox::::VTABLE, count: ::windows_core::imp::RefCount::new(1), invoke }; + unsafe { ::core::mem::transmute(::std::boxed::Box::new(com)) } + } + pub fn Invoke(&self, args: P0) -> ::windows_core::Result<()> + where + P0: ::windows_core::IntoParam, + { + let this = self; + unsafe { (::windows_core::Interface::vtable(this).Invoke)(::windows_core::Interface::as_raw(this), args.into_param().abi()).ok() } + } +} +#[repr(C)] +struct StorageProviderKnownFolderSyncRequestedHandlerBox) -> ::windows_core::Result<()> + ::core::marker::Send + 'static> { + vtable: *const StorageProviderKnownFolderSyncRequestedHandler_Vtbl, + invoke: F, + count: ::windows_core::imp::RefCount, +} +impl) -> ::windows_core::Result<()> + ::core::marker::Send + 'static> StorageProviderKnownFolderSyncRequestedHandlerBox { + const VTABLE: StorageProviderKnownFolderSyncRequestedHandler_Vtbl = StorageProviderKnownFolderSyncRequestedHandler_Vtbl { + base__: ::windows_core::IUnknown_Vtbl { QueryInterface: Self::QueryInterface, AddRef: Self::AddRef, Release: Self::Release }, + Invoke: Self::Invoke, + }; + unsafe extern "system" fn QueryInterface(this: *mut ::core::ffi::c_void, iid: *const ::windows_core::GUID, interface: *mut *mut ::core::ffi::c_void) -> ::windows_core::HRESULT { + let this = this as *mut *mut ::core::ffi::c_void as *mut Self; + if iid.is_null() || interface.is_null() { + return ::windows_core::HRESULT(-2147467261); + } + *interface = if *iid == ::IID || *iid == <::windows_core::IUnknown as ::windows_core::ComInterface>::IID || *iid == <::windows_core::imp::IAgileObject as ::windows_core::ComInterface>::IID { &mut (*this).vtable as *mut _ as _ } else { ::core::ptr::null_mut() }; + if (*interface).is_null() { + ::windows_core::HRESULT(-2147467262) + } else { + (*this).count.add_ref(); + ::windows_core::HRESULT(0) + } + } + unsafe extern "system" fn AddRef(this: *mut ::core::ffi::c_void) -> u32 { + let this = this as *mut *mut ::core::ffi::c_void as *mut Self; + (*this).count.add_ref() + } + unsafe extern "system" fn Release(this: *mut ::core::ffi::c_void) -> u32 { + let this = this as *mut *mut ::core::ffi::c_void as *mut Self; + let remaining = (*this).count.release(); + if remaining == 0 { + let _ = ::std::boxed::Box::from_raw(this); + } + remaining + } + unsafe extern "system" fn Invoke(this: *mut ::core::ffi::c_void, args: *mut ::core::ffi::c_void) -> ::windows_core::HRESULT { + let this = this as *mut *mut ::core::ffi::c_void as *mut Self; + ((*this).invoke)(::windows_core::from_raw_borrowed(&args)).into() + } +} +unsafe impl ::windows_core::Interface for StorageProviderKnownFolderSyncRequestedHandler { + type Vtable = StorageProviderKnownFolderSyncRequestedHandler_Vtbl; +} +unsafe impl ::windows_core::ComInterface for StorageProviderKnownFolderSyncRequestedHandler { + const IID: ::windows_core::GUID = ::windows_core::GUID::from_u128(0xc4cbb4f5_13dd_5c8e_8b96_336fc30c629b); +} +impl ::windows_core::RuntimeType for StorageProviderKnownFolderSyncRequestedHandler { + const SIGNATURE: ::windows_core::imp::ConstBuffer = ::windows_core::imp::ConstBuffer::for_interface::(); +} +#[repr(C)] +#[doc(hidden)] +pub struct StorageProviderKnownFolderSyncRequestedHandler_Vtbl { + pub base__: ::windows_core::IUnknown_Vtbl, + pub Invoke: unsafe extern "system" fn(this: *mut ::core::ffi::c_void, args: *mut ::core::ffi::c_void) -> ::windows_core::HRESULT, +} #[cfg(feature = "implement")] ::core::include!("impl.rs"); diff --git a/crates/libs/windows/src/Windows/System/RemoteDesktop/Provider/mod.rs b/crates/libs/windows/src/Windows/System/RemoteDesktop/Provider/mod.rs new file mode 100644 index 0000000000..1c8f08dabe --- /dev/null +++ b/crates/libs/windows/src/Windows/System/RemoteDesktop/Provider/mod.rs @@ -0,0 +1,419 @@ +#[doc(hidden)] +#[repr(transparent)] +#[derive(::core::cmp::PartialEq, ::core::cmp::Eq, ::core::fmt::Debug, ::core::clone::Clone)] +pub struct IPerformLocalActionRequestedEventArgs(::windows_core::IUnknown); +unsafe impl ::windows_core::Interface for IPerformLocalActionRequestedEventArgs { + type Vtable = IPerformLocalActionRequestedEventArgs_Vtbl; +} +unsafe impl ::windows_core::ComInterface for IPerformLocalActionRequestedEventArgs { + const IID: ::windows_core::GUID = ::windows_core::GUID::from_u128(0x59359f4f_0862_53a3_a3b3_c932fb718cdc); +} +#[repr(C)] +#[doc(hidden)] +pub struct IPerformLocalActionRequestedEventArgs_Vtbl { + pub base__: ::windows_core::IInspectable_Vtbl, + pub Action: unsafe extern "system" fn(this: *mut ::core::ffi::c_void, result__: *mut RemoteDesktopLocalAction) -> ::windows_core::HRESULT, +} +#[doc(hidden)] +#[repr(transparent)] +#[derive(::core::cmp::PartialEq, ::core::cmp::Eq, ::core::fmt::Debug, ::core::clone::Clone)] +pub struct IRemoteDesktopConnectionInfo(::windows_core::IUnknown); +unsafe impl ::windows_core::Interface for IRemoteDesktopConnectionInfo { + type Vtable = IRemoteDesktopConnectionInfo_Vtbl; +} +unsafe impl ::windows_core::ComInterface for IRemoteDesktopConnectionInfo { + const IID: ::windows_core::GUID = ::windows_core::GUID::from_u128(0x68bd69d6_6dea_543b_b737_f347919f5093); +} +#[repr(C)] +#[doc(hidden)] +pub struct IRemoteDesktopConnectionInfo_Vtbl { + pub base__: ::windows_core::IInspectable_Vtbl, + pub SetConnectionStatus: unsafe extern "system" fn(this: *mut ::core::ffi::c_void, value: RemoteDesktopConnectionStatus) -> ::windows_core::HRESULT, + pub SwitchToLocalSession: unsafe extern "system" fn(this: *mut ::core::ffi::c_void) -> ::windows_core::HRESULT, +} +#[doc(hidden)] +#[repr(transparent)] +#[derive(::core::cmp::PartialEq, ::core::cmp::Eq, ::core::fmt::Debug, ::core::clone::Clone)] +pub struct IRemoteDesktopConnectionInfoStatics(::windows_core::IUnknown); +unsafe impl ::windows_core::Interface for IRemoteDesktopConnectionInfoStatics { + type Vtable = IRemoteDesktopConnectionInfoStatics_Vtbl; +} +unsafe impl ::windows_core::ComInterface for IRemoteDesktopConnectionInfoStatics { + const IID: ::windows_core::GUID = ::windows_core::GUID::from_u128(0x4a7dc5a1_3368_5a75_bb78_807df7ebc439); +} +#[repr(C)] +#[doc(hidden)] +pub struct IRemoteDesktopConnectionInfoStatics_Vtbl { + pub base__: ::windows_core::IInspectable_Vtbl, + #[cfg(feature = "UI")] + pub GetForLaunchUri: unsafe extern "system" fn(this: *mut ::core::ffi::c_void, launchuri: *mut ::core::ffi::c_void, windowid: super::super::super::UI::WindowId, result__: *mut *mut ::core::ffi::c_void) -> ::windows_core::HRESULT, + #[cfg(not(feature = "UI"))] + GetForLaunchUri: usize, +} +#[doc(hidden)] +#[repr(transparent)] +#[derive(::core::cmp::PartialEq, ::core::cmp::Eq, ::core::fmt::Debug, ::core::clone::Clone)] +pub struct IRemoteDesktopConnectionRemoteInfo(::windows_core::IUnknown); +unsafe impl ::windows_core::Interface for IRemoteDesktopConnectionRemoteInfo { + type Vtable = IRemoteDesktopConnectionRemoteInfo_Vtbl; +} +unsafe impl ::windows_core::ComInterface for IRemoteDesktopConnectionRemoteInfo { + const IID: ::windows_core::GUID = ::windows_core::GUID::from_u128(0x2a3dfa7e_a7ab_547e_9a6a_4c565bbb8d71); +} +#[repr(C)] +#[doc(hidden)] +pub struct IRemoteDesktopConnectionRemoteInfo_Vtbl { + pub base__: ::windows_core::IInspectable_Vtbl, + pub ReportSwitched: unsafe extern "system" fn(this: *mut ::core::ffi::c_void) -> ::windows_core::HRESULT, + pub SwitchToLocalSessionRequested: unsafe extern "system" fn(this: *mut ::core::ffi::c_void, handler: *mut ::core::ffi::c_void, result__: *mut super::super::super::Foundation::EventRegistrationToken) -> ::windows_core::HRESULT, + pub RemoveSwitchToLocalSessionRequested: unsafe extern "system" fn(this: *mut ::core::ffi::c_void, token: super::super::super::Foundation::EventRegistrationToken) -> ::windows_core::HRESULT, + pub PerformLocalActionRequested: unsafe extern "system" fn(this: *mut ::core::ffi::c_void, handler: *mut ::core::ffi::c_void, result__: *mut super::super::super::Foundation::EventRegistrationToken) -> ::windows_core::HRESULT, + pub RemovePerformLocalActionRequested: unsafe extern "system" fn(this: *mut ::core::ffi::c_void, token: super::super::super::Foundation::EventRegistrationToken) -> ::windows_core::HRESULT, +} +#[doc(hidden)] +#[repr(transparent)] +#[derive(::core::cmp::PartialEq, ::core::cmp::Eq, ::core::fmt::Debug, ::core::clone::Clone)] +pub struct IRemoteDesktopConnectionRemoteInfoStatics(::windows_core::IUnknown); +unsafe impl ::windows_core::Interface for IRemoteDesktopConnectionRemoteInfoStatics { + type Vtable = IRemoteDesktopConnectionRemoteInfoStatics_Vtbl; +} +unsafe impl ::windows_core::ComInterface for IRemoteDesktopConnectionRemoteInfoStatics { + const IID: ::windows_core::GUID = ::windows_core::GUID::from_u128(0xb590e64a_e4c9_53e8_b83d_a0db3676246a); +} +#[repr(C)] +#[doc(hidden)] +pub struct IRemoteDesktopConnectionRemoteInfoStatics_Vtbl { + pub base__: ::windows_core::IInspectable_Vtbl, + pub IsSwitchSupported: unsafe extern "system" fn(this: *mut ::core::ffi::c_void, result__: *mut bool) -> ::windows_core::HRESULT, + pub GetForLaunchUri: unsafe extern "system" fn(this: *mut ::core::ffi::c_void, launchuri: *mut ::core::ffi::c_void, result__: *mut *mut ::core::ffi::c_void) -> ::windows_core::HRESULT, +} +#[doc(hidden)] +#[repr(transparent)] +#[derive(::core::cmp::PartialEq, ::core::cmp::Eq, ::core::fmt::Debug, ::core::clone::Clone)] +pub struct IRemoteDesktopInfo(::windows_core::IUnknown); +unsafe impl ::windows_core::Interface for IRemoteDesktopInfo { + type Vtable = IRemoteDesktopInfo_Vtbl; +} +unsafe impl ::windows_core::ComInterface for IRemoteDesktopInfo { + const IID: ::windows_core::GUID = ::windows_core::GUID::from_u128(0xd185bb25_2f1e_5098_b9e0_f46d6358c5c4); +} +#[repr(C)] +#[doc(hidden)] +pub struct IRemoteDesktopInfo_Vtbl { + pub base__: ::windows_core::IInspectable_Vtbl, + pub DisplayName: unsafe extern "system" fn(this: *mut ::core::ffi::c_void, result__: *mut ::std::mem::MaybeUninit<::windows_core::HSTRING>) -> ::windows_core::HRESULT, + pub Id: unsafe extern "system" fn(this: *mut ::core::ffi::c_void, result__: *mut ::std::mem::MaybeUninit<::windows_core::HSTRING>) -> ::windows_core::HRESULT, +} +#[doc(hidden)] +#[repr(transparent)] +#[derive(::core::cmp::PartialEq, ::core::cmp::Eq, ::core::fmt::Debug, ::core::clone::Clone)] +pub struct IRemoteDesktopInfoFactory(::windows_core::IUnknown); +unsafe impl ::windows_core::Interface for IRemoteDesktopInfoFactory { + type Vtable = IRemoteDesktopInfoFactory_Vtbl; +} +unsafe impl ::windows_core::ComInterface for IRemoteDesktopInfoFactory { + const IID: ::windows_core::GUID = ::windows_core::GUID::from_u128(0xad0e8d58_b56f_5a8b_b419_8002ee0c5ee9); +} +#[repr(C)] +#[doc(hidden)] +pub struct IRemoteDesktopInfoFactory_Vtbl { + pub base__: ::windows_core::IInspectable_Vtbl, + pub CreateInstance: unsafe extern "system" fn(this: *mut ::core::ffi::c_void, id: ::std::mem::MaybeUninit<::windows_core::HSTRING>, displayname: ::std::mem::MaybeUninit<::windows_core::HSTRING>, result__: *mut *mut ::core::ffi::c_void) -> ::windows_core::HRESULT, +} +#[doc(hidden)] +#[repr(transparent)] +#[derive(::core::cmp::PartialEq, ::core::cmp::Eq, ::core::fmt::Debug, ::core::clone::Clone)] +pub struct IRemoteDesktopRegistrarStatics(::windows_core::IUnknown); +unsafe impl ::windows_core::Interface for IRemoteDesktopRegistrarStatics { + type Vtable = IRemoteDesktopRegistrarStatics_Vtbl; +} +unsafe impl ::windows_core::ComInterface for IRemoteDesktopRegistrarStatics { + const IID: ::windows_core::GUID = ::windows_core::GUID::from_u128(0x687c2750_46d9_5de3_8dc3_84a9202cecfb); +} +#[repr(C)] +#[doc(hidden)] +pub struct IRemoteDesktopRegistrarStatics_Vtbl { + pub base__: ::windows_core::IInspectable_Vtbl, + #[cfg(feature = "Foundation_Collections")] + pub DesktopInfos: unsafe extern "system" fn(this: *mut ::core::ffi::c_void, result__: *mut *mut ::core::ffi::c_void) -> ::windows_core::HRESULT, + #[cfg(not(feature = "Foundation_Collections"))] + DesktopInfos: usize, + pub IsSwitchToLocalSessionEnabled: unsafe extern "system" fn(this: *mut ::core::ffi::c_void, result__: *mut bool) -> ::windows_core::HRESULT, +} +#[repr(transparent)] +#[derive(::core::cmp::PartialEq, ::core::cmp::Eq, ::core::fmt::Debug, ::core::clone::Clone)] +pub struct PerformLocalActionRequestedEventArgs(::windows_core::IUnknown); +impl PerformLocalActionRequestedEventArgs { + pub fn Action(&self) -> ::windows_core::Result { + let this = self; + unsafe { + let mut result__ = ::std::mem::zeroed(); + (::windows_core::Interface::vtable(this).Action)(::windows_core::Interface::as_raw(this), &mut result__).from_abi(result__) + } + } +} +impl ::windows_core::RuntimeType for PerformLocalActionRequestedEventArgs { + const SIGNATURE: ::windows_core::imp::ConstBuffer = ::windows_core::imp::ConstBuffer::for_class::(); +} +unsafe impl ::windows_core::Interface for PerformLocalActionRequestedEventArgs { + type Vtable = IPerformLocalActionRequestedEventArgs_Vtbl; +} +unsafe impl ::windows_core::ComInterface for PerformLocalActionRequestedEventArgs { + const IID: ::windows_core::GUID = ::IID; +} +impl ::windows_core::RuntimeName for PerformLocalActionRequestedEventArgs { + const NAME: &'static str = "Windows.System.RemoteDesktop.Provider.PerformLocalActionRequestedEventArgs"; +} +::windows_core::imp::interface_hierarchy!(PerformLocalActionRequestedEventArgs, ::windows_core::IUnknown, ::windows_core::IInspectable); +unsafe impl ::core::marker::Send for PerformLocalActionRequestedEventArgs {} +unsafe impl ::core::marker::Sync for PerformLocalActionRequestedEventArgs {} +#[repr(transparent)] +#[derive(::core::cmp::PartialEq, ::core::cmp::Eq, ::core::fmt::Debug, ::core::clone::Clone)] +pub struct RemoteDesktopConnectionInfo(::windows_core::IUnknown); +impl RemoteDesktopConnectionInfo { + pub fn SetConnectionStatus(&self, value: RemoteDesktopConnectionStatus) -> ::windows_core::Result<()> { + let this = self; + unsafe { (::windows_core::Interface::vtable(this).SetConnectionStatus)(::windows_core::Interface::as_raw(this), value).ok() } + } + pub fn SwitchToLocalSession(&self) -> ::windows_core::Result<()> { + let this = self; + unsafe { (::windows_core::Interface::vtable(this).SwitchToLocalSession)(::windows_core::Interface::as_raw(this)).ok() } + } + #[doc = "Required features: `\"UI\"`"] + #[cfg(feature = "UI")] + pub fn GetForLaunchUri(launchuri: P0, windowid: super::super::super::UI::WindowId) -> ::windows_core::Result + where + P0: ::windows_core::IntoParam, + { + Self::IRemoteDesktopConnectionInfoStatics(|this| unsafe { + let mut result__ = ::std::mem::zeroed(); + (::windows_core::Interface::vtable(this).GetForLaunchUri)(::windows_core::Interface::as_raw(this), launchuri.into_param().abi(), windowid, &mut result__).from_abi(result__) + }) + } + #[doc(hidden)] + pub fn IRemoteDesktopConnectionInfoStatics ::windows_core::Result>(callback: F) -> ::windows_core::Result { + static SHARED: ::windows_core::imp::FactoryCache = ::windows_core::imp::FactoryCache::new(); + SHARED.call(callback) + } +} +impl ::windows_core::RuntimeType for RemoteDesktopConnectionInfo { + const SIGNATURE: ::windows_core::imp::ConstBuffer = ::windows_core::imp::ConstBuffer::for_class::(); +} +unsafe impl ::windows_core::Interface for RemoteDesktopConnectionInfo { + type Vtable = IRemoteDesktopConnectionInfo_Vtbl; +} +unsafe impl ::windows_core::ComInterface for RemoteDesktopConnectionInfo { + const IID: ::windows_core::GUID = ::IID; +} +impl ::windows_core::RuntimeName for RemoteDesktopConnectionInfo { + const NAME: &'static str = "Windows.System.RemoteDesktop.Provider.RemoteDesktopConnectionInfo"; +} +::windows_core::imp::interface_hierarchy!(RemoteDesktopConnectionInfo, ::windows_core::IUnknown, ::windows_core::IInspectable); +unsafe impl ::core::marker::Send for RemoteDesktopConnectionInfo {} +unsafe impl ::core::marker::Sync for RemoteDesktopConnectionInfo {} +#[repr(transparent)] +#[derive(::core::cmp::PartialEq, ::core::cmp::Eq, ::core::fmt::Debug, ::core::clone::Clone)] +pub struct RemoteDesktopConnectionRemoteInfo(::windows_core::IUnknown); +impl RemoteDesktopConnectionRemoteInfo { + pub fn Close(&self) -> ::windows_core::Result<()> { + let this = &::windows_core::ComInterface::cast::(self)?; + unsafe { (::windows_core::Interface::vtable(this).Close)(::windows_core::Interface::as_raw(this)).ok() } + } + pub fn ReportSwitched(&self) -> ::windows_core::Result<()> { + let this = self; + unsafe { (::windows_core::Interface::vtable(this).ReportSwitched)(::windows_core::Interface::as_raw(this)).ok() } + } + pub fn SwitchToLocalSessionRequested(&self, handler: P0) -> ::windows_core::Result + where + P0: ::windows_core::IntoParam>, + { + let this = self; + unsafe { + let mut result__ = ::std::mem::zeroed(); + (::windows_core::Interface::vtable(this).SwitchToLocalSessionRequested)(::windows_core::Interface::as_raw(this), handler.into_param().abi(), &mut result__).from_abi(result__) + } + } + pub fn RemoveSwitchToLocalSessionRequested(&self, token: super::super::super::Foundation::EventRegistrationToken) -> ::windows_core::Result<()> { + let this = self; + unsafe { (::windows_core::Interface::vtable(this).RemoveSwitchToLocalSessionRequested)(::windows_core::Interface::as_raw(this), token).ok() } + } + pub fn PerformLocalActionRequested(&self, handler: P0) -> ::windows_core::Result + where + P0: ::windows_core::IntoParam>, + { + let this = self; + unsafe { + let mut result__ = ::std::mem::zeroed(); + (::windows_core::Interface::vtable(this).PerformLocalActionRequested)(::windows_core::Interface::as_raw(this), handler.into_param().abi(), &mut result__).from_abi(result__) + } + } + pub fn RemovePerformLocalActionRequested(&self, token: super::super::super::Foundation::EventRegistrationToken) -> ::windows_core::Result<()> { + let this = self; + unsafe { (::windows_core::Interface::vtable(this).RemovePerformLocalActionRequested)(::windows_core::Interface::as_raw(this), token).ok() } + } + pub fn IsSwitchSupported() -> ::windows_core::Result { + Self::IRemoteDesktopConnectionRemoteInfoStatics(|this| unsafe { + let mut result__ = ::std::mem::zeroed(); + (::windows_core::Interface::vtable(this).IsSwitchSupported)(::windows_core::Interface::as_raw(this), &mut result__).from_abi(result__) + }) + } + pub fn GetForLaunchUri(launchuri: P0) -> ::windows_core::Result + where + P0: ::windows_core::IntoParam, + { + Self::IRemoteDesktopConnectionRemoteInfoStatics(|this| unsafe { + let mut result__ = ::std::mem::zeroed(); + (::windows_core::Interface::vtable(this).GetForLaunchUri)(::windows_core::Interface::as_raw(this), launchuri.into_param().abi(), &mut result__).from_abi(result__) + }) + } + #[doc(hidden)] + pub fn IRemoteDesktopConnectionRemoteInfoStatics ::windows_core::Result>(callback: F) -> ::windows_core::Result { + static SHARED: ::windows_core::imp::FactoryCache = ::windows_core::imp::FactoryCache::new(); + SHARED.call(callback) + } +} +impl ::windows_core::RuntimeType for RemoteDesktopConnectionRemoteInfo { + const SIGNATURE: ::windows_core::imp::ConstBuffer = ::windows_core::imp::ConstBuffer::for_class::(); +} +unsafe impl ::windows_core::Interface for RemoteDesktopConnectionRemoteInfo { + type Vtable = IRemoteDesktopConnectionRemoteInfo_Vtbl; +} +unsafe impl ::windows_core::ComInterface for RemoteDesktopConnectionRemoteInfo { + const IID: ::windows_core::GUID = ::IID; +} +impl ::windows_core::RuntimeName for RemoteDesktopConnectionRemoteInfo { + const NAME: &'static str = "Windows.System.RemoteDesktop.Provider.RemoteDesktopConnectionRemoteInfo"; +} +::windows_core::imp::interface_hierarchy!(RemoteDesktopConnectionRemoteInfo, ::windows_core::IUnknown, ::windows_core::IInspectable); +impl ::windows_core::CanTryInto for RemoteDesktopConnectionRemoteInfo {} +unsafe impl ::core::marker::Send for RemoteDesktopConnectionRemoteInfo {} +unsafe impl ::core::marker::Sync for RemoteDesktopConnectionRemoteInfo {} +#[repr(transparent)] +#[derive(::core::cmp::PartialEq, ::core::cmp::Eq, ::core::fmt::Debug, ::core::clone::Clone)] +pub struct RemoteDesktopInfo(::windows_core::IUnknown); +impl RemoteDesktopInfo { + pub fn DisplayName(&self) -> ::windows_core::Result<::windows_core::HSTRING> { + let this = self; + unsafe { + let mut result__ = ::std::mem::zeroed(); + (::windows_core::Interface::vtable(this).DisplayName)(::windows_core::Interface::as_raw(this), &mut result__).from_abi(result__) + } + } + pub fn Id(&self) -> ::windows_core::Result<::windows_core::HSTRING> { + let this = self; + unsafe { + let mut result__ = ::std::mem::zeroed(); + (::windows_core::Interface::vtable(this).Id)(::windows_core::Interface::as_raw(this), &mut result__).from_abi(result__) + } + } + pub fn CreateInstance(id: &::windows_core::HSTRING, displayname: &::windows_core::HSTRING) -> ::windows_core::Result { + Self::IRemoteDesktopInfoFactory(|this| unsafe { + let mut result__ = ::std::mem::zeroed(); + (::windows_core::Interface::vtable(this).CreateInstance)(::windows_core::Interface::as_raw(this), ::core::mem::transmute_copy(id), ::core::mem::transmute_copy(displayname), &mut result__).from_abi(result__) + }) + } + #[doc(hidden)] + pub fn IRemoteDesktopInfoFactory ::windows_core::Result>(callback: F) -> ::windows_core::Result { + static SHARED: ::windows_core::imp::FactoryCache = ::windows_core::imp::FactoryCache::new(); + SHARED.call(callback) + } +} +impl ::windows_core::RuntimeType for RemoteDesktopInfo { + const SIGNATURE: ::windows_core::imp::ConstBuffer = ::windows_core::imp::ConstBuffer::for_class::(); +} +unsafe impl ::windows_core::Interface for RemoteDesktopInfo { + type Vtable = IRemoteDesktopInfo_Vtbl; +} +unsafe impl ::windows_core::ComInterface for RemoteDesktopInfo { + const IID: ::windows_core::GUID = ::IID; +} +impl ::windows_core::RuntimeName for RemoteDesktopInfo { + const NAME: &'static str = "Windows.System.RemoteDesktop.Provider.RemoteDesktopInfo"; +} +::windows_core::imp::interface_hierarchy!(RemoteDesktopInfo, ::windows_core::IUnknown, ::windows_core::IInspectable); +unsafe impl ::core::marker::Send for RemoteDesktopInfo {} +unsafe impl ::core::marker::Sync for RemoteDesktopInfo {} +pub struct RemoteDesktopRegistrar; +impl RemoteDesktopRegistrar { + #[doc = "Required features: `\"Foundation_Collections\"`"] + #[cfg(feature = "Foundation_Collections")] + pub fn DesktopInfos() -> ::windows_core::Result> { + Self::IRemoteDesktopRegistrarStatics(|this| unsafe { + let mut result__ = ::std::mem::zeroed(); + (::windows_core::Interface::vtable(this).DesktopInfos)(::windows_core::Interface::as_raw(this), &mut result__).from_abi(result__) + }) + } + pub fn IsSwitchToLocalSessionEnabled() -> ::windows_core::Result { + Self::IRemoteDesktopRegistrarStatics(|this| unsafe { + let mut result__ = ::std::mem::zeroed(); + (::windows_core::Interface::vtable(this).IsSwitchToLocalSessionEnabled)(::windows_core::Interface::as_raw(this), &mut result__).from_abi(result__) + }) + } + #[doc(hidden)] + pub fn IRemoteDesktopRegistrarStatics ::windows_core::Result>(callback: F) -> ::windows_core::Result { + static SHARED: ::windows_core::imp::FactoryCache = ::windows_core::imp::FactoryCache::new(); + SHARED.call(callback) + } +} +impl ::windows_core::RuntimeName for RemoteDesktopRegistrar { + const NAME: &'static str = "Windows.System.RemoteDesktop.Provider.RemoteDesktopRegistrar"; +} +#[repr(transparent)] +#[derive(::core::cmp::PartialEq, ::core::cmp::Eq)] +pub struct RemoteDesktopConnectionStatus(pub i32); +impl RemoteDesktopConnectionStatus { + pub const Connecting: Self = Self(0i32); + pub const Connected: Self = Self(1i32); + pub const UserInputNeeded: Self = Self(2i32); + pub const Disconnected: Self = Self(3i32); +} +impl ::core::marker::Copy for RemoteDesktopConnectionStatus {} +impl ::core::clone::Clone for RemoteDesktopConnectionStatus { + fn clone(&self) -> Self { + *self + } +} +impl ::core::default::Default for RemoteDesktopConnectionStatus { + fn default() -> Self { + Self(0) + } +} +impl ::windows_core::TypeKind for RemoteDesktopConnectionStatus { + type TypeKind = ::windows_core::CopyType; +} +impl ::core::fmt::Debug for RemoteDesktopConnectionStatus { + fn fmt(&self, f: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result { + f.debug_tuple("RemoteDesktopConnectionStatus").field(&self.0).finish() + } +} +impl ::windows_core::RuntimeType for RemoteDesktopConnectionStatus { + const SIGNATURE: ::windows_core::imp::ConstBuffer = ::windows_core::imp::ConstBuffer::from_slice(b"enum(Windows.System.RemoteDesktop.Provider.RemoteDesktopConnectionStatus;i4)"); +} +#[repr(transparent)] +#[derive(::core::cmp::PartialEq, ::core::cmp::Eq)] +pub struct RemoteDesktopLocalAction(pub i32); +impl RemoteDesktopLocalAction { + pub const ShowBluetoothSettings: Self = Self(0i32); +} +impl ::core::marker::Copy for RemoteDesktopLocalAction {} +impl ::core::clone::Clone for RemoteDesktopLocalAction { + fn clone(&self) -> Self { + *self + } +} +impl ::core::default::Default for RemoteDesktopLocalAction { + fn default() -> Self { + Self(0) + } +} +impl ::windows_core::TypeKind for RemoteDesktopLocalAction { + type TypeKind = ::windows_core::CopyType; +} +impl ::core::fmt::Debug for RemoteDesktopLocalAction { + fn fmt(&self, f: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result { + f.debug_tuple("RemoteDesktopLocalAction").field(&self.0).finish() + } +} +impl ::windows_core::RuntimeType for RemoteDesktopLocalAction { + const SIGNATURE: ::windows_core::imp::ConstBuffer = ::windows_core::imp::ConstBuffer::from_slice(b"enum(Windows.System.RemoteDesktop.Provider.RemoteDesktopLocalAction;i4)"); +} diff --git a/crates/libs/windows/src/Windows/System/RemoteDesktop/mod.rs b/crates/libs/windows/src/Windows/System/RemoteDesktop/mod.rs index f388448f6c..edc4aef362 100644 --- a/crates/libs/windows/src/Windows/System/RemoteDesktop/mod.rs +++ b/crates/libs/windows/src/Windows/System/RemoteDesktop/mod.rs @@ -1,6 +1,9 @@ #[cfg(feature = "System_RemoteDesktop_Input")] #[doc = "Required features: `\"System_RemoteDesktop_Input\"`"] pub mod Input; +#[cfg(feature = "System_RemoteDesktop_Provider")] +#[doc = "Required features: `\"System_RemoteDesktop_Provider\"`"] +pub mod Provider; #[doc(hidden)] #[repr(transparent)] #[derive(::core::cmp::PartialEq, ::core::cmp::Eq, ::core::fmt::Debug, ::core::clone::Clone)] diff --git a/crates/libs/windows/src/Windows/UI/Composition/mod.rs b/crates/libs/windows/src/Windows/UI/Composition/mod.rs index 387f5c1627..123a89eeaf 100644 --- a/crates/libs/windows/src/Windows/UI/Composition/mod.rs +++ b/crates/libs/windows/src/Windows/UI/Composition/mod.rs @@ -2267,6 +2267,60 @@ pub struct ICompositionTargetFactory_Vtbl { #[doc(hidden)] #[repr(transparent)] #[derive(::core::cmp::PartialEq, ::core::cmp::Eq, ::core::fmt::Debug, ::core::clone::Clone)] +pub struct ICompositionTexture(::windows_core::IUnknown); +unsafe impl ::windows_core::Interface for ICompositionTexture { + type Vtable = ICompositionTexture_Vtbl; +} +unsafe impl ::windows_core::ComInterface for ICompositionTexture { + const IID: ::windows_core::GUID = ::windows_core::GUID::from_u128(0x347d03a0_1c0a_4c0b_b232_8570b2b1a4ea); +} +#[repr(C)] +#[doc(hidden)] +pub struct ICompositionTexture_Vtbl { + pub base__: ::windows_core::IInspectable_Vtbl, + #[cfg(feature = "Graphics")] + pub SourceRect: unsafe extern "system" fn(this: *mut ::core::ffi::c_void, result__: *mut super::super::Graphics::RectInt32) -> ::windows_core::HRESULT, + #[cfg(not(feature = "Graphics"))] + SourceRect: usize, + #[cfg(feature = "Graphics")] + pub SetSourceRect: unsafe extern "system" fn(this: *mut ::core::ffi::c_void, value: super::super::Graphics::RectInt32) -> ::windows_core::HRESULT, + #[cfg(not(feature = "Graphics"))] + SetSourceRect: usize, + #[cfg(feature = "Graphics_DirectX")] + pub AlphaMode: unsafe extern "system" fn(this: *mut ::core::ffi::c_void, result__: *mut super::super::Graphics::DirectX::DirectXAlphaMode) -> ::windows_core::HRESULT, + #[cfg(not(feature = "Graphics_DirectX"))] + AlphaMode: usize, + #[cfg(feature = "Graphics_DirectX")] + pub SetAlphaMode: unsafe extern "system" fn(this: *mut ::core::ffi::c_void, value: super::super::Graphics::DirectX::DirectXAlphaMode) -> ::windows_core::HRESULT, + #[cfg(not(feature = "Graphics_DirectX"))] + SetAlphaMode: usize, + #[cfg(feature = "Graphics_DirectX")] + pub ColorSpace: unsafe extern "system" fn(this: *mut ::core::ffi::c_void, result__: *mut super::super::Graphics::DirectX::DirectXColorSpace) -> ::windows_core::HRESULT, + #[cfg(not(feature = "Graphics_DirectX"))] + ColorSpace: usize, + #[cfg(feature = "Graphics_DirectX")] + pub SetColorSpace: unsafe extern "system" fn(this: *mut ::core::ffi::c_void, value: super::super::Graphics::DirectX::DirectXColorSpace) -> ::windows_core::HRESULT, + #[cfg(not(feature = "Graphics_DirectX"))] + SetColorSpace: usize, +} +#[doc(hidden)] +#[repr(transparent)] +#[derive(::core::cmp::PartialEq, ::core::cmp::Eq, ::core::fmt::Debug, ::core::clone::Clone)] +pub struct ICompositionTextureFactory(::windows_core::IUnknown); +unsafe impl ::windows_core::Interface for ICompositionTextureFactory { + type Vtable = ICompositionTextureFactory_Vtbl; +} +unsafe impl ::windows_core::ComInterface for ICompositionTextureFactory { + const IID: ::windows_core::GUID = ::windows_core::GUID::from_u128(0x09d9523d_471c_5ab5_b053_b568ee46ebfb); +} +#[repr(C)] +#[doc(hidden)] +pub struct ICompositionTextureFactory_Vtbl { + pub base__: ::windows_core::IInspectable_Vtbl, +} +#[doc(hidden)] +#[repr(transparent)] +#[derive(::core::cmp::PartialEq, ::core::cmp::Eq, ::core::fmt::Debug, ::core::clone::Clone)] pub struct ICompositionTransform(::windows_core::IUnknown); unsafe impl ::windows_core::Interface for ICompositionTransform { type Vtable = ICompositionTransform_Vtbl; @@ -15776,6 +15830,183 @@ unsafe impl ::core::marker::Send for CompositionTarget {} unsafe impl ::core::marker::Sync for CompositionTarget {} #[repr(transparent)] #[derive(::core::cmp::PartialEq, ::core::cmp::Eq, ::core::fmt::Debug, ::core::clone::Clone)] +pub struct CompositionTexture(::windows_core::IUnknown); +impl CompositionTexture { + pub fn PopulatePropertyInfo(&self, propertyname: &::windows_core::HSTRING, propertyinfo: P0) -> ::windows_core::Result<()> + where + P0: ::windows_core::IntoParam, + { + let this = &::windows_core::ComInterface::cast::(self)?; + unsafe { (::windows_core::Interface::vtable(this).PopulatePropertyInfo)(::windows_core::Interface::as_raw(this), ::core::mem::transmute_copy(propertyname), propertyinfo.into_param().abi()).ok() } + } + pub fn Close(&self) -> ::windows_core::Result<()> { + let this = &::windows_core::ComInterface::cast::(self)?; + unsafe { (::windows_core::Interface::vtable(this).Close)(::windows_core::Interface::as_raw(this)).ok() } + } + pub fn Compositor(&self) -> ::windows_core::Result { + let this = &::windows_core::ComInterface::cast::(self)?; + unsafe { + let mut result__ = ::std::mem::zeroed(); + (::windows_core::Interface::vtable(this).Compositor)(::windows_core::Interface::as_raw(this), &mut result__).from_abi(result__) + } + } + #[doc = "Required features: `\"UI_Core\"`"] + #[cfg(feature = "UI_Core")] + pub fn Dispatcher(&self) -> ::windows_core::Result { + let this = &::windows_core::ComInterface::cast::(self)?; + unsafe { + let mut result__ = ::std::mem::zeroed(); + (::windows_core::Interface::vtable(this).Dispatcher)(::windows_core::Interface::as_raw(this), &mut result__).from_abi(result__) + } + } + pub fn Properties(&self) -> ::windows_core::Result { + let this = &::windows_core::ComInterface::cast::(self)?; + unsafe { + let mut result__ = ::std::mem::zeroed(); + (::windows_core::Interface::vtable(this).Properties)(::windows_core::Interface::as_raw(this), &mut result__).from_abi(result__) + } + } + pub fn StartAnimation(&self, propertyname: &::windows_core::HSTRING, animation: P0) -> ::windows_core::Result<()> + where + P0: ::windows_core::TryIntoParam, + { + let this = &::windows_core::ComInterface::cast::(self)?; + unsafe { (::windows_core::Interface::vtable(this).StartAnimation)(::windows_core::Interface::as_raw(this), ::core::mem::transmute_copy(propertyname), animation.try_into_param()?.abi()).ok() } + } + pub fn StopAnimation(&self, propertyname: &::windows_core::HSTRING) -> ::windows_core::Result<()> { + let this = &::windows_core::ComInterface::cast::(self)?; + unsafe { (::windows_core::Interface::vtable(this).StopAnimation)(::windows_core::Interface::as_raw(this), ::core::mem::transmute_copy(propertyname)).ok() } + } + pub fn Comment(&self) -> ::windows_core::Result<::windows_core::HSTRING> { + let this = &::windows_core::ComInterface::cast::(self)?; + unsafe { + let mut result__ = ::std::mem::zeroed(); + (::windows_core::Interface::vtable(this).Comment)(::windows_core::Interface::as_raw(this), &mut result__).from_abi(result__) + } + } + pub fn SetComment(&self, value: &::windows_core::HSTRING) -> ::windows_core::Result<()> { + let this = &::windows_core::ComInterface::cast::(self)?; + unsafe { (::windows_core::Interface::vtable(this).SetComment)(::windows_core::Interface::as_raw(this), ::core::mem::transmute_copy(value)).ok() } + } + pub fn ImplicitAnimations(&self) -> ::windows_core::Result { + let this = &::windows_core::ComInterface::cast::(self)?; + unsafe { + let mut result__ = ::std::mem::zeroed(); + (::windows_core::Interface::vtable(this).ImplicitAnimations)(::windows_core::Interface::as_raw(this), &mut result__).from_abi(result__) + } + } + pub fn SetImplicitAnimations(&self, value: P0) -> ::windows_core::Result<()> + where + P0: ::windows_core::IntoParam, + { + let this = &::windows_core::ComInterface::cast::(self)?; + unsafe { (::windows_core::Interface::vtable(this).SetImplicitAnimations)(::windows_core::Interface::as_raw(this), value.into_param().abi()).ok() } + } + pub fn StartAnimationGroup(&self, value: P0) -> ::windows_core::Result<()> + where + P0: ::windows_core::TryIntoParam, + { + let this = &::windows_core::ComInterface::cast::(self)?; + unsafe { (::windows_core::Interface::vtable(this).StartAnimationGroup)(::windows_core::Interface::as_raw(this), value.try_into_param()?.abi()).ok() } + } + pub fn StopAnimationGroup(&self, value: P0) -> ::windows_core::Result<()> + where + P0: ::windows_core::TryIntoParam, + { + let this = &::windows_core::ComInterface::cast::(self)?; + unsafe { (::windows_core::Interface::vtable(this).StopAnimationGroup)(::windows_core::Interface::as_raw(this), value.try_into_param()?.abi()).ok() } + } + #[doc = "Required features: `\"System\"`"] + #[cfg(feature = "System")] + pub fn DispatcherQueue(&self) -> ::windows_core::Result { + let this = &::windows_core::ComInterface::cast::(self)?; + unsafe { + let mut result__ = ::std::mem::zeroed(); + (::windows_core::Interface::vtable(this).DispatcherQueue)(::windows_core::Interface::as_raw(this), &mut result__).from_abi(result__) + } + } + pub fn TryGetAnimationController(&self, propertyname: &::windows_core::HSTRING) -> ::windows_core::Result { + let this = &::windows_core::ComInterface::cast::(self)?; + unsafe { + let mut result__ = ::std::mem::zeroed(); + (::windows_core::Interface::vtable(this).TryGetAnimationController)(::windows_core::Interface::as_raw(this), ::core::mem::transmute_copy(propertyname), &mut result__).from_abi(result__) + } + } + pub fn StartAnimationWithController(&self, propertyname: &::windows_core::HSTRING, animation: P0, animationcontroller: P1) -> ::windows_core::Result<()> + where + P0: ::windows_core::TryIntoParam, + P1: ::windows_core::IntoParam, + { + let this = &::windows_core::ComInterface::cast::(self)?; + unsafe { (::windows_core::Interface::vtable(this).StartAnimationWithController)(::windows_core::Interface::as_raw(this), ::core::mem::transmute_copy(propertyname), animation.try_into_param()?.abi(), animationcontroller.into_param().abi()).ok() } + } + #[doc = "Required features: `\"Graphics\"`"] + #[cfg(feature = "Graphics")] + pub fn SourceRect(&self) -> ::windows_core::Result { + let this = self; + unsafe { + let mut result__ = ::std::mem::zeroed(); + (::windows_core::Interface::vtable(this).SourceRect)(::windows_core::Interface::as_raw(this), &mut result__).from_abi(result__) + } + } + #[doc = "Required features: `\"Graphics\"`"] + #[cfg(feature = "Graphics")] + pub fn SetSourceRect(&self, value: super::super::Graphics::RectInt32) -> ::windows_core::Result<()> { + let this = self; + unsafe { (::windows_core::Interface::vtable(this).SetSourceRect)(::windows_core::Interface::as_raw(this), value).ok() } + } + #[doc = "Required features: `\"Graphics_DirectX\"`"] + #[cfg(feature = "Graphics_DirectX")] + pub fn AlphaMode(&self) -> ::windows_core::Result { + let this = self; + unsafe { + let mut result__ = ::std::mem::zeroed(); + (::windows_core::Interface::vtable(this).AlphaMode)(::windows_core::Interface::as_raw(this), &mut result__).from_abi(result__) + } + } + #[doc = "Required features: `\"Graphics_DirectX\"`"] + #[cfg(feature = "Graphics_DirectX")] + pub fn SetAlphaMode(&self, value: super::super::Graphics::DirectX::DirectXAlphaMode) -> ::windows_core::Result<()> { + let this = self; + unsafe { (::windows_core::Interface::vtable(this).SetAlphaMode)(::windows_core::Interface::as_raw(this), value).ok() } + } + #[doc = "Required features: `\"Graphics_DirectX\"`"] + #[cfg(feature = "Graphics_DirectX")] + pub fn ColorSpace(&self) -> ::windows_core::Result { + let this = self; + unsafe { + let mut result__ = ::std::mem::zeroed(); + (::windows_core::Interface::vtable(this).ColorSpace)(::windows_core::Interface::as_raw(this), &mut result__).from_abi(result__) + } + } + #[doc = "Required features: `\"Graphics_DirectX\"`"] + #[cfg(feature = "Graphics_DirectX")] + pub fn SetColorSpace(&self, value: super::super::Graphics::DirectX::DirectXColorSpace) -> ::windows_core::Result<()> { + let this = self; + unsafe { (::windows_core::Interface::vtable(this).SetColorSpace)(::windows_core::Interface::as_raw(this), value).ok() } + } +} +impl ::windows_core::RuntimeType for CompositionTexture { + const SIGNATURE: ::windows_core::imp::ConstBuffer = ::windows_core::imp::ConstBuffer::for_class::(); +} +unsafe impl ::windows_core::Interface for CompositionTexture { + type Vtable = ICompositionTexture_Vtbl; +} +unsafe impl ::windows_core::ComInterface for CompositionTexture { + const IID: ::windows_core::GUID = ::IID; +} +impl ::windows_core::RuntimeName for CompositionTexture { + const NAME: &'static str = "Windows.UI.Composition.CompositionTexture"; +} +::windows_core::imp::interface_hierarchy!(CompositionTexture, ::windows_core::IUnknown, ::windows_core::IInspectable); +impl ::windows_core::CanTryInto for CompositionTexture {} +impl ::windows_core::CanTryInto for CompositionTexture {} +impl ::windows_core::CanTryInto for CompositionTexture {} +impl ::windows_core::CanTryInto for CompositionTexture {} +unsafe impl ::core::marker::Send for CompositionTexture {} +unsafe impl ::core::marker::Sync for CompositionTexture {} +#[repr(transparent)] +#[derive(::core::cmp::PartialEq, ::core::cmp::Eq, ::core::fmt::Debug, ::core::clone::Clone)] pub struct CompositionTransform(::windows_core::IUnknown); impl CompositionTransform { pub fn PopulatePropertyInfo(&self, propertyname: &::windows_core::HSTRING, propertyinfo: P0) -> ::windows_core::Result<()> diff --git a/crates/libs/windows/src/Windows/UI/Notifications/Preview/mod.rs b/crates/libs/windows/src/Windows/UI/Notifications/Preview/mod.rs new file mode 100644 index 0000000000..a3e8a75239 --- /dev/null +++ b/crates/libs/windows/src/Windows/UI/Notifications/Preview/mod.rs @@ -0,0 +1,30 @@ +#[doc(hidden)] +#[repr(transparent)] +#[derive(::core::cmp::PartialEq, ::core::cmp::Eq, ::core::fmt::Debug, ::core::clone::Clone)] +pub struct IToastOcclusionManagerPreviewStatics(::windows_core::IUnknown); +unsafe impl ::windows_core::Interface for IToastOcclusionManagerPreviewStatics { + type Vtable = IToastOcclusionManagerPreviewStatics_Vtbl; +} +unsafe impl ::windows_core::ComInterface for IToastOcclusionManagerPreviewStatics { + const IID: ::windows_core::GUID = ::windows_core::GUID::from_u128(0x507e5c83_50f9_5412_8953_b65c18cfab12); +} +#[repr(C)] +#[doc(hidden)] +pub struct IToastOcclusionManagerPreviewStatics_Vtbl { + pub base__: ::windows_core::IInspectable_Vtbl, + pub SetToastWindowMargin: unsafe extern "system" fn(this: *mut ::core::ffi::c_void, appwindowid: super::super::WindowId, margin: f64) -> ::windows_core::HRESULT, +} +pub struct ToastOcclusionManagerPreview; +impl ToastOcclusionManagerPreview { + pub fn SetToastWindowMargin(appwindowid: super::super::WindowId, margin: f64) -> ::windows_core::Result<()> { + Self::IToastOcclusionManagerPreviewStatics(|this| unsafe { (::windows_core::Interface::vtable(this).SetToastWindowMargin)(::windows_core::Interface::as_raw(this), appwindowid, margin).ok() }) + } + #[doc(hidden)] + pub fn IToastOcclusionManagerPreviewStatics ::windows_core::Result>(callback: F) -> ::windows_core::Result { + static SHARED: ::windows_core::imp::FactoryCache = ::windows_core::imp::FactoryCache::new(); + SHARED.call(callback) + } +} +impl ::windows_core::RuntimeName for ToastOcclusionManagerPreview { + const NAME: &'static str = "Windows.UI.Notifications.Preview.ToastOcclusionManagerPreview"; +} diff --git a/crates/libs/windows/src/Windows/UI/Notifications/mod.rs b/crates/libs/windows/src/Windows/UI/Notifications/mod.rs index 871971f6af..203ccc946d 100644 --- a/crates/libs/windows/src/Windows/UI/Notifications/mod.rs +++ b/crates/libs/windows/src/Windows/UI/Notifications/mod.rs @@ -1,6 +1,9 @@ #[cfg(feature = "UI_Notifications_Management")] #[doc = "Required features: `\"UI_Notifications_Management\"`"] pub mod Management; +#[cfg(feature = "UI_Notifications_Preview")] +#[doc = "Required features: `\"UI_Notifications_Preview\"`"] +pub mod Preview; #[repr(transparent)] #[derive(::core::cmp::PartialEq, ::core::cmp::Eq, ::core::fmt::Debug, ::core::clone::Clone)] pub struct IAdaptiveNotificationContent(::windows_core::IUnknown); diff --git a/crates/libs/windows/src/Windows/UI/Shell/mod.rs b/crates/libs/windows/src/Windows/UI/Shell/mod.rs index d3ef622735..d3c987cf09 100644 --- a/crates/libs/windows/src/Windows/UI/Shell/mod.rs +++ b/crates/libs/windows/src/Windows/UI/Shell/mod.rs @@ -235,6 +235,21 @@ pub struct ITaskbarManager2_Vtbl { #[doc(hidden)] #[repr(transparent)] #[derive(::core::cmp::PartialEq, ::core::cmp::Eq, ::core::fmt::Debug, ::core::clone::Clone)] +pub struct ITaskbarManagerDesktopAppSupportStatics(::windows_core::IUnknown); +unsafe impl ::windows_core::Interface for ITaskbarManagerDesktopAppSupportStatics { + type Vtable = ITaskbarManagerDesktopAppSupportStatics_Vtbl; +} +unsafe impl ::windows_core::ComInterface for ITaskbarManagerDesktopAppSupportStatics { + const IID: ::windows_core::GUID = ::windows_core::GUID::from_u128(0xcdfefd63_e879_4134_b9a7_8283f05f9480); +} +#[repr(C)] +#[doc(hidden)] +pub struct ITaskbarManagerDesktopAppSupportStatics_Vtbl { + pub base__: ::windows_core::IInspectable_Vtbl, +} +#[doc(hidden)] +#[repr(transparent)] +#[derive(::core::cmp::PartialEq, ::core::cmp::Eq, ::core::fmt::Debug, ::core::clone::Clone)] pub struct ITaskbarManagerStatics(::windows_core::IUnknown); unsafe impl ::windows_core::Interface for ITaskbarManagerStatics { type Vtable = ITaskbarManagerStatics_Vtbl; @@ -248,6 +263,227 @@ pub struct ITaskbarManagerStatics_Vtbl { pub base__: ::windows_core::IInspectable_Vtbl, pub GetDefault: unsafe extern "system" fn(this: *mut ::core::ffi::c_void, result__: *mut *mut ::core::ffi::c_void) -> ::windows_core::HRESULT, } +#[doc(hidden)] +#[repr(transparent)] +#[derive(::core::cmp::PartialEq, ::core::cmp::Eq, ::core::fmt::Debug, ::core::clone::Clone)] +pub struct IWindowTab(::windows_core::IUnknown); +unsafe impl ::windows_core::Interface for IWindowTab { + type Vtable = IWindowTab_Vtbl; +} +unsafe impl ::windows_core::ComInterface for IWindowTab { + const IID: ::windows_core::GUID = ::windows_core::GUID::from_u128(0x551e776a_7928_4d60_bdd9_672b5a5758eb); +} +#[repr(C)] +#[doc(hidden)] +pub struct IWindowTab_Vtbl { + pub base__: ::windows_core::IInspectable_Vtbl, + pub Tag: unsafe extern "system" fn(this: *mut ::core::ffi::c_void, result__: *mut *mut ::core::ffi::c_void) -> ::windows_core::HRESULT, + pub SetTag: unsafe extern "system" fn(this: *mut ::core::ffi::c_void, value: *mut ::core::ffi::c_void) -> ::windows_core::HRESULT, + pub Title: unsafe extern "system" fn(this: *mut ::core::ffi::c_void, result__: *mut ::std::mem::MaybeUninit<::windows_core::HSTRING>) -> ::windows_core::HRESULT, + pub SetTitle: unsafe extern "system" fn(this: *mut ::core::ffi::c_void, value: ::std::mem::MaybeUninit<::windows_core::HSTRING>) -> ::windows_core::HRESULT, + pub Icon: unsafe extern "system" fn(this: *mut ::core::ffi::c_void, result__: *mut *mut ::core::ffi::c_void) -> ::windows_core::HRESULT, + pub SetIcon: unsafe extern "system" fn(this: *mut ::core::ffi::c_void, value: *mut ::core::ffi::c_void) -> ::windows_core::HRESULT, + pub TreatAsSecondaryTileId: unsafe extern "system" fn(this: *mut ::core::ffi::c_void, result__: *mut ::std::mem::MaybeUninit<::windows_core::HSTRING>) -> ::windows_core::HRESULT, + pub SetTreatAsSecondaryTileId: unsafe extern "system" fn(this: *mut ::core::ffi::c_void, value: ::std::mem::MaybeUninit<::windows_core::HSTRING>) -> ::windows_core::HRESULT, + pub Group: unsafe extern "system" fn(this: *mut ::core::ffi::c_void, result__: *mut *mut ::core::ffi::c_void) -> ::windows_core::HRESULT, + pub SetGroup: unsafe extern "system" fn(this: *mut ::core::ffi::c_void, value: *mut ::core::ffi::c_void) -> ::windows_core::HRESULT, + pub ReportThumbnailAvailable: unsafe extern "system" fn(this: *mut ::core::ffi::c_void) -> ::windows_core::HRESULT, +} +#[doc(hidden)] +#[repr(transparent)] +#[derive(::core::cmp::PartialEq, ::core::cmp::Eq, ::core::fmt::Debug, ::core::clone::Clone)] +pub struct IWindowTabCloseRequestedEventArgs(::windows_core::IUnknown); +unsafe impl ::windows_core::Interface for IWindowTabCloseRequestedEventArgs { + type Vtable = IWindowTabCloseRequestedEventArgs_Vtbl; +} +unsafe impl ::windows_core::ComInterface for IWindowTabCloseRequestedEventArgs { + const IID: ::windows_core::GUID = ::windows_core::GUID::from_u128(0x477282e9_eec4_5882_9889_2dd64d0f9fb6); +} +#[repr(C)] +#[doc(hidden)] +pub struct IWindowTabCloseRequestedEventArgs_Vtbl { + pub base__: ::windows_core::IInspectable_Vtbl, + pub Tab: unsafe extern "system" fn(this: *mut ::core::ffi::c_void, result__: *mut *mut ::core::ffi::c_void) -> ::windows_core::HRESULT, +} +#[doc(hidden)] +#[repr(transparent)] +#[derive(::core::cmp::PartialEq, ::core::cmp::Eq, ::core::fmt::Debug, ::core::clone::Clone)] +pub struct IWindowTabCollection(::windows_core::IUnknown); +unsafe impl ::windows_core::Interface for IWindowTabCollection { + type Vtable = IWindowTabCollection_Vtbl; +} +unsafe impl ::windows_core::ComInterface for IWindowTabCollection { + const IID: ::windows_core::GUID = ::windows_core::GUID::from_u128(0xaccd0d6c_ed07_519a_8c33_17e02e7e9b0f); +} +#[repr(C)] +#[doc(hidden)] +pub struct IWindowTabCollection_Vtbl { + pub base__: ::windows_core::IInspectable_Vtbl, + pub MoveTab: unsafe extern "system" fn(this: *mut ::core::ffi::c_void, tab: *mut ::core::ffi::c_void, index: u32) -> ::windows_core::HRESULT, +} +#[doc(hidden)] +#[repr(transparent)] +#[derive(::core::cmp::PartialEq, ::core::cmp::Eq, ::core::fmt::Debug, ::core::clone::Clone)] +pub struct IWindowTabGroup(::windows_core::IUnknown); +unsafe impl ::windows_core::Interface for IWindowTabGroup { + type Vtable = IWindowTabGroup_Vtbl; +} +unsafe impl ::windows_core::ComInterface for IWindowTabGroup { + const IID: ::windows_core::GUID = ::windows_core::GUID::from_u128(0xa9c2c4fe_6cfe_449c_8b57_5756771abe56); +} +#[repr(C)] +#[doc(hidden)] +pub struct IWindowTabGroup_Vtbl { + pub base__: ::windows_core::IInspectable_Vtbl, + pub Title: unsafe extern "system" fn(this: *mut ::core::ffi::c_void, result__: *mut ::std::mem::MaybeUninit<::windows_core::HSTRING>) -> ::windows_core::HRESULT, + pub SetTitle: unsafe extern "system" fn(this: *mut ::core::ffi::c_void, value: ::std::mem::MaybeUninit<::windows_core::HSTRING>) -> ::windows_core::HRESULT, + pub Icon: unsafe extern "system" fn(this: *mut ::core::ffi::c_void, result__: *mut *mut ::core::ffi::c_void) -> ::windows_core::HRESULT, + pub SetIcon: unsafe extern "system" fn(this: *mut ::core::ffi::c_void, value: *mut ::core::ffi::c_void) -> ::windows_core::HRESULT, +} +#[doc(hidden)] +#[repr(transparent)] +#[derive(::core::cmp::PartialEq, ::core::cmp::Eq, ::core::fmt::Debug, ::core::clone::Clone)] +pub struct IWindowTabIcon(::windows_core::IUnknown); +unsafe impl ::windows_core::Interface for IWindowTabIcon { + type Vtable = IWindowTabIcon_Vtbl; +} +unsafe impl ::windows_core::ComInterface for IWindowTabIcon { + const IID: ::windows_core::GUID = ::windows_core::GUID::from_u128(0xf92f398f_3669_4d0c_a183_14ddae6f6538); +} +#[repr(C)] +#[doc(hidden)] +pub struct IWindowTabIcon_Vtbl { + pub base__: ::windows_core::IInspectable_Vtbl, +} +#[doc(hidden)] +#[repr(transparent)] +#[derive(::core::cmp::PartialEq, ::core::cmp::Eq, ::core::fmt::Debug, ::core::clone::Clone)] +pub struct IWindowTabIconStatics(::windows_core::IUnknown); +unsafe impl ::windows_core::Interface for IWindowTabIconStatics { + type Vtable = IWindowTabIconStatics_Vtbl; +} +unsafe impl ::windows_core::ComInterface for IWindowTabIconStatics { + const IID: ::windows_core::GUID = ::windows_core::GUID::from_u128(0x2e18d95e_2cbb_4084_af0c_36ee1c2d54b1); +} +#[repr(C)] +#[doc(hidden)] +pub struct IWindowTabIconStatics_Vtbl { + pub base__: ::windows_core::IInspectable_Vtbl, + pub CreateFromFontGlyph: unsafe extern "system" fn(this: *mut ::core::ffi::c_void, glyph: ::std::mem::MaybeUninit<::windows_core::HSTRING>, fontfamily: ::std::mem::MaybeUninit<::windows_core::HSTRING>, result__: *mut *mut ::core::ffi::c_void) -> ::windows_core::HRESULT, + pub CreateFromFontGlyphWithUri: unsafe extern "system" fn(this: *mut ::core::ffi::c_void, glyph: ::std::mem::MaybeUninit<::windows_core::HSTRING>, fontfamily: ::std::mem::MaybeUninit<::windows_core::HSTRING>, fonturi: *mut ::core::ffi::c_void, result__: *mut *mut ::core::ffi::c_void) -> ::windows_core::HRESULT, + #[cfg(feature = "Storage_Streams")] + pub CreateFromImage: unsafe extern "system" fn(this: *mut ::core::ffi::c_void, image: *mut ::core::ffi::c_void, result__: *mut *mut ::core::ffi::c_void) -> ::windows_core::HRESULT, + #[cfg(not(feature = "Storage_Streams"))] + CreateFromImage: usize, +} +#[doc(hidden)] +#[repr(transparent)] +#[derive(::core::cmp::PartialEq, ::core::cmp::Eq, ::core::fmt::Debug, ::core::clone::Clone)] +pub struct IWindowTabManager(::windows_core::IUnknown); +unsafe impl ::windows_core::Interface for IWindowTabManager { + type Vtable = IWindowTabManager_Vtbl; +} +unsafe impl ::windows_core::ComInterface for IWindowTabManager { + const IID: ::windows_core::GUID = ::windows_core::GUID::from_u128(0x97b3c697_f43a_43e7_b3a2_e889a9835599); +} +#[repr(C)] +#[doc(hidden)] +pub struct IWindowTabManager_Vtbl { + pub base__: ::windows_core::IInspectable_Vtbl, + pub Tabs: unsafe extern "system" fn(this: *mut ::core::ffi::c_void, result__: *mut *mut ::core::ffi::c_void) -> ::windows_core::HRESULT, + pub SetActiveTab: unsafe extern "system" fn(this: *mut ::core::ffi::c_void, tab: *mut ::core::ffi::c_void) -> ::windows_core::HRESULT, + pub TabSwitchRequested: unsafe extern "system" fn(this: *mut ::core::ffi::c_void, handler: *mut ::core::ffi::c_void, result__: *mut super::super::Foundation::EventRegistrationToken) -> ::windows_core::HRESULT, + pub RemoveTabSwitchRequested: unsafe extern "system" fn(this: *mut ::core::ffi::c_void, token: super::super::Foundation::EventRegistrationToken) -> ::windows_core::HRESULT, + pub TabCloseRequested: unsafe extern "system" fn(this: *mut ::core::ffi::c_void, handler: *mut ::core::ffi::c_void, result__: *mut super::super::Foundation::EventRegistrationToken) -> ::windows_core::HRESULT, + pub RemoveTabCloseRequested: unsafe extern "system" fn(this: *mut ::core::ffi::c_void, token: super::super::Foundation::EventRegistrationToken) -> ::windows_core::HRESULT, + pub TabTearOutRequested: unsafe extern "system" fn(this: *mut ::core::ffi::c_void, handler: *mut ::core::ffi::c_void, result__: *mut super::super::Foundation::EventRegistrationToken) -> ::windows_core::HRESULT, + pub RemoveTabTearOutRequested: unsafe extern "system" fn(this: *mut ::core::ffi::c_void, token: super::super::Foundation::EventRegistrationToken) -> ::windows_core::HRESULT, + pub TabThumbnailRequested: unsafe extern "system" fn(this: *mut ::core::ffi::c_void, handler: *mut ::core::ffi::c_void, result__: *mut super::super::Foundation::EventRegistrationToken) -> ::windows_core::HRESULT, + pub RemoveTabThumbnailRequested: unsafe extern "system" fn(this: *mut ::core::ffi::c_void, token: super::super::Foundation::EventRegistrationToken) -> ::windows_core::HRESULT, +} +#[doc(hidden)] +#[repr(transparent)] +#[derive(::core::cmp::PartialEq, ::core::cmp::Eq, ::core::fmt::Debug, ::core::clone::Clone)] +pub struct IWindowTabManagerStatics(::windows_core::IUnknown); +unsafe impl ::windows_core::Interface for IWindowTabManagerStatics { + type Vtable = IWindowTabManagerStatics_Vtbl; +} +unsafe impl ::windows_core::ComInterface for IWindowTabManagerStatics { + const IID: ::windows_core::GUID = ::windows_core::GUID::from_u128(0x76755668_45f0_4e0b_8172_4e6d9d0f87bd); +} +#[repr(C)] +#[doc(hidden)] +pub struct IWindowTabManagerStatics_Vtbl { + pub base__: ::windows_core::IInspectable_Vtbl, + pub GetForWindow: unsafe extern "system" fn(this: *mut ::core::ffi::c_void, id: super::WindowId, result__: *mut *mut ::core::ffi::c_void) -> ::windows_core::HRESULT, + pub IsSupported: unsafe extern "system" fn(this: *mut ::core::ffi::c_void, result__: *mut bool) -> ::windows_core::HRESULT, + pub IsTabTearOutSupported: unsafe extern "system" fn(this: *mut ::core::ffi::c_void, result__: *mut bool) -> ::windows_core::HRESULT, +} +#[doc(hidden)] +#[repr(transparent)] +#[derive(::core::cmp::PartialEq, ::core::cmp::Eq, ::core::fmt::Debug, ::core::clone::Clone)] +pub struct IWindowTabSwitchRequestedEventArgs(::windows_core::IUnknown); +unsafe impl ::windows_core::Interface for IWindowTabSwitchRequestedEventArgs { + type Vtable = IWindowTabSwitchRequestedEventArgs_Vtbl; +} +unsafe impl ::windows_core::ComInterface for IWindowTabSwitchRequestedEventArgs { + const IID: ::windows_core::GUID = ::windows_core::GUID::from_u128(0x7cbc421a_58a4_568b_a351_f8a947a5aad8); +} +#[repr(C)] +#[doc(hidden)] +pub struct IWindowTabSwitchRequestedEventArgs_Vtbl { + pub base__: ::windows_core::IInspectable_Vtbl, + pub Tab: unsafe extern "system" fn(this: *mut ::core::ffi::c_void, result__: *mut *mut ::core::ffi::c_void) -> ::windows_core::HRESULT, +} +#[doc(hidden)] +#[repr(transparent)] +#[derive(::core::cmp::PartialEq, ::core::cmp::Eq, ::core::fmt::Debug, ::core::clone::Clone)] +pub struct IWindowTabTearOutRequestedEventArgs(::windows_core::IUnknown); +unsafe impl ::windows_core::Interface for IWindowTabTearOutRequestedEventArgs { + type Vtable = IWindowTabTearOutRequestedEventArgs_Vtbl; +} +unsafe impl ::windows_core::ComInterface for IWindowTabTearOutRequestedEventArgs { + const IID: ::windows_core::GUID = ::windows_core::GUID::from_u128(0x17d66659_5005_5ece_99af_566306e73642); +} +#[repr(C)] +#[doc(hidden)] +pub struct IWindowTabTearOutRequestedEventArgs_Vtbl { + pub base__: ::windows_core::IInspectable_Vtbl, + pub Tab: unsafe extern "system" fn(this: *mut ::core::ffi::c_void, result__: *mut *mut ::core::ffi::c_void) -> ::windows_core::HRESULT, + pub WindowId: unsafe extern "system" fn(this: *mut ::core::ffi::c_void, result__: *mut u64) -> ::windows_core::HRESULT, + pub SetWindowId: unsafe extern "system" fn(this: *mut ::core::ffi::c_void, value: u64) -> ::windows_core::HRESULT, + pub GetDeferral: unsafe extern "system" fn(this: *mut ::core::ffi::c_void, result__: *mut *mut ::core::ffi::c_void) -> ::windows_core::HRESULT, +} +#[doc(hidden)] +#[repr(transparent)] +#[derive(::core::cmp::PartialEq, ::core::cmp::Eq, ::core::fmt::Debug, ::core::clone::Clone)] +pub struct IWindowTabThumbnailRequestedEventArgs(::windows_core::IUnknown); +unsafe impl ::windows_core::Interface for IWindowTabThumbnailRequestedEventArgs { + type Vtable = IWindowTabThumbnailRequestedEventArgs_Vtbl; +} +unsafe impl ::windows_core::ComInterface for IWindowTabThumbnailRequestedEventArgs { + const IID: ::windows_core::GUID = ::windows_core::GUID::from_u128(0x2d558e54_9c4e_5abc_ab72_3350fb4937a0); +} +#[repr(C)] +#[doc(hidden)] +pub struct IWindowTabThumbnailRequestedEventArgs_Vtbl { + pub base__: ::windows_core::IInspectable_Vtbl, + pub Tab: unsafe extern "system" fn(this: *mut ::core::ffi::c_void, result__: *mut *mut ::core::ffi::c_void) -> ::windows_core::HRESULT, + #[cfg(feature = "Graphics_Imaging")] + pub RequestedSize: unsafe extern "system" fn(this: *mut ::core::ffi::c_void, result__: *mut super::super::Graphics::Imaging::BitmapSize) -> ::windows_core::HRESULT, + #[cfg(not(feature = "Graphics_Imaging"))] + RequestedSize: usize, + #[cfg(feature = "Storage_Streams")] + pub Image: unsafe extern "system" fn(this: *mut ::core::ffi::c_void, result__: *mut *mut ::core::ffi::c_void) -> ::windows_core::HRESULT, + #[cfg(not(feature = "Storage_Streams"))] + Image: usize, + #[cfg(feature = "Storage_Streams")] + pub SetImage: unsafe extern "system" fn(this: *mut ::core::ffi::c_void, value: *mut ::core::ffi::c_void) -> ::windows_core::HRESULT, + #[cfg(not(feature = "Storage_Streams"))] + SetImage: usize, + pub GetDeferral: unsafe extern "system" fn(this: *mut ::core::ffi::c_void, result__: *mut *mut ::core::ffi::c_void) -> ::windows_core::HRESULT, + pub IsCompositedOnWindow: unsafe extern "system" fn(this: *mut ::core::ffi::c_void, result__: *mut bool) -> ::windows_core::HRESULT, +} pub struct AdaptiveCardBuilder; impl AdaptiveCardBuilder { pub fn CreateAdaptiveCardFromJson(value: &::windows_core::HSTRING) -> ::windows_core::Result { @@ -646,6 +882,639 @@ impl ::windows_core::RuntimeName for TaskbarManager { unsafe impl ::core::marker::Send for TaskbarManager {} unsafe impl ::core::marker::Sync for TaskbarManager {} #[repr(transparent)] +#[derive(::core::cmp::PartialEq, ::core::cmp::Eq, ::core::fmt::Debug, ::core::clone::Clone)] +pub struct WindowTab(::windows_core::IUnknown); +impl WindowTab { + pub fn new() -> ::windows_core::Result { + Self::IActivationFactory(|f| f.ActivateInstance::()) + } + fn IActivationFactory ::windows_core::Result>(callback: F) -> ::windows_core::Result { + static SHARED: ::windows_core::imp::FactoryCache = ::windows_core::imp::FactoryCache::new(); + SHARED.call(callback) + } + pub fn Tag(&self) -> ::windows_core::Result<::windows_core::IInspectable> { + let this = self; + unsafe { + let mut result__ = ::std::mem::zeroed(); + (::windows_core::Interface::vtable(this).Tag)(::windows_core::Interface::as_raw(this), &mut result__).from_abi(result__) + } + } + pub fn SetTag(&self, value: P0) -> ::windows_core::Result<()> + where + P0: ::windows_core::IntoParam<::windows_core::IInspectable>, + { + let this = self; + unsafe { (::windows_core::Interface::vtable(this).SetTag)(::windows_core::Interface::as_raw(this), value.into_param().abi()).ok() } + } + pub fn Title(&self) -> ::windows_core::Result<::windows_core::HSTRING> { + let this = self; + unsafe { + let mut result__ = ::std::mem::zeroed(); + (::windows_core::Interface::vtable(this).Title)(::windows_core::Interface::as_raw(this), &mut result__).from_abi(result__) + } + } + pub fn SetTitle(&self, value: &::windows_core::HSTRING) -> ::windows_core::Result<()> { + let this = self; + unsafe { (::windows_core::Interface::vtable(this).SetTitle)(::windows_core::Interface::as_raw(this), ::core::mem::transmute_copy(value)).ok() } + } + pub fn Icon(&self) -> ::windows_core::Result { + let this = self; + unsafe { + let mut result__ = ::std::mem::zeroed(); + (::windows_core::Interface::vtable(this).Icon)(::windows_core::Interface::as_raw(this), &mut result__).from_abi(result__) + } + } + pub fn SetIcon(&self, value: P0) -> ::windows_core::Result<()> + where + P0: ::windows_core::IntoParam, + { + let this = self; + unsafe { (::windows_core::Interface::vtable(this).SetIcon)(::windows_core::Interface::as_raw(this), value.into_param().abi()).ok() } + } + pub fn TreatAsSecondaryTileId(&self) -> ::windows_core::Result<::windows_core::HSTRING> { + let this = self; + unsafe { + let mut result__ = ::std::mem::zeroed(); + (::windows_core::Interface::vtable(this).TreatAsSecondaryTileId)(::windows_core::Interface::as_raw(this), &mut result__).from_abi(result__) + } + } + pub fn SetTreatAsSecondaryTileId(&self, value: &::windows_core::HSTRING) -> ::windows_core::Result<()> { + let this = self; + unsafe { (::windows_core::Interface::vtable(this).SetTreatAsSecondaryTileId)(::windows_core::Interface::as_raw(this), ::core::mem::transmute_copy(value)).ok() } + } + pub fn Group(&self) -> ::windows_core::Result { + let this = self; + unsafe { + let mut result__ = ::std::mem::zeroed(); + (::windows_core::Interface::vtable(this).Group)(::windows_core::Interface::as_raw(this), &mut result__).from_abi(result__) + } + } + pub fn SetGroup(&self, value: P0) -> ::windows_core::Result<()> + where + P0: ::windows_core::IntoParam, + { + let this = self; + unsafe { (::windows_core::Interface::vtable(this).SetGroup)(::windows_core::Interface::as_raw(this), value.into_param().abi()).ok() } + } + pub fn ReportThumbnailAvailable(&self) -> ::windows_core::Result<()> { + let this = self; + unsafe { (::windows_core::Interface::vtable(this).ReportThumbnailAvailable)(::windows_core::Interface::as_raw(this)).ok() } + } +} +impl ::windows_core::RuntimeType for WindowTab { + const SIGNATURE: ::windows_core::imp::ConstBuffer = ::windows_core::imp::ConstBuffer::for_class::(); +} +unsafe impl ::windows_core::Interface for WindowTab { + type Vtable = IWindowTab_Vtbl; +} +unsafe impl ::windows_core::ComInterface for WindowTab { + const IID: ::windows_core::GUID = ::IID; +} +impl ::windows_core::RuntimeName for WindowTab { + const NAME: &'static str = "Windows.UI.Shell.WindowTab"; +} +::windows_core::imp::interface_hierarchy!(WindowTab, ::windows_core::IUnknown, ::windows_core::IInspectable); +unsafe impl ::core::marker::Send for WindowTab {} +unsafe impl ::core::marker::Sync for WindowTab {} +#[repr(transparent)] +#[derive(::core::cmp::PartialEq, ::core::cmp::Eq, ::core::fmt::Debug, ::core::clone::Clone)] +pub struct WindowTabCloseRequestedEventArgs(::windows_core::IUnknown); +impl WindowTabCloseRequestedEventArgs { + pub fn Tab(&self) -> ::windows_core::Result { + let this = self; + unsafe { + let mut result__ = ::std::mem::zeroed(); + (::windows_core::Interface::vtable(this).Tab)(::windows_core::Interface::as_raw(this), &mut result__).from_abi(result__) + } + } +} +impl ::windows_core::RuntimeType for WindowTabCloseRequestedEventArgs { + const SIGNATURE: ::windows_core::imp::ConstBuffer = ::windows_core::imp::ConstBuffer::for_class::(); +} +unsafe impl ::windows_core::Interface for WindowTabCloseRequestedEventArgs { + type Vtable = IWindowTabCloseRequestedEventArgs_Vtbl; +} +unsafe impl ::windows_core::ComInterface for WindowTabCloseRequestedEventArgs { + const IID: ::windows_core::GUID = ::IID; +} +impl ::windows_core::RuntimeName for WindowTabCloseRequestedEventArgs { + const NAME: &'static str = "Windows.UI.Shell.WindowTabCloseRequestedEventArgs"; +} +::windows_core::imp::interface_hierarchy!(WindowTabCloseRequestedEventArgs, ::windows_core::IUnknown, ::windows_core::IInspectable); +unsafe impl ::core::marker::Send for WindowTabCloseRequestedEventArgs {} +unsafe impl ::core::marker::Sync for WindowTabCloseRequestedEventArgs {} +#[repr(transparent)] +#[derive(::core::cmp::PartialEq, ::core::cmp::Eq, ::core::fmt::Debug, ::core::clone::Clone)] +pub struct WindowTabCollection(::windows_core::IUnknown); +impl WindowTabCollection { + #[doc = "Required features: `\"Foundation_Collections\"`"] + #[cfg(feature = "Foundation_Collections")] + pub fn First(&self) -> ::windows_core::Result> { + let this = &::windows_core::ComInterface::cast::>(self)?; + unsafe { + let mut result__ = ::std::mem::zeroed(); + (::windows_core::Interface::vtable(this).First)(::windows_core::Interface::as_raw(this), &mut result__).from_abi(result__) + } + } + #[doc = "Required features: `\"Foundation_Collections\"`"] + #[cfg(feature = "Foundation_Collections")] + pub fn GetAt(&self, index: u32) -> ::windows_core::Result { + let this = &::windows_core::ComInterface::cast::>(self)?; + unsafe { + let mut result__ = ::std::mem::zeroed(); + (::windows_core::Interface::vtable(this).GetAt)(::windows_core::Interface::as_raw(this), index, &mut result__).from_abi(result__) + } + } + #[doc = "Required features: `\"Foundation_Collections\"`"] + #[cfg(feature = "Foundation_Collections")] + pub fn Size(&self) -> ::windows_core::Result { + let this = &::windows_core::ComInterface::cast::>(self)?; + unsafe { + let mut result__ = ::std::mem::zeroed(); + (::windows_core::Interface::vtable(this).Size)(::windows_core::Interface::as_raw(this), &mut result__).from_abi(result__) + } + } + #[doc = "Required features: `\"Foundation_Collections\"`"] + #[cfg(feature = "Foundation_Collections")] + pub fn GetView(&self) -> ::windows_core::Result> { + let this = &::windows_core::ComInterface::cast::>(self)?; + unsafe { + let mut result__ = ::std::mem::zeroed(); + (::windows_core::Interface::vtable(this).GetView)(::windows_core::Interface::as_raw(this), &mut result__).from_abi(result__) + } + } + #[doc = "Required features: `\"Foundation_Collections\"`"] + #[cfg(feature = "Foundation_Collections")] + pub fn IndexOf(&self, value: P0, index: &mut u32) -> ::windows_core::Result + where + P0: ::windows_core::IntoParam, + { + let this = &::windows_core::ComInterface::cast::>(self)?; + unsafe { + let mut result__ = ::std::mem::zeroed(); + (::windows_core::Interface::vtable(this).IndexOf)(::windows_core::Interface::as_raw(this), value.into_param().abi(), index, &mut result__).from_abi(result__) + } + } + #[doc = "Required features: `\"Foundation_Collections\"`"] + #[cfg(feature = "Foundation_Collections")] + pub fn SetAt(&self, index: u32, value: P0) -> ::windows_core::Result<()> + where + P0: ::windows_core::IntoParam, + { + let this = &::windows_core::ComInterface::cast::>(self)?; + unsafe { (::windows_core::Interface::vtable(this).SetAt)(::windows_core::Interface::as_raw(this), index, value.into_param().abi()).ok() } + } + #[doc = "Required features: `\"Foundation_Collections\"`"] + #[cfg(feature = "Foundation_Collections")] + pub fn InsertAt(&self, index: u32, value: P0) -> ::windows_core::Result<()> + where + P0: ::windows_core::IntoParam, + { + let this = &::windows_core::ComInterface::cast::>(self)?; + unsafe { (::windows_core::Interface::vtable(this).InsertAt)(::windows_core::Interface::as_raw(this), index, value.into_param().abi()).ok() } + } + #[doc = "Required features: `\"Foundation_Collections\"`"] + #[cfg(feature = "Foundation_Collections")] + pub fn RemoveAt(&self, index: u32) -> ::windows_core::Result<()> { + let this = &::windows_core::ComInterface::cast::>(self)?; + unsafe { (::windows_core::Interface::vtable(this).RemoveAt)(::windows_core::Interface::as_raw(this), index).ok() } + } + #[doc = "Required features: `\"Foundation_Collections\"`"] + #[cfg(feature = "Foundation_Collections")] + pub fn Append(&self, value: P0) -> ::windows_core::Result<()> + where + P0: ::windows_core::IntoParam, + { + let this = &::windows_core::ComInterface::cast::>(self)?; + unsafe { (::windows_core::Interface::vtable(this).Append)(::windows_core::Interface::as_raw(this), value.into_param().abi()).ok() } + } + #[doc = "Required features: `\"Foundation_Collections\"`"] + #[cfg(feature = "Foundation_Collections")] + pub fn RemoveAtEnd(&self) -> ::windows_core::Result<()> { + let this = &::windows_core::ComInterface::cast::>(self)?; + unsafe { (::windows_core::Interface::vtable(this).RemoveAtEnd)(::windows_core::Interface::as_raw(this)).ok() } + } + #[doc = "Required features: `\"Foundation_Collections\"`"] + #[cfg(feature = "Foundation_Collections")] + pub fn Clear(&self) -> ::windows_core::Result<()> { + let this = &::windows_core::ComInterface::cast::>(self)?; + unsafe { (::windows_core::Interface::vtable(this).Clear)(::windows_core::Interface::as_raw(this)).ok() } + } + #[doc = "Required features: `\"Foundation_Collections\"`"] + #[cfg(feature = "Foundation_Collections")] + pub fn GetMany(&self, startindex: u32, items: &mut [::core::option::Option]) -> ::windows_core::Result { + let this = &::windows_core::ComInterface::cast::>(self)?; + unsafe { + let mut result__ = ::std::mem::zeroed(); + (::windows_core::Interface::vtable(this).GetMany)(::windows_core::Interface::as_raw(this), startindex, items.len().try_into().unwrap(), ::core::mem::transmute_copy(&items), &mut result__).from_abi(result__) + } + } + #[doc = "Required features: `\"Foundation_Collections\"`"] + #[cfg(feature = "Foundation_Collections")] + pub fn ReplaceAll(&self, items: &[::core::option::Option]) -> ::windows_core::Result<()> { + let this = &::windows_core::ComInterface::cast::>(self)?; + unsafe { (::windows_core::Interface::vtable(this).ReplaceAll)(::windows_core::Interface::as_raw(this), items.len().try_into().unwrap(), ::core::mem::transmute(items.as_ptr())).ok() } + } + pub fn MoveTab(&self, tab: P0, index: u32) -> ::windows_core::Result<()> + where + P0: ::windows_core::IntoParam, + { + let this = self; + unsafe { (::windows_core::Interface::vtable(this).MoveTab)(::windows_core::Interface::as_raw(this), tab.into_param().abi(), index).ok() } + } +} +impl ::windows_core::RuntimeType for WindowTabCollection { + const SIGNATURE: ::windows_core::imp::ConstBuffer = ::windows_core::imp::ConstBuffer::for_class::(); +} +unsafe impl ::windows_core::Interface for WindowTabCollection { + type Vtable = IWindowTabCollection_Vtbl; +} +unsafe impl ::windows_core::ComInterface for WindowTabCollection { + const IID: ::windows_core::GUID = ::IID; +} +impl ::windows_core::RuntimeName for WindowTabCollection { + const NAME: &'static str = "Windows.UI.Shell.WindowTabCollection"; +} +#[cfg(feature = "Foundation_Collections")] +impl ::core::iter::IntoIterator for WindowTabCollection { + type Item = WindowTab; + type IntoIter = super::super::Foundation::Collections::VectorIterator; + fn into_iter(self) -> Self::IntoIter { + ::core::iter::IntoIterator::into_iter(&self) + } +} +#[cfg(feature = "Foundation_Collections")] +impl ::core::iter::IntoIterator for &WindowTabCollection { + type Item = WindowTab; + type IntoIter = super::super::Foundation::Collections::VectorIterator; + fn into_iter(self) -> Self::IntoIter { + super::super::Foundation::Collections::VectorIterator::new(::windows_core::ComInterface::cast(self).ok()) + } +} +::windows_core::imp::interface_hierarchy!(WindowTabCollection, ::windows_core::IUnknown, ::windows_core::IInspectable); +#[cfg(feature = "Foundation_Collections")] +impl ::windows_core::CanTryInto> for WindowTabCollection {} +#[cfg(feature = "Foundation_Collections")] +impl ::windows_core::CanTryInto> for WindowTabCollection {} +unsafe impl ::core::marker::Send for WindowTabCollection {} +unsafe impl ::core::marker::Sync for WindowTabCollection {} +#[repr(transparent)] +#[derive(::core::cmp::PartialEq, ::core::cmp::Eq, ::core::fmt::Debug, ::core::clone::Clone)] +pub struct WindowTabGroup(::windows_core::IUnknown); +impl WindowTabGroup { + pub fn new() -> ::windows_core::Result { + Self::IActivationFactory(|f| f.ActivateInstance::()) + } + fn IActivationFactory ::windows_core::Result>(callback: F) -> ::windows_core::Result { + static SHARED: ::windows_core::imp::FactoryCache = ::windows_core::imp::FactoryCache::new(); + SHARED.call(callback) + } + pub fn Title(&self) -> ::windows_core::Result<::windows_core::HSTRING> { + let this = self; + unsafe { + let mut result__ = ::std::mem::zeroed(); + (::windows_core::Interface::vtable(this).Title)(::windows_core::Interface::as_raw(this), &mut result__).from_abi(result__) + } + } + pub fn SetTitle(&self, value: &::windows_core::HSTRING) -> ::windows_core::Result<()> { + let this = self; + unsafe { (::windows_core::Interface::vtable(this).SetTitle)(::windows_core::Interface::as_raw(this), ::core::mem::transmute_copy(value)).ok() } + } + pub fn Icon(&self) -> ::windows_core::Result { + let this = self; + unsafe { + let mut result__ = ::std::mem::zeroed(); + (::windows_core::Interface::vtable(this).Icon)(::windows_core::Interface::as_raw(this), &mut result__).from_abi(result__) + } + } + pub fn SetIcon(&self, value: P0) -> ::windows_core::Result<()> + where + P0: ::windows_core::IntoParam, + { + let this = self; + unsafe { (::windows_core::Interface::vtable(this).SetIcon)(::windows_core::Interface::as_raw(this), value.into_param().abi()).ok() } + } +} +impl ::windows_core::RuntimeType for WindowTabGroup { + const SIGNATURE: ::windows_core::imp::ConstBuffer = ::windows_core::imp::ConstBuffer::for_class::(); +} +unsafe impl ::windows_core::Interface for WindowTabGroup { + type Vtable = IWindowTabGroup_Vtbl; +} +unsafe impl ::windows_core::ComInterface for WindowTabGroup { + const IID: ::windows_core::GUID = ::IID; +} +impl ::windows_core::RuntimeName for WindowTabGroup { + const NAME: &'static str = "Windows.UI.Shell.WindowTabGroup"; +} +::windows_core::imp::interface_hierarchy!(WindowTabGroup, ::windows_core::IUnknown, ::windows_core::IInspectable); +unsafe impl ::core::marker::Send for WindowTabGroup {} +unsafe impl ::core::marker::Sync for WindowTabGroup {} +#[repr(transparent)] +#[derive(::core::cmp::PartialEq, ::core::cmp::Eq, ::core::fmt::Debug, ::core::clone::Clone)] +pub struct WindowTabIcon(::windows_core::IUnknown); +impl WindowTabIcon { + pub fn CreateFromFontGlyph(glyph: &::windows_core::HSTRING, fontfamily: &::windows_core::HSTRING) -> ::windows_core::Result { + Self::IWindowTabIconStatics(|this| unsafe { + let mut result__ = ::std::mem::zeroed(); + (::windows_core::Interface::vtable(this).CreateFromFontGlyph)(::windows_core::Interface::as_raw(this), ::core::mem::transmute_copy(glyph), ::core::mem::transmute_copy(fontfamily), &mut result__).from_abi(result__) + }) + } + pub fn CreateFromFontGlyphWithUri(glyph: &::windows_core::HSTRING, fontfamily: &::windows_core::HSTRING, fonturi: P0) -> ::windows_core::Result + where + P0: ::windows_core::IntoParam, + { + Self::IWindowTabIconStatics(|this| unsafe { + let mut result__ = ::std::mem::zeroed(); + (::windows_core::Interface::vtable(this).CreateFromFontGlyphWithUri)(::windows_core::Interface::as_raw(this), ::core::mem::transmute_copy(glyph), ::core::mem::transmute_copy(fontfamily), fonturi.into_param().abi(), &mut result__).from_abi(result__) + }) + } + #[doc = "Required features: `\"Storage_Streams\"`"] + #[cfg(feature = "Storage_Streams")] + pub fn CreateFromImage(image: P0) -> ::windows_core::Result + where + P0: ::windows_core::TryIntoParam, + { + Self::IWindowTabIconStatics(|this| unsafe { + let mut result__ = ::std::mem::zeroed(); + (::windows_core::Interface::vtable(this).CreateFromImage)(::windows_core::Interface::as_raw(this), image.try_into_param()?.abi(), &mut result__).from_abi(result__) + }) + } + #[doc(hidden)] + pub fn IWindowTabIconStatics ::windows_core::Result>(callback: F) -> ::windows_core::Result { + static SHARED: ::windows_core::imp::FactoryCache = ::windows_core::imp::FactoryCache::new(); + SHARED.call(callback) + } +} +impl ::windows_core::RuntimeType for WindowTabIcon { + const SIGNATURE: ::windows_core::imp::ConstBuffer = ::windows_core::imp::ConstBuffer::for_class::(); +} +unsafe impl ::windows_core::Interface for WindowTabIcon { + type Vtable = IWindowTabIcon_Vtbl; +} +unsafe impl ::windows_core::ComInterface for WindowTabIcon { + const IID: ::windows_core::GUID = ::IID; +} +impl ::windows_core::RuntimeName for WindowTabIcon { + const NAME: &'static str = "Windows.UI.Shell.WindowTabIcon"; +} +::windows_core::imp::interface_hierarchy!(WindowTabIcon, ::windows_core::IUnknown, ::windows_core::IInspectable); +unsafe impl ::core::marker::Send for WindowTabIcon {} +unsafe impl ::core::marker::Sync for WindowTabIcon {} +#[repr(transparent)] +#[derive(::core::cmp::PartialEq, ::core::cmp::Eq, ::core::fmt::Debug, ::core::clone::Clone)] +pub struct WindowTabManager(::windows_core::IUnknown); +impl WindowTabManager { + pub fn Tabs(&self) -> ::windows_core::Result { + let this = self; + unsafe { + let mut result__ = ::std::mem::zeroed(); + (::windows_core::Interface::vtable(this).Tabs)(::windows_core::Interface::as_raw(this), &mut result__).from_abi(result__) + } + } + pub fn SetActiveTab(&self, tab: P0) -> ::windows_core::Result<()> + where + P0: ::windows_core::IntoParam, + { + let this = self; + unsafe { (::windows_core::Interface::vtable(this).SetActiveTab)(::windows_core::Interface::as_raw(this), tab.into_param().abi()).ok() } + } + pub fn TabSwitchRequested(&self, handler: P0) -> ::windows_core::Result + where + P0: ::windows_core::IntoParam>, + { + let this = self; + unsafe { + let mut result__ = ::std::mem::zeroed(); + (::windows_core::Interface::vtable(this).TabSwitchRequested)(::windows_core::Interface::as_raw(this), handler.into_param().abi(), &mut result__).from_abi(result__) + } + } + pub fn RemoveTabSwitchRequested(&self, token: super::super::Foundation::EventRegistrationToken) -> ::windows_core::Result<()> { + let this = self; + unsafe { (::windows_core::Interface::vtable(this).RemoveTabSwitchRequested)(::windows_core::Interface::as_raw(this), token).ok() } + } + pub fn TabCloseRequested(&self, handler: P0) -> ::windows_core::Result + where + P0: ::windows_core::IntoParam>, + { + let this = self; + unsafe { + let mut result__ = ::std::mem::zeroed(); + (::windows_core::Interface::vtable(this).TabCloseRequested)(::windows_core::Interface::as_raw(this), handler.into_param().abi(), &mut result__).from_abi(result__) + } + } + pub fn RemoveTabCloseRequested(&self, token: super::super::Foundation::EventRegistrationToken) -> ::windows_core::Result<()> { + let this = self; + unsafe { (::windows_core::Interface::vtable(this).RemoveTabCloseRequested)(::windows_core::Interface::as_raw(this), token).ok() } + } + pub fn TabTearOutRequested(&self, handler: P0) -> ::windows_core::Result + where + P0: ::windows_core::IntoParam>, + { + let this = self; + unsafe { + let mut result__ = ::std::mem::zeroed(); + (::windows_core::Interface::vtable(this).TabTearOutRequested)(::windows_core::Interface::as_raw(this), handler.into_param().abi(), &mut result__).from_abi(result__) + } + } + pub fn RemoveTabTearOutRequested(&self, token: super::super::Foundation::EventRegistrationToken) -> ::windows_core::Result<()> { + let this = self; + unsafe { (::windows_core::Interface::vtable(this).RemoveTabTearOutRequested)(::windows_core::Interface::as_raw(this), token).ok() } + } + pub fn TabThumbnailRequested(&self, handler: P0) -> ::windows_core::Result + where + P0: ::windows_core::IntoParam>, + { + let this = self; + unsafe { + let mut result__ = ::std::mem::zeroed(); + (::windows_core::Interface::vtable(this).TabThumbnailRequested)(::windows_core::Interface::as_raw(this), handler.into_param().abi(), &mut result__).from_abi(result__) + } + } + pub fn RemoveTabThumbnailRequested(&self, token: super::super::Foundation::EventRegistrationToken) -> ::windows_core::Result<()> { + let this = self; + unsafe { (::windows_core::Interface::vtable(this).RemoveTabThumbnailRequested)(::windows_core::Interface::as_raw(this), token).ok() } + } + pub fn GetForWindow(id: super::WindowId) -> ::windows_core::Result { + Self::IWindowTabManagerStatics(|this| unsafe { + let mut result__ = ::std::mem::zeroed(); + (::windows_core::Interface::vtable(this).GetForWindow)(::windows_core::Interface::as_raw(this), id, &mut result__).from_abi(result__) + }) + } + pub fn IsSupported() -> ::windows_core::Result { + Self::IWindowTabManagerStatics(|this| unsafe { + let mut result__ = ::std::mem::zeroed(); + (::windows_core::Interface::vtable(this).IsSupported)(::windows_core::Interface::as_raw(this), &mut result__).from_abi(result__) + }) + } + pub fn IsTabTearOutSupported() -> ::windows_core::Result { + Self::IWindowTabManagerStatics(|this| unsafe { + let mut result__ = ::std::mem::zeroed(); + (::windows_core::Interface::vtable(this).IsTabTearOutSupported)(::windows_core::Interface::as_raw(this), &mut result__).from_abi(result__) + }) + } + #[doc(hidden)] + pub fn IWindowTabManagerStatics ::windows_core::Result>(callback: F) -> ::windows_core::Result { + static SHARED: ::windows_core::imp::FactoryCache = ::windows_core::imp::FactoryCache::new(); + SHARED.call(callback) + } +} +impl ::windows_core::RuntimeType for WindowTabManager { + const SIGNATURE: ::windows_core::imp::ConstBuffer = ::windows_core::imp::ConstBuffer::for_class::(); +} +unsafe impl ::windows_core::Interface for WindowTabManager { + type Vtable = IWindowTabManager_Vtbl; +} +unsafe impl ::windows_core::ComInterface for WindowTabManager { + const IID: ::windows_core::GUID = ::IID; +} +impl ::windows_core::RuntimeName for WindowTabManager { + const NAME: &'static str = "Windows.UI.Shell.WindowTabManager"; +} +::windows_core::imp::interface_hierarchy!(WindowTabManager, ::windows_core::IUnknown, ::windows_core::IInspectable); +unsafe impl ::core::marker::Send for WindowTabManager {} +unsafe impl ::core::marker::Sync for WindowTabManager {} +#[repr(transparent)] +#[derive(::core::cmp::PartialEq, ::core::cmp::Eq, ::core::fmt::Debug, ::core::clone::Clone)] +pub struct WindowTabSwitchRequestedEventArgs(::windows_core::IUnknown); +impl WindowTabSwitchRequestedEventArgs { + pub fn Tab(&self) -> ::windows_core::Result { + let this = self; + unsafe { + let mut result__ = ::std::mem::zeroed(); + (::windows_core::Interface::vtable(this).Tab)(::windows_core::Interface::as_raw(this), &mut result__).from_abi(result__) + } + } +} +impl ::windows_core::RuntimeType for WindowTabSwitchRequestedEventArgs { + const SIGNATURE: ::windows_core::imp::ConstBuffer = ::windows_core::imp::ConstBuffer::for_class::(); +} +unsafe impl ::windows_core::Interface for WindowTabSwitchRequestedEventArgs { + type Vtable = IWindowTabSwitchRequestedEventArgs_Vtbl; +} +unsafe impl ::windows_core::ComInterface for WindowTabSwitchRequestedEventArgs { + const IID: ::windows_core::GUID = ::IID; +} +impl ::windows_core::RuntimeName for WindowTabSwitchRequestedEventArgs { + const NAME: &'static str = "Windows.UI.Shell.WindowTabSwitchRequestedEventArgs"; +} +::windows_core::imp::interface_hierarchy!(WindowTabSwitchRequestedEventArgs, ::windows_core::IUnknown, ::windows_core::IInspectable); +unsafe impl ::core::marker::Send for WindowTabSwitchRequestedEventArgs {} +unsafe impl ::core::marker::Sync for WindowTabSwitchRequestedEventArgs {} +#[repr(transparent)] +#[derive(::core::cmp::PartialEq, ::core::cmp::Eq, ::core::fmt::Debug, ::core::clone::Clone)] +pub struct WindowTabTearOutRequestedEventArgs(::windows_core::IUnknown); +impl WindowTabTearOutRequestedEventArgs { + pub fn Tab(&self) -> ::windows_core::Result { + let this = self; + unsafe { + let mut result__ = ::std::mem::zeroed(); + (::windows_core::Interface::vtable(this).Tab)(::windows_core::Interface::as_raw(this), &mut result__).from_abi(result__) + } + } + pub fn WindowId(&self) -> ::windows_core::Result { + let this = self; + unsafe { + let mut result__ = ::std::mem::zeroed(); + (::windows_core::Interface::vtable(this).WindowId)(::windows_core::Interface::as_raw(this), &mut result__).from_abi(result__) + } + } + pub fn SetWindowId(&self, value: u64) -> ::windows_core::Result<()> { + let this = self; + unsafe { (::windows_core::Interface::vtable(this).SetWindowId)(::windows_core::Interface::as_raw(this), value).ok() } + } + pub fn GetDeferral(&self) -> ::windows_core::Result { + let this = self; + unsafe { + let mut result__ = ::std::mem::zeroed(); + (::windows_core::Interface::vtable(this).GetDeferral)(::windows_core::Interface::as_raw(this), &mut result__).from_abi(result__) + } + } +} +impl ::windows_core::RuntimeType for WindowTabTearOutRequestedEventArgs { + const SIGNATURE: ::windows_core::imp::ConstBuffer = ::windows_core::imp::ConstBuffer::for_class::(); +} +unsafe impl ::windows_core::Interface for WindowTabTearOutRequestedEventArgs { + type Vtable = IWindowTabTearOutRequestedEventArgs_Vtbl; +} +unsafe impl ::windows_core::ComInterface for WindowTabTearOutRequestedEventArgs { + const IID: ::windows_core::GUID = ::IID; +} +impl ::windows_core::RuntimeName for WindowTabTearOutRequestedEventArgs { + const NAME: &'static str = "Windows.UI.Shell.WindowTabTearOutRequestedEventArgs"; +} +::windows_core::imp::interface_hierarchy!(WindowTabTearOutRequestedEventArgs, ::windows_core::IUnknown, ::windows_core::IInspectable); +unsafe impl ::core::marker::Send for WindowTabTearOutRequestedEventArgs {} +unsafe impl ::core::marker::Sync for WindowTabTearOutRequestedEventArgs {} +#[repr(transparent)] +#[derive(::core::cmp::PartialEq, ::core::cmp::Eq, ::core::fmt::Debug, ::core::clone::Clone)] +pub struct WindowTabThumbnailRequestedEventArgs(::windows_core::IUnknown); +impl WindowTabThumbnailRequestedEventArgs { + pub fn Tab(&self) -> ::windows_core::Result { + let this = self; + unsafe { + let mut result__ = ::std::mem::zeroed(); + (::windows_core::Interface::vtable(this).Tab)(::windows_core::Interface::as_raw(this), &mut result__).from_abi(result__) + } + } + #[doc = "Required features: `\"Graphics_Imaging\"`"] + #[cfg(feature = "Graphics_Imaging")] + pub fn RequestedSize(&self) -> ::windows_core::Result { + let this = self; + unsafe { + let mut result__ = ::std::mem::zeroed(); + (::windows_core::Interface::vtable(this).RequestedSize)(::windows_core::Interface::as_raw(this), &mut result__).from_abi(result__) + } + } + #[doc = "Required features: `\"Storage_Streams\"`"] + #[cfg(feature = "Storage_Streams")] + pub fn Image(&self) -> ::windows_core::Result { + let this = self; + unsafe { + let mut result__ = ::std::mem::zeroed(); + (::windows_core::Interface::vtable(this).Image)(::windows_core::Interface::as_raw(this), &mut result__).from_abi(result__) + } + } + #[doc = "Required features: `\"Storage_Streams\"`"] + #[cfg(feature = "Storage_Streams")] + pub fn SetImage(&self, value: P0) -> ::windows_core::Result<()> + where + P0: ::windows_core::TryIntoParam, + { + let this = self; + unsafe { (::windows_core::Interface::vtable(this).SetImage)(::windows_core::Interface::as_raw(this), value.try_into_param()?.abi()).ok() } + } + pub fn GetDeferral(&self) -> ::windows_core::Result { + let this = self; + unsafe { + let mut result__ = ::std::mem::zeroed(); + (::windows_core::Interface::vtable(this).GetDeferral)(::windows_core::Interface::as_raw(this), &mut result__).from_abi(result__) + } + } + pub fn IsCompositedOnWindow(&self) -> ::windows_core::Result { + let this = self; + unsafe { + let mut result__ = ::std::mem::zeroed(); + (::windows_core::Interface::vtable(this).IsCompositedOnWindow)(::windows_core::Interface::as_raw(this), &mut result__).from_abi(result__) + } + } +} +impl ::windows_core::RuntimeType for WindowTabThumbnailRequestedEventArgs { + const SIGNATURE: ::windows_core::imp::ConstBuffer = ::windows_core::imp::ConstBuffer::for_class::(); +} +unsafe impl ::windows_core::Interface for WindowTabThumbnailRequestedEventArgs { + type Vtable = IWindowTabThumbnailRequestedEventArgs_Vtbl; +} +unsafe impl ::windows_core::ComInterface for WindowTabThumbnailRequestedEventArgs { + const IID: ::windows_core::GUID = ::IID; +} +impl ::windows_core::RuntimeName for WindowTabThumbnailRequestedEventArgs { + const NAME: &'static str = "Windows.UI.Shell.WindowTabThumbnailRequestedEventArgs"; +} +::windows_core::imp::interface_hierarchy!(WindowTabThumbnailRequestedEventArgs, ::windows_core::IUnknown, ::windows_core::IInspectable); +unsafe impl ::core::marker::Send for WindowTabThumbnailRequestedEventArgs {} +unsafe impl ::core::marker::Sync for WindowTabThumbnailRequestedEventArgs {} +#[repr(transparent)] #[derive(::core::cmp::PartialEq, ::core::cmp::Eq)] pub struct SecurityAppKind(pub i32); impl SecurityAppKind {