2 * Defines the COM interfaces and APIs related to IDataObject.
6 #ifndef __WINE_WINE_OBJ_DATAOBJECT_H
7 #define __WINE_WINE_OBJ_DATAOBJECT_H
11 #endif /* defined(__cplusplus) */
13 /*****************************************************************************
14 * Predeclare the structures
16 typedef enum tagDATADIR
22 typedef struct DVTARGETDEVICE16 DVTARGETDEVICE16, *LPDVTARGETDEVICE16;
23 typedef struct DVTARGETDEVICE DVTARGETDEVICE, *LPDVTARGETDEVICE;
25 typedef struct FORMATETC16 FORMATETC16, *LPFORMATETC16;
26 typedef struct FORMATETC FORMATETC, *LPFORMATETC;
28 typedef struct STGMEDIUM STGMEDIUM, *LPSTGMEDIUM;
31 /*****************************************************************************
32 * Predeclare the interfaces
34 DEFINE_OLEGUID(IID_IAdviseSink, 0x0000010fL, 0, 0);
35 typedef struct IAdviseSink IAdviseSink,*LPADVISESINK;
37 DEFINE_OLEGUID(IID_IAdviseSink2, 0x00000125L, 0, 0);
38 typedef struct IAdviseSink2 IAdviseSink2,*LPADVISESINK2;
40 DEFINE_OLEGUID(IID_IDataAdviseHolder, 0x00000110L, 0, 0);
41 typedef struct IDataAdviseHolder IDataAdviseHolder,*LPDATAADVISEHOLDER;
43 DEFINE_OLEGUID(IID_IDataObject, 0x0000010EL, 0, 0);
44 typedef struct IDataObject IDataObject,*LPDATAOBJECT;
46 DEFINE_OLEGUID(IID_IEnumFORMATETC, 0x00000103L, 0, 0);
47 typedef struct IEnumFORMATETC IEnumFORMATETC,*LPENUMFORMATETC;
49 DEFINE_OLEGUID(IID_IEnumSTATDATA, 0x00000105L, 0, 0);
50 typedef struct IEnumSTATDATA IEnumSTATDATA,*LPENUMSTATDATA;
53 /*****************************************************************************
54 * DVTARGETDEVICE structure
59 WORD tdDriverNameOffset;
60 WORD tdDeviceNameOffset;
61 WORD tdPortNameOffset;
62 WORD tdExtDevmodeOffset;
67 /*****************************************************************************
70 /* wished data format */
81 /*****************************************************************************
96 typedef struct tagRemSTGMEDIUM
101 unsigned long pUnkForRelease;
102 unsigned long cbData;
106 /* dataobject as answer to a request */
112 HMETAFILEPICT hMetaFilePict;
113 HENHMETAFILE hEnhMetaFile;
115 LPOLESTR lpszFileName;
119 IUnknown *pUnkForRelease;
127 ADVF_DATAONSTOP = 64,
128 ADVFCACHE_NOHANDLER = 8,
129 ADVFCACHE_FORCEBUILTIN = 16,
130 ADVFCACHE_ONSAVE = 32
133 typedef struct tagSTATDATA
137 IAdviseSink *pAdvSink;
139 } STATDATA, *LPSTATDATA;
141 /*****************************************************************************
142 * IAdviseSink interface
144 #define ICOM_INTERFACE IAdviseSink
145 #define IAdviseSink_METHODS \
146 ICOM_VMETHOD2(OnDataChange, FORMATETC*,pFormatetc, STGMEDIUM*,pStgmed) \
147 ICOM_VMETHOD2(OnViewChange, DWORD,dwAspect, LONG,lindex) \
148 ICOM_VMETHOD1(OnRename, IMoniker*,pmk) \
149 ICOM_VMETHOD (OnSave) \
150 ICOM_VMETHOD (OnClose)
151 #define IAdviseSink_IMETHODS \
154 ICOM_DEFINE(IAdviseSink,IUnknown)
155 #undef ICOM_INTERFACE
157 /*** IUnknown methods ***/
158 #define IAdviseSink_QueryInterface(p,a,b) ICOM_CALL2(QueryInterface,p,a,b)
159 #define IAdviseSink_AddRef(p) ICOM_CALL (AddRef,p)
160 #define IAdviseSink_Release(p) ICOM_CALL (Release,p)
161 /*** IAdviseSink methods ***/
162 #define IAdviseSink_OnDataChange(p,a,b) ICOM_CALL2(OnDataChange,p,a,b)
163 #define IAdviseSink_OnViewChange(p,a,b) ICOM_CALL2(OnViewChange,p,a,b)
164 #define IAdviseSink_OnRename(p,a) ICOM_CALL1(OnRename,p,a)
165 #define IAdviseSink_OnSave(p) ICOM_CALL (OnSave,p)
166 #define IAdviseSink_OnClose(p) ICOM_CALL (OnClose,p)
169 /*****************************************************************************
170 * IAdviseSink2 interface
172 #define ICOM_INTERFACE IAdviseSink2
173 #define IAdviseSink2_METHODS \
174 ICOM_VMETHOD1(OnLinkSrcChange, IMoniker*,pmk)
175 #define IAdviseSink2_IMETHODS \
176 IAdviseSink_IMETHODS \
178 ICOM_DEFINE(IAdviseSink2,IAdviseSink)
179 #undef ICOM_INTERFACE
181 /*** IUnknown methods ***/
182 #define IAdviseSink2_QueryInterface(p,a,b) ICOM_CALL2(QueryInterface,p,a,b)
183 #define IAdviseSink2_AddRef(p) ICOM_CALL (AddRef,p)
184 #define IAdviseSink2_Release(p) ICOM_CALL (Release,p)
185 /*** IAdviseSink methods ***/
186 #define IAdviseSink2_OnDataChange(p,a,b) ICOM_CALL2(IAdviseSink,OnDataChange,p,a,b)
187 #define IAdviseSink2_OnViewChange(p,a,b) ICOM_CALL2(IAdviseSink,OnViewChange,p,a,b)
188 #define IAdviseSink2_OnRename(p,a) ICOM_CALL1(IAdviseSink,OnRename,p,a)
189 #define IAdviseSink2_OnSave(p) ICOM_CALL (IAdviseSink,OnSave,p)
190 #define IAdviseSink2_OnClose(p) ICOM_CALL (IAdviseSink,OnClose,p)
191 /*** IAdviseSink2 methods ***/
192 #define IAdviseSink2_OnLinkSrcChange(p,a) ICOM_CALL(OnLinkSrcChange,p,a)
195 /*****************************************************************************
196 * IDataAdviseHolder interface
198 #define ICOM_INTERFACE IDataAdviseHolder
199 #define IDataAdviseHolder_METHODS \
200 ICOM_METHOD5(HRESULT,Advise, IDataObject*,pDataObject, FORMATETC*,pFetc, DWORD,advf, IAdviseSink*,pAdvise, DWORD*,pdwConnection) \
201 ICOM_METHOD1(HRESULT,Unadvise, DWORD,dwConnection) \
202 ICOM_METHOD1(HRESULT,EnumAdvise, IEnumSTATDATA**,ppenumAdvise) \
203 ICOM_METHOD3(HRESULT,SendOnDataChange, IDataObject*,pDataObject, DWORD,dwReserved, DWORD,advf)
204 #define IDataAdviseHolder_IMETHODS \
206 IDataAdviseHolder_METHODS
207 ICOM_DEFINE(IDataAdviseHolder,IUnknown)
208 #undef ICOM_INTERFACE
210 /*** IUnknown methods ***/
211 #define IDataAdviseHolder_QueryInterface(p,a,b) ICOM_CALL2(QueryInterface,p,a,b)
212 #define IDataAdviseHolder_AddRef(p) ICOM_CALL (AddRef,p)
213 #define IDataAdviseHolder_Release(p) ICOM_CALL (Release,p)
214 /*** IDataAdviseHolder methods ***/
215 #define IDataAdviseHolder_Advise(p,a,b,c,d,e) ICOM_CALL5(Advise,p,a,b,c,d,e)
216 #define IDataAdviseHolder_Unadvise(p,a) ICOM_CALL1(Unadvise,p,a)
217 #define IDataAdviseHolder_EnumAdvise(p,a) ICOM_CALL1(EnumAdvise,p,a)
218 #define IDataAdviseHolder_SendOnDataChange(p,a,b,c) ICOM_CALL3(SendOnDataChange,p,a,b,c)
220 /* FIXME: not implemented */
221 HRESULT WINAPI CreateDataAdviseHolder(LPDATAADVISEHOLDER* ppDAHolder);
224 /*****************************************************************************
225 * IDataObject interface
227 #define ICOM_INTERFACE IDataObject
228 #define IDataObject_METHODS \
229 ICOM_METHOD2(HRESULT,GetData, LPFORMATETC,pformatetcIn, STGMEDIUM*,pmedium) \
230 ICOM_METHOD2(HRESULT,GetDataHere, LPFORMATETC,pformatetc, STGMEDIUM*,pmedium) \
231 ICOM_METHOD1(HRESULT,QueryGetData, LPFORMATETC,pformatetc) \
232 ICOM_METHOD2(HRESULT,GetCanonicalFormatEtc, LPFORMATETC,pformatectIn, LPFORMATETC,pformatetcOut) \
233 ICOM_METHOD3(HRESULT,SetData, LPFORMATETC,pformatetc, STGMEDIUM*,pmedium, BOOL,fRelease) \
234 ICOM_METHOD2(HRESULT,EnumFormatEtc, DWORD,dwDirection, IEnumFORMATETC**,ppenumFormatEtc) \
235 ICOM_METHOD4(HRESULT,DAdvise, FORMATETC*,pformatetc, DWORD,advf, IAdviseSink*,pAdvSink, DWORD*,pdwConnection) \
236 ICOM_METHOD1(HRESULT,DUnadvise, DWORD,dwConnection) \
237 ICOM_METHOD1(HRESULT,EnumDAdvise, IEnumSTATDATA**,ppenumAdvise)
238 #define IDataObject_IMETHODS \
241 ICOM_DEFINE(IDataObject,IUnknown)
242 #undef ICOM_INTERFACE
244 /*** IUnknown methods ***/
245 #define IDataObject_QueryInterface(p,a,b) ICOM_CALL2(QueryInterface,p,a,b)
246 #define IDataObject_AddRef(p) ICOM_CALL (AddRef,p)
247 #define IDataObject_Release(p) ICOM_CALL (Release,p)
248 /*** IDataObject methods ***/
249 #define IDataObject_GetData(p,a,b) ICOM_CALL2(GetData,p,a,b)
250 #define IDataObject_GetDataHere(p,a,b) ICOM_CALL2(GetDataHere,p,a,b)
251 #define IDataObject_QueryGetData(p,a) ICOM_CALL1(QueryGetData,p,a)
252 #define IDataObject_GetCanonicalFormatEtc(p,a,b) ICOM_CALL2(GetCanonicalFormatEtc,p,a,b)
253 #define IDataObject_SetData(p,a,b,c) ICOM_CALL3(SetData,p,a,b,c)
254 #define IDataObject_EnumFormatEtc(p,a,b) ICOM_CALL2(EnumFormatEtc,p,a,b)
255 #define IDataObject_DAdvise(p,a,b,c,d) ICOM_CALL4(DAdvise,p,a,b,c,d)
256 #define IDataObject_DUnadvise(p,a) ICOM_CALL1(DUnadvise,p,a)
257 #define IDataObject_EnumDAdvise(p,a) ICOM_CALL1(EnumDAdvise,p,a)
260 /*****************************************************************************
261 * IEnumFORMATETC interface
263 #define ICOM_INTERFACE IEnumFORMATETC
264 #define IEnumFORMATETC_METHODS \
265 ICOM_METHOD3(HRESULT,Next, ULONG,celt, FORMATETC*,rgelt, ULONG*,pceltFethed) \
266 ICOM_METHOD1(HRESULT,Skip, ULONG,celt) \
267 ICOM_METHOD (HRESULT,Reset) \
268 ICOM_METHOD1(HRESULT,Clone, IEnumFORMATETC**,ppenum)
269 #define IEnumFORMATETC_IMETHODS \
271 IEnumFORMATETC_METHODS
272 ICOM_DEFINE(IEnumFORMATETC,IUnknown)
273 #undef ICOM_INTERFACE
275 /*** IUnknown methods ***/
276 #define IEnumFORMATETC_QueryInterface(p,a,b) ICOM_CALL2(QueryInterface,p,a,b)
277 #define IEnumFORMATETC_AddRef(p) ICOM_CALL (AddRef,p)
278 #define IEnumFORMATETC_Release(p) ICOM_CALL (Release,p)
279 /*** IEnumFORMATETC methods ***/
280 #define IEnumFORMATETC_Next(p,a,b,c) ICOM_CALL3(Next,p,a,b,c)
281 #define IEnumFORMATETC_Skip(p,a) ICOM_CALL1(Skip,p,a)
282 #define IEnumFORMATETC_Reset(p) ICOM_CALL (Reset,p)
283 #define IEnumFORMATETC_Clone(p,a) ICOM_CALL1(Clone,p,a)
286 /*****************************************************************************
287 * IEnumSTATDATA interface
289 #define ICOM_INTERFACE IEnumSTATDATA
290 #define IEnumSTATDATA_METHODS \
291 ICOM_METHOD3(HRESULT,Next, ULONG,celt, STATDATA*,rgelt, ULONG*,pceltFethed) \
292 ICOM_METHOD1(HRESULT,Skip, ULONG,celt) \
293 ICOM_METHOD (HRESULT,Reset) \
294 ICOM_METHOD1(HRESULT,Clone, IEnumSTATDATA**,ppenum)
295 #define IEnumSTATDATA_IMETHODS \
297 IEnumSTATDATA_METHODS
298 ICOM_DEFINE(IEnumSTATDATA,IUnknown)
299 #undef ICOM_INTERFACE
301 /*** IUnknown methods ***/
302 #define IEnumSTATDATA_QueryInterface(p,a,b) ICOM_CALL2(QueryInterface,p,a,b)
303 #define IEnumSTATDATA_AddRef(p) ICOM_CALL (AddRef,p)
304 #define IEnumSTATDATA_Release(p) ICOM_CALL (Release,p)
305 /*** IEnumSTATDATA methods ***/
306 #define IEnumSTATDATA_Next(p,a,b,c) ICOM_CALL3(Next,p,a,b,c)
307 #define IEnumSTATDATA_Skip(p,a) ICOM_CALL1(Skip,p,a)
308 #define IEnumSTATDATA_Reset(p) ICOM_CALL (Reset,p)
309 #define IEnumSTATDATA_Clone(p,a) ICOM_CALL1(Clone,p,a)
312 /*****************************************************************************
316 /* FIXME: not implemented */
317 HRESULT WINAPI CreateDataCache(LPUNKNOWN pUnkOuter, REFCLSID rclsid, REFIID iid, LPVOID* ppv);
321 #endif /* defined(__cplusplus) */
323 #endif /* __WINE_WINE_OBJ_DATAOBJECT_H */