]> git.proxmox.com Git - rustc.git/blob - vendor/windows/src/Windows/Win32/System/Com/UI/impl.rs
New upstream version 1.70.0+dfsg1
[rustc.git] / vendor / windows / src / Windows / Win32 / System / Com / UI / impl.rs
1 #[doc = "*Required features: `\"Win32_System_Com_UI\"`, `\"Win32_Graphics_Gdi\"`, `\"Win32_UI_WindowsAndMessaging\"`, `\"implement\"`*"]
2 #[cfg(all(feature = "Win32_Graphics_Gdi", feature = "Win32_UI_WindowsAndMessaging"))]
3 pub trait IDummyHICONIncluder_Impl: Sized {
4 fn Dummy(&self, h1: super::super::super::UI::WindowsAndMessaging::HICON, h2: super::super::super::Graphics::Gdi::HDC) -> ::windows::core::Result<()>;
5 }
6 #[cfg(all(feature = "Win32_Graphics_Gdi", feature = "Win32_UI_WindowsAndMessaging"))]
7 impl ::windows::core::RuntimeName for IDummyHICONIncluder {}
8 #[cfg(all(feature = "Win32_Graphics_Gdi", feature = "Win32_UI_WindowsAndMessaging"))]
9 impl IDummyHICONIncluder_Vtbl {
10 pub const fn new<Identity: ::windows::core::IUnknownImpl<Impl = Impl>, Impl: IDummyHICONIncluder_Impl, const OFFSET: isize>() -> IDummyHICONIncluder_Vtbl {
11 unsafe extern "system" fn Dummy<Identity: ::windows::core::IUnknownImpl<Impl = Impl>, Impl: IDummyHICONIncluder_Impl, const OFFSET: isize>(this: *mut ::core::ffi::c_void, h1: super::super::super::UI::WindowsAndMessaging::HICON, h2: super::super::super::Graphics::Gdi::HDC) -> ::windows::core::HRESULT {
12 let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
13 let this = (*this).get_impl();
14 this.Dummy(::core::mem::transmute_copy(&h1), ::core::mem::transmute_copy(&h2)).into()
15 }
16 Self { base__: ::windows::core::IUnknown_Vtbl::new::<Identity, OFFSET>(), Dummy: Dummy::<Identity, Impl, OFFSET> }
17 }
18 pub fn matches(iid: &windows::core::GUID) -> bool {
19 iid == &<IDummyHICONIncluder as ::windows::core::ComInterface>::IID
20 }
21 }
22 #[doc = "*Required features: `\"Win32_System_Com_UI\"`, `\"Win32_Graphics_Gdi\"`, `\"Win32_System_Com_StructuredStorage\"`, `\"implement\"`*"]
23 #[cfg(all(feature = "Win32_Graphics_Gdi", feature = "Win32_System_Com_StructuredStorage"))]
24 pub trait IThumbnailExtractor_Impl: Sized {
25 fn ExtractThumbnail(&self, pstg: ::core::option::Option<&super::StructuredStorage::IStorage>, ullength: u32, ulheight: u32, puloutputlength: *mut u32, puloutputheight: *mut u32, phoutputbitmap: *mut super::super::super::Graphics::Gdi::HBITMAP) -> ::windows::core::Result<()>;
26 fn OnFileUpdated(&self, pstg: ::core::option::Option<&super::StructuredStorage::IStorage>) -> ::windows::core::Result<()>;
27 }
28 #[cfg(all(feature = "Win32_Graphics_Gdi", feature = "Win32_System_Com_StructuredStorage"))]
29 impl ::windows::core::RuntimeName for IThumbnailExtractor {}
30 #[cfg(all(feature = "Win32_Graphics_Gdi", feature = "Win32_System_Com_StructuredStorage"))]
31 impl IThumbnailExtractor_Vtbl {
32 pub const fn new<Identity: ::windows::core::IUnknownImpl<Impl = Impl>, Impl: IThumbnailExtractor_Impl, const OFFSET: isize>() -> IThumbnailExtractor_Vtbl {
33 unsafe extern "system" fn ExtractThumbnail<Identity: ::windows::core::IUnknownImpl<Impl = Impl>, Impl: IThumbnailExtractor_Impl, const OFFSET: isize>(this: *mut ::core::ffi::c_void, pstg: *mut ::core::ffi::c_void, ullength: u32, ulheight: u32, puloutputlength: *mut u32, puloutputheight: *mut u32, phoutputbitmap: *mut super::super::super::Graphics::Gdi::HBITMAP) -> ::windows::core::HRESULT {
34 let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
35 let this = (*this).get_impl();
36 this.ExtractThumbnail(::windows::core::from_raw_borrowed(&pstg), ::core::mem::transmute_copy(&ullength), ::core::mem::transmute_copy(&ulheight), ::core::mem::transmute_copy(&puloutputlength), ::core::mem::transmute_copy(&puloutputheight), ::core::mem::transmute_copy(&phoutputbitmap)).into()
37 }
38 unsafe extern "system" fn OnFileUpdated<Identity: ::windows::core::IUnknownImpl<Impl = Impl>, Impl: IThumbnailExtractor_Impl, const OFFSET: isize>(this: *mut ::core::ffi::c_void, pstg: *mut ::core::ffi::c_void) -> ::windows::core::HRESULT {
39 let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
40 let this = (*this).get_impl();
41 this.OnFileUpdated(::windows::core::from_raw_borrowed(&pstg)).into()
42 }
43 Self {
44 base__: ::windows::core::IUnknown_Vtbl::new::<Identity, OFFSET>(),
45 ExtractThumbnail: ExtractThumbnail::<Identity, Impl, OFFSET>,
46 OnFileUpdated: OnFileUpdated::<Identity, Impl, OFFSET>,
47 }
48 }
49 pub fn matches(iid: &windows::core::GUID) -> bool {
50 iid == &<IThumbnailExtractor as ::windows::core::ComInterface>::IID
51 }
52 }