]> git.proxmox.com Git - rustc.git/blob - vendor/windows/src/Windows/UI/Input/Preview/mod.rs
New upstream version 1.70.0+dfsg1
[rustc.git] / vendor / windows / src / Windows / UI / Input / Preview / mod.rs
1 #[cfg(feature = "UI_Input_Preview_Injection")]
2 pub mod Injection;
3 #[doc(hidden)]
4 #[repr(transparent)]
5 pub struct IInputActivationListenerPreviewStatics(::windows::core::IUnknown);
6 unsafe impl ::windows::core::Interface for IInputActivationListenerPreviewStatics {
7 type Vtable = IInputActivationListenerPreviewStatics_Vtbl;
8 }
9 impl ::core::clone::Clone for IInputActivationListenerPreviewStatics {
10 fn clone(&self) -> Self {
11 Self(self.0.clone())
12 }
13 }
14 unsafe impl ::windows::core::ComInterface for IInputActivationListenerPreviewStatics {
15 const IID: ::windows::core::GUID = ::windows::core::GUID::from_u128(0xf0551ce5_0de6_5be0_a589_f737201a4582);
16 }
17 #[repr(C)]
18 #[doc(hidden)]
19 pub struct IInputActivationListenerPreviewStatics_Vtbl {
20 pub base__: ::windows::core::IInspectable_Vtbl,
21 #[cfg(feature = "UI_WindowManagement")]
22 pub CreateForApplicationWindow: unsafe extern "system" fn(this: *mut ::core::ffi::c_void, window: *mut ::core::ffi::c_void, result__: *mut *mut ::core::ffi::c_void) -> ::windows::core::HRESULT,
23 #[cfg(not(feature = "UI_WindowManagement"))]
24 CreateForApplicationWindow: usize,
25 }
26 #[doc = "*Required features: `\"UI_Input_Preview\"`*"]
27 pub struct InputActivationListenerPreview;
28 impl InputActivationListenerPreview {
29 #[doc = "*Required features: `\"UI_WindowManagement\"`*"]
30 #[cfg(feature = "UI_WindowManagement")]
31 pub fn CreateForApplicationWindow(window: &super::super::WindowManagement::AppWindow) -> ::windows::core::Result<super::InputActivationListener> {
32 Self::IInputActivationListenerPreviewStatics(|this| unsafe {
33 let mut result__ = ::windows::core::zeroed::<super::InputActivationListener>();
34 (::windows::core::Interface::vtable(this).CreateForApplicationWindow)(::windows::core::Interface::as_raw(this), ::core::mem::transmute_copy(window), &mut result__).from_abi(result__)
35 })
36 }
37 #[doc(hidden)]
38 pub fn IInputActivationListenerPreviewStatics<R, F: FnOnce(&IInputActivationListenerPreviewStatics) -> ::windows::core::Result<R>>(callback: F) -> ::windows::core::Result<R> {
39 static SHARED: ::windows::imp::FactoryCache<InputActivationListenerPreview, IInputActivationListenerPreviewStatics> = ::windows::imp::FactoryCache::new();
40 SHARED.call(callback)
41 }
42 }
43 impl ::windows::core::RuntimeName for InputActivationListenerPreview {
44 const NAME: &'static str = "Windows.UI.Input.Preview.InputActivationListenerPreview";
45 }
46 #[cfg(feature = "implement")]
47 ::core::include!("impl.rs");