]> git.proxmox.com Git - rustc.git/blame - vendor/windows/src/Windows/Win32/System/WinRT/Pdf/impl.rs
New upstream version 1.70.0+dfsg1
[rustc.git] / vendor / windows / src / Windows / Win32 / System / WinRT / Pdf / impl.rs
CommitLineData
353b0b11
FG
1#[doc = "*Required features: `\"Win32_System_WinRT_Pdf\"`, `\"Win32_Foundation\"`, `\"Win32_Graphics_Direct2D_Common\"`, `\"Win32_Graphics_Dxgi\"`, `\"implement\"`*"]
2#[cfg(all(feature = "Win32_Foundation", feature = "Win32_Graphics_Direct2D_Common", feature = "Win32_Graphics_Dxgi"))]
3pub trait IPdfRendererNative_Impl: Sized {
4 fn RenderPageToSurface(&self, pdfpage: ::core::option::Option<&::windows::core::IUnknown>, psurface: ::core::option::Option<&super::super::super::Graphics::Dxgi::IDXGISurface>, offset: &super::super::super::Foundation::POINT, prenderparams: *const PDF_RENDER_PARAMS) -> ::windows::core::Result<()>;
5 fn RenderPageToDeviceContext(&self, pdfpage: ::core::option::Option<&::windows::core::IUnknown>, pd2ddevicecontext: ::core::option::Option<&super::super::super::Graphics::Direct2D::ID2D1DeviceContext>, prenderparams: *const PDF_RENDER_PARAMS) -> ::windows::core::Result<()>;
6}
7#[cfg(all(feature = "Win32_Foundation", feature = "Win32_Graphics_Direct2D_Common", feature = "Win32_Graphics_Dxgi"))]
8impl ::windows::core::RuntimeName for IPdfRendererNative {}
9#[cfg(all(feature = "Win32_Foundation", feature = "Win32_Graphics_Direct2D_Common", feature = "Win32_Graphics_Dxgi"))]
10impl IPdfRendererNative_Vtbl {
11 pub const fn new<Identity: ::windows::core::IUnknownImpl<Impl = Impl>, Impl: IPdfRendererNative_Impl, const OFFSET: isize>() -> IPdfRendererNative_Vtbl {
12 unsafe extern "system" fn RenderPageToSurface<Identity: ::windows::core::IUnknownImpl<Impl = Impl>, Impl: IPdfRendererNative_Impl, const OFFSET: isize>(this: *mut ::core::ffi::c_void, pdfpage: *mut ::core::ffi::c_void, psurface: *mut ::core::ffi::c_void, offset: super::super::super::Foundation::POINT, prenderparams: *const PDF_RENDER_PARAMS) -> ::windows::core::HRESULT {
13 let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
14 let this = (*this).get_impl();
15 this.RenderPageToSurface(::windows::core::from_raw_borrowed(&pdfpage), ::windows::core::from_raw_borrowed(&psurface), ::core::mem::transmute(&offset), ::core::mem::transmute_copy(&prenderparams)).into()
16 }
17 unsafe extern "system" fn RenderPageToDeviceContext<Identity: ::windows::core::IUnknownImpl<Impl = Impl>, Impl: IPdfRendererNative_Impl, const OFFSET: isize>(this: *mut ::core::ffi::c_void, pdfpage: *mut ::core::ffi::c_void, pd2ddevicecontext: *mut ::core::ffi::c_void, prenderparams: *const PDF_RENDER_PARAMS) -> ::windows::core::HRESULT {
18 let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
19 let this = (*this).get_impl();
20 this.RenderPageToDeviceContext(::windows::core::from_raw_borrowed(&pdfpage), ::windows::core::from_raw_borrowed(&pd2ddevicecontext), ::core::mem::transmute_copy(&prenderparams)).into()
21 }
22 Self {
23 base__: ::windows::core::IUnknown_Vtbl::new::<Identity, OFFSET>(),
24 RenderPageToSurface: RenderPageToSurface::<Identity, Impl, OFFSET>,
25 RenderPageToDeviceContext: RenderPageToDeviceContext::<Identity, Impl, OFFSET>,
26 }
27 }
28 pub fn matches(iid: &windows::core::GUID) -> bool {
29 iid == &<IPdfRendererNative as ::windows::core::ComInterface>::IID
30 }
31}