Reimplemented winsock asynchronous DNS services. No longer use a
[wine] / include / docobj.h
1 #ifndef __WINE_DOCOBJ_H
2 #define __WINE_DOCOBJ_H
3
4 #include "winbase.h"
5 #include "winuser.h"
6 #include "ole2.h"
7 #include "wine/obj_oleaut.h"
8
9 /*****************************************************************************
10  * Declare the structures
11  */
12 typedef enum
13 {
14         OLECMDF_SUPPORTED = 0x1,
15         OLECMDF_ENABLED = 0x2,
16         OLECMDF_LATCHED = 0x4,
17         OLECMDF_NINCHED = 0x8
18 } OLECMDF;
19
20 typedef struct _tagOLECMD
21 {
22         ULONG cmdID;
23         DWORD cmdf;
24 } OLECMD;
25
26 typedef struct _tagOLECMDTEXT
27 {
28         DWORD cmdtextf;
29         ULONG cwActual;
30         ULONG cwBuf;
31         WCHAR rgwz[1];
32 } OLECMDTEXT;
33
34 typedef enum 
35
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;
44
45 typedef struct tagPAGERANGE
46 {
47         LONG nFromPage;
48         LONG nToPage;
49 } PAGERANGE;
50
51 typedef struct  tagPAGESET
52 {
53         ULONG cbStruct;
54         BOOL fOddPages;
55         BOOL fEvenPages;
56         ULONG cPageRange;
57         PAGERANGE rgPages[ 1 ];
58 } PAGESET;
59
60 typedef enum
61 {
62         OLECMDTEXTF_NONE  = 0,
63         OLECMDTEXTF_NAME  = 1,
64         OLECMDTEXTF_STATUS  = 2
65 } OLECMDTEXTF;
66
67 typedef enum 
68 {
69         OLECMDEXECOPT_DODEFAULT = 0,
70         OLECMDEXECOPT_PROMPTUSER  = 1,
71         OLECMDEXECOPT_DONTPROMPTUSER  = 2,
72         OLECMDEXECOPT_SHOWHELP  = 3
73 } OLECMDEXECOPT;
74                                                                                                                           
75 #define OLECMDERR_E_FIRST            (OLE_E_LAST+1)
76 #define OLECMDERR_E_NOTSUPPORTED     (OLECMDERR_E_FIRST)
77 #define OLECMDERR_E_DISABLED         (OLECMDERR_E_FIRST+1)
78 #define OLECMDERR_E_NOHELP           (OLECMDERR_E_FIRST+2)
79 #define OLECMDERR_E_CANCELED         (OLECMDERR_E_FIRST+3)
80 #define OLECMDERR_E_UNKNOWNGROUP     (OLECMDERR_E_FIRST+4)
81  
82 /*****************************************************************************
83  * Predeclare the interfaces
84  */
85 DEFINE_GUID(IID_IOleDocument, 0xb722bcc5,0x4e68,0x101b,0xa2,0xbc,0x00,0xaa,0x00,0x40,0x47,0x70);
86 typedef struct IOleDocument IOleDocument, *LPOLEDOCUMENT;
87  
88 DEFINE_GUID(IID_IOleDocumentSite, 0xb722bcc7,0x4e68,0x101b,0xa2,0xbc,0x00,0xaa,0x00,0x40,0x47,0x70);
89 typedef struct IOleDocumentSite IOleDocumentSite, *LPOLEDOCUMENTSITE;
90  
91 DEFINE_GUID(IID_IOleDocumentView, 0xb722bcc6,0x4e68,0x101b,0xa2,0xbc,0x00,0xaa,0x00,0x40,0x47,0x70);
92 typedef struct IOleDocumentView IOleDocumentView, *LPOLEDOCUMENTVIEW;
93  
94 DEFINE_GUID(IID_IEnumOleDocumentViews, 0xb722bcc6,0x4e68,0x101b,0xa2,0xbc,0x00,0xaa,0x00,0x40,0x47,0x70);
95 typedef struct IEnumOleDocumentViews IEnumOleDocumentViews, *LPENUMOLEDOCUMENTVIEWS;
96  
97 DEFINE_GUID(IID_IOleCommandTarget, 0xb722bccb,0x4e68,0x101b,0xa2,0xbc,0x00,0xaa,0x00,0x40,0x47,0x70);
98 typedef struct IOleCommandTarget IOleCommandTarget, *LPOLECOMMANDTARGET;
99  
100 DEFINE_GUID(IID_IContinueCallback, 0xb722bcca,0x4e68,0x101b,0xa2,0xbc,0x00,0xaa,0x00,0x40,0x47,0x70);
101 typedef struct IContinueCallback IContinueCallback, *LPCONTINUECALLBACK;
102  
103 DEFINE_GUID(IID_IPrint, 0xb722bcc9,0x4e68,0x101b,0xa2,0xbc,0x00,0xaa,0x00,0x40,0x47,0x70);
104 typedef struct IPrint IPrint, *LPPRINT;
105  
106  
107 /*****************************************************************************
108  * IOleDocument interface
109  */
110 #define ICOM_INTERFACE IOleDocument
111 #define IOleDocument_METHODS \
112         ICOM_METHOD4(HRESULT,CreateView, IOleInPlaceSite*,pIPSite, IStream*,pstm, DWORD,dwReserved, IOleDocumentView**,ppView) \
113         ICOM_METHOD1(HRESULT,GetDocMiscStatus, DWORD*,pdwStatus) \
114         ICOM_METHOD2(HRESULT,EnumViews, IEnumOleDocumentViews**,ppEnum, IOleDocumentView**,ppView)
115 #define IOleDocument_IMETHODS \
116         IUnknown_IMETHODS \
117         IOleDocument_METHODS
118 ICOM_DEFINE(IOleDocument,IUnknown)
119 #undef ICOM_INTERFACE
120
121 #ifdef ICOM_CINTERFACE
122 /*** IUnknown methods ***/
123 #define IOleDocument_QueryInterface(p,a,b)      ICOM_CALL2(QueryInterface,p,a,b)
124 #define IOleDocument_AddRef(p)                  ICOM_CALL (AddRef,p)
125 #define IOleDocument_Release(p)                 ICOM_CALL (Release,p)
126 /*** IOleDocument methods ***/
127 #define IOleDocument_CreateView(p,a,b,c,d)      ICOM_CALL4(CreateView,p,a,b,c,d)
128 #define IOleDocument_GetDocMiscStatus(p,a)      ICOM_CALL1(GetDocMiscStatus,p,a)
129 #define IOleDocument_EnumViews(p,a,b)           ICOM_CALL2(EnumViews,p,a,b)
130 #endif
131
132
133 /*****************************************************************************
134  * IOleDocumentSite interface
135  */
136 #define ICOM_INTERFACE IOleDocumentSite
137 #define IOleDocumentSite_METHODS \
138         ICOM_METHOD1(HRESULT,ActivateMe, IOleDocumentView*,pViewToActivate)
139 #define IOleDocumentSite_IMETHODS \
140         IUnknown_IMETHODS \
141         IOleDocumentSite_METHODS
142 ICOM_DEFINE(IOleDocumentSite,IUnknown)
143 #undef ICOM_INTERFACE
144
145 #ifdef ICOM_CINTERFACE
146 /*** IUnknown methods ***/
147 #define IOleDocumentSite_QueryInterface(p,a,b)      ICOM_CALL2(QueryInterface,p,a,b)
148 #define IOleDocumentSite_AddRef(p)                  ICOM_CALL (AddRef,p)
149 #define IOleDocumentSite_Release(p)                 ICOM_CALL (Release,p)
150 /*** IOleDocumentSite methods ***/
151 #define IOleDocumentSite_ActivateMe(p,a)            ICOM_CALL4(ActivateMe,p,a)
152 #endif
153
154
155 /*****************************************************************************
156  * IOleDocumentSite interface
157  */
158 #define ICOM_INTERFACE IOleDocumentView
159 #define IOleDocumentView_METHODS \
160         ICOM_METHOD1(HRESULT,SetInPlaceSite, IOleInPlaceSite*,pIPSite) \
161         ICOM_METHOD1(HRESULT,GetInPlaceSite, IOleInPlaceSite**,ppIPSite) \
162         ICOM_METHOD1(HRESULT,GetDocument, IUnknown**,ppunk) \
163         ICOM_METHOD1(HRESULT,SetRect, LPRECT,prcView) \
164         ICOM_METHOD1(HRESULT,GetRect, LPRECT,prcView) \
165         ICOM_METHOD4(HRESULT,GetRectComplex, LPRECT,prcView, LPRECT,prcHScroll, LPRECT,prcVScroll, LPRECT,prcSizeBox) \
166         ICOM_METHOD1(HRESULT,Show, BOOL,fShow) \
167         ICOM_METHOD1(HRESULT,UIActivate, BOOL,fUIActivate) \
168         ICOM_METHOD (HRESULT,Open) \
169         ICOM_METHOD1(HRESULT,CloseView, DWORD,dwReserved) \
170         ICOM_METHOD1(HRESULT,SaveViewState, LPSTREAM,pstm) \
171         ICOM_METHOD1(HRESULT,ApplyViewState,LPSTREAM,pstm) \
172         ICOM_METHOD2(HRESULT,Clone, IOleInPlaceSite*,pIPSiteNew, IOleDocumentView**,ppViewNew) 
173 #define IOleDocumentView_IMETHODS \
174         IUnknown_IMETHODS \
175         IOleDocumentView_METHODS
176 ICOM_DEFINE(IOleDocumentView,IUnknown)
177 #undef ICOM_INTERFACE
178
179 #ifdef ICOM_CINTERFACE
180 /*** IUnknown methods ***/
181 #define IOleDocumentView_QueryInterface(p,a,b)      ICOM_CALL2(QueryInterface,p,a,b)
182 #define IOleDocumentView_AddRef(p)                  ICOM_CALL (AddRef,p)
183 #define IOleDocumentView_Release(p)                 ICOM_CALL (Release,p)
184 /*** IOleDocumentView methods ***/
185 #define IOleDocumentView_SetInPlaceSite(p,a)        ICOM_CALL1(SetInPlaceSite,p,a)
186 #define IOleDocumentView_GetInPlaceSite(p,a)        ICOM_CALL1(GetInPlaceSite,p,a)
187 #define IOleDocumentView_GetDocument(p,a)           ICOM_CALL1(GetDocument,p,a)
188 #define IOleDocumentView_SetRect(p,a)               ICOM_CALL1(SetRect,p,a)
189 #define IOleDocumentView_GetRect(p,a)               ICOM_CALL1(GetRect,p,a)
190 #define IOleDocumentView_GetRectComplex(p,a,b,c,d)  ICOM_CALL4(GetRectComplex,p,a,b,c,d)
191 #define IOleDocumentView_Show(p,a)                  ICOM_CALL1(Show,p,a)
192 #define IOleDocumentView_UIActivate(p,a)            ICOM_CALL1(UIActivate,p,a)
193 #define IOleDocumentView_Open(p)                    ICOM_CALL (Open,p)
194 #define IOleDocumentView_CloseView(p,a)             ICOM_CALL1(CloseView,p,a)
195 #define IOleDocumentView_SaveViewState(p,a)         ICOM_CALL1(SaveViewState,p,a)
196 #define IOleDocumentView_ApplyViewState(p,a)        ICOM_CALL1(ApplyViewState,p,a)
197 #define IOleDocumentView_Clone(p,a,b)               ICOM_CALL2(Clone,p,a,b)
198 #endif
199
200
201 /*****************************************************************************
202  * IOleDocumentSite interface
203  */
204 #define ICOM_INTERFACE IEnumOleDocumentViews
205 #define IEnumOleDocumentViews_METHODS \
206         ICOM_METHOD3(HRESULT,Next, ULONG,cViews, IOleDocumentView**,rgpView, ULONG*,pcFetched) \
207         ICOM_METHOD1(HRESULT,Skip, ULONG,cViews) \
208         ICOM_METHOD (HRESULT,Reset) \
209         ICOM_METHOD1(HRESULT,Clone, IEnumOleDocumentViews**,ppEnum) 
210 #define IEnumOleDocumentViews_IMETHODS \
211         IUnknown_IMETHODS \
212         IEnumOleDocumentViews_METHODS
213 ICOM_DEFINE(IEnumOleDocumentViews,IUnknown)
214 #undef ICOM_INTERFACE
215
216 #ifdef ICOM_CINTERFACE
217 /*** IUnknown methods ***/
218 #define IEnumOleDocumentViews_QueryInterface(p,a,b)   ICOM_CALL2(QueryInterface,p,a,b)
219 #define IEnumOleDocumentViews_AddRef(p)               ICOM_CALL (AddRef,p)
220 #define IEnumOleDocumentViews_Release(p)              ICOM_CALL (Release,p)
221 /*** IEnumOleDocumentViews methods ***/
222 #define IEnumOleDocumentViews_Next(p,a,b,c)           ICOM_CALL3(Next,p,a,b,c)
223 #define IEnumOleDocumentViews_Skip(p,a)               ICOM_CALL1(Skip,p,a)
224 #define IEnumOleDocumentViews_Reset(p)                ICOM_CALL (Reset,p)
225 #define IEnumOleDocumentViews_Clone(p,a)              ICOM_CALL1(Clone,p,a)
226 #endif
227
228                                   
229 /*****************************************************************************
230  * IOleCommandTarget interface
231  */
232 #define ICOM_INTERFACE IOleCommandTarget
233 #define IOleCommandTarget_METHODS \
234         ICOM_METHOD4(HRESULT,QueryStatus, const GUID*,pguidCmdGroup, ULONG,cCmds, OLECMD*,prgCmds[1], OLECMDTEXT*,pCmdText) \
235         ICOM_METHOD5(HRESULT,Exec, const GUID*,pguidCmdGroup, DWORD,nCmdID, DWORD,nCmdexecopt, VARIANT*,pvaIn, VARIANT*,pvaOut)
236 #define IOleCommandTarget_IMETHODS \
237         IUnknown_IMETHODS \
238         IOleCommandTarget_METHODS
239 ICOM_DEFINE(IOleCommandTarget,IUnknown)
240 #undef ICOM_INTERFACE
241
242 #ifdef ICOM_CINTERFACE
243 /*** IUnknown methods ***/
244 #define IOleCommandTarget_QueryInterface(p,a,b)   ICOM_CALL2(QueryInterface,p,a,b)
245 #define IOleCommandTarget_AddRef(p)               ICOM_CALL (AddRef,p)
246 #define IOleCommandTarget_Release(p)              ICOM_CALL (Release,p)
247 /*** IOleCommandTarget methods ***/
248 #define IOleCommandTarget_QueryStatus(p,a,b,c,d)  ICOM_CALL4(QueryStatus,p,a,b,c,d)
249 #define IOleCommandTarget_Exec(p,a,b,c,d,e)       ICOM_CALL5(Exec,p,a,b,c,d,e)
250 #endif
251
252
253 /*****************************************************************************
254  * IContinueCallback interface
255  */
256 #define ICOM_INTERFACE IContinueCallback
257 #define IContinueCallback_METHODS \
258         ICOM_METHOD (HRESULT,FContinue) \
259         ICOM_METHOD3(HRESULT,FContinuePrinting, LONG,nCntPrinted, LONG,nCurPage, WCHAR*,pwszPrintStatus)
260 #define IContinueCallback_IMETHODS \
261         IUnknown_IMETHODS \
262         IContinueCallback_METHODS
263 ICOM_DEFINE(IContinueCallback,IUnknown)
264 #undef ICOM_INTERFACE
265
266 #ifdef ICOM_CINTERFACE
267 /*** IUnknown methods ***/
268 #define IContinueCallback_QueryInterface(p,a,b)   ICOM_CALL2(QueryInterface,p,a,b)
269 #define IContinueCallback_AddRef(p)               ICOM_CALL (AddRef,p)
270 #define IContinueCallback_Release(p)              ICOM_CALL (Release,p)
271 /*** IContinueCallback methods ***/
272 #define IContinueCallback_FContinue(p)               ICOM_CALL (FContinue,p)
273 #define IContinueCallback_FContinuePrinting(p,a,b,c) ICOM_CALL3(FContinuePrinting,p,a,b,c)
274 #endif
275
276
277 /*****************************************************************************
278  * IPrint interface
279  */
280 #define ICOM_INTERFACE IPrint
281 #define IPrint_METHODS \
282         ICOM_METHOD1(HRESULT,SetInitialPageNum, LONG,nFirstPage) \
283         ICOM_METHOD2(HRESULT,GetPageInfo, LONG*,pnFirstPage, LONG*,pcPages) \
284         ICOM_METHOD8(HRESULT,Print, DWORD,grfFlags, DVTARGETDEVICE**,pptd, PAGESET**,ppPageSet, STGMEDIUM*,pstgmOptions, IContinueCallback*,pcallback, LONG,nFirstPage, LONG*,pcPagesPrinted, LONG*,pnLastPage) 
285 #define IPrint_IMETHODS \
286         IUnknown_IMETHODS \
287         IPrint_METHODS
288 ICOM_DEFINE(IPrint,IUnknown)
289 #undef ICOM_INTERFACE
290                                 
291 #ifdef ICOM_CINTERFACE
292 /*** IUnknown methods ***/
293 #define IPrint_QueryInterface(p,a,b)   ICOM_CALL2(QueryInterface,p,a,b)
294 #define IPrint_AddRef(p)               ICOM_CALL (AddRef,p)
295 #define IPrint_Release(p)              ICOM_CALL (Release,p)
296 /*** Iprint methods ***/
297 #define IPrint_SetInitialPageNum(p,a)  ICOM_CALL1(SetInitialPageNum,p,a)
298 #define IPrint_GetPageInfo(p,a,b)      ICOM_CALL2(GetPageInfo,p,a,b)
299 #define IPrint_Print(p,a,b,c,d,e,f,g)  ICOM_CALL7(Print,p,a,b,c,d,e,f,g)
300 #endif
301                                 
302                                 
303                                 
304
305 #endif /* __WINE_DOCOBJ_H */