]> git.proxmox.com Git - rustc.git/blame - vendor/windows/src/Windows/Phone/System/mod.rs
New upstream version 1.70.0+dfsg1
[rustc.git] / vendor / windows / src / Windows / Phone / System / mod.rs
CommitLineData
353b0b11
FG
1#[cfg(feature = "Phone_System_Power")]
2pub mod Power;
3#[cfg(feature = "Phone_System_Profile")]
4pub mod Profile;
5#[cfg(feature = "Phone_System_UserProfile")]
6pub mod UserProfile;
7#[doc(hidden)]
8#[repr(transparent)]
9pub struct ISystemProtectionStatics(::windows::core::IUnknown);
10unsafe impl ::windows::core::Interface for ISystemProtectionStatics {
11 type Vtable = ISystemProtectionStatics_Vtbl;
12}
13impl ::core::clone::Clone for ISystemProtectionStatics {
14 fn clone(&self) -> Self {
15 Self(self.0.clone())
16 }
17}
18unsafe impl ::windows::core::ComInterface for ISystemProtectionStatics {
19 const IID: ::windows::core::GUID = ::windows::core::GUID::from_u128(0x49c36560_97e1_4d99_8bfb_befeaa6ace6d);
20}
21#[repr(C)]
22#[doc(hidden)]
23pub struct ISystemProtectionStatics_Vtbl {
24 pub base__: ::windows::core::IInspectable_Vtbl,
25 pub ScreenLocked: unsafe extern "system" fn(this: *mut ::core::ffi::c_void, result__: *mut bool) -> ::windows::core::HRESULT,
26}
27#[doc(hidden)]
28#[repr(transparent)]
29pub struct ISystemProtectionUnlockStatics(::windows::core::IUnknown);
30unsafe impl ::windows::core::Interface for ISystemProtectionUnlockStatics {
31 type Vtable = ISystemProtectionUnlockStatics_Vtbl;
32}
33impl ::core::clone::Clone for ISystemProtectionUnlockStatics {
34 fn clone(&self) -> Self {
35 Self(self.0.clone())
36 }
37}
38unsafe impl ::windows::core::ComInterface for ISystemProtectionUnlockStatics {
39 const IID: ::windows::core::GUID = ::windows::core::GUID::from_u128(0x0692fa3f_8f11_4c4b_aa0d_87d7af7b1779);
40}
41#[repr(C)]
42#[doc(hidden)]
43pub struct ISystemProtectionUnlockStatics_Vtbl {
44 pub base__: ::windows::core::IInspectable_Vtbl,
45 pub RequestScreenUnlock: unsafe extern "system" fn(this: *mut ::core::ffi::c_void) -> ::windows::core::HRESULT,
46}
47#[doc = "*Required features: `\"Phone_System\"`*"]
48pub struct SystemProtection;
49impl SystemProtection {
50 pub fn ScreenLocked() -> ::windows::core::Result<bool> {
51 Self::ISystemProtectionStatics(|this| unsafe {
52 let mut result__ = ::windows::core::zeroed::<bool>();
53 (::windows::core::Interface::vtable(this).ScreenLocked)(::windows::core::Interface::as_raw(this), &mut result__).from_abi(result__)
54 })
55 }
56 pub fn RequestScreenUnlock() -> ::windows::core::Result<()> {
57 Self::ISystemProtectionUnlockStatics(|this| unsafe { (::windows::core::Interface::vtable(this).RequestScreenUnlock)(::windows::core::Interface::as_raw(this)).ok() })
58 }
59 #[doc(hidden)]
60 pub fn ISystemProtectionStatics<R, F: FnOnce(&ISystemProtectionStatics) -> ::windows::core::Result<R>>(callback: F) -> ::windows::core::Result<R> {
61 static SHARED: ::windows::imp::FactoryCache<SystemProtection, ISystemProtectionStatics> = ::windows::imp::FactoryCache::new();
62 SHARED.call(callback)
63 }
64 #[doc(hidden)]
65 pub fn ISystemProtectionUnlockStatics<R, F: FnOnce(&ISystemProtectionUnlockStatics) -> ::windows::core::Result<R>>(callback: F) -> ::windows::core::Result<R> {
66 static SHARED: ::windows::imp::FactoryCache<SystemProtection, ISystemProtectionUnlockStatics> = ::windows::imp::FactoryCache::new();
67 SHARED.call(callback)
68 }
69}
70impl ::windows::core::RuntimeName for SystemProtection {
71 const NAME: &'static str = "Windows.Phone.System.SystemProtection";
72}
73#[cfg(feature = "implement")]
74::core::include!("impl.rs");