]> git.proxmox.com Git - rustc.git/blob - vendor/windows/src/Windows/UI/WindowManagement/Preview/mod.rs
New upstream version 1.70.0+dfsg1
[rustc.git] / vendor / windows / src / Windows / UI / WindowManagement / Preview / mod.rs
1 #[doc(hidden)]
2 #[repr(transparent)]
3 pub struct IWindowManagementPreview(::windows::core::IUnknown);
4 unsafe impl ::windows::core::Interface for IWindowManagementPreview {
5 type Vtable = IWindowManagementPreview_Vtbl;
6 }
7 impl ::core::clone::Clone for IWindowManagementPreview {
8 fn clone(&self) -> Self {
9 Self(self.0.clone())
10 }
11 }
12 unsafe impl ::windows::core::ComInterface for IWindowManagementPreview {
13 const IID: ::windows::core::GUID = ::windows::core::GUID::from_u128(0x4ef55b0d_561d_513c_a67c_2c02b69cef41);
14 }
15 #[repr(C)]
16 #[doc(hidden)]
17 pub struct IWindowManagementPreview_Vtbl {
18 pub base__: ::windows::core::IInspectable_Vtbl,
19 }
20 #[doc(hidden)]
21 #[repr(transparent)]
22 pub struct IWindowManagementPreviewStatics(::windows::core::IUnknown);
23 unsafe impl ::windows::core::Interface for IWindowManagementPreviewStatics {
24 type Vtable = IWindowManagementPreviewStatics_Vtbl;
25 }
26 impl ::core::clone::Clone for IWindowManagementPreviewStatics {
27 fn clone(&self) -> Self {
28 Self(self.0.clone())
29 }
30 }
31 unsafe impl ::windows::core::ComInterface for IWindowManagementPreviewStatics {
32 const IID: ::windows::core::GUID = ::windows::core::GUID::from_u128(0x0f9725c6_c004_5a23_8fd2_8d092ce2704a);
33 }
34 #[repr(C)]
35 #[doc(hidden)]
36 pub struct IWindowManagementPreviewStatics_Vtbl {
37 pub base__: ::windows::core::IInspectable_Vtbl,
38 #[cfg(feature = "Foundation")]
39 pub SetPreferredMinSize: unsafe extern "system" fn(this: *mut ::core::ffi::c_void, window: *mut ::core::ffi::c_void, preferredframeminsize: super::super::super::Foundation::Size) -> ::windows::core::HRESULT,
40 #[cfg(not(feature = "Foundation"))]
41 SetPreferredMinSize: usize,
42 }
43 #[doc = "*Required features: `\"UI_WindowManagement_Preview\"`*"]
44 #[repr(transparent)]
45 pub struct WindowManagementPreview(::windows::core::IUnknown);
46 impl WindowManagementPreview {
47 #[doc = "*Required features: `\"Foundation\"`*"]
48 #[cfg(feature = "Foundation")]
49 pub fn SetPreferredMinSize(window: &super::AppWindow, preferredframeminsize: super::super::super::Foundation::Size) -> ::windows::core::Result<()> {
50 Self::IWindowManagementPreviewStatics(|this| unsafe { (::windows::core::Interface::vtable(this).SetPreferredMinSize)(::windows::core::Interface::as_raw(this), ::core::mem::transmute_copy(window), preferredframeminsize).ok() })
51 }
52 #[doc(hidden)]
53 pub fn IWindowManagementPreviewStatics<R, F: FnOnce(&IWindowManagementPreviewStatics) -> ::windows::core::Result<R>>(callback: F) -> ::windows::core::Result<R> {
54 static SHARED: ::windows::imp::FactoryCache<WindowManagementPreview, IWindowManagementPreviewStatics> = ::windows::imp::FactoryCache::new();
55 SHARED.call(callback)
56 }
57 }
58 impl ::core::cmp::PartialEq for WindowManagementPreview {
59 fn eq(&self, other: &Self) -> bool {
60 self.0 == other.0
61 }
62 }
63 impl ::core::cmp::Eq for WindowManagementPreview {}
64 impl ::core::fmt::Debug for WindowManagementPreview {
65 fn fmt(&self, f: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result {
66 f.debug_tuple("WindowManagementPreview").field(&self.0).finish()
67 }
68 }
69 impl ::windows::core::RuntimeType for WindowManagementPreview {
70 const SIGNATURE: ::windows::imp::ConstBuffer = ::windows::imp::ConstBuffer::from_slice(b"rc(Windows.UI.WindowManagement.Preview.WindowManagementPreview;{4ef55b0d-561d-513c-a67c-2c02b69cef41})");
71 }
72 impl ::core::clone::Clone for WindowManagementPreview {
73 fn clone(&self) -> Self {
74 Self(self.0.clone())
75 }
76 }
77 unsafe impl ::windows::core::Interface for WindowManagementPreview {
78 type Vtable = IWindowManagementPreview_Vtbl;
79 }
80 unsafe impl ::windows::core::ComInterface for WindowManagementPreview {
81 const IID: ::windows::core::GUID = <IWindowManagementPreview as ::windows::core::ComInterface>::IID;
82 }
83 impl ::windows::core::RuntimeName for WindowManagementPreview {
84 const NAME: &'static str = "Windows.UI.WindowManagement.Preview.WindowManagementPreview";
85 }
86 ::windows::imp::interface_hierarchy!(WindowManagementPreview, ::windows::core::IUnknown, ::windows::core::IInspectable);
87 unsafe impl ::core::marker::Send for WindowManagementPreview {}
88 unsafe impl ::core::marker::Sync for WindowManagementPreview {}
89 #[cfg(feature = "implement")]
90 ::core::include!("impl.rs");