1 | /*
|
---|
2 | * Copyright (C) 1999 Paul Quinn
|
---|
3 | * Copyright (C) 2003 Alexandre Julliard
|
---|
4 | *
|
---|
5 | * This library is free software; you can redistribute it and/or
|
---|
6 | * modify it under the terms of the GNU Lesser General Public
|
---|
7 | * License as published by the Free Software Foundation; either
|
---|
8 | * version 2.1 of the License, or (at your option) any later version.
|
---|
9 | *
|
---|
10 | * This library is distributed in the hope that it will be useful,
|
---|
11 | * but WITHOUT ANY WARRANTY; without even the implied warranty of
|
---|
12 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
---|
13 | * Lesser General Public License for more details.
|
---|
14 | *
|
---|
15 | * You should have received a copy of the GNU Lesser General Public
|
---|
16 | * License along with this library; if not, write to the Free Software
|
---|
17 | * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
|
---|
18 | */
|
---|
19 |
|
---|
20 | /*
|
---|
21 | * Oracle LGPL Disclaimer: For the avoidance of doubt, except that if any license choice
|
---|
22 | * other than GPL or LGPL is available it will apply instead, Oracle elects to use only
|
---|
23 | * the Lesser General Public License version 2.1 (LGPLv2) at this time for any software where
|
---|
24 | * a choice of LGPL license versions is made available with the language indicating
|
---|
25 | * that LGPLv2 or any later version may be used, or where a choice of which version
|
---|
26 | * of the LGPL is applied is otherwise unspecified.
|
---|
27 | */
|
---|
28 |
|
---|
29 | import "ocidl.idl";
|
---|
30 | import "objidl.idl";
|
---|
31 | import "oleidl.idl";
|
---|
32 | import "oaidl.idl";
|
---|
33 | import "servprov.idl";
|
---|
34 |
|
---|
35 |
|
---|
36 | interface IOleDocumentView;
|
---|
37 | interface IEnumOleDocumentViews;
|
---|
38 |
|
---|
39 |
|
---|
40 | /*****************************************************************************
|
---|
41 | * IOleDocument interface
|
---|
42 | */
|
---|
43 | [
|
---|
44 | object,
|
---|
45 | uuid(b722bcc5-4e68-101b-a2bc-00aa00404770),
|
---|
46 | pointer_default(unique)
|
---|
47 | ]
|
---|
48 | interface IOleDocument : IUnknown
|
---|
49 | {
|
---|
50 | typedef [unique] IOleDocument *LPOLEDOCUMENT;
|
---|
51 |
|
---|
52 | typedef enum
|
---|
53 | {
|
---|
54 | DOCMISC_CANCREATEMULTIPLEVIEWS = 1,
|
---|
55 | DOCMISC_SUPPORTCOMPLEXRECTANGLES = 2,
|
---|
56 | DOCMISC_CANTOPENEDIT = 4,
|
---|
57 | DOCMISC_NOFILESUPPORT = 8
|
---|
58 | } DOCMISC;
|
---|
59 |
|
---|
60 | HRESULT CreateView(
|
---|
61 | [in, unique] IOleInPlaceSite *pIPSite,
|
---|
62 | [in, unique] IStream *pstm,
|
---|
63 | [in] DWORD dwReserved,
|
---|
64 | [out] IOleDocumentView **ppView);
|
---|
65 |
|
---|
66 | HRESULT GetDocMiscStatus(
|
---|
67 | [out] DWORD *pdwStatus);
|
---|
68 |
|
---|
69 | HRESULT EnumViews(
|
---|
70 | [out] IEnumOleDocumentViews **ppEnum,
|
---|
71 | [out] IOleDocumentView **ppView);
|
---|
72 | }
|
---|
73 |
|
---|
74 |
|
---|
75 | /*****************************************************************************
|
---|
76 | * IOleDocumentSite interface
|
---|
77 | */
|
---|
78 | [
|
---|
79 | object,
|
---|
80 | uuid(b722bcc7-4e68-101b-a2bc-00aa00404770),
|
---|
81 | pointer_default(unique)
|
---|
82 | ]
|
---|
83 | interface IOleDocumentSite : IUnknown
|
---|
84 | {
|
---|
85 | typedef [unique] IOleDocumentSite *LPOLEDOCUMENTSITE;
|
---|
86 |
|
---|
87 | HRESULT ActivateMe( [in] IOleDocumentView *pViewToActivate );
|
---|
88 | }
|
---|
89 |
|
---|
90 |
|
---|
91 | /*****************************************************************************
|
---|
92 | * IOleDocumentView interface
|
---|
93 | */
|
---|
94 | [
|
---|
95 | object,
|
---|
96 | uuid(b722bcc6-4e68-101b-a2bc-00aa00404770),
|
---|
97 | pointer_default(unique)
|
---|
98 | ]
|
---|
99 | interface IOleDocumentView : IUnknown
|
---|
100 | {
|
---|
101 | typedef [unique] IOleDocumentView *LPOLEDOCUMENTVIEW;
|
---|
102 |
|
---|
103 | HRESULT SetInPlaceSite( [in, unique] IOleInPlaceSite *pIPSite );
|
---|
104 |
|
---|
105 | HRESULT GetInPlaceSite( [out] IOleInPlaceSite **ppIPSite );
|
---|
106 |
|
---|
107 | HRESULT GetDocument( [out] IUnknown **ppunk );
|
---|
108 |
|
---|
109 | HRESULT SetRect( [in] LPRECT prcView );
|
---|
110 |
|
---|
111 | HRESULT GetRect( [out] LPRECT prcView );
|
---|
112 |
|
---|
113 | HRESULT SetRectComplex(
|
---|
114 | [in, unique] LPRECT prcView,
|
---|
115 | [in, unique] LPRECT prcHScroll,
|
---|
116 | [in, unique] LPRECT prcVScroll,
|
---|
117 | [in, unique] LPRECT prcSizeBox);
|
---|
118 |
|
---|
119 | HRESULT Show( [in] BOOL fShow );
|
---|
120 |
|
---|
121 | HRESULT UIActivate( [in] BOOL fUIActivate );
|
---|
122 |
|
---|
123 | HRESULT Open();
|
---|
124 |
|
---|
125 | HRESULT CloseView( [in] DWORD dwReserved );
|
---|
126 |
|
---|
127 | HRESULT SaveViewState( [in] LPSTREAM pstm );
|
---|
128 |
|
---|
129 | HRESULT ApplyViewState( [in] LPSTREAM pstm );
|
---|
130 |
|
---|
131 | HRESULT Clone(
|
---|
132 | [in] IOleInPlaceSite *pIPSiteNew,
|
---|
133 | [out] IOleDocumentView **ppViewNew);
|
---|
134 | }
|
---|
135 |
|
---|
136 |
|
---|
137 | /*****************************************************************************
|
---|
138 | * IEnumOleDocumentViews interface
|
---|
139 | */
|
---|
140 | [
|
---|
141 | object,
|
---|
142 | uuid(b722bcc8-4e68-101b-a2bc-00aa00404770),
|
---|
143 | pointer_default(unique)
|
---|
144 | ]
|
---|
145 | interface IEnumOleDocumentViews : IUnknown
|
---|
146 | {
|
---|
147 | typedef [unique] IEnumOleDocumentViews *LPENUMOLEDOCUMENTVIEWS;
|
---|
148 |
|
---|
149 | [local]
|
---|
150 | HRESULT Next(
|
---|
151 | [in] ULONG cViews,
|
---|
152 | [out] IOleDocumentView **rgpView,
|
---|
153 | [out] ULONG *pcFetched);
|
---|
154 |
|
---|
155 | [call_as(Next)]
|
---|
156 | HRESULT RemoteNext(
|
---|
157 | [in] ULONG cViews,
|
---|
158 | [out, size_is(cViews), length_is(*pcFetched)] IOleDocumentView **rgpView,
|
---|
159 | [out] ULONG *pcFetched);
|
---|
160 |
|
---|
161 | HRESULT Skip( [in] ULONG cViews );
|
---|
162 |
|
---|
163 | HRESULT Reset();
|
---|
164 |
|
---|
165 | HRESULT Clone( [out] IEnumOleDocumentViews **ppEnum );
|
---|
166 | }
|
---|
167 |
|
---|
168 |
|
---|
169 | /*****************************************************************************
|
---|
170 | * IOleCommandTarget interface
|
---|
171 | */
|
---|
172 | [
|
---|
173 | object,
|
---|
174 | uuid(b722bccb-4e68-101b-a2bc-00aa00404770),
|
---|
175 | pointer_default(unique)
|
---|
176 | ]
|
---|
177 | interface IOleCommandTarget : IUnknown
|
---|
178 | {
|
---|
179 | typedef [unique] IOleCommandTarget *LPOLECOMMANDTARGET;
|
---|
180 |
|
---|
181 | typedef enum OLECMDF
|
---|
182 | {
|
---|
183 | OLECMDF_SUPPORTED = 0x1,
|
---|
184 | OLECMDF_ENABLED = 0x2,
|
---|
185 | OLECMDF_LATCHED = 0x4,
|
---|
186 | OLECMDF_NINCHED = 0x8,
|
---|
187 | OLECMDF_INVISIBLE = 0x10,
|
---|
188 | OLECMDF_DEFHIDEONCTXTMENU = 0x20
|
---|
189 | } OLECMDF;
|
---|
190 |
|
---|
191 | typedef struct _tagOLECMD
|
---|
192 | {
|
---|
193 | ULONG cmdID;
|
---|
194 | DWORD cmdf;
|
---|
195 | } OLECMD;
|
---|
196 |
|
---|
197 | typedef struct _tagOLECMDTEXT
|
---|
198 | {
|
---|
199 | DWORD cmdtextf;
|
---|
200 | ULONG cwActual;
|
---|
201 | ULONG cwBuf;
|
---|
202 | [size_is(cwBuf)] WCHAR rgwz[];
|
---|
203 | } OLECMDTEXT;
|
---|
204 |
|
---|
205 | typedef enum OLECMDTEXTF
|
---|
206 | {
|
---|
207 | OLECMDTEXTF_NONE = 0,
|
---|
208 | OLECMDTEXTF_NAME = 1,
|
---|
209 | OLECMDTEXTF_STATUS = 2
|
---|
210 | } OLECMDTEXTF;
|
---|
211 |
|
---|
212 | typedef enum OLECMDEXECOPT
|
---|
213 | {
|
---|
214 | OLECMDEXECOPT_DODEFAULT = 0,
|
---|
215 | OLECMDEXECOPT_PROMPTUSER = 1,
|
---|
216 | OLECMDEXECOPT_DONTPROMPTUSER = 2,
|
---|
217 | OLECMDEXECOPT_SHOWHELP = 3
|
---|
218 | } OLECMDEXECOPT;
|
---|
219 |
|
---|
220 | typedef enum OLECMDID
|
---|
221 | {
|
---|
222 | OLECMDID_OPEN = 1,
|
---|
223 | OLECMDID_NEW = 2,
|
---|
224 | OLECMDID_SAVE = 3,
|
---|
225 | OLECMDID_SAVEAS = 4,
|
---|
226 | OLECMDID_SAVECOPYAS = 5,
|
---|
227 | OLECMDID_PRINT = 6,
|
---|
228 | OLECMDID_PRINTPREVIEW = 7,
|
---|
229 | OLECMDID_PAGESETUP = 8,
|
---|
230 | OLECMDID_SPELL = 9,
|
---|
231 | OLECMDID_PROPERTIES = 10,
|
---|
232 | OLECMDID_CUT = 11,
|
---|
233 | OLECMDID_COPY = 12,
|
---|
234 | OLECMDID_PASTE = 13,
|
---|
235 | OLECMDID_PASTESPECIAL = 14,
|
---|
236 | OLECMDID_UNDO = 15,
|
---|
237 | OLECMDID_REDO = 16,
|
---|
238 | OLECMDID_SELECTALL = 17,
|
---|
239 | OLECMDID_CLEARSELECTION = 18,
|
---|
240 | OLECMDID_ZOOM = 19,
|
---|
241 | OLECMDID_GETZOOMRANGE = 20,
|
---|
242 | OLECMDID_UPDATECOMMANDS = 21,
|
---|
243 | OLECMDID_REFRESH = 22,
|
---|
244 | OLECMDID_STOP = 23,
|
---|
245 | OLECMDID_HIDETOOLBARS = 24,
|
---|
246 | OLECMDID_SETPROGRESSMAX = 25,
|
---|
247 | OLECMDID_SETPROGRESSPOS = 26,
|
---|
248 | OLECMDID_SETPROGRESSTEXT = 27,
|
---|
249 | OLECMDID_SETTITLE = 28,
|
---|
250 | OLECMDID_SETDOWNLOADSTATE = 29,
|
---|
251 | OLECMDID_STOPDOWNLOAD = 30,
|
---|
252 | OLECMDID_ONTOOLBARACTIVATED = 31,
|
---|
253 | OLECMDID_FIND = 32,
|
---|
254 | OLECMDID_DELETE = 33,
|
---|
255 | OLECMDID_HTTPEQUIV = 34,
|
---|
256 | OLECMDID_HTTPEQUIV_DONE = 35,
|
---|
257 | OLECMDID_ENABLE_INTERACTION = 36,
|
---|
258 | OLECMDID_ONUNLOAD = 37,
|
---|
259 | OLECMDID_PROPERTYBAG2 = 38,
|
---|
260 | OLECMDID_PREREFRESH = 39,
|
---|
261 | /* iexplorer uses ... 44 */
|
---|
262 | OLECMDID_SHOWSCRIPTERROR = 40,
|
---|
263 | OLECMDID_SHOWMESSAGE = 41,
|
---|
264 | OLECMDID_SHOWFIND = 42,
|
---|
265 | OLECMDID_SHOWPAGESETUP = 43,
|
---|
266 | OLECMDID_SHOWPRINT = 44,
|
---|
267 | OLECMDID_CLOSE = 45,
|
---|
268 | OLECMDID_ALLOWUILESSSAVEAS = 46,
|
---|
269 | OLECMDID_DONTDOWNLOADCSS = 47,
|
---|
270 | OLECMDID_UPDATEPAGESTATUS = 48,
|
---|
271 | OLECMDID_PRINT2 = 49,
|
---|
272 | OLECMDID_PRINTPREVIEW2 = 50,
|
---|
273 | OLECMDID_SETPRINTTEMPLATE = 51,
|
---|
274 | OLECMDID_GETPRINTTEMPLATE = 52,
|
---|
275 | OLECMDID_PAGEACTIONBLOCKED = 55,
|
---|
276 | OLECMDID_PAGEACTIONUIQUERY = 56,
|
---|
277 | OLECMDID_FOCUSVIEWCONTROLS = 57,
|
---|
278 | OLECMDID_FOCUSVIEWCONTROLSQUERY = 58,
|
---|
279 | OLECMDID_SHOWPAGEACTIONMENU = 59,
|
---|
280 | OLECMDID_ADDTRAVELENTRY = 60,
|
---|
281 | OLECMDID_UPDATETRAVELENTRY = 61,
|
---|
282 | OLECMDID_UPDATEBACKFORWARDSTATE = 62,
|
---|
283 | OLECMDID_OPTICAL_ZOOM = 63,
|
---|
284 | OLECMDID_OPTICAL_GETZOOMRANGE = 64,
|
---|
285 | OLECMDID_WINDOWSTATECHANGED = 65,
|
---|
286 | OLECMDID_ACTIVEXINSTALLSCOPE = 66
|
---|
287 | } OLECMDID;
|
---|
288 |
|
---|
289 | HRESULT QueryStatus(
|
---|
290 | [in, unique] const GUID *pguidCmdGroup,
|
---|
291 | [in] ULONG cCmds,
|
---|
292 | [in, out, size_is(cCmds)] OLECMD prgCmds[],
|
---|
293 | [in, out, unique] OLECMDTEXT *pCmdText);
|
---|
294 |
|
---|
295 | HRESULT Exec(
|
---|
296 | [in, unique] const GUID *pguidCmdGroup,
|
---|
297 | [in] DWORD nCmdID,
|
---|
298 | [in] DWORD nCmdexecopt,
|
---|
299 | [in, unique] VARIANT *pvaIn,
|
---|
300 | [in, out, unique] VARIANT *pvaOut);
|
---|
301 | }
|
---|
302 |
|
---|
303 |
|
---|
304 | /*****************************************************************************
|
---|
305 | * IContinueCallback interface
|
---|
306 | */
|
---|
307 | [
|
---|
308 | object,
|
---|
309 | uuid(b722bcca-4e68-101b-a2bc-00aa00404770),
|
---|
310 | pointer_default(unique)
|
---|
311 | ]
|
---|
312 | interface IContinueCallback : IUnknown
|
---|
313 | {
|
---|
314 | typedef [unique] IContinueCallback *LPCONTINUECALLBACK;
|
---|
315 |
|
---|
316 | HRESULT FContinue();
|
---|
317 |
|
---|
318 | HRESULT FContinuePrinting(
|
---|
319 | [in] LONG nCntPrinted,
|
---|
320 | [in] LONG nCurPage,
|
---|
321 | [in, unique] WCHAR *pwszPrintStatus);
|
---|
322 | }
|
---|
323 |
|
---|
324 |
|
---|
325 | /*****************************************************************************
|
---|
326 | * IPrint interface
|
---|
327 | */
|
---|
328 | [
|
---|
329 | object,
|
---|
330 | uuid(b722bcc9-4e68-101b-a2bc-00aa00404770),
|
---|
331 | pointer_default(unique)
|
---|
332 | ]
|
---|
333 | interface IPrint : IUnknown
|
---|
334 | {
|
---|
335 | typedef [unique] IPrint *LPPRINT;
|
---|
336 |
|
---|
337 | typedef enum
|
---|
338 | {
|
---|
339 | PRINTFLAG_MAYBOTHERUSER = 1,
|
---|
340 | PRINTFLAG_PROMPTUSER = 2,
|
---|
341 | PRINTFLAG_USERMAYCHANGEPRINTER = 4,
|
---|
342 | PRINTFLAG_RECOMPOSETODEVICE = 8,
|
---|
343 | PRINTFLAG_DONTACTUALLYPRINT = 16,
|
---|
344 | PRINTFLAG_FORCEPROPERTIES = 32,
|
---|
345 | PRINTFLAG_PRINTTOFILE = 64
|
---|
346 | } PRINTFLAG;
|
---|
347 |
|
---|
348 | typedef struct tagPAGERANGE
|
---|
349 | {
|
---|
350 | LONG nFromPage;
|
---|
351 | LONG nToPage;
|
---|
352 | } PAGERANGE;
|
---|
353 |
|
---|
354 | typedef struct tagPAGESET
|
---|
355 | {
|
---|
356 | ULONG cbStruct;
|
---|
357 | BOOL fOddPages;
|
---|
358 | BOOL fEvenPages;
|
---|
359 | ULONG cPageRange;
|
---|
360 | [size_is(cPageRange)] PAGERANGE rgPages[];
|
---|
361 | } PAGESET;
|
---|
362 |
|
---|
363 | HRESULT SetInitialPageNum(
|
---|
364 | [in] LONG nFirstPage);
|
---|
365 |
|
---|
366 | HRESULT GetPageInfo(
|
---|
367 | [out] LONG *pnFirstPage,
|
---|
368 | [out] LONG *pcPages);
|
---|
369 |
|
---|
370 | [local]
|
---|
371 | HRESULT Print(
|
---|
372 | [in] DWORD grfFlags,
|
---|
373 | [in, out] DVTARGETDEVICE **pptd,
|
---|
374 | [in, out] PAGESET **ppPageSet,
|
---|
375 | [in, out, unique] STGMEDIUM *pstgmOptions,
|
---|
376 | [in] IContinueCallback *pcallback,
|
---|
377 | [in] LONG nFirstPage,
|
---|
378 | [out] LONG *pcPagesPrinted,
|
---|
379 | [out] LONG *pnLastPage);
|
---|
380 |
|
---|
381 | [call_as(Print)]
|
---|
382 | HRESULT RemotePrint(
|
---|
383 | [in] DWORD grfFlags,
|
---|
384 | [in, out] DVTARGETDEVICE **pptd,
|
---|
385 | [in, out] PAGESET **pppageset,
|
---|
386 | [in, out, unique] RemSTGMEDIUM *pstgmOptions,
|
---|
387 | [in] IContinueCallback *pcallback,
|
---|
388 | [in] LONG nFirstPage,
|
---|
389 | [out] LONG *pcPagesPrinted,
|
---|
390 | [out] LONG *pnLastPage);
|
---|
391 | }
|
---|
392 |
|
---|
393 |
|
---|
394 | cpp_quote("#define OLECMDERR_E_FIRST (OLE_E_LAST+1)")
|
---|
395 | cpp_quote("#define OLECMDERR_E_NOTSUPPORTED (OLECMDERR_E_FIRST)")
|
---|
396 | cpp_quote("#define OLECMDERR_E_DISABLED (OLECMDERR_E_FIRST+1)")
|
---|
397 | cpp_quote("#define OLECMDERR_E_NOHELP (OLECMDERR_E_FIRST+2)")
|
---|
398 | cpp_quote("#define OLECMDERR_E_CANCELED (OLECMDERR_E_FIRST+3)")
|
---|
399 | cpp_quote("#define OLECMDERR_E_UNKNOWNGROUP (OLECMDERR_E_FIRST+4)")
|
---|
400 |
|
---|
401 | cpp_quote("#define MSOCMDERR_E_FIRST OLECMDERR_E_FIRST")
|
---|
402 | cpp_quote("#define MSOCMDERR_E_NOTSUPPORTED OLECMDERR_E_NOTSUPPORTED")
|
---|
403 | cpp_quote("#define MSOCMDERR_E_DISABLED OLECMDERR_E_DISABLED")
|
---|
404 | cpp_quote("#define MSOCMDERR_E_NOHELP OLECMDERR_E_NOHELP")
|
---|
405 | cpp_quote("#define MSOCMDERR_E_CANCELED OLECMDERR_E_CANCELED")
|
---|
406 | cpp_quote("#define MSOCMDERR_E_UNKNOWNGROUP OLECMDERR_E_UNKNOWNGROUP")
|
---|
407 |
|
---|
408 | cpp_quote("#define LPMSODOCUMENT LPOLEDOCUMENT")
|
---|
409 | cpp_quote("#define LPMSODOCUMENTSITE LPOLEDOCUMENTSITE")
|
---|
410 | cpp_quote("#define LPMSOVIEW LPOLEDOCUMENTVIEW")
|
---|
411 | cpp_quote("#define LPENUMMSOVIEW LPENUMOLEDOCUMENTVIEWS")
|
---|
412 | cpp_quote("#define LPMSOCOMMANDTARGET LPOLECOMMANDTARGET")
|
---|
413 | cpp_quote("#define IID_IMsoDocument IID_IOleDocument")
|
---|
414 | cpp_quote("#define IID_IMsoDocumentSite IID_IOleDocumentSite")
|
---|
415 | cpp_quote("#define IID_IMsoView IID_IOleDocumentView")
|
---|
416 | cpp_quote("#define IID_IEnumMsoView IID_IEnumOleDocumentViews")
|
---|
417 | cpp_quote("#define IID_IMsoCommandTarget IID_IOleCommandTarget")
|
---|