OSDN Git Service

行を生成するメソッドをLineToIndexTableに移動した
[fooeditengine/FooEditEngine.git] / Metro / FooEditEngine / Print / ComInterface.cs
1 /*
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.
5
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.
8
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/>.
10  */
11 using System;
12 using System.Collections.Generic;
13 using System.Linq;
14 using System.Text;
15 using System.Threading.Tasks;
16 using System.Security;
17 using System.Runtime.InteropServices;
18
19 namespace FooEditEngine
20 {
21     [ComImport]
22     [InterfaceType(ComInterfaceType.InterfaceIsIUnknown)]
23     [Guid("1b8efec4-3019-4c27-964e-367202156906")]
24     [SecurityCritical]
25     interface IPrintDocumentPackageTarget
26     {
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);
29         void Cancel();
30         
31     };
32
33     [ComImport]
34     [InterfaceType(ComInterfaceType.InterfaceIsIUnknown)]
35     [Guid("0b31cc62-d7ec-4747-9d6e-f2537d870f2b")]
36     [SecurityCritical]
37     interface IPrintPreviewPageCollection
38     {
39         void Paginate(
40             [In] UInt32 currentJobPage,
41             [In, MarshalAs(UnmanagedType.Interface)] object printTaskOptions);
42         void MakePage(
43             [In] UInt32 desiredJobPage,
44             [In] float width,
45             [In]float height);
46         
47     };
48
49     [ComImport]
50     [InterfaceType(ComInterfaceType.InterfaceIsIUnknown)]
51     [Guid("a96bb1db-172e-4667-82b5-ad97a252318f")]
52     [SecurityCritical]
53     interface IPrintDocumentPageSource
54     {
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);
57     }
58
59     enum PageCountType
60     {
61         FinalPageCount  = 0,
62         IntermediatePageCount   = 1 
63     };
64
65     [ComImport]
66     [InterfaceType(ComInterfaceType.InterfaceIsIUnknown)]
67     [Guid("1a6dd0ad-1e2a-4e99-a5ba-91f17818290e")]  //IID_PREVIEWPACKAGETARGET_DXGIと同じ
68     [SecurityCritical]
69     interface IPrintPreviewDxgiPackageTarget
70     {
71         void SetJobPageCount( 
72             [In] PageCountType countType,
73             UInt32 count);
74
75         void DrawPage( 
76             [In]UInt32 jobPageNumber,
77             [In] IntPtr dxgiSurface,
78             float dpiX,
79             float dpiY);
80         
81         void InvalidatePreview();
82         
83     };
84
85     static class PreviewPackageIds
86     {
87         public static string IID_PREVIEWPACKAGETARGET_DXGI = "1a6dd0ad-1e2a-4e99-a5ba-91f17818290e";
88     }
89 }