]> git.proxmox.com Git - rustc.git/blob - vendor/windows/src/Windows/Perception/Automation/Core/mod.rs
New upstream version 1.70.0+dfsg1
[rustc.git] / vendor / windows / src / Windows / Perception / Automation / Core / mod.rs
1 #[doc(hidden)]
2 #[repr(transparent)]
3 pub struct ICorePerceptionAutomationStatics(::windows::core::IUnknown);
4 unsafe impl ::windows::core::Interface for ICorePerceptionAutomationStatics {
5 type Vtable = ICorePerceptionAutomationStatics_Vtbl;
6 }
7 impl ::core::clone::Clone for ICorePerceptionAutomationStatics {
8 fn clone(&self) -> Self {
9 Self(self.0.clone())
10 }
11 }
12 unsafe impl ::windows::core::ComInterface for ICorePerceptionAutomationStatics {
13 const IID: ::windows::core::GUID = ::windows::core::GUID::from_u128(0x0bb04541_4ce2_4923_9a76_8187ecc59112);
14 }
15 #[repr(C)]
16 #[doc(hidden)]
17 pub struct ICorePerceptionAutomationStatics_Vtbl {
18 pub base__: ::windows::core::IInspectable_Vtbl,
19 #[cfg(feature = "Foundation")]
20 pub SetActivationFactoryProvider: unsafe extern "system" fn(this: *mut ::core::ffi::c_void, provider: *mut ::core::ffi::c_void) -> ::windows::core::HRESULT,
21 #[cfg(not(feature = "Foundation"))]
22 SetActivationFactoryProvider: usize,
23 }
24 #[doc = "*Required features: `\"Perception_Automation_Core\"`*"]
25 pub struct CorePerceptionAutomation;
26 impl CorePerceptionAutomation {
27 #[doc = "*Required features: `\"Foundation\"`*"]
28 #[cfg(feature = "Foundation")]
29 pub fn SetActivationFactoryProvider<P0>(provider: P0) -> ::windows::core::Result<()>
30 where
31 P0: ::windows::core::TryIntoParam<super::super::super::Foundation::IGetActivationFactory>,
32 {
33 Self::ICorePerceptionAutomationStatics(|this| unsafe { (::windows::core::Interface::vtable(this).SetActivationFactoryProvider)(::windows::core::Interface::as_raw(this), provider.try_into_param()?.abi()).ok() })
34 }
35 #[doc(hidden)]
36 pub fn ICorePerceptionAutomationStatics<R, F: FnOnce(&ICorePerceptionAutomationStatics) -> ::windows::core::Result<R>>(callback: F) -> ::windows::core::Result<R> {
37 static SHARED: ::windows::imp::FactoryCache<CorePerceptionAutomation, ICorePerceptionAutomationStatics> = ::windows::imp::FactoryCache::new();
38 SHARED.call(callback)
39 }
40 }
41 impl ::windows::core::RuntimeName for CorePerceptionAutomation {
42 const NAME: &'static str = "Windows.Perception.Automation.Core.CorePerceptionAutomation";
43 }
44 #[cfg(feature = "implement")]
45 ::core::include!("impl.rs");