| #[doc(hidden)] |
| #[repr(transparent)] |
| pub struct IExtendedExecutionForegroundRevokedEventArgs(::windows::core::IUnknown); |
| unsafe impl ::windows::core::Interface for IExtendedExecutionForegroundRevokedEventArgs { |
| type Vtable = IExtendedExecutionForegroundRevokedEventArgs_Vtbl; |
| } |
| impl ::core::clone::Clone for IExtendedExecutionForegroundRevokedEventArgs { |
| fn clone(&self) -> Self { |
| Self(self.0.clone()) |
| } |
| } |
| unsafe impl ::windows::core::ComInterface for IExtendedExecutionForegroundRevokedEventArgs { |
| const IID: ::windows::core::GUID = ::windows::core::GUID::from_u128(0xb07cd940_9557_aea4_2c99_bdd56d9be461); |
| } |
| #[repr(C)] |
| #[doc(hidden)] |
| pub struct IExtendedExecutionForegroundRevokedEventArgs_Vtbl { |
| pub base__: ::windows::core::IInspectable_Vtbl, |
| pub Reason: unsafe extern "system" fn(this: *mut ::core::ffi::c_void, result__: *mut ExtendedExecutionForegroundRevokedReason) -> ::windows::core::HRESULT, |
| } |
| #[doc(hidden)] |
| #[repr(transparent)] |
| pub struct IExtendedExecutionForegroundSession(::windows::core::IUnknown); |
| unsafe impl ::windows::core::Interface for IExtendedExecutionForegroundSession { |
| type Vtable = IExtendedExecutionForegroundSession_Vtbl; |
| } |
| impl ::core::clone::Clone for IExtendedExecutionForegroundSession { |
| fn clone(&self) -> Self { |
| Self(self.0.clone()) |
| } |
| } |
| unsafe impl ::windows::core::ComInterface for IExtendedExecutionForegroundSession { |
| const IID: ::windows::core::GUID = ::windows::core::GUID::from_u128(0xfbf440e1_9d10_4201_b01e_c83275296f2e); |
| } |
| #[repr(C)] |
| #[doc(hidden)] |
| pub struct IExtendedExecutionForegroundSession_Vtbl { |
| pub base__: ::windows::core::IInspectable_Vtbl, |
| pub Description: unsafe extern "system" fn(this: *mut ::core::ffi::c_void, result__: *mut ::std::mem::MaybeUninit<::windows::core::HSTRING>) -> ::windows::core::HRESULT, |
| pub SetDescription: unsafe extern "system" fn(this: *mut ::core::ffi::c_void, value: ::std::mem::MaybeUninit<::windows::core::HSTRING>) -> ::windows::core::HRESULT, |
| #[cfg(feature = "Foundation")] |
| pub Revoked: 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, |
| #[cfg(not(feature = "Foundation"))] |
| Revoked: usize, |
| #[cfg(feature = "Foundation")] |
| pub RemoveRevoked: unsafe extern "system" fn(this: *mut ::core::ffi::c_void, token: super::super::super::Foundation::EventRegistrationToken) -> ::windows::core::HRESULT, |
| #[cfg(not(feature = "Foundation"))] |
| RemoveRevoked: usize, |
| #[cfg(feature = "Foundation")] |
| pub RequestExtensionAsync: unsafe extern "system" fn(this: *mut ::core::ffi::c_void, result__: *mut *mut ::core::ffi::c_void) -> ::windows::core::HRESULT, |
| #[cfg(not(feature = "Foundation"))] |
| RequestExtensionAsync: usize, |
| pub Reason: unsafe extern "system" fn(this: *mut ::core::ffi::c_void, result__: *mut ExtendedExecutionForegroundReason) -> ::windows::core::HRESULT, |
| pub SetReason: unsafe extern "system" fn(this: *mut ::core::ffi::c_void, value: ExtendedExecutionForegroundReason) -> ::windows::core::HRESULT, |
| } |
| #[doc = "*Required features: `\"ApplicationModel_ExtendedExecution_Foreground\"`*"] |
| #[repr(transparent)] |
| pub struct ExtendedExecutionForegroundRevokedEventArgs(::windows::core::IUnknown); |
| impl ExtendedExecutionForegroundRevokedEventArgs { |
| pub fn Reason(&self) -> ::windows::core::Result<ExtendedExecutionForegroundRevokedReason> { |
| let this = self; |
| unsafe { |
| let mut result__ = ::windows::core::zeroed::<ExtendedExecutionForegroundRevokedReason>(); |
| (::windows::core::Interface::vtable(this).Reason)(::windows::core::Interface::as_raw(this), &mut result__).from_abi(result__) |
| } |
| } |
| } |
| impl ::core::cmp::PartialEq for ExtendedExecutionForegroundRevokedEventArgs { |
| fn eq(&self, other: &Self) -> bool { |
| self.0 == other.0 |
| } |
| } |
| impl ::core::cmp::Eq for ExtendedExecutionForegroundRevokedEventArgs {} |
| impl ::core::fmt::Debug for ExtendedExecutionForegroundRevokedEventArgs { |
| fn fmt(&self, f: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result { |
| f.debug_tuple("ExtendedExecutionForegroundRevokedEventArgs").field(&self.0).finish() |
| } |
| } |
| impl ::windows::core::RuntimeType for ExtendedExecutionForegroundRevokedEventArgs { |
| const SIGNATURE: ::windows::imp::ConstBuffer = ::windows::imp::ConstBuffer::from_slice(b"rc(Windows.ApplicationModel.ExtendedExecution.Foreground.ExtendedExecutionForegroundRevokedEventArgs;{b07cd940-9557-aea4-2c99-bdd56d9be461})"); |
| } |
| impl ::core::clone::Clone for ExtendedExecutionForegroundRevokedEventArgs { |
| fn clone(&self) -> Self { |
| Self(self.0.clone()) |
| } |
| } |
| unsafe impl ::windows::core::Interface for ExtendedExecutionForegroundRevokedEventArgs { |
| type Vtable = IExtendedExecutionForegroundRevokedEventArgs_Vtbl; |
| } |
| unsafe impl ::windows::core::ComInterface for ExtendedExecutionForegroundRevokedEventArgs { |
| const IID: ::windows::core::GUID = <IExtendedExecutionForegroundRevokedEventArgs as ::windows::core::ComInterface>::IID; |
| } |
| impl ::windows::core::RuntimeName for ExtendedExecutionForegroundRevokedEventArgs { |
| const NAME: &'static str = "Windows.ApplicationModel.ExtendedExecution.Foreground.ExtendedExecutionForegroundRevokedEventArgs"; |
| } |
| ::windows::imp::interface_hierarchy!(ExtendedExecutionForegroundRevokedEventArgs, ::windows::core::IUnknown, ::windows::core::IInspectable); |
| unsafe impl ::core::marker::Send for ExtendedExecutionForegroundRevokedEventArgs {} |
| unsafe impl ::core::marker::Sync for ExtendedExecutionForegroundRevokedEventArgs {} |
| #[doc = "*Required features: `\"ApplicationModel_ExtendedExecution_Foreground\"`*"] |
| #[repr(transparent)] |
| pub struct ExtendedExecutionForegroundSession(::windows::core::IUnknown); |
| impl ExtendedExecutionForegroundSession { |
| pub fn new() -> ::windows::core::Result<Self> { |
| Self::IActivationFactory(|f| f.ActivateInstance::<Self>()) |
| } |
| fn IActivationFactory<R, F: FnOnce(&::windows::imp::IGenericFactory) -> ::windows::core::Result<R>>(callback: F) -> ::windows::core::Result<R> { |
| static SHARED: ::windows::imp::FactoryCache<ExtendedExecutionForegroundSession, ::windows::imp::IGenericFactory> = ::windows::imp::FactoryCache::new(); |
| SHARED.call(callback) |
| } |
| #[doc = "*Required features: `\"Foundation\"`*"] |
| #[cfg(feature = "Foundation")] |
| pub fn Close(&self) -> ::windows::core::Result<()> { |
| let this = &::windows::core::ComInterface::cast::<super::super::super::Foundation::IClosable>(self)?; |
| unsafe { (::windows::core::Interface::vtable(this).Close)(::windows::core::Interface::as_raw(this)).ok() } |
| } |
| pub fn Description(&self) -> ::windows::core::Result<::windows::core::HSTRING> { |
| let this = self; |
| unsafe { |
| let mut result__ = ::windows::core::zeroed::<::windows::core::HSTRING>(); |
| (::windows::core::Interface::vtable(this).Description)(::windows::core::Interface::as_raw(this), &mut result__).from_abi(result__) |
| } |
| } |
| pub fn SetDescription(&self, value: &::windows::core::HSTRING) -> ::windows::core::Result<()> { |
| let this = self; |
| unsafe { (::windows::core::Interface::vtable(this).SetDescription)(::windows::core::Interface::as_raw(this), ::core::mem::transmute_copy(value)).ok() } |
| } |
| #[doc = "*Required features: `\"Foundation\"`*"] |
| #[cfg(feature = "Foundation")] |
| pub fn Revoked(&self, handler: &super::super::super::Foundation::TypedEventHandler<::windows::core::IInspectable, ExtendedExecutionForegroundRevokedEventArgs>) -> ::windows::core::Result<super::super::super::Foundation::EventRegistrationToken> { |
| let this = self; |
| unsafe { |
| let mut result__ = ::windows::core::zeroed::<super::super::super::Foundation::EventRegistrationToken>(); |
| (::windows::core::Interface::vtable(this).Revoked)(::windows::core::Interface::as_raw(this), ::core::mem::transmute_copy(handler), &mut result__).from_abi(result__) |
| } |
| } |
| #[doc = "*Required features: `\"Foundation\"`*"] |
| #[cfg(feature = "Foundation")] |
| pub fn RemoveRevoked(&self, token: super::super::super::Foundation::EventRegistrationToken) -> ::windows::core::Result<()> { |
| let this = self; |
| unsafe { (::windows::core::Interface::vtable(this).RemoveRevoked)(::windows::core::Interface::as_raw(this), token).ok() } |
| } |
| #[doc = "*Required features: `\"Foundation\"`*"] |
| #[cfg(feature = "Foundation")] |
| pub fn RequestExtensionAsync(&self) -> ::windows::core::Result<super::super::super::Foundation::IAsyncOperation<ExtendedExecutionForegroundResult>> { |
| let this = self; |
| unsafe { |
| let mut result__ = ::windows::core::zeroed::<super::super::super::Foundation::IAsyncOperation<ExtendedExecutionForegroundResult>>(); |
| (::windows::core::Interface::vtable(this).RequestExtensionAsync)(::windows::core::Interface::as_raw(this), &mut result__).from_abi(result__) |
| } |
| } |
| pub fn Reason(&self) -> ::windows::core::Result<ExtendedExecutionForegroundReason> { |
| let this = self; |
| unsafe { |
| let mut result__ = ::windows::core::zeroed::<ExtendedExecutionForegroundReason>(); |
| (::windows::core::Interface::vtable(this).Reason)(::windows::core::Interface::as_raw(this), &mut result__).from_abi(result__) |
| } |
| } |
| pub fn SetReason(&self, value: ExtendedExecutionForegroundReason) -> ::windows::core::Result<()> { |
| let this = self; |
| unsafe { (::windows::core::Interface::vtable(this).SetReason)(::windows::core::Interface::as_raw(this), value).ok() } |
| } |
| } |
| impl ::core::cmp::PartialEq for ExtendedExecutionForegroundSession { |
| fn eq(&self, other: &Self) -> bool { |
| self.0 == other.0 |
| } |
| } |
| impl ::core::cmp::Eq for ExtendedExecutionForegroundSession {} |
| impl ::core::fmt::Debug for ExtendedExecutionForegroundSession { |
| fn fmt(&self, f: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result { |
| f.debug_tuple("ExtendedExecutionForegroundSession").field(&self.0).finish() |
| } |
| } |
| impl ::windows::core::RuntimeType for ExtendedExecutionForegroundSession { |
| const SIGNATURE: ::windows::imp::ConstBuffer = ::windows::imp::ConstBuffer::from_slice(b"rc(Windows.ApplicationModel.ExtendedExecution.Foreground.ExtendedExecutionForegroundSession;{fbf440e1-9d10-4201-b01e-c83275296f2e})"); |
| } |
| impl ::core::clone::Clone for ExtendedExecutionForegroundSession { |
| fn clone(&self) -> Self { |
| Self(self.0.clone()) |
| } |
| } |
| unsafe impl ::windows::core::Interface for ExtendedExecutionForegroundSession { |
| type Vtable = IExtendedExecutionForegroundSession_Vtbl; |
| } |
| unsafe impl ::windows::core::ComInterface for ExtendedExecutionForegroundSession { |
| const IID: ::windows::core::GUID = <IExtendedExecutionForegroundSession as ::windows::core::ComInterface>::IID; |
| } |
| impl ::windows::core::RuntimeName for ExtendedExecutionForegroundSession { |
| const NAME: &'static str = "Windows.ApplicationModel.ExtendedExecution.Foreground.ExtendedExecutionForegroundSession"; |
| } |
| ::windows::imp::interface_hierarchy!(ExtendedExecutionForegroundSession, ::windows::core::IUnknown, ::windows::core::IInspectable); |
| #[cfg(feature = "Foundation")] |
| impl ::windows::core::CanTryInto<super::super::super::Foundation::IClosable> for ExtendedExecutionForegroundSession {} |
| unsafe impl ::core::marker::Send for ExtendedExecutionForegroundSession {} |
| unsafe impl ::core::marker::Sync for ExtendedExecutionForegroundSession {} |
| #[doc = "*Required features: `\"ApplicationModel_ExtendedExecution_Foreground\"`*"] |
| #[repr(transparent)] |
| #[derive(::core::cmp::PartialEq, ::core::cmp::Eq)] |
| pub struct ExtendedExecutionForegroundReason(pub i32); |
| impl ExtendedExecutionForegroundReason { |
| pub const Unspecified: Self = Self(0i32); |
| pub const SavingData: Self = Self(1i32); |
| pub const BackgroundAudio: Self = Self(2i32); |
| pub const Unconstrained: Self = Self(3i32); |
| } |
| impl ::core::marker::Copy for ExtendedExecutionForegroundReason {} |
| impl ::core::clone::Clone for ExtendedExecutionForegroundReason { |
| fn clone(&self) -> Self { |
| *self |
| } |
| } |
| impl ::core::default::Default for ExtendedExecutionForegroundReason { |
| fn default() -> Self { |
| Self(0) |
| } |
| } |
| impl ::windows::core::TypeKind for ExtendedExecutionForegroundReason { |
| type TypeKind = ::windows::core::CopyType; |
| } |
| impl ::core::fmt::Debug for ExtendedExecutionForegroundReason { |
| fn fmt(&self, f: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result { |
| f.debug_tuple("ExtendedExecutionForegroundReason").field(&self.0).finish() |
| } |
| } |
| impl ::windows::core::RuntimeType for ExtendedExecutionForegroundReason { |
| const SIGNATURE: ::windows::imp::ConstBuffer = ::windows::imp::ConstBuffer::from_slice(b"enum(Windows.ApplicationModel.ExtendedExecution.Foreground.ExtendedExecutionForegroundReason;i4)"); |
| } |
| #[doc = "*Required features: `\"ApplicationModel_ExtendedExecution_Foreground\"`*"] |
| #[repr(transparent)] |
| #[derive(::core::cmp::PartialEq, ::core::cmp::Eq)] |
| pub struct ExtendedExecutionForegroundResult(pub i32); |
| impl ExtendedExecutionForegroundResult { |
| pub const Allowed: Self = Self(0i32); |
| pub const Denied: Self = Self(1i32); |
| } |
| impl ::core::marker::Copy for ExtendedExecutionForegroundResult {} |
| impl ::core::clone::Clone for ExtendedExecutionForegroundResult { |
| fn clone(&self) -> Self { |
| *self |
| } |
| } |
| impl ::core::default::Default for ExtendedExecutionForegroundResult { |
| fn default() -> Self { |
| Self(0) |
| } |
| } |
| impl ::windows::core::TypeKind for ExtendedExecutionForegroundResult { |
| type TypeKind = ::windows::core::CopyType; |
| } |
| impl ::core::fmt::Debug for ExtendedExecutionForegroundResult { |
| fn fmt(&self, f: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result { |
| f.debug_tuple("ExtendedExecutionForegroundResult").field(&self.0).finish() |
| } |
| } |
| impl ::windows::core::RuntimeType for ExtendedExecutionForegroundResult { |
| const SIGNATURE: ::windows::imp::ConstBuffer = ::windows::imp::ConstBuffer::from_slice(b"enum(Windows.ApplicationModel.ExtendedExecution.Foreground.ExtendedExecutionForegroundResult;i4)"); |
| } |
| #[doc = "*Required features: `\"ApplicationModel_ExtendedExecution_Foreground\"`*"] |
| #[repr(transparent)] |
| #[derive(::core::cmp::PartialEq, ::core::cmp::Eq)] |
| pub struct ExtendedExecutionForegroundRevokedReason(pub i32); |
| impl ExtendedExecutionForegroundRevokedReason { |
| pub const Resumed: Self = Self(0i32); |
| pub const SystemPolicy: Self = Self(1i32); |
| } |
| impl ::core::marker::Copy for ExtendedExecutionForegroundRevokedReason {} |
| impl ::core::clone::Clone for ExtendedExecutionForegroundRevokedReason { |
| fn clone(&self) -> Self { |
| *self |
| } |
| } |
| impl ::core::default::Default for ExtendedExecutionForegroundRevokedReason { |
| fn default() -> Self { |
| Self(0) |
| } |
| } |
| impl ::windows::core::TypeKind for ExtendedExecutionForegroundRevokedReason { |
| type TypeKind = ::windows::core::CopyType; |
| } |
| impl ::core::fmt::Debug for ExtendedExecutionForegroundRevokedReason { |
| fn fmt(&self, f: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result { |
| f.debug_tuple("ExtendedExecutionForegroundRevokedReason").field(&self.0).finish() |
| } |
| } |
| impl ::windows::core::RuntimeType for ExtendedExecutionForegroundRevokedReason { |
| const SIGNATURE: ::windows::imp::ConstBuffer = ::windows::imp::ConstBuffer::from_slice(b"enum(Windows.ApplicationModel.ExtendedExecution.Foreground.ExtendedExecutionForegroundRevokedReason;i4)"); |
| } |
| #[cfg(feature = "implement")] |
| ::core::include!("impl.rs"); |