4 #ifndef COM_NO_WINDOWS_H
10 #ifndef __WINE_DOCOBJ_H
11 #define __WINE_DOCOBJ_H
18 #include "wine/obj_oleaut.h"
20 /*****************************************************************************
21 * Declare the structures
25 OLECMDF_SUPPORTED = 0x1,
26 OLECMDF_ENABLED = 0x2,
27 OLECMDF_LATCHED = 0x4,
31 typedef struct _tagOLECMD
37 typedef struct _tagOLECMDTEXT
47 PRINTFLAG_MAYBOTHERUSER = 1,
48 PRINTFLAG_PROMPTUSER = 2,
49 PRINTFLAG_USERMAYCHANGEPRINTER = 4,
50 PRINTFLAG_RECOMPOSETODEVICE = 8,
51 PRINTFLAG_DONTACTUALLYPRINT = 16,
52 PRINTFLAG_FORCEPROPERTIES = 32,
53 PRINTFLAG_PRINTTOFILE = 64
56 typedef struct tagPAGERANGE
62 typedef struct tagPAGESET
68 PAGERANGE rgPages[ 1 ];
75 OLECMDTEXTF_STATUS = 2
80 OLECMDEXECOPT_DODEFAULT = 0,
81 OLECMDEXECOPT_PROMPTUSER = 1,
82 OLECMDEXECOPT_DONTPROMPTUSER = 2,
83 OLECMDEXECOPT_SHOWHELP = 3
92 OLECMDID_SAVECOPYAS = 5,
94 OLECMDID_PRINTPREVIEW = 7,
95 OLECMDID_PAGESETUP = 8,
97 OLECMDID_PROPERTIES = 10,
101 OLECMDID_PASTESPECIAL = 14,
104 OLECMDID_SELECTALL = 17,
105 OLECMDID_CLEARSELECTION = 18,
107 OLECMDID_GETZOOMRANGE = 20,
108 OLECMDID_UPDATECOMMANDS = 21,
109 OLECMDID_REFRESH = 22,
111 OLECMDID_HIDETOOLBARS = 24,
112 OLECMDID_SETPROGRESSMAX = 25,
113 OLECMDID_SETPROGRESSPOS = 26,
114 OLECMDID_SETPROGRESSTEXT = 27,
115 OLECMDID_SETTITLE = 28,
116 OLECMDID_SETDOWNLOADSTATE = 29,
117 OLECMDID_STOPDOWNLOAD = 30,
118 OLECMDID_ONTOOLBARACTIVATED = 31,
120 OLECMDID_DELETE = 33,
121 OLECMDID_HTTPEQUIV = 34,
122 OLECMDID_HTTPEQUIV_DONE = 35,
123 OLECMDID_ENABLE_INTERACTION = 36,
124 OLECMDID_ONUNLOAD = 37,
125 OLECMDID_PROPERTYBAG2 = 38,
126 OLECMDID_PREREFRESH = 39
127 /* iexplorer uses ... 44 */
130 #define OLECMDERR_E_FIRST (OLE_E_LAST+1)
131 #define OLECMDERR_E_NOTSUPPORTED (OLECMDERR_E_FIRST)
132 #define OLECMDERR_E_DISABLED (OLECMDERR_E_FIRST+1)
133 #define OLECMDERR_E_NOHELP (OLECMDERR_E_FIRST+2)
134 #define OLECMDERR_E_CANCELED (OLECMDERR_E_FIRST+3)
135 #define OLECMDERR_E_UNKNOWNGROUP (OLECMDERR_E_FIRST+4)
137 /*****************************************************************************
138 * Predeclare the interfaces
140 DEFINE_GUID(IID_IOleDocument, 0xb722bcc5,0x4e68,0x101b,0xa2,0xbc,0x00,0xaa,0x00,0x40,0x47,0x70);
141 typedef struct IOleDocument IOleDocument, *LPOLEDOCUMENT;
143 DEFINE_GUID(IID_IOleDocumentSite, 0xb722bcc7,0x4e68,0x101b,0xa2,0xbc,0x00,0xaa,0x00,0x40,0x47,0x70);
144 typedef struct IOleDocumentSite IOleDocumentSite, *LPOLEDOCUMENTSITE;
146 DEFINE_GUID(IID_IOleDocumentView, 0xb722bcc6,0x4e68,0x101b,0xa2,0xbc,0x00,0xaa,0x00,0x40,0x47,0x70);
147 typedef struct IOleDocumentView IOleDocumentView, *LPOLEDOCUMENTVIEW;
149 DEFINE_GUID(IID_IEnumOleDocumentViews, 0xb722bcc6,0x4e68,0x101b,0xa2,0xbc,0x00,0xaa,0x00,0x40,0x47,0x70);
150 typedef struct IEnumOleDocumentViews IEnumOleDocumentViews, *LPENUMOLEDOCUMENTVIEWS;
152 DEFINE_GUID(IID_IOleCommandTarget, 0xb722bccb,0x4e68,0x101b,0xa2,0xbc,0x00,0xaa,0x00,0x40,0x47,0x70);
153 typedef struct IOleCommandTarget IOleCommandTarget, *LPOLECOMMANDTARGET;
155 DEFINE_GUID(IID_IContinueCallback, 0xb722bcca,0x4e68,0x101b,0xa2,0xbc,0x00,0xaa,0x00,0x40,0x47,0x70);
156 typedef struct IContinueCallback IContinueCallback, *LPCONTINUECALLBACK;
158 DEFINE_GUID(IID_IPrint, 0xb722bcc9,0x4e68,0x101b,0xa2,0xbc,0x00,0xaa,0x00,0x40,0x47,0x70);
159 typedef struct IPrint IPrint, *LPPRINT;
162 /*****************************************************************************
163 * IOleDocument interface
165 #define ICOM_INTERFACE IOleDocument
166 #define IOleDocument_METHODS \
167 ICOM_METHOD4(HRESULT,CreateView, IOleInPlaceSite*,pIPSite, IStream*,pstm, DWORD,dwReserved, IOleDocumentView**,ppView) \
168 ICOM_METHOD1(HRESULT,GetDocMiscStatus, DWORD*,pdwStatus) \
169 ICOM_METHOD2(HRESULT,EnumViews, IEnumOleDocumentViews**,ppEnum, IOleDocumentView**,ppView)
170 #define IOleDocument_IMETHODS \
173 ICOM_DEFINE(IOleDocument,IUnknown)
174 #undef ICOM_INTERFACE
176 /*** IUnknown methods ***/
177 #define IOleDocument_QueryInterface(p,a,b) ICOM_CALL2(QueryInterface,p,a,b)
178 #define IOleDocument_AddRef(p) ICOM_CALL (AddRef,p)
179 #define IOleDocument_Release(p) ICOM_CALL (Release,p)
180 /*** IOleDocument methods ***/
181 #define IOleDocument_CreateView(p,a,b,c,d) ICOM_CALL4(CreateView,p,a,b,c,d)
182 #define IOleDocument_GetDocMiscStatus(p,a) ICOM_CALL1(GetDocMiscStatus,p,a)
183 #define IOleDocument_EnumViews(p,a,b) ICOM_CALL2(EnumViews,p,a,b)
186 /*****************************************************************************
187 * IOleDocumentSite interface
189 #define ICOM_INTERFACE IOleDocumentSite
190 #define IOleDocumentSite_METHODS \
191 ICOM_METHOD1(HRESULT,ActivateMe, IOleDocumentView*,pViewToActivate)
192 #define IOleDocumentSite_IMETHODS \
194 IOleDocumentSite_METHODS
195 ICOM_DEFINE(IOleDocumentSite,IUnknown)
196 #undef ICOM_INTERFACE
198 /*** IUnknown methods ***/
199 #define IOleDocumentSite_QueryInterface(p,a,b) ICOM_CALL2(QueryInterface,p,a,b)
200 #define IOleDocumentSite_AddRef(p) ICOM_CALL (AddRef,p)
201 #define IOleDocumentSite_Release(p) ICOM_CALL (Release,p)
202 /*** IOleDocumentSite methods ***/
203 #define IOleDocumentSite_ActivateMe(p,a) ICOM_CALL4(ActivateMe,p,a)
206 /*****************************************************************************
207 * IOleDocumentSite interface
209 #define ICOM_INTERFACE IOleDocumentView
210 #define IOleDocumentView_METHODS \
211 ICOM_METHOD1(HRESULT,SetInPlaceSite, IOleInPlaceSite*,pIPSite) \
212 ICOM_METHOD1(HRESULT,GetInPlaceSite, IOleInPlaceSite**,ppIPSite) \
213 ICOM_METHOD1(HRESULT,GetDocument, IUnknown**,ppunk) \
214 ICOM_METHOD1(HRESULT,SetRect, LPRECT,prcView) \
215 ICOM_METHOD1(HRESULT,GetRect, LPRECT,prcView) \
216 ICOM_METHOD4(HRESULT,SetRectComplex, LPRECT,prcView, LPRECT,prcHScroll, LPRECT,prcVScroll, LPRECT,prcSizeBox) \
217 ICOM_METHOD1(HRESULT,Show, BOOL,fShow) \
218 ICOM_METHOD1(HRESULT,UIActivate, BOOL,fUIActivate) \
219 ICOM_METHOD (HRESULT,Open) \
220 ICOM_METHOD1(HRESULT,CloseView, DWORD,dwReserved) \
221 ICOM_METHOD1(HRESULT,SaveViewState, LPSTREAM,pstm) \
222 ICOM_METHOD1(HRESULT,ApplyViewState,LPSTREAM,pstm) \
223 ICOM_METHOD2(HRESULT,Clone, IOleInPlaceSite*,pIPSiteNew, IOleDocumentView**,ppViewNew)
224 #define IOleDocumentView_IMETHODS \
226 IOleDocumentView_METHODS
227 ICOM_DEFINE(IOleDocumentView,IUnknown)
228 #undef ICOM_INTERFACE
230 /*** IUnknown methods ***/
231 #define IOleDocumentView_QueryInterface(p,a,b) ICOM_CALL2(QueryInterface,p,a,b)
232 #define IOleDocumentView_AddRef(p) ICOM_CALL (AddRef,p)
233 #define IOleDocumentView_Release(p) ICOM_CALL (Release,p)
234 /*** IOleDocumentView methods ***/
235 #define IOleDocumentView_SetInPlaceSite(p,a) ICOM_CALL1(SetInPlaceSite,p,a)
236 #define IOleDocumentView_GetInPlaceSite(p,a) ICOM_CALL1(GetInPlaceSite,p,a)
237 #define IOleDocumentView_GetDocument(p,a) ICOM_CALL1(GetDocument,p,a)
238 #define IOleDocumentView_SetRect(p,a) ICOM_CALL1(SetRect,p,a)
239 #define IOleDocumentView_GetRect(p,a) ICOM_CALL1(GetRect,p,a)
240 #define IOleDocumentView_GetRectComplex(p,a,b,c,d) ICOM_CALL4(GetRectComplex,p,a,b,c,d)
241 #define IOleDocumentView_Show(p,a) ICOM_CALL1(Show,p,a)
242 #define IOleDocumentView_UIActivate(p,a) ICOM_CALL1(UIActivate,p,a)
243 #define IOleDocumentView_Open(p) ICOM_CALL (Open,p)
244 #define IOleDocumentView_CloseView(p,a) ICOM_CALL1(CloseView,p,a)
245 #define IOleDocumentView_SaveViewState(p,a) ICOM_CALL1(SaveViewState,p,a)
246 #define IOleDocumentView_ApplyViewState(p,a) ICOM_CALL1(ApplyViewState,p,a)
247 #define IOleDocumentView_Clone(p,a,b) ICOM_CALL2(Clone,p,a,b)
250 /*****************************************************************************
251 * IOleDocumentSite interface
253 #define ICOM_INTERFACE IEnumOleDocumentViews
254 #define IEnumOleDocumentViews_METHODS \
255 ICOM_METHOD3(HRESULT,Next, ULONG,cViews, IOleDocumentView**,rgpView, ULONG*,pcFetched) \
256 ICOM_METHOD1(HRESULT,Skip, ULONG,cViews) \
257 ICOM_METHOD (HRESULT,Reset) \
258 ICOM_METHOD1(HRESULT,Clone, IEnumOleDocumentViews**,ppEnum)
259 #define IEnumOleDocumentViews_IMETHODS \
261 IEnumOleDocumentViews_METHODS
262 ICOM_DEFINE(IEnumOleDocumentViews,IUnknown)
263 #undef ICOM_INTERFACE
265 /*** IUnknown methods ***/
266 #define IEnumOleDocumentViews_QueryInterface(p,a,b) ICOM_CALL2(QueryInterface,p,a,b)
267 #define IEnumOleDocumentViews_AddRef(p) ICOM_CALL (AddRef,p)
268 #define IEnumOleDocumentViews_Release(p) ICOM_CALL (Release,p)
269 /*** IEnumOleDocumentViews methods ***/
270 #define IEnumOleDocumentViews_Next(p,a,b,c) ICOM_CALL3(Next,p,a,b,c)
271 #define IEnumOleDocumentViews_Skip(p,a) ICOM_CALL1(Skip,p,a)
272 #define IEnumOleDocumentViews_Reset(p) ICOM_CALL (Reset,p)
273 #define IEnumOleDocumentViews_Clone(p,a) ICOM_CALL1(Clone,p,a)
276 /*****************************************************************************
277 * IOleCommandTarget interface
279 #define ICOM_INTERFACE IOleCommandTarget
280 #define IOleCommandTarget_METHODS \
281 ICOM_METHOD4(HRESULT,QueryStatus, const GUID*,pguidCmdGroup, ULONG,cCmds, OLECMD*,prgCmds, OLECMDTEXT*,pCmdText) \
282 ICOM_METHOD5(HRESULT,Exec, const GUID*,pguidCmdGroup, DWORD,nCmdID, DWORD,nCmdexecopt, VARIANT*,pvaIn, VARIANT*,pvaOut)
283 #define IOleCommandTarget_IMETHODS \
285 IOleCommandTarget_METHODS
286 ICOM_DEFINE(IOleCommandTarget,IUnknown)
287 #undef ICOM_INTERFACE
289 /*** IUnknown methods ***/
290 #define IOleCommandTarget_QueryInterface(p,a,b) ICOM_CALL2(QueryInterface,p,a,b)
291 #define IOleCommandTarget_AddRef(p) ICOM_CALL (AddRef,p)
292 #define IOleCommandTarget_Release(p) ICOM_CALL (Release,p)
293 /*** IOleCommandTarget methods ***/
294 #define IOleCommandTarget_QueryStatus(p,a,b,c,d) ICOM_CALL4(QueryStatus,p,a,b,c,d)
295 #define IOleCommandTarget_Exec(p,a,b,c,d,e) ICOM_CALL5(Exec,p,a,b,c,d,e)
298 /*****************************************************************************
299 * IContinueCallback interface
301 #define ICOM_INTERFACE IContinueCallback
302 #define IContinueCallback_METHODS \
303 ICOM_METHOD (HRESULT,FContinue) \
304 ICOM_METHOD3(HRESULT,FContinuePrinting, LONG,nCntPrinted, LONG,nCurPage, WCHAR*,pwszPrintStatus)
305 #define IContinueCallback_IMETHODS \
307 IContinueCallback_METHODS
308 ICOM_DEFINE(IContinueCallback,IUnknown)
309 #undef ICOM_INTERFACE
311 /*** IUnknown methods ***/
312 #define IContinueCallback_QueryInterface(p,a,b) ICOM_CALL2(QueryInterface,p,a,b)
313 #define IContinueCallback_AddRef(p) ICOM_CALL (AddRef,p)
314 #define IContinueCallback_Release(p) ICOM_CALL (Release,p)
315 /*** IContinueCallback methods ***/
316 #define IContinueCallback_FContinue(p) ICOM_CALL (FContinue,p)
317 #define IContinueCallback_FContinuePrinting(p,a,b,c) ICOM_CALL3(FContinuePrinting,p,a,b,c)
320 /*****************************************************************************
323 #define ICOM_INTERFACE IPrint
324 #define IPrint_METHODS \
325 ICOM_METHOD1(HRESULT,SetInitialPageNum, LONG,nFirstPage) \
326 ICOM_METHOD2(HRESULT,GetPageInfo, LONG*,pnFirstPage, LONG*,pcPages) \
327 ICOM_METHOD8(HRESULT,Print, DWORD,grfFlags, DVTARGETDEVICE**,pptd, PAGESET**,ppPageSet, STGMEDIUM*,pstgmOptions, IContinueCallback*,pcallback, LONG,nFirstPage, LONG*,pcPagesPrinted, LONG*,pnLastPage)
328 #define IPrint_IMETHODS \
331 ICOM_DEFINE(IPrint,IUnknown)
332 #undef ICOM_INTERFACE
334 /*** IUnknown methods ***/
335 #define IPrint_QueryInterface(p,a,b) ICOM_CALL2(QueryInterface,p,a,b)
336 #define IPrint_AddRef(p) ICOM_CALL (AddRef,p)
337 #define IPrint_Release(p) ICOM_CALL (Release,p)
338 /*** Iprint methods ***/
339 #define IPrint_SetInitialPageNum(p,a) ICOM_CALL1(SetInitialPageNum,p,a)
340 #define IPrint_GetPageInfo(p,a,b) ICOM_CALL2(GetPageInfo,p,a,b)
341 #define IPrint_Print(p,a,b,c,d,e,f,g) ICOM_CALL7(Print,p,a,b,c,d,e,f,g)
344 #define LPMSODOCUMENT LPOLEDOCUMENT
345 #define LPMSODOCUMENTSITE LPOLEDOCUMENTSITE
346 #define LPMSOVIEW LPOLEDOCUMENTVIEW
347 #define LPENUMMSOVIEW LPENUMOLEDOCUMENTVIEWS
348 #define LPMSOCOMMANDTARGET LPOLECOMMANDTARGET
349 #define IID_IMsoDocument IID_IOleDocument
350 #define IID_IMsoDocumentSite IID_IOleDocumentSite
351 #define IID_IMsoView IID_IOleDocumentView
352 #define IID_IEnumMsoView IID_IEnumOleDocumentViews
353 #define IID_IMsoCommandTarget IID_IOleCommandTarget
356 #endif /* __WINE_DOCOBJ_H */