Note what to do with the winedefault.reg in the file.
[wine/multimedia.git] / include / docobj.h
blob6f60e62ad91e1f4edb5188e7118d0ce849ade7f5
1 #ifndef __WINE_DOCOBJ_H
2 #define __WINE_DOCOBJ_H
4 #include "winbase.h"
5 #include "winuser.h"
6 #include "ole2.h"
7 #include "wine/obj_oleaut.h"
9 /*****************************************************************************
10 * Declare the structures
12 typedef enum
14 OLECMDF_SUPPORTED = 0x1,
15 OLECMDF_ENABLED = 0x2,
16 OLECMDF_LATCHED = 0x4,
17 OLECMDF_NINCHED = 0x8
18 } OLECMDF;
20 typedef struct _tagOLECMD
22 ULONG cmdID;
23 DWORD cmdf;
24 } OLECMD;
26 typedef struct _tagOLECMDTEXT
28 DWORD cmdtextf;
29 ULONG cwActual;
30 ULONG cwBuf;
31 WCHAR rgwz[1];
32 } OLECMDTEXT;
34 typedef enum
36 PRINTFLAG_MAYBOTHERUSER = 1,
37 PRINTFLAG_PROMPTUSER = 2,
38 PRINTFLAG_USERMAYCHANGEPRINTER = 4,
39 PRINTFLAG_RECOMPOSETODEVICE = 8,
40 PRINTFLAG_DONTACTUALLYPRINT = 16,
41 PRINTFLAG_FORCEPROPERTIES = 32,
42 PRINTFLAG_PRINTTOFILE = 64
43 } PRINTFLAG;
45 typedef struct tagPAGERANGE
47 LONG nFromPage;
48 LONG nToPage;
49 } PAGERANGE;
51 typedef struct tagPAGESET
53 ULONG cbStruct;
54 BOOL fOddPages;
55 BOOL fEvenPages;
56 ULONG cPageRange;
57 PAGERANGE rgPages[ 1 ];
58 } PAGESET;
60 typedef enum
62 OLECMDTEXTF_NONE = 0,
63 OLECMDTEXTF_NAME = 1,
64 OLECMDTEXTF_STATUS = 2
65 } OLECMDTEXTF;
67 typedef enum
69 OLECMDEXECOPT_DODEFAULT = 0,
70 OLECMDEXECOPT_PROMPTUSER = 1,
71 OLECMDEXECOPT_DONTPROMPTUSER = 2,
72 OLECMDEXECOPT_SHOWHELP = 3
73 } OLECMDEXECOPT;
75 typedef enum OLECMDID
77 OLECMDID_OPEN = 1,
78 OLECMDID_NEW = 2,
79 OLECMDID_SAVE = 3,
80 OLECMDID_SAVEAS = 4,
81 OLECMDID_SAVECOPYAS = 5,
82 OLECMDID_PRINT = 6,
83 OLECMDID_PRINTPREVIEW = 7,
84 OLECMDID_PAGESETUP = 8,
85 OLECMDID_SPELL = 9,
86 OLECMDID_PROPERTIES = 10,
87 OLECMDID_CUT = 11,
88 OLECMDID_COPY = 12,
89 OLECMDID_PASTE = 13,
90 OLECMDID_PASTESPECIAL = 14,
91 OLECMDID_UNDO = 15,
92 OLECMDID_REDO = 16,
93 OLECMDID_SELECTALL = 17,
94 OLECMDID_CLEARSELECTION = 18,
95 OLECMDID_ZOOM = 19,
96 OLECMDID_GETZOOMRANGE = 20,
97 OLECMDID_UPDATECOMMANDS = 21,
98 OLECMDID_REFRESH = 22,
99 OLECMDID_STOP = 23,
100 OLECMDID_HIDETOOLBARS = 24,
101 OLECMDID_SETPROGRESSMAX = 25,
102 OLECMDID_SETPROGRESSPOS = 26,
103 OLECMDID_SETPROGRESSTEXT = 27,
104 OLECMDID_SETTITLE = 28,
105 OLECMDID_SETDOWNLOADSTATE = 29,
106 OLECMDID_STOPDOWNLOAD = 30,
107 OLECMDID_ONTOOLBARACTIVATED = 31,
108 OLECMDID_FIND = 32,
109 OLECMDID_DELETE = 33,
110 OLECMDID_HTTPEQUIV = 34,
111 OLECMDID_HTTPEQUIV_DONE = 35,
112 OLECMDID_ENABLE_INTERACTION = 36,
113 OLECMDID_ONUNLOAD = 37,
114 OLECMDID_PROPERTYBAG2 = 38,
115 OLECMDID_PREREFRESH = 39
116 /* iexplorer uses ... 44 */
117 } OLECMDID;
119 #define OLECMDERR_E_FIRST (OLE_E_LAST+1)
120 #define OLECMDERR_E_NOTSUPPORTED (OLECMDERR_E_FIRST)
121 #define OLECMDERR_E_DISABLED (OLECMDERR_E_FIRST+1)
122 #define OLECMDERR_E_NOHELP (OLECMDERR_E_FIRST+2)
123 #define OLECMDERR_E_CANCELED (OLECMDERR_E_FIRST+3)
124 #define OLECMDERR_E_UNKNOWNGROUP (OLECMDERR_E_FIRST+4)
126 /*****************************************************************************
127 * Predeclare the interfaces
129 DEFINE_GUID(IID_IOleDocument, 0xb722bcc5,0x4e68,0x101b,0xa2,0xbc,0x00,0xaa,0x00,0x40,0x47,0x70);
130 typedef struct IOleDocument IOleDocument, *LPOLEDOCUMENT;
132 DEFINE_GUID(IID_IOleDocumentSite, 0xb722bcc7,0x4e68,0x101b,0xa2,0xbc,0x00,0xaa,0x00,0x40,0x47,0x70);
133 typedef struct IOleDocumentSite IOleDocumentSite, *LPOLEDOCUMENTSITE;
135 DEFINE_GUID(IID_IOleDocumentView, 0xb722bcc6,0x4e68,0x101b,0xa2,0xbc,0x00,0xaa,0x00,0x40,0x47,0x70);
136 typedef struct IOleDocumentView IOleDocumentView, *LPOLEDOCUMENTVIEW;
138 DEFINE_GUID(IID_IEnumOleDocumentViews, 0xb722bcc6,0x4e68,0x101b,0xa2,0xbc,0x00,0xaa,0x00,0x40,0x47,0x70);
139 typedef struct IEnumOleDocumentViews IEnumOleDocumentViews, *LPENUMOLEDOCUMENTVIEWS;
141 DEFINE_GUID(IID_IOleCommandTarget, 0xb722bccb,0x4e68,0x101b,0xa2,0xbc,0x00,0xaa,0x00,0x40,0x47,0x70);
142 typedef struct IOleCommandTarget IOleCommandTarget, *LPOLECOMMANDTARGET;
144 DEFINE_GUID(IID_IContinueCallback, 0xb722bcca,0x4e68,0x101b,0xa2,0xbc,0x00,0xaa,0x00,0x40,0x47,0x70);
145 typedef struct IContinueCallback IContinueCallback, *LPCONTINUECALLBACK;
147 DEFINE_GUID(IID_IPrint, 0xb722bcc9,0x4e68,0x101b,0xa2,0xbc,0x00,0xaa,0x00,0x40,0x47,0x70);
148 typedef struct IPrint IPrint, *LPPRINT;
151 /*****************************************************************************
152 * IOleDocument interface
154 #define ICOM_INTERFACE IOleDocument
155 #define IOleDocument_METHODS \
156 ICOM_METHOD4(HRESULT,CreateView, IOleInPlaceSite*,pIPSite, IStream*,pstm, DWORD,dwReserved, IOleDocumentView**,ppView) \
157 ICOM_METHOD1(HRESULT,GetDocMiscStatus, DWORD*,pdwStatus) \
158 ICOM_METHOD2(HRESULT,EnumViews, IEnumOleDocumentViews**,ppEnum, IOleDocumentView**,ppView)
159 #define IOleDocument_IMETHODS \
160 IUnknown_IMETHODS \
161 IOleDocument_METHODS
162 ICOM_DEFINE(IOleDocument,IUnknown)
163 #undef ICOM_INTERFACE
165 /*** IUnknown methods ***/
166 #define IOleDocument_QueryInterface(p,a,b) ICOM_CALL2(QueryInterface,p,a,b)
167 #define IOleDocument_AddRef(p) ICOM_CALL (AddRef,p)
168 #define IOleDocument_Release(p) ICOM_CALL (Release,p)
169 /*** IOleDocument methods ***/
170 #define IOleDocument_CreateView(p,a,b,c,d) ICOM_CALL4(CreateView,p,a,b,c,d)
171 #define IOleDocument_GetDocMiscStatus(p,a) ICOM_CALL1(GetDocMiscStatus,p,a)
172 #define IOleDocument_EnumViews(p,a,b) ICOM_CALL2(EnumViews,p,a,b)
175 /*****************************************************************************
176 * IOleDocumentSite interface
178 #define ICOM_INTERFACE IOleDocumentSite
179 #define IOleDocumentSite_METHODS \
180 ICOM_METHOD1(HRESULT,ActivateMe, IOleDocumentView*,pViewToActivate)
181 #define IOleDocumentSite_IMETHODS \
182 IUnknown_IMETHODS \
183 IOleDocumentSite_METHODS
184 ICOM_DEFINE(IOleDocumentSite,IUnknown)
185 #undef ICOM_INTERFACE
187 /*** IUnknown methods ***/
188 #define IOleDocumentSite_QueryInterface(p,a,b) ICOM_CALL2(QueryInterface,p,a,b)
189 #define IOleDocumentSite_AddRef(p) ICOM_CALL (AddRef,p)
190 #define IOleDocumentSite_Release(p) ICOM_CALL (Release,p)
191 /*** IOleDocumentSite methods ***/
192 #define IOleDocumentSite_ActivateMe(p,a) ICOM_CALL4(ActivateMe,p,a)
195 /*****************************************************************************
196 * IOleDocumentSite interface
198 #define ICOM_INTERFACE IOleDocumentView
199 #define IOleDocumentView_METHODS \
200 ICOM_METHOD1(HRESULT,SetInPlaceSite, IOleInPlaceSite*,pIPSite) \
201 ICOM_METHOD1(HRESULT,GetInPlaceSite, IOleInPlaceSite**,ppIPSite) \
202 ICOM_METHOD1(HRESULT,GetDocument, IUnknown**,ppunk) \
203 ICOM_METHOD1(HRESULT,SetRect, LPRECT,prcView) \
204 ICOM_METHOD1(HRESULT,GetRect, LPRECT,prcView) \
205 ICOM_METHOD4(HRESULT,SetRectComplex, LPRECT,prcView, LPRECT,prcHScroll, LPRECT,prcVScroll, LPRECT,prcSizeBox) \
206 ICOM_METHOD1(HRESULT,Show, BOOL,fShow) \
207 ICOM_METHOD1(HRESULT,UIActivate, BOOL,fUIActivate) \
208 ICOM_METHOD (HRESULT,Open) \
209 ICOM_METHOD1(HRESULT,CloseView, DWORD,dwReserved) \
210 ICOM_METHOD1(HRESULT,SaveViewState, LPSTREAM,pstm) \
211 ICOM_METHOD1(HRESULT,ApplyViewState,LPSTREAM,pstm) \
212 ICOM_METHOD2(HRESULT,Clone, IOleInPlaceSite*,pIPSiteNew, IOleDocumentView**,ppViewNew)
213 #define IOleDocumentView_IMETHODS \
214 IUnknown_IMETHODS \
215 IOleDocumentView_METHODS
216 ICOM_DEFINE(IOleDocumentView,IUnknown)
217 #undef ICOM_INTERFACE
219 /*** IUnknown methods ***/
220 #define IOleDocumentView_QueryInterface(p,a,b) ICOM_CALL2(QueryInterface,p,a,b)
221 #define IOleDocumentView_AddRef(p) ICOM_CALL (AddRef,p)
222 #define IOleDocumentView_Release(p) ICOM_CALL (Release,p)
223 /*** IOleDocumentView methods ***/
224 #define IOleDocumentView_SetInPlaceSite(p,a) ICOM_CALL1(SetInPlaceSite,p,a)
225 #define IOleDocumentView_GetInPlaceSite(p,a) ICOM_CALL1(GetInPlaceSite,p,a)
226 #define IOleDocumentView_GetDocument(p,a) ICOM_CALL1(GetDocument,p,a)
227 #define IOleDocumentView_SetRect(p,a) ICOM_CALL1(SetRect,p,a)
228 #define IOleDocumentView_GetRect(p,a) ICOM_CALL1(GetRect,p,a)
229 #define IOleDocumentView_GetRectComplex(p,a,b,c,d) ICOM_CALL4(GetRectComplex,p,a,b,c,d)
230 #define IOleDocumentView_Show(p,a) ICOM_CALL1(Show,p,a)
231 #define IOleDocumentView_UIActivate(p,a) ICOM_CALL1(UIActivate,p,a)
232 #define IOleDocumentView_Open(p) ICOM_CALL (Open,p)
233 #define IOleDocumentView_CloseView(p,a) ICOM_CALL1(CloseView,p,a)
234 #define IOleDocumentView_SaveViewState(p,a) ICOM_CALL1(SaveViewState,p,a)
235 #define IOleDocumentView_ApplyViewState(p,a) ICOM_CALL1(ApplyViewState,p,a)
236 #define IOleDocumentView_Clone(p,a,b) ICOM_CALL2(Clone,p,a,b)
239 /*****************************************************************************
240 * IOleDocumentSite interface
242 #define ICOM_INTERFACE IEnumOleDocumentViews
243 #define IEnumOleDocumentViews_METHODS \
244 ICOM_METHOD3(HRESULT,Next, ULONG,cViews, IOleDocumentView**,rgpView, ULONG*,pcFetched) \
245 ICOM_METHOD1(HRESULT,Skip, ULONG,cViews) \
246 ICOM_METHOD (HRESULT,Reset) \
247 ICOM_METHOD1(HRESULT,Clone, IEnumOleDocumentViews**,ppEnum)
248 #define IEnumOleDocumentViews_IMETHODS \
249 IUnknown_IMETHODS \
250 IEnumOleDocumentViews_METHODS
251 ICOM_DEFINE(IEnumOleDocumentViews,IUnknown)
252 #undef ICOM_INTERFACE
254 /*** IUnknown methods ***/
255 #define IEnumOleDocumentViews_QueryInterface(p,a,b) ICOM_CALL2(QueryInterface,p,a,b)
256 #define IEnumOleDocumentViews_AddRef(p) ICOM_CALL (AddRef,p)
257 #define IEnumOleDocumentViews_Release(p) ICOM_CALL (Release,p)
258 /*** IEnumOleDocumentViews methods ***/
259 #define IEnumOleDocumentViews_Next(p,a,b,c) ICOM_CALL3(Next,p,a,b,c)
260 #define IEnumOleDocumentViews_Skip(p,a) ICOM_CALL1(Skip,p,a)
261 #define IEnumOleDocumentViews_Reset(p) ICOM_CALL (Reset,p)
262 #define IEnumOleDocumentViews_Clone(p,a) ICOM_CALL1(Clone,p,a)
265 /*****************************************************************************
266 * IOleCommandTarget interface
268 #define ICOM_INTERFACE IOleCommandTarget
269 #define IOleCommandTarget_METHODS \
270 ICOM_METHOD4(HRESULT,QueryStatus, const GUID*,pguidCmdGroup, ULONG,cCmds, OLECMD*,prgCmds, OLECMDTEXT*,pCmdText) \
271 ICOM_METHOD5(HRESULT,Exec, const GUID*,pguidCmdGroup, DWORD,nCmdID, DWORD,nCmdexecopt, VARIANT*,pvaIn, VARIANT*,pvaOut)
272 #define IOleCommandTarget_IMETHODS \
273 IUnknown_IMETHODS \
274 IOleCommandTarget_METHODS
275 ICOM_DEFINE(IOleCommandTarget,IUnknown)
276 #undef ICOM_INTERFACE
278 /*** IUnknown methods ***/
279 #define IOleCommandTarget_QueryInterface(p,a,b) ICOM_CALL2(QueryInterface,p,a,b)
280 #define IOleCommandTarget_AddRef(p) ICOM_CALL (AddRef,p)
281 #define IOleCommandTarget_Release(p) ICOM_CALL (Release,p)
282 /*** IOleCommandTarget methods ***/
283 #define IOleCommandTarget_QueryStatus(p,a,b,c,d) ICOM_CALL4(QueryStatus,p,a,b,c,d)
284 #define IOleCommandTarget_Exec(p,a,b,c,d,e) ICOM_CALL5(Exec,p,a,b,c,d,e)
287 /*****************************************************************************
288 * IContinueCallback interface
290 #define ICOM_INTERFACE IContinueCallback
291 #define IContinueCallback_METHODS \
292 ICOM_METHOD (HRESULT,FContinue) \
293 ICOM_METHOD3(HRESULT,FContinuePrinting, LONG,nCntPrinted, LONG,nCurPage, WCHAR*,pwszPrintStatus)
294 #define IContinueCallback_IMETHODS \
295 IUnknown_IMETHODS \
296 IContinueCallback_METHODS
297 ICOM_DEFINE(IContinueCallback,IUnknown)
298 #undef ICOM_INTERFACE
300 /*** IUnknown methods ***/
301 #define IContinueCallback_QueryInterface(p,a,b) ICOM_CALL2(QueryInterface,p,a,b)
302 #define IContinueCallback_AddRef(p) ICOM_CALL (AddRef,p)
303 #define IContinueCallback_Release(p) ICOM_CALL (Release,p)
304 /*** IContinueCallback methods ***/
305 #define IContinueCallback_FContinue(p) ICOM_CALL (FContinue,p)
306 #define IContinueCallback_FContinuePrinting(p,a,b,c) ICOM_CALL3(FContinuePrinting,p,a,b,c)
309 /*****************************************************************************
310 * IPrint interface
312 #define ICOM_INTERFACE IPrint
313 #define IPrint_METHODS \
314 ICOM_METHOD1(HRESULT,SetInitialPageNum, LONG,nFirstPage) \
315 ICOM_METHOD2(HRESULT,GetPageInfo, LONG*,pnFirstPage, LONG*,pcPages) \
316 ICOM_METHOD8(HRESULT,Print, DWORD,grfFlags, DVTARGETDEVICE**,pptd, PAGESET**,ppPageSet, STGMEDIUM*,pstgmOptions, IContinueCallback*,pcallback, LONG,nFirstPage, LONG*,pcPagesPrinted, LONG*,pnLastPage)
317 #define IPrint_IMETHODS \
318 IUnknown_IMETHODS \
319 IPrint_METHODS
320 ICOM_DEFINE(IPrint,IUnknown)
321 #undef ICOM_INTERFACE
323 /*** IUnknown methods ***/
324 #define IPrint_QueryInterface(p,a,b) ICOM_CALL2(QueryInterface,p,a,b)
325 #define IPrint_AddRef(p) ICOM_CALL (AddRef,p)
326 #define IPrint_Release(p) ICOM_CALL (Release,p)
327 /*** Iprint methods ***/
328 #define IPrint_SetInitialPageNum(p,a) ICOM_CALL1(SetInitialPageNum,p,a)
329 #define IPrint_GetPageInfo(p,a,b) ICOM_CALL2(GetPageInfo,p,a,b)
330 #define IPrint_Print(p,a,b,c,d,e,f,g) ICOM_CALL7(Print,p,a,b,c,d,e,f,g)
333 #define LPMSODOCUMENT LPOLEDOCUMENT
334 #define LPMSODOCUMENTSITE LPOLEDOCUMENTSITE
335 #define LPMSOVIEW LPOLEDOCUMENTVIEW
336 #define LPENUMMSOVIEW LPENUMOLEDOCUMENTVIEWS
337 #define LPMSOCOMMANDTARGET LPOLECOMMANDTARGET
338 #define IID_IMsoDocument IID_IOleDocument
339 #define IID_IMsoDocumentSite IID_IOleDocumentSite
340 #define IID_IMsoView IID_IOleDocumentView
341 #define IID_IEnumMsoView IID_IEnumOleDocumentViews
342 #define IID_IMsoCommandTarget IID_IOleCommandTarget
345 #endif /* __WINE_DOCOBJ_H */