- rework how texturing is done in the D3D driver
[wine/multimedia.git] / include / docobj.h
blob4cbdaef421ca4b4836f4c9f97a1abcaaa858039b
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 #ifndef __WINE__
20 #include "rpc.h"
21 #include "rpcndr.h"
22 #ifndef COM_NO_WINDOWS_H
23 #include "windows.h"
24 #include "ole2.h"
25 #endif
26 #endif
28 #ifndef __WINE_DOCOBJ_H
29 #define __WINE_DOCOBJ_H
31 #include "winbase.h"
32 #include "windef.h"
33 #include "wingdi.h"
34 #include "winuser.h"
35 #include "ole2.h"
36 #include "wine/obj_oleaut.h"
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;
148 #define OLECMDERR_E_FIRST (OLE_E_LAST+1)
149 #define OLECMDERR_E_NOTSUPPORTED (OLECMDERR_E_FIRST)
150 #define OLECMDERR_E_DISABLED (OLECMDERR_E_FIRST+1)
151 #define OLECMDERR_E_NOHELP (OLECMDERR_E_FIRST+2)
152 #define OLECMDERR_E_CANCELED (OLECMDERR_E_FIRST+3)
153 #define OLECMDERR_E_UNKNOWNGROUP (OLECMDERR_E_FIRST+4)
155 /*****************************************************************************
156 * Predeclare the interfaces
158 DEFINE_GUID(IID_IOleDocument, 0xb722bcc5,0x4e68,0x101b,0xa2,0xbc,0x00,0xaa,0x00,0x40,0x47,0x70);
159 typedef struct IOleDocument IOleDocument, *LPOLEDOCUMENT;
161 DEFINE_GUID(IID_IOleDocumentSite, 0xb722bcc7,0x4e68,0x101b,0xa2,0xbc,0x00,0xaa,0x00,0x40,0x47,0x70);
162 typedef struct IOleDocumentSite IOleDocumentSite, *LPOLEDOCUMENTSITE;
164 DEFINE_GUID(IID_IOleDocumentView, 0xb722bcc6,0x4e68,0x101b,0xa2,0xbc,0x00,0xaa,0x00,0x40,0x47,0x70);
165 typedef struct IOleDocumentView IOleDocumentView, *LPOLEDOCUMENTVIEW;
167 DEFINE_GUID(IID_IEnumOleDocumentViews, 0xb722bcc6,0x4e68,0x101b,0xa2,0xbc,0x00,0xaa,0x00,0x40,0x47,0x70);
168 typedef struct IEnumOleDocumentViews IEnumOleDocumentViews, *LPENUMOLEDOCUMENTVIEWS;
170 DEFINE_GUID(IID_IOleCommandTarget, 0xb722bccb,0x4e68,0x101b,0xa2,0xbc,0x00,0xaa,0x00,0x40,0x47,0x70);
171 typedef struct IOleCommandTarget IOleCommandTarget, *LPOLECOMMANDTARGET;
173 DEFINE_GUID(IID_IContinueCallback, 0xb722bcca,0x4e68,0x101b,0xa2,0xbc,0x00,0xaa,0x00,0x40,0x47,0x70);
174 typedef struct IContinueCallback IContinueCallback, *LPCONTINUECALLBACK;
176 DEFINE_GUID(IID_IPrint, 0xb722bcc9,0x4e68,0x101b,0xa2,0xbc,0x00,0xaa,0x00,0x40,0x47,0x70);
177 typedef struct IPrint IPrint, *LPPRINT;
180 /*****************************************************************************
181 * IOleDocument interface
183 #define ICOM_INTERFACE IOleDocument
184 #define IOleDocument_METHODS \
185 ICOM_METHOD4(HRESULT,CreateView, IOleInPlaceSite*,pIPSite, IStream*,pstm, DWORD,dwReserved, IOleDocumentView**,ppView) \
186 ICOM_METHOD1(HRESULT,GetDocMiscStatus, DWORD*,pdwStatus) \
187 ICOM_METHOD2(HRESULT,EnumViews, IEnumOleDocumentViews**,ppEnum, IOleDocumentView**,ppView)
188 #define IOleDocument_IMETHODS \
189 IUnknown_IMETHODS \
190 IOleDocument_METHODS
191 ICOM_DEFINE(IOleDocument,IUnknown)
192 #undef ICOM_INTERFACE
194 /*** IUnknown methods ***/
195 #define IOleDocument_QueryInterface(p,a,b) ICOM_CALL2(QueryInterface,p,a,b)
196 #define IOleDocument_AddRef(p) ICOM_CALL (AddRef,p)
197 #define IOleDocument_Release(p) ICOM_CALL (Release,p)
198 /*** IOleDocument methods ***/
199 #define IOleDocument_CreateView(p,a,b,c,d) ICOM_CALL4(CreateView,p,a,b,c,d)
200 #define IOleDocument_GetDocMiscStatus(p,a) ICOM_CALL1(GetDocMiscStatus,p,a)
201 #define IOleDocument_EnumViews(p,a,b) ICOM_CALL2(EnumViews,p,a,b)
204 /*****************************************************************************
205 * IOleDocumentSite interface
207 #define ICOM_INTERFACE IOleDocumentSite
208 #define IOleDocumentSite_METHODS \
209 ICOM_METHOD1(HRESULT,ActivateMe, IOleDocumentView*,pViewToActivate)
210 #define IOleDocumentSite_IMETHODS \
211 IUnknown_IMETHODS \
212 IOleDocumentSite_METHODS
213 ICOM_DEFINE(IOleDocumentSite,IUnknown)
214 #undef ICOM_INTERFACE
216 /*** IUnknown methods ***/
217 #define IOleDocumentSite_QueryInterface(p,a,b) ICOM_CALL2(QueryInterface,p,a,b)
218 #define IOleDocumentSite_AddRef(p) ICOM_CALL (AddRef,p)
219 #define IOleDocumentSite_Release(p) ICOM_CALL (Release,p)
220 /*** IOleDocumentSite methods ***/
221 #define IOleDocumentSite_ActivateMe(p,a) ICOM_CALL4(ActivateMe,p,a)
224 /*****************************************************************************
225 * IOleDocumentSite interface
227 #define ICOM_INTERFACE IOleDocumentView
228 #define IOleDocumentView_METHODS \
229 ICOM_METHOD1(HRESULT,SetInPlaceSite, IOleInPlaceSite*,pIPSite) \
230 ICOM_METHOD1(HRESULT,GetInPlaceSite, IOleInPlaceSite**,ppIPSite) \
231 ICOM_METHOD1(HRESULT,GetDocument, IUnknown**,ppunk) \
232 ICOM_METHOD1(HRESULT,SetRect, LPRECT,prcView) \
233 ICOM_METHOD1(HRESULT,GetRect, LPRECT,prcView) \
234 ICOM_METHOD4(HRESULT,SetRectComplex, LPRECT,prcView, LPRECT,prcHScroll, LPRECT,prcVScroll, LPRECT,prcSizeBox) \
235 ICOM_METHOD1(HRESULT,Show, BOOL,fShow) \
236 ICOM_METHOD1(HRESULT,UIActivate, BOOL,fUIActivate) \
237 ICOM_METHOD (HRESULT,Open) \
238 ICOM_METHOD1(HRESULT,CloseView, DWORD,dwReserved) \
239 ICOM_METHOD1(HRESULT,SaveViewState, LPSTREAM,pstm) \
240 ICOM_METHOD1(HRESULT,ApplyViewState,LPSTREAM,pstm) \
241 ICOM_METHOD2(HRESULT,Clone, IOleInPlaceSite*,pIPSiteNew, IOleDocumentView**,ppViewNew)
242 #define IOleDocumentView_IMETHODS \
243 IUnknown_IMETHODS \
244 IOleDocumentView_METHODS
245 ICOM_DEFINE(IOleDocumentView,IUnknown)
246 #undef ICOM_INTERFACE
248 /*** IUnknown methods ***/
249 #define IOleDocumentView_QueryInterface(p,a,b) ICOM_CALL2(QueryInterface,p,a,b)
250 #define IOleDocumentView_AddRef(p) ICOM_CALL (AddRef,p)
251 #define IOleDocumentView_Release(p) ICOM_CALL (Release,p)
252 /*** IOleDocumentView methods ***/
253 #define IOleDocumentView_SetInPlaceSite(p,a) ICOM_CALL1(SetInPlaceSite,p,a)
254 #define IOleDocumentView_GetInPlaceSite(p,a) ICOM_CALL1(GetInPlaceSite,p,a)
255 #define IOleDocumentView_GetDocument(p,a) ICOM_CALL1(GetDocument,p,a)
256 #define IOleDocumentView_SetRect(p,a) ICOM_CALL1(SetRect,p,a)
257 #define IOleDocumentView_GetRect(p,a) ICOM_CALL1(GetRect,p,a)
258 #define IOleDocumentView_GetRectComplex(p,a,b,c,d) ICOM_CALL4(GetRectComplex,p,a,b,c,d)
259 #define IOleDocumentView_Show(p,a) ICOM_CALL1(Show,p,a)
260 #define IOleDocumentView_UIActivate(p,a) ICOM_CALL1(UIActivate,p,a)
261 #define IOleDocumentView_Open(p) ICOM_CALL (Open,p)
262 #define IOleDocumentView_CloseView(p,a) ICOM_CALL1(CloseView,p,a)
263 #define IOleDocumentView_SaveViewState(p,a) ICOM_CALL1(SaveViewState,p,a)
264 #define IOleDocumentView_ApplyViewState(p,a) ICOM_CALL1(ApplyViewState,p,a)
265 #define IOleDocumentView_Clone(p,a,b) ICOM_CALL2(Clone,p,a,b)
268 /*****************************************************************************
269 * IOleDocumentSite interface
271 #define ICOM_INTERFACE IEnumOleDocumentViews
272 #define IEnumOleDocumentViews_METHODS \
273 ICOM_METHOD3(HRESULT,Next, ULONG,cViews, IOleDocumentView**,rgpView, ULONG*,pcFetched) \
274 ICOM_METHOD1(HRESULT,Skip, ULONG,cViews) \
275 ICOM_METHOD (HRESULT,Reset) \
276 ICOM_METHOD1(HRESULT,Clone, IEnumOleDocumentViews**,ppEnum)
277 #define IEnumOleDocumentViews_IMETHODS \
278 IUnknown_IMETHODS \
279 IEnumOleDocumentViews_METHODS
280 ICOM_DEFINE(IEnumOleDocumentViews,IUnknown)
281 #undef ICOM_INTERFACE
283 /*** IUnknown methods ***/
284 #define IEnumOleDocumentViews_QueryInterface(p,a,b) ICOM_CALL2(QueryInterface,p,a,b)
285 #define IEnumOleDocumentViews_AddRef(p) ICOM_CALL (AddRef,p)
286 #define IEnumOleDocumentViews_Release(p) ICOM_CALL (Release,p)
287 /*** IEnumOleDocumentViews methods ***/
288 #define IEnumOleDocumentViews_Next(p,a,b,c) ICOM_CALL3(Next,p,a,b,c)
289 #define IEnumOleDocumentViews_Skip(p,a) ICOM_CALL1(Skip,p,a)
290 #define IEnumOleDocumentViews_Reset(p) ICOM_CALL (Reset,p)
291 #define IEnumOleDocumentViews_Clone(p,a) ICOM_CALL1(Clone,p,a)
294 /*****************************************************************************
295 * IOleCommandTarget interface
297 #define ICOM_INTERFACE IOleCommandTarget
298 #define IOleCommandTarget_METHODS \
299 ICOM_METHOD4(HRESULT,QueryStatus, const GUID*,pguidCmdGroup, ULONG,cCmds, OLECMD*,prgCmds, OLECMDTEXT*,pCmdText) \
300 ICOM_METHOD5(HRESULT,Exec, const GUID*,pguidCmdGroup, DWORD,nCmdID, DWORD,nCmdexecopt, VARIANT*,pvaIn, VARIANT*,pvaOut)
301 #define IOleCommandTarget_IMETHODS \
302 IUnknown_IMETHODS \
303 IOleCommandTarget_METHODS
304 ICOM_DEFINE(IOleCommandTarget,IUnknown)
305 #undef ICOM_INTERFACE
307 /*** IUnknown methods ***/
308 #define IOleCommandTarget_QueryInterface(p,a,b) ICOM_CALL2(QueryInterface,p,a,b)
309 #define IOleCommandTarget_AddRef(p) ICOM_CALL (AddRef,p)
310 #define IOleCommandTarget_Release(p) ICOM_CALL (Release,p)
311 /*** IOleCommandTarget methods ***/
312 #define IOleCommandTarget_QueryStatus(p,a,b,c,d) ICOM_CALL4(QueryStatus,p,a,b,c,d)
313 #define IOleCommandTarget_Exec(p,a,b,c,d,e) ICOM_CALL5(Exec,p,a,b,c,d,e)
316 /*****************************************************************************
317 * IContinueCallback interface
319 #define ICOM_INTERFACE IContinueCallback
320 #define IContinueCallback_METHODS \
321 ICOM_METHOD (HRESULT,FContinue) \
322 ICOM_METHOD3(HRESULT,FContinuePrinting, LONG,nCntPrinted, LONG,nCurPage, WCHAR*,pwszPrintStatus)
323 #define IContinueCallback_IMETHODS \
324 IUnknown_IMETHODS \
325 IContinueCallback_METHODS
326 ICOM_DEFINE(IContinueCallback,IUnknown)
327 #undef ICOM_INTERFACE
329 /*** IUnknown methods ***/
330 #define IContinueCallback_QueryInterface(p,a,b) ICOM_CALL2(QueryInterface,p,a,b)
331 #define IContinueCallback_AddRef(p) ICOM_CALL (AddRef,p)
332 #define IContinueCallback_Release(p) ICOM_CALL (Release,p)
333 /*** IContinueCallback methods ***/
334 #define IContinueCallback_FContinue(p) ICOM_CALL (FContinue,p)
335 #define IContinueCallback_FContinuePrinting(p,a,b,c) ICOM_CALL3(FContinuePrinting,p,a,b,c)
338 /*****************************************************************************
339 * IPrint interface
341 #define ICOM_INTERFACE IPrint
342 #define IPrint_METHODS \
343 ICOM_METHOD1(HRESULT,SetInitialPageNum, LONG,nFirstPage) \
344 ICOM_METHOD2(HRESULT,GetPageInfo, LONG*,pnFirstPage, LONG*,pcPages) \
345 ICOM_METHOD8(HRESULT,Print, DWORD,grfFlags, DVTARGETDEVICE**,pptd, PAGESET**,ppPageSet, STGMEDIUM*,pstgmOptions, IContinueCallback*,pcallback, LONG,nFirstPage, LONG*,pcPagesPrinted, LONG*,pnLastPage)
346 #define IPrint_IMETHODS \
347 IUnknown_IMETHODS \
348 IPrint_METHODS
349 ICOM_DEFINE(IPrint,IUnknown)
350 #undef ICOM_INTERFACE
352 /*** IUnknown methods ***/
353 #define IPrint_QueryInterface(p,a,b) ICOM_CALL2(QueryInterface,p,a,b)
354 #define IPrint_AddRef(p) ICOM_CALL (AddRef,p)
355 #define IPrint_Release(p) ICOM_CALL (Release,p)
356 /*** Iprint methods ***/
357 #define IPrint_SetInitialPageNum(p,a) ICOM_CALL1(SetInitialPageNum,p,a)
358 #define IPrint_GetPageInfo(p,a,b) ICOM_CALL2(GetPageInfo,p,a,b)
359 #define IPrint_Print(p,a,b,c,d,e,f,g) ICOM_CALL7(Print,p,a,b,c,d,e,f,g)
362 #define LPMSODOCUMENT LPOLEDOCUMENT
363 #define LPMSODOCUMENTSITE LPOLEDOCUMENTSITE
364 #define LPMSOVIEW LPOLEDOCUMENTVIEW
365 #define LPENUMMSOVIEW LPENUMOLEDOCUMENTVIEWS
366 #define LPMSOCOMMANDTARGET LPOLECOMMANDTARGET
367 #define IID_IMsoDocument IID_IOleDocument
368 #define IID_IMsoDocumentSite IID_IOleDocumentSite
369 #define IID_IMsoView IID_IOleDocumentView
370 #define IID_IEnumMsoView IID_IEnumOleDocumentViews
371 #define IID_IMsoCommandTarget IID_IOleCommandTarget
374 #endif /* __WINE_DOCOBJ_H */