2 * Copyright (C) 1999 Paul Quinn
4 * This library is free software; you can redistribute it and/or
5 * modify it under the terms of the GNU Lesser General Public
6 * License as published by the Free Software Foundation; either
7 * version 2.1 of the License, or (at your option) any later version.
9 * This library is distributed in the hope that it will be useful,
10 * but WITHOUT ANY WARRANTY; without even the implied warranty of
11 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
12 * Lesser General Public License for more details.
14 * You should have received a copy of the GNU Lesser General Public
15 * License along with this library; if not, write to the Free Software
16 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
21 #ifndef COM_NO_WINDOWS_H
26 #ifndef __WINE_DOCOBJ_H
27 #define __WINE_DOCOBJ_H
34 #include "wine/obj_oleaut.h"
36 /*****************************************************************************
37 * Declare the structures
41 OLECMDF_SUPPORTED
= 0x1,
42 OLECMDF_ENABLED
= 0x2,
43 OLECMDF_LATCHED
= 0x4,
47 typedef struct _tagOLECMD
53 typedef struct _tagOLECMDTEXT
63 PRINTFLAG_MAYBOTHERUSER
= 1,
64 PRINTFLAG_PROMPTUSER
= 2,
65 PRINTFLAG_USERMAYCHANGEPRINTER
= 4,
66 PRINTFLAG_RECOMPOSETODEVICE
= 8,
67 PRINTFLAG_DONTACTUALLYPRINT
= 16,
68 PRINTFLAG_FORCEPROPERTIES
= 32,
69 PRINTFLAG_PRINTTOFILE
= 64
72 typedef struct tagPAGERANGE
78 typedef struct tagPAGESET
84 PAGERANGE rgPages
[ 1 ];
91 OLECMDTEXTF_STATUS
= 2
96 OLECMDEXECOPT_DODEFAULT
= 0,
97 OLECMDEXECOPT_PROMPTUSER
= 1,
98 OLECMDEXECOPT_DONTPROMPTUSER
= 2,
99 OLECMDEXECOPT_SHOWHELP
= 3
102 typedef enum OLECMDID
108 OLECMDID_SAVECOPYAS
= 5,
110 OLECMDID_PRINTPREVIEW
= 7,
111 OLECMDID_PAGESETUP
= 8,
113 OLECMDID_PROPERTIES
= 10,
117 OLECMDID_PASTESPECIAL
= 14,
120 OLECMDID_SELECTALL
= 17,
121 OLECMDID_CLEARSELECTION
= 18,
123 OLECMDID_GETZOOMRANGE
= 20,
124 OLECMDID_UPDATECOMMANDS
= 21,
125 OLECMDID_REFRESH
= 22,
127 OLECMDID_HIDETOOLBARS
= 24,
128 OLECMDID_SETPROGRESSMAX
= 25,
129 OLECMDID_SETPROGRESSPOS
= 26,
130 OLECMDID_SETPROGRESSTEXT
= 27,
131 OLECMDID_SETTITLE
= 28,
132 OLECMDID_SETDOWNLOADSTATE
= 29,
133 OLECMDID_STOPDOWNLOAD
= 30,
134 OLECMDID_ONTOOLBARACTIVATED
= 31,
136 OLECMDID_DELETE
= 33,
137 OLECMDID_HTTPEQUIV
= 34,
138 OLECMDID_HTTPEQUIV_DONE
= 35,
139 OLECMDID_ENABLE_INTERACTION
= 36,
140 OLECMDID_ONUNLOAD
= 37,
141 OLECMDID_PROPERTYBAG2
= 38,
142 OLECMDID_PREREFRESH
= 39
143 /* iexplorer uses ... 44 */
146 #define OLECMDERR_E_FIRST (OLE_E_LAST+1)
147 #define OLECMDERR_E_NOTSUPPORTED (OLECMDERR_E_FIRST)
148 #define OLECMDERR_E_DISABLED (OLECMDERR_E_FIRST+1)
149 #define OLECMDERR_E_NOHELP (OLECMDERR_E_FIRST+2)
150 #define OLECMDERR_E_CANCELED (OLECMDERR_E_FIRST+3)
151 #define OLECMDERR_E_UNKNOWNGROUP (OLECMDERR_E_FIRST+4)
153 /*****************************************************************************
154 * Predeclare the interfaces
156 DEFINE_GUID(IID_IOleDocument
, 0xb722bcc5,0x4e68,0x101b,0xa2,0xbc,0x00,0xaa,0x00,0x40,0x47,0x70);
157 typedef struct IOleDocument IOleDocument
, *LPOLEDOCUMENT
;
159 DEFINE_GUID(IID_IOleDocumentSite
, 0xb722bcc7,0x4e68,0x101b,0xa2,0xbc,0x00,0xaa,0x00,0x40,0x47,0x70);
160 typedef struct IOleDocumentSite IOleDocumentSite
, *LPOLEDOCUMENTSITE
;
162 DEFINE_GUID(IID_IOleDocumentView
, 0xb722bcc6,0x4e68,0x101b,0xa2,0xbc,0x00,0xaa,0x00,0x40,0x47,0x70);
163 typedef struct IOleDocumentView IOleDocumentView
, *LPOLEDOCUMENTVIEW
;
165 DEFINE_GUID(IID_IEnumOleDocumentViews
, 0xb722bcc6,0x4e68,0x101b,0xa2,0xbc,0x00,0xaa,0x00,0x40,0x47,0x70);
166 typedef struct IEnumOleDocumentViews IEnumOleDocumentViews
, *LPENUMOLEDOCUMENTVIEWS
;
168 DEFINE_GUID(IID_IOleCommandTarget
, 0xb722bccb,0x4e68,0x101b,0xa2,0xbc,0x00,0xaa,0x00,0x40,0x47,0x70);
169 typedef struct IOleCommandTarget IOleCommandTarget
, *LPOLECOMMANDTARGET
;
171 DEFINE_GUID(IID_IContinueCallback
, 0xb722bcca,0x4e68,0x101b,0xa2,0xbc,0x00,0xaa,0x00,0x40,0x47,0x70);
172 typedef struct IContinueCallback IContinueCallback
, *LPCONTINUECALLBACK
;
174 DEFINE_GUID(IID_IPrint
, 0xb722bcc9,0x4e68,0x101b,0xa2,0xbc,0x00,0xaa,0x00,0x40,0x47,0x70);
175 typedef struct IPrint IPrint
, *LPPRINT
;
178 /*****************************************************************************
179 * IOleDocument interface
181 #define ICOM_INTERFACE IOleDocument
182 #define IOleDocument_METHODS \
183 ICOM_METHOD4(HRESULT,CreateView, IOleInPlaceSite*,pIPSite, IStream*,pstm, DWORD,dwReserved, IOleDocumentView**,ppView) \
184 ICOM_METHOD1(HRESULT,GetDocMiscStatus, DWORD*,pdwStatus) \
185 ICOM_METHOD2(HRESULT,EnumViews, IEnumOleDocumentViews**,ppEnum, IOleDocumentView**,ppView)
186 #define IOleDocument_IMETHODS \
189 ICOM_DEFINE(IOleDocument
,IUnknown
)
190 #undef ICOM_INTERFACE
192 /*** IUnknown methods ***/
193 #define IOleDocument_QueryInterface(p,a,b) ICOM_CALL2(QueryInterface,p,a,b)
194 #define IOleDocument_AddRef(p) ICOM_CALL (AddRef,p)
195 #define IOleDocument_Release(p) ICOM_CALL (Release,p)
196 /*** IOleDocument methods ***/
197 #define IOleDocument_CreateView(p,a,b,c,d) ICOM_CALL4(CreateView,p,a,b,c,d)
198 #define IOleDocument_GetDocMiscStatus(p,a) ICOM_CALL1(GetDocMiscStatus,p,a)
199 #define IOleDocument_EnumViews(p,a,b) ICOM_CALL2(EnumViews,p,a,b)
202 /*****************************************************************************
203 * IOleDocumentSite interface
205 #define ICOM_INTERFACE IOleDocumentSite
206 #define IOleDocumentSite_METHODS \
207 ICOM_METHOD1(HRESULT,ActivateMe, IOleDocumentView*,pViewToActivate)
208 #define IOleDocumentSite_IMETHODS \
210 IOleDocumentSite_METHODS
211 ICOM_DEFINE(IOleDocumentSite
,IUnknown
)
212 #undef ICOM_INTERFACE
214 /*** IUnknown methods ***/
215 #define IOleDocumentSite_QueryInterface(p,a,b) ICOM_CALL2(QueryInterface,p,a,b)
216 #define IOleDocumentSite_AddRef(p) ICOM_CALL (AddRef,p)
217 #define IOleDocumentSite_Release(p) ICOM_CALL (Release,p)
218 /*** IOleDocumentSite methods ***/
219 #define IOleDocumentSite_ActivateMe(p,a) ICOM_CALL4(ActivateMe,p,a)
222 /*****************************************************************************
223 * IOleDocumentSite interface
225 #define ICOM_INTERFACE IOleDocumentView
226 #define IOleDocumentView_METHODS \
227 ICOM_METHOD1(HRESULT,SetInPlaceSite, IOleInPlaceSite*,pIPSite) \
228 ICOM_METHOD1(HRESULT,GetInPlaceSite, IOleInPlaceSite**,ppIPSite) \
229 ICOM_METHOD1(HRESULT,GetDocument, IUnknown**,ppunk) \
230 ICOM_METHOD1(HRESULT,SetRect, LPRECT,prcView) \
231 ICOM_METHOD1(HRESULT,GetRect, LPRECT,prcView) \
232 ICOM_METHOD4(HRESULT,SetRectComplex, LPRECT,prcView, LPRECT,prcHScroll, LPRECT,prcVScroll, LPRECT,prcSizeBox) \
233 ICOM_METHOD1(HRESULT,Show, BOOL,fShow) \
234 ICOM_METHOD1(HRESULT,UIActivate, BOOL,fUIActivate) \
235 ICOM_METHOD (HRESULT,Open) \
236 ICOM_METHOD1(HRESULT,CloseView, DWORD,dwReserved) \
237 ICOM_METHOD1(HRESULT,SaveViewState, LPSTREAM,pstm) \
238 ICOM_METHOD1(HRESULT,ApplyViewState,LPSTREAM,pstm) \
239 ICOM_METHOD2(HRESULT,Clone, IOleInPlaceSite*,pIPSiteNew, IOleDocumentView**,ppViewNew)
240 #define IOleDocumentView_IMETHODS \
242 IOleDocumentView_METHODS
243 ICOM_DEFINE(IOleDocumentView
,IUnknown
)
244 #undef ICOM_INTERFACE
246 /*** IUnknown methods ***/
247 #define IOleDocumentView_QueryInterface(p,a,b) ICOM_CALL2(QueryInterface,p,a,b)
248 #define IOleDocumentView_AddRef(p) ICOM_CALL (AddRef,p)
249 #define IOleDocumentView_Release(p) ICOM_CALL (Release,p)
250 /*** IOleDocumentView methods ***/
251 #define IOleDocumentView_SetInPlaceSite(p,a) ICOM_CALL1(SetInPlaceSite,p,a)
252 #define IOleDocumentView_GetInPlaceSite(p,a) ICOM_CALL1(GetInPlaceSite,p,a)
253 #define IOleDocumentView_GetDocument(p,a) ICOM_CALL1(GetDocument,p,a)
254 #define IOleDocumentView_SetRect(p,a) ICOM_CALL1(SetRect,p,a)
255 #define IOleDocumentView_GetRect(p,a) ICOM_CALL1(GetRect,p,a)
256 #define IOleDocumentView_GetRectComplex(p,a,b,c,d) ICOM_CALL4(GetRectComplex,p,a,b,c,d)
257 #define IOleDocumentView_Show(p,a) ICOM_CALL1(Show,p,a)
258 #define IOleDocumentView_UIActivate(p,a) ICOM_CALL1(UIActivate,p,a)
259 #define IOleDocumentView_Open(p) ICOM_CALL (Open,p)
260 #define IOleDocumentView_CloseView(p,a) ICOM_CALL1(CloseView,p,a)
261 #define IOleDocumentView_SaveViewState(p,a) ICOM_CALL1(SaveViewState,p,a)
262 #define IOleDocumentView_ApplyViewState(p,a) ICOM_CALL1(ApplyViewState,p,a)
263 #define IOleDocumentView_Clone(p,a,b) ICOM_CALL2(Clone,p,a,b)
266 /*****************************************************************************
267 * IOleDocumentSite interface
269 #define ICOM_INTERFACE IEnumOleDocumentViews
270 #define IEnumOleDocumentViews_METHODS \
271 ICOM_METHOD3(HRESULT,Next, ULONG,cViews, IOleDocumentView**,rgpView, ULONG*,pcFetched) \
272 ICOM_METHOD1(HRESULT,Skip, ULONG,cViews) \
273 ICOM_METHOD (HRESULT,Reset) \
274 ICOM_METHOD1(HRESULT,Clone, IEnumOleDocumentViews**,ppEnum)
275 #define IEnumOleDocumentViews_IMETHODS \
277 IEnumOleDocumentViews_METHODS
278 ICOM_DEFINE(IEnumOleDocumentViews
,IUnknown
)
279 #undef ICOM_INTERFACE
281 /*** IUnknown methods ***/
282 #define IEnumOleDocumentViews_QueryInterface(p,a,b) ICOM_CALL2(QueryInterface,p,a,b)
283 #define IEnumOleDocumentViews_AddRef(p) ICOM_CALL (AddRef,p)
284 #define IEnumOleDocumentViews_Release(p) ICOM_CALL (Release,p)
285 /*** IEnumOleDocumentViews methods ***/
286 #define IEnumOleDocumentViews_Next(p,a,b,c) ICOM_CALL3(Next,p,a,b,c)
287 #define IEnumOleDocumentViews_Skip(p,a) ICOM_CALL1(Skip,p,a)
288 #define IEnumOleDocumentViews_Reset(p) ICOM_CALL (Reset,p)
289 #define IEnumOleDocumentViews_Clone(p,a) ICOM_CALL1(Clone,p,a)
292 /*****************************************************************************
293 * IOleCommandTarget interface
295 #define ICOM_INTERFACE IOleCommandTarget
296 #define IOleCommandTarget_METHODS \
297 ICOM_METHOD4(HRESULT,QueryStatus, const GUID*,pguidCmdGroup, ULONG,cCmds, OLECMD*,prgCmds, OLECMDTEXT*,pCmdText) \
298 ICOM_METHOD5(HRESULT,Exec, const GUID*,pguidCmdGroup, DWORD,nCmdID, DWORD,nCmdexecopt, VARIANT*,pvaIn, VARIANT*,pvaOut)
299 #define IOleCommandTarget_IMETHODS \
301 IOleCommandTarget_METHODS
302 ICOM_DEFINE(IOleCommandTarget
,IUnknown
)
303 #undef ICOM_INTERFACE
305 /*** IUnknown methods ***/
306 #define IOleCommandTarget_QueryInterface(p,a,b) ICOM_CALL2(QueryInterface,p,a,b)
307 #define IOleCommandTarget_AddRef(p) ICOM_CALL (AddRef,p)
308 #define IOleCommandTarget_Release(p) ICOM_CALL (Release,p)
309 /*** IOleCommandTarget methods ***/
310 #define IOleCommandTarget_QueryStatus(p,a,b,c,d) ICOM_CALL4(QueryStatus,p,a,b,c,d)
311 #define IOleCommandTarget_Exec(p,a,b,c,d,e) ICOM_CALL5(Exec,p,a,b,c,d,e)
314 /*****************************************************************************
315 * IContinueCallback interface
317 #define ICOM_INTERFACE IContinueCallback
318 #define IContinueCallback_METHODS \
319 ICOM_METHOD (HRESULT,FContinue) \
320 ICOM_METHOD3(HRESULT,FContinuePrinting, LONG,nCntPrinted, LONG,nCurPage, WCHAR*,pwszPrintStatus)
321 #define IContinueCallback_IMETHODS \
323 IContinueCallback_METHODS
324 ICOM_DEFINE(IContinueCallback
,IUnknown
)
325 #undef ICOM_INTERFACE
327 /*** IUnknown methods ***/
328 #define IContinueCallback_QueryInterface(p,a,b) ICOM_CALL2(QueryInterface,p,a,b)
329 #define IContinueCallback_AddRef(p) ICOM_CALL (AddRef,p)
330 #define IContinueCallback_Release(p) ICOM_CALL (Release,p)
331 /*** IContinueCallback methods ***/
332 #define IContinueCallback_FContinue(p) ICOM_CALL (FContinue,p)
333 #define IContinueCallback_FContinuePrinting(p,a,b,c) ICOM_CALL3(FContinuePrinting,p,a,b,c)
336 /*****************************************************************************
339 #define ICOM_INTERFACE IPrint
340 #define IPrint_METHODS \
341 ICOM_METHOD1(HRESULT,SetInitialPageNum, LONG,nFirstPage) \
342 ICOM_METHOD2(HRESULT,GetPageInfo, LONG*,pnFirstPage, LONG*,pcPages) \
343 ICOM_METHOD8(HRESULT,Print, DWORD,grfFlags, DVTARGETDEVICE**,pptd, PAGESET**,ppPageSet, STGMEDIUM*,pstgmOptions, IContinueCallback*,pcallback, LONG,nFirstPage, LONG*,pcPagesPrinted, LONG*,pnLastPage)
344 #define IPrint_IMETHODS \
347 ICOM_DEFINE(IPrint
,IUnknown
)
348 #undef ICOM_INTERFACE
350 /*** IUnknown methods ***/
351 #define IPrint_QueryInterface(p,a,b) ICOM_CALL2(QueryInterface,p,a,b)
352 #define IPrint_AddRef(p) ICOM_CALL (AddRef,p)
353 #define IPrint_Release(p) ICOM_CALL (Release,p)
354 /*** Iprint methods ***/
355 #define IPrint_SetInitialPageNum(p,a) ICOM_CALL1(SetInitialPageNum,p,a)
356 #define IPrint_GetPageInfo(p,a,b) ICOM_CALL2(GetPageInfo,p,a,b)
357 #define IPrint_Print(p,a,b,c,d,e,f,g) ICOM_CALL7(Print,p,a,b,c,d,e,f,g)
360 #define LPMSODOCUMENT LPOLEDOCUMENT
361 #define LPMSODOCUMENTSITE LPOLEDOCUMENTSITE
362 #define LPMSOVIEW LPOLEDOCUMENTVIEW
363 #define LPENUMMSOVIEW LPENUMOLEDOCUMENTVIEWS
364 #define LPMSOCOMMANDTARGET LPOLECOMMANDTARGET
365 #define IID_IMsoDocument IID_IOleDocument
366 #define IID_IMsoDocumentSite IID_IOleDocumentSite
367 #define IID_IMsoView IID_IOleDocumentView
368 #define IID_IEnumMsoView IID_IEnumOleDocumentViews
369 #define IID_IMsoCommandTarget IID_IOleCommandTarget
372 #endif /* __WINE_DOCOBJ_H */