Keep README.fr in sync.
[wine/multimedia.git] / include / docobj.h
blob77ea99243d6a51a25ee1b373a7af4a78bd53374c
1 /*
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
19 #include "rpc.h"
20 #include "rpcndr.h"
21 #ifndef COM_NO_WINDOWS_H
22 #include "windows.h"
23 #include "ole2.h"
24 #endif
26 #ifndef __WINE_DOCOBJ_H
27 #define __WINE_DOCOBJ_H
29 #include "winbase.h"
30 #include "windef.h"
31 #include "wingdi.h"
32 #include "winuser.h"
33 #include "ole2.h"
34 #define __WINE_INCLUDE_OAIDL
35 #include "oaidl.h"
36 #undef __WINE_INCLUDE_OAIDL
38 /*****************************************************************************
39 * Declare the structures
41 typedef enum
43 OLECMDF_SUPPORTED = 0x1,
44 OLECMDF_ENABLED = 0x2,
45 OLECMDF_LATCHED = 0x4,
46 OLECMDF_NINCHED = 0x8
47 } OLECMDF;
49 typedef struct _tagOLECMD
51 ULONG cmdID;
52 DWORD cmdf;
53 } OLECMD;
55 typedef struct _tagOLECMDTEXT
57 DWORD cmdtextf;
58 ULONG cwActual;
59 ULONG cwBuf;
60 WCHAR rgwz[1];
61 } OLECMDTEXT;
63 typedef enum
65 PRINTFLAG_MAYBOTHERUSER = 1,
66 PRINTFLAG_PROMPTUSER = 2,
67 PRINTFLAG_USERMAYCHANGEPRINTER = 4,
68 PRINTFLAG_RECOMPOSETODEVICE = 8,
69 PRINTFLAG_DONTACTUALLYPRINT = 16,
70 PRINTFLAG_FORCEPROPERTIES = 32,
71 PRINTFLAG_PRINTTOFILE = 64
72 } PRINTFLAG;
74 typedef struct tagPAGERANGE
76 LONG nFromPage;
77 LONG nToPage;
78 } PAGERANGE;
80 typedef struct tagPAGESET
82 ULONG cbStruct;
83 BOOL fOddPages;
84 BOOL fEvenPages;
85 ULONG cPageRange;
86 PAGERANGE rgPages[ 1 ];
87 } PAGESET;
89 typedef enum
91 OLECMDTEXTF_NONE = 0,
92 OLECMDTEXTF_NAME = 1,
93 OLECMDTEXTF_STATUS = 2
94 } OLECMDTEXTF;
96 typedef enum
98 OLECMDEXECOPT_DODEFAULT = 0,
99 OLECMDEXECOPT_PROMPTUSER = 1,
100 OLECMDEXECOPT_DONTPROMPTUSER = 2,
101 OLECMDEXECOPT_SHOWHELP = 3
102 } OLECMDEXECOPT;
104 typedef enum OLECMDID
106 OLECMDID_OPEN = 1,
107 OLECMDID_NEW = 2,
108 OLECMDID_SAVE = 3,
109 OLECMDID_SAVEAS = 4,
110 OLECMDID_SAVECOPYAS = 5,
111 OLECMDID_PRINT = 6,
112 OLECMDID_PRINTPREVIEW = 7,
113 OLECMDID_PAGESETUP = 8,
114 OLECMDID_SPELL = 9,
115 OLECMDID_PROPERTIES = 10,
116 OLECMDID_CUT = 11,
117 OLECMDID_COPY = 12,
118 OLECMDID_PASTE = 13,
119 OLECMDID_PASTESPECIAL = 14,
120 OLECMDID_UNDO = 15,
121 OLECMDID_REDO = 16,
122 OLECMDID_SELECTALL = 17,
123 OLECMDID_CLEARSELECTION = 18,
124 OLECMDID_ZOOM = 19,
125 OLECMDID_GETZOOMRANGE = 20,
126 OLECMDID_UPDATECOMMANDS = 21,
127 OLECMDID_REFRESH = 22,
128 OLECMDID_STOP = 23,
129 OLECMDID_HIDETOOLBARS = 24,
130 OLECMDID_SETPROGRESSMAX = 25,
131 OLECMDID_SETPROGRESSPOS = 26,
132 OLECMDID_SETPROGRESSTEXT = 27,
133 OLECMDID_SETTITLE = 28,
134 OLECMDID_SETDOWNLOADSTATE = 29,
135 OLECMDID_STOPDOWNLOAD = 30,
136 OLECMDID_ONTOOLBARACTIVATED = 31,
137 OLECMDID_FIND = 32,
138 OLECMDID_DELETE = 33,
139 OLECMDID_HTTPEQUIV = 34,
140 OLECMDID_HTTPEQUIV_DONE = 35,
141 OLECMDID_ENABLE_INTERACTION = 36,
142 OLECMDID_ONUNLOAD = 37,
143 OLECMDID_PROPERTYBAG2 = 38,
144 OLECMDID_PREREFRESH = 39,
145 /* iexplorer uses ... 44 */
146 OLECMDID_SHOWSCRIPTERROR = 40,
147 OLECMDID_SHOWMESSAGE = 41,
148 OLECMDID_SHOWFIND = 42,
149 OLECMDID_SHOWPAGESETUP = 43,
150 OLECMDID_SHOWPRINT = 44,
151 OLECMDID_CLOSE = 45,
152 OLECMDID_ALLOWUILESSSAVEAS = 46,
153 OLECMDID_DONTDOWNLOADCSS = 47,
154 OLECMDID_UPDATEPAGESTATUS = 48,
155 OLECMDID_PRINT2 = 49,
156 OLECMDID_PRINTPREVIEW2 = 50,
157 OLECMDID_SETPRINTTEMPLATE = 51,
158 OLECMDID_GETPRINTTEMPLATE = 52
159 } OLECMDID;
161 #define OLECMDERR_E_FIRST (OLE_E_LAST+1)
162 #define OLECMDERR_E_NOTSUPPORTED (OLECMDERR_E_FIRST)
163 #define OLECMDERR_E_DISABLED (OLECMDERR_E_FIRST+1)
164 #define OLECMDERR_E_NOHELP (OLECMDERR_E_FIRST+2)
165 #define OLECMDERR_E_CANCELED (OLECMDERR_E_FIRST+3)
166 #define OLECMDERR_E_UNKNOWNGROUP (OLECMDERR_E_FIRST+4)
168 /*****************************************************************************
169 * Predeclare the interfaces
171 DEFINE_GUID(IID_IOleDocument, 0xb722bcc5,0x4e68,0x101b,0xa2,0xbc,0x00,0xaa,0x00,0x40,0x47,0x70);
172 typedef struct IOleDocument IOleDocument, *LPOLEDOCUMENT;
174 DEFINE_GUID(IID_IOleDocumentSite, 0xb722bcc7,0x4e68,0x101b,0xa2,0xbc,0x00,0xaa,0x00,0x40,0x47,0x70);
175 typedef struct IOleDocumentSite IOleDocumentSite, *LPOLEDOCUMENTSITE;
177 DEFINE_GUID(IID_IOleDocumentView, 0xb722bcc6,0x4e68,0x101b,0xa2,0xbc,0x00,0xaa,0x00,0x40,0x47,0x70);
178 typedef struct IOleDocumentView IOleDocumentView, *LPOLEDOCUMENTVIEW;
180 DEFINE_GUID(IID_IEnumOleDocumentViews, 0xb722bcc6,0x4e68,0x101b,0xa2,0xbc,0x00,0xaa,0x00,0x40,0x47,0x70);
181 typedef struct IEnumOleDocumentViews IEnumOleDocumentViews, *LPENUMOLEDOCUMENTVIEWS;
183 DEFINE_GUID(IID_IOleCommandTarget, 0xb722bccb,0x4e68,0x101b,0xa2,0xbc,0x00,0xaa,0x00,0x40,0x47,0x70);
184 typedef struct IOleCommandTarget IOleCommandTarget, *LPOLECOMMANDTARGET;
186 DEFINE_GUID(IID_IContinueCallback, 0xb722bcca,0x4e68,0x101b,0xa2,0xbc,0x00,0xaa,0x00,0x40,0x47,0x70);
187 typedef struct IContinueCallback IContinueCallback, *LPCONTINUECALLBACK;
189 DEFINE_GUID(IID_IPrint, 0xb722bcc9,0x4e68,0x101b,0xa2,0xbc,0x00,0xaa,0x00,0x40,0x47,0x70);
190 typedef struct IPrint IPrint, *LPPRINT;
193 /*****************************************************************************
194 * IOleDocument interface
196 #define ICOM_INTERFACE IOleDocument
197 #define IOleDocument_METHODS \
198 ICOM_METHOD4(HRESULT,CreateView, IOleInPlaceSite*,pIPSite, IStream*,pstm, DWORD,dwReserved, IOleDocumentView**,ppView) \
199 ICOM_METHOD1(HRESULT,GetDocMiscStatus, DWORD*,pdwStatus) \
200 ICOM_METHOD2(HRESULT,EnumViews, IEnumOleDocumentViews**,ppEnum, IOleDocumentView**,ppView)
201 #define IOleDocument_IMETHODS \
202 IUnknown_IMETHODS \
203 IOleDocument_METHODS
204 ICOM_DEFINE(IOleDocument,IUnknown)
205 #undef ICOM_INTERFACE
207 /*** IUnknown methods ***/
208 #define IOleDocument_QueryInterface(p,a,b) ICOM_CALL2(QueryInterface,p,a,b)
209 #define IOleDocument_AddRef(p) ICOM_CALL (AddRef,p)
210 #define IOleDocument_Release(p) ICOM_CALL (Release,p)
211 /*** IOleDocument methods ***/
212 #define IOleDocument_CreateView(p,a,b,c,d) ICOM_CALL4(CreateView,p,a,b,c,d)
213 #define IOleDocument_GetDocMiscStatus(p,a) ICOM_CALL1(GetDocMiscStatus,p,a)
214 #define IOleDocument_EnumViews(p,a,b) ICOM_CALL2(EnumViews,p,a,b)
217 /*****************************************************************************
218 * IOleDocumentSite interface
220 #define ICOM_INTERFACE IOleDocumentSite
221 #define IOleDocumentSite_METHODS \
222 ICOM_METHOD1(HRESULT,ActivateMe, IOleDocumentView*,pViewToActivate)
223 #define IOleDocumentSite_IMETHODS \
224 IUnknown_IMETHODS \
225 IOleDocumentSite_METHODS
226 ICOM_DEFINE(IOleDocumentSite,IUnknown)
227 #undef ICOM_INTERFACE
229 /*** IUnknown methods ***/
230 #define IOleDocumentSite_QueryInterface(p,a,b) ICOM_CALL2(QueryInterface,p,a,b)
231 #define IOleDocumentSite_AddRef(p) ICOM_CALL (AddRef,p)
232 #define IOleDocumentSite_Release(p) ICOM_CALL (Release,p)
233 /*** IOleDocumentSite methods ***/
234 #define IOleDocumentSite_ActivateMe(p,a) ICOM_CALL4(ActivateMe,p,a)
237 /*****************************************************************************
238 * IOleDocumentSite interface
240 #define ICOM_INTERFACE IOleDocumentView
241 #define IOleDocumentView_METHODS \
242 ICOM_METHOD1(HRESULT,SetInPlaceSite, IOleInPlaceSite*,pIPSite) \
243 ICOM_METHOD1(HRESULT,GetInPlaceSite, IOleInPlaceSite**,ppIPSite) \
244 ICOM_METHOD1(HRESULT,GetDocument, IUnknown**,ppunk) \
245 ICOM_METHOD1(HRESULT,SetRect, LPRECT,prcView) \
246 ICOM_METHOD1(HRESULT,GetRect, LPRECT,prcView) \
247 ICOM_METHOD4(HRESULT,SetRectComplex, LPRECT,prcView, LPRECT,prcHScroll, LPRECT,prcVScroll, LPRECT,prcSizeBox) \
248 ICOM_METHOD1(HRESULT,Show, BOOL,fShow) \
249 ICOM_METHOD1(HRESULT,UIActivate, BOOL,fUIActivate) \
250 ICOM_METHOD (HRESULT,Open) \
251 ICOM_METHOD1(HRESULT,CloseView, DWORD,dwReserved) \
252 ICOM_METHOD1(HRESULT,SaveViewState, LPSTREAM,pstm) \
253 ICOM_METHOD1(HRESULT,ApplyViewState,LPSTREAM,pstm) \
254 ICOM_METHOD2(HRESULT,Clone, IOleInPlaceSite*,pIPSiteNew, IOleDocumentView**,ppViewNew)
255 #define IOleDocumentView_IMETHODS \
256 IUnknown_IMETHODS \
257 IOleDocumentView_METHODS
258 ICOM_DEFINE(IOleDocumentView,IUnknown)
259 #undef ICOM_INTERFACE
261 /*** IUnknown methods ***/
262 #define IOleDocumentView_QueryInterface(p,a,b) ICOM_CALL2(QueryInterface,p,a,b)
263 #define IOleDocumentView_AddRef(p) ICOM_CALL (AddRef,p)
264 #define IOleDocumentView_Release(p) ICOM_CALL (Release,p)
265 /*** IOleDocumentView methods ***/
266 #define IOleDocumentView_SetInPlaceSite(p,a) ICOM_CALL1(SetInPlaceSite,p,a)
267 #define IOleDocumentView_GetInPlaceSite(p,a) ICOM_CALL1(GetInPlaceSite,p,a)
268 #define IOleDocumentView_GetDocument(p,a) ICOM_CALL1(GetDocument,p,a)
269 #define IOleDocumentView_SetRect(p,a) ICOM_CALL1(SetRect,p,a)
270 #define IOleDocumentView_GetRect(p,a) ICOM_CALL1(GetRect,p,a)
271 #define IOleDocumentView_GetRectComplex(p,a,b,c,d) ICOM_CALL4(GetRectComplex,p,a,b,c,d)
272 #define IOleDocumentView_Show(p,a) ICOM_CALL1(Show,p,a)
273 #define IOleDocumentView_UIActivate(p,a) ICOM_CALL1(UIActivate,p,a)
274 #define IOleDocumentView_Open(p) ICOM_CALL (Open,p)
275 #define IOleDocumentView_CloseView(p,a) ICOM_CALL1(CloseView,p,a)
276 #define IOleDocumentView_SaveViewState(p,a) ICOM_CALL1(SaveViewState,p,a)
277 #define IOleDocumentView_ApplyViewState(p,a) ICOM_CALL1(ApplyViewState,p,a)
278 #define IOleDocumentView_Clone(p,a,b) ICOM_CALL2(Clone,p,a,b)
281 /*****************************************************************************
282 * IOleDocumentSite interface
284 #define ICOM_INTERFACE IEnumOleDocumentViews
285 #define IEnumOleDocumentViews_METHODS \
286 ICOM_METHOD3(HRESULT,Next, ULONG,cViews, IOleDocumentView**,rgpView, ULONG*,pcFetched) \
287 ICOM_METHOD1(HRESULT,Skip, ULONG,cViews) \
288 ICOM_METHOD (HRESULT,Reset) \
289 ICOM_METHOD1(HRESULT,Clone, IEnumOleDocumentViews**,ppEnum)
290 #define IEnumOleDocumentViews_IMETHODS \
291 IUnknown_IMETHODS \
292 IEnumOleDocumentViews_METHODS
293 ICOM_DEFINE(IEnumOleDocumentViews,IUnknown)
294 #undef ICOM_INTERFACE
296 /*** IUnknown methods ***/
297 #define IEnumOleDocumentViews_QueryInterface(p,a,b) ICOM_CALL2(QueryInterface,p,a,b)
298 #define IEnumOleDocumentViews_AddRef(p) ICOM_CALL (AddRef,p)
299 #define IEnumOleDocumentViews_Release(p) ICOM_CALL (Release,p)
300 /*** IEnumOleDocumentViews methods ***/
301 #define IEnumOleDocumentViews_Next(p,a,b,c) ICOM_CALL3(Next,p,a,b,c)
302 #define IEnumOleDocumentViews_Skip(p,a) ICOM_CALL1(Skip,p,a)
303 #define IEnumOleDocumentViews_Reset(p) ICOM_CALL (Reset,p)
304 #define IEnumOleDocumentViews_Clone(p,a) ICOM_CALL1(Clone,p,a)
307 /*****************************************************************************
308 * IOleCommandTarget interface
310 #define ICOM_INTERFACE IOleCommandTarget
311 #define IOleCommandTarget_METHODS \
312 ICOM_METHOD4(HRESULT,QueryStatus, const GUID*,pguidCmdGroup, ULONG,cCmds, OLECMD*,prgCmds, OLECMDTEXT*,pCmdText) \
313 ICOM_METHOD5(HRESULT,Exec, const GUID*,pguidCmdGroup, DWORD,nCmdID, DWORD,nCmdexecopt, VARIANT*,pvaIn, VARIANT*,pvaOut)
314 #define IOleCommandTarget_IMETHODS \
315 IUnknown_IMETHODS \
316 IOleCommandTarget_METHODS
317 ICOM_DEFINE(IOleCommandTarget,IUnknown)
318 #undef ICOM_INTERFACE
320 /*** IUnknown methods ***/
321 #define IOleCommandTarget_QueryInterface(p,a,b) ICOM_CALL2(QueryInterface,p,a,b)
322 #define IOleCommandTarget_AddRef(p) ICOM_CALL (AddRef,p)
323 #define IOleCommandTarget_Release(p) ICOM_CALL (Release,p)
324 /*** IOleCommandTarget methods ***/
325 #define IOleCommandTarget_QueryStatus(p,a,b,c,d) ICOM_CALL4(QueryStatus,p,a,b,c,d)
326 #define IOleCommandTarget_Exec(p,a,b,c,d,e) ICOM_CALL5(Exec,p,a,b,c,d,e)
329 /*****************************************************************************
330 * IContinueCallback interface
332 #define ICOM_INTERFACE IContinueCallback
333 #define IContinueCallback_METHODS \
334 ICOM_METHOD (HRESULT,FContinue) \
335 ICOM_METHOD3(HRESULT,FContinuePrinting, LONG,nCntPrinted, LONG,nCurPage, WCHAR*,pwszPrintStatus)
336 #define IContinueCallback_IMETHODS \
337 IUnknown_IMETHODS \
338 IContinueCallback_METHODS
339 ICOM_DEFINE(IContinueCallback,IUnknown)
340 #undef ICOM_INTERFACE
342 /*** IUnknown methods ***/
343 #define IContinueCallback_QueryInterface(p,a,b) ICOM_CALL2(QueryInterface,p,a,b)
344 #define IContinueCallback_AddRef(p) ICOM_CALL (AddRef,p)
345 #define IContinueCallback_Release(p) ICOM_CALL (Release,p)
346 /*** IContinueCallback methods ***/
347 #define IContinueCallback_FContinue(p) ICOM_CALL (FContinue,p)
348 #define IContinueCallback_FContinuePrinting(p,a,b,c) ICOM_CALL3(FContinuePrinting,p,a,b,c)
351 /*****************************************************************************
352 * IPrint interface
354 #define ICOM_INTERFACE IPrint
355 #define IPrint_METHODS \
356 ICOM_METHOD1(HRESULT,SetInitialPageNum, LONG,nFirstPage) \
357 ICOM_METHOD2(HRESULT,GetPageInfo, LONG*,pnFirstPage, LONG*,pcPages) \
358 ICOM_METHOD8(HRESULT,Print, DWORD,grfFlags, DVTARGETDEVICE**,pptd, PAGESET**,ppPageSet, STGMEDIUM*,pstgmOptions, IContinueCallback*,pcallback, LONG,nFirstPage, LONG*,pcPagesPrinted, LONG*,pnLastPage)
359 #define IPrint_IMETHODS \
360 IUnknown_IMETHODS \
361 IPrint_METHODS
362 ICOM_DEFINE(IPrint,IUnknown)
363 #undef ICOM_INTERFACE
365 /*** IUnknown methods ***/
366 #define IPrint_QueryInterface(p,a,b) ICOM_CALL2(QueryInterface,p,a,b)
367 #define IPrint_AddRef(p) ICOM_CALL (AddRef,p)
368 #define IPrint_Release(p) ICOM_CALL (Release,p)
369 /*** Iprint methods ***/
370 #define IPrint_SetInitialPageNum(p,a) ICOM_CALL1(SetInitialPageNum,p,a)
371 #define IPrint_GetPageInfo(p,a,b) ICOM_CALL2(GetPageInfo,p,a,b)
372 #define IPrint_Print(p,a,b,c,d,e,f,g) ICOM_CALL7(Print,p,a,b,c,d,e,f,g)
375 #define LPMSODOCUMENT LPOLEDOCUMENT
376 #define LPMSODOCUMENTSITE LPOLEDOCUMENTSITE
377 #define LPMSOVIEW LPOLEDOCUMENTVIEW
378 #define LPENUMMSOVIEW LPENUMOLEDOCUMENTVIEWS
379 #define LPMSOCOMMANDTARGET LPOLECOMMANDTARGET
380 #define IID_IMsoDocument IID_IOleDocument
381 #define IID_IMsoDocumentSite IID_IOleDocumentSite
382 #define IID_IMsoView IID_IOleDocumentView
383 #define IID_IEnumMsoView IID_IEnumOleDocumentViews
384 #define IID_IMsoCommandTarget IID_IOleCommandTarget
387 #endif /* __WINE_DOCOBJ_H */