2 * Copyright (C) 2013 FooProject
3 * * This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by
4 * the Free Software Foundation; either version 3 of the License, or (at your option) any later version.
6 * This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of
7 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.
9 You should have received a copy of the GNU General Public License along with this program. If not, see <http://www.gnu.org/licenses/>.
12 using System.Collections.Generic;
15 using System.Threading.Tasks;
16 using System.Security;
17 using System.Runtime.InteropServices;
19 namespace FooEditEngine
22 [InterfaceType(ComInterfaceType.InterfaceIsIUnknown)]
23 [Guid("1b8efec4-3019-4c27-964e-367202156906")]
25 interface IPrintDocumentPackageTarget
27 void GetPackageTargetTypes([Out] out UInt32 targetCount, [Out] out Guid targetTypes);
28 void GetPackageTarget([In]ref Guid guidTargetType,[In]ref Guid riid,[Out] out IntPtr ppvTarget);
34 [InterfaceType(ComInterfaceType.InterfaceIsIUnknown)]
35 [Guid("0b31cc62-d7ec-4747-9d6e-f2537d870f2b")]
37 interface IPrintPreviewPageCollection
40 [In] UInt32 currentJobPage,
41 [In, MarshalAs(UnmanagedType.Interface)] object printTaskOptions);
43 [In] UInt32 desiredJobPage,
50 [InterfaceType(ComInterfaceType.InterfaceIsIUnknown)]
51 [Guid("a96bb1db-172e-4667-82b5-ad97a252318f")]
53 interface IPrintDocumentPageSource
55 void GetPreviewPageCollection([In, MarshalAs(UnmanagedType.Interface)]IPrintDocumentPackageTarget docPackageTarget, [Out, MarshalAs(UnmanagedType.Interface)] out IPrintPreviewPageCollection docPageCollection);
56 void MakeDocument([In, MarshalAs(UnmanagedType.Interface)] object printTaskOptions, [In, MarshalAs(UnmanagedType.Interface)]IPrintDocumentPackageTarget docPackageTarget);
62 IntermediatePageCount = 1
66 [InterfaceType(ComInterfaceType.InterfaceIsIUnknown)]
67 [Guid("1a6dd0ad-1e2a-4e99-a5ba-91f17818290e")] //IID_PREVIEWPACKAGETARGET_DXGIと同じ
69 interface IPrintPreviewDxgiPackageTarget
72 [In] PageCountType countType,
76 [In]UInt32 jobPageNumber,
77 [In] IntPtr dxgiSurface,
81 void InvalidatePreview();
85 static class PreviewPackageIds
87 public static string IID_PREVIEWPACKAGETARGET_DXGI = "1a6dd0ad-1e2a-4e99-a5ba-91f17818290e";