Implemented the OLE object default handler and data cache.
[wine] / include / wine / obj_oleundo.h
1 /*
2  * Defines the COM interfaces and APIs from ocidl.h which pertain to Undo/Redo
3  *
4  * Depends on 'obj_base.h'.
5  */
6
7 #ifndef __WINE_WINE_OBJ_OLEUNDO_H
8 #define __WINE_WINE_OBJ_OLEUNDO_H
9
10
11 #include "winbase.h"
12
13 /*****************************************************************************
14  * Predeclare the interfaces
15  */
16 DEFINE_GUID(IID_IQuickActivate, 0xcf51ed10, 0x62fe, 0x11cf, 0xbf, 0x86, 0x00, 0xa0, 0xc9, 0x03, 0x48, 0x36);
17 typedef struct IQuickActivate IQuickActivate,*LPQUICKACTIVATE;
18  
19 DEFINE_GUID(IID_IPointerInactive, 0x55980ba0, 0x35aa, 0x11cf, 0xb6, 0x71, 0x00, 0xaa, 0x00, 0x4c, 0xd6, 0xd8);
20 typedef struct IPointerInactive IPointerInactive,*LPPOINTERINACTIVE;
21
22 DEFINE_GUID(IID_IAdviseSinkEx, 0x3af24290, 0x0c96, 0x11ce, 0xa0, 0xcf, 0x00, 0xaa, 0x00, 0x60, 0x0a, 0xb8);
23 typedef struct IAdviseSinkEx IAdviseSinkEx,*LPADVISESINKEX;
24
25 DEFINE_GUID(IID_IOleUndoManager, 0xd001f200, 0xef97, 0x11ce, 0x9b, 0xc9, 0x00, 0xaa, 0x00, 0x60, 0x8e, 0x01);
26 typedef struct IOleUndoManager IOleUndoManager,*LPOLEUNDOMANAGER;
27
28 DEFINE_GUID(IID_IOleUndoUnit, 0x894ad3b0, 0xef97, 0x11ce, 0x9b, 0xc9, 0x00, 0xaa, 0x00, 0x60, 0x8e, 0x01);
29 typedef struct IOleUndoUnit IOleUndoUnit,*LPOLEUNDOUNIT;
30
31 DEFINE_GUID(IID_IOleParentUndoUnit, 0xa1faf330, 0xef97, 0x11ce, 0x9b, 0xc9, 0x00, 0xaa, 0x00, 0x60, 0x8e, 0x01);
32 typedef struct IOleParentUndoUnit IOleParentUndoUnit,*LPOLEPARENTUNDOUNIT;
33
34 DEFINE_GUID(IID_IEnumOleUndoUnits, 0xb3e7c340, 0xef97, 0x11ce, 0x9b, 0xc9, 0x00, 0xaa, 0x00, 0x60, 0x8e, 0x01);
35 typedef struct IEnumOleUndoUnits IEnumOleUndoUnits,*LPENUMOLEUNDOUNITS;
36
37 /*****************************************************************************
38  * Declare the structures
39  */
40 typedef enum tagQACONTAINERFLAGS
41 {
42         QACONTAINER_SHOWHATCHING = 0x1,
43         QACONTAINER_SHOWGRABHANDLES = 0x2,
44         QACONTAINER_USERMODE = 0x4,
45         QACONTAINER_DISPLAYASDEFAULT = 0x8,
46         QACONTAINER_UIDEAD = 0x10,
47         QACONTAINER_AUTOCLIP = 0x20,
48         QACONTAINER_MESSAGEREFLECT = 0x40,
49         QACONTAINER_SUPPORTSMNEMONICS = 0x80
50 } QACONTAINERFLAGS;
51
52 typedef DWORD OLE_COLOR;
53
54 typedef struct tagQACONTROL
55 {
56         ULONG cbSize;
57         DWORD dwMiscStatus;
58         DWORD dwViewStatus;
59         DWORD dwEventCookie;
60         DWORD dwPropNotifyCookie;
61         DWORD dwPointerActivationPolicy;
62 } QACONTROL;
63
64 typedef struct tagQACONTAINER
65 {
66         ULONG cbSize;
67         IOleClientSite *pClientSite;
68         IAdviseSinkEx *pAdviseSink;
69         IPropertyNotifySink *pPropertyNotifySink;
70         IUnknown *pUnkEventSink;
71         DWORD dwAmbientFlags;
72         OLE_COLOR colorFore;
73         OLE_COLOR colorBack;
74         IFont *pFont;
75         IOleUndoManager *pUndoMgr;
76         DWORD dwAppearance;
77         LONG lcid;
78         HPALETTE hpal;
79         struct IBindHost *pBindHost;
80 } QACONTAINER;
81
82 /*****************************************************************************
83  * IQuickActivate interface
84  */
85 #define ICOM_INTERFACE IQuickActivate
86 #define IQuickActivate_METHODS \
87         ICOM_METHOD2(HRESULT,QuickActivate, QACONTAINER*,pQaContainer, QACONTROL*,pQaControl) \
88         ICOM_METHOD1(HRESULT,SetContentExtent, LPSIZEL,pSizel) \
89         ICOM_METHOD1(HRESULT,GetContentExtent, LPSIZEL,pSizel)
90 #define IQuickActivate_IMETHODS \
91         IUnknown_IMETHODS \
92         IQuickActivate_METHODS
93 ICOM_DEFINE(IQuickActivate,IUnknown)
94 #undef ICOM_INTERFACE
95
96 #ifdef ICOM_CINTERFACE
97 /*** IUnknown methods ***/
98 #define IQuickActivate_QueryInterface(p,a,b) ICOM_CALL2(QueryInterface,p,a,b)
99 #define IQuickActivate_AddRef(p)             ICOM_CALL (AddRef,p)
100 #define IQuickActivate_Release(p)            ICOM_CALL (Release,p)
101 /*** IQuickActivate methods ***/
102 #define IQuickActivate_QuickActivate(p,a,b)  ICOM_CALL2(QuickActivate,p,a,b)
103 #define IQuickActivate_SetContentExtent(p,a) ICOM_CALL1(SetContentExtent,p,a)
104 #define IQuickActivate_GetContentExtent(p,a) ICOM_CALL1(GetContentExtent,p,a)
105 #endif
106
107
108 /*****************************************************************************
109  * IPointerInactive interface
110  */
111 #define ICOM_INTERFACE IPointerInactive
112 #define IPointerInactive_METHODS \
113         ICOM_METHOD1(HRESULT,GetActivationPolicy, DWORD*,pdwPolicy) \
114         ICOM_METHOD4(HRESULT,OnInactiveMoveMouse, LPCRECT,pRectBounds, LONG,x, LONG,y, DWORD,grfKeyState) \
115         ICOM_METHOD5(HRESULT,OnInactiveSetCursor, LPCRECT,pRectBounds, LONG,x, LONG,y, DWORD,dwMouseMsg, BOOL,fSetAlways) 
116 #define IPointerInactive_IMETHODS \
117         IUnknown_IMETHODS \
118         IPointerInactive_METHODS
119 ICOM_DEFINE(IPointerInactive,IUnknown)
120 #undef ICOM_INTERFACE
121
122 #ifdef ICOM_CINTERFACE
123 /*** IUnknown methods ***/
124 #define IPointerInactive_QueryInterface(p,a,b) ICOM_CALL2(QueryInterface,p,a,b)
125 #define IPointerInactive_AddRef(p)             ICOM_CALL (AddRef,p)
126 #define IPointerInactive_Release(p)            ICOM_CALL (Release,p)
127 /*** IPointerInactive methods ***/
128 #define IPointerInactive_GetActivationPolicy(p,a)         ICOM_CALL1(GetActivationPolicy,p,a)
129 #define IPointerInactive_OnInactiveMoveMouse(p,a,b,c,d)   ICOM_CALL4(OnInactiveMoveMouse,p,a,b,c,d) 
130 #define IPointerInactive_OnInactiveSetCursor(p,a,b,c,d,e) ICOM_CALL5(OnInactiveSetCursor,p,a,b,d,e)
131 #endif
132
133
134 /*****************************************************************************
135  * IAdviseSinkEx interface
136  */
137 #define ICOM_INTERFACE IAdviseSinkEx
138 #define IAdviseSinkEx_METHODS \
139         ICOM_METHOD1(HRESULT,OnViewStatusChange, DWORD,dwViewStatus)
140 #define IAdviseSinkEx_IMETHODS \
141         IAdviseSink_IMETHODS \
142         IAdviseSinkEx_METHODS
143 ICOM_DEFINE(IAdviseSinkEx,IAdviseSink)
144 #undef ICOM_INTERFACE
145
146 #ifdef ICOM_CINTERFACE
147 /*** IUnknown methods ***/
148 #define IAdviseSinkEx_QueryInterface(p,a,b) ICOM_CALL2(QueryInterface,p,a,b)
149 #define IAdviseSinkEx_AddRef(p)             ICOM_CALL (AddRef,p)
150 #define IAdviseSinkEx_Release(p)            ICOM_CALL (Release,p)
151 /*** IAdviseSink methods ***/
152 #define IAdviseSinkEx_OnDataChange(p,a,b)   ICOM_CALL2(OnDataChange,p,a,b)
153 #define IAdviseSinkEx_OnViewChange(p,a,b)   ICOM_CALL2(OnViewChange,p,a,b)
154 #define IAdviseSinkEx_OnRename(p,a)         ICOM_CALL1(OnRename,p,a)
155 #define IAdviseSinkEx_OnSave(p)             ICOM_CALL (OnSave,p)
156 #define IAdviseSinkEx_OnClose(p)            ICOM_CALL (OnClose,p)
157 /*** IAdviseSinkEx methods ***/
158 #define IAdviseSinkEx_OnViewStatusChange(p,a)  ICOM_CALL1(OnViewStatusChange,p,a)
159 #endif
160
161
162 /*****************************************************************************
163  * IOleUndoManager interface
164  */
165 #define ICOM_INTERFACE IOleUndoManager
166 #define IOleUndoManager_METHODS \
167         ICOM_METHOD1(HRESULT,Open, IOleParentUndoUnit*,pPUU) \
168         ICOM_METHOD2(HRESULT,Close, IOleParentUndoUnit*,pPUU, BOOL,fCommit) \
169         ICOM_METHOD1(HRESULT,Add, IOleUndoUnit*,pUU) \
170         ICOM_METHOD1(HRESULT,GetOpenParentState, DWORD*,pdwState) \
171         ICOM_METHOD1(HRESULT,DiscardFrom, IOleUndoUnit*,pUU) \
172         ICOM_METHOD1(HRESULT,UndoTo, IOleUndoUnit*,pUU) \
173         ICOM_METHOD1(HRESULT,RedoTo, IOleUndoUnit*,pUU) \
174         ICOM_METHOD1(HRESULT,EnumUndoable, IEnumOleUndoUnits**,ppEnum) \
175         ICOM_METHOD1(HRESULT,EnumRedoable, IEnumOleUndoUnits**,ppEnum) \
176         ICOM_METHOD1(HRESULT,GetLastUndoDescription, BSTR*,pBstr) \
177         ICOM_METHOD1(HRESULT,GetLastRedoDescription, BSTR*,pBstr) \
178         ICOM_METHOD1(HRESULT,Enable, BOOL,fEnable)
179 #define IOleUndoManager_IMETHODS \
180         IUnknown_IMETHODS \
181         IOleUndoManager_METHODS
182 ICOM_DEFINE(IOleUndoManager,IUnknown)
183 #undef ICOM_INTERFACE
184
185 #ifdef ICOM_CINTERFACE
186 /*** IUnknown methods ***/
187 #define IOleUndoManager_QueryInterface(p,a,b) ICOM_CALL2(QueryInterface,p,a,b)
188 #define IOleUndoManager_AddRef(p)             ICOM_CALL (AddRef,p)
189 #define IOleUndoManager_Release(p)            ICOM_CALL (Release,p)
190 /*** IOleUndoManager methods ***/
191 #define IOleUndoManager_Open(p,a)                   ICOM_CALL1(Open,p,a)
192 #define IOleUndoManager_Close(p,a,b)                ICOM_CALL2(Close,p,a,b)
193 #define IOleUndoManager_Add(p,a)                    ICOM_CALL1(Add,p,a)
194 #define IOleUndoManager_GetOpenParentState(p,a)     ICOM_CALL1(GetOpenParentState,p,a)
195 #define IOleUndoManager_DiscardFrom(p,a)            ICOM_CALL1(DiscardFrom,p,a)
196 #define IOleUndoManager_UndoTo(p,a)                 ICOM_CALL1(UndoTo,p,a)
197 #define IOleUndoManager_RedoTo(p,a)                 ICOM_CALL1(RedoTo,p,a)
198 #define IOleUndoManager_EnumUndoable(p,a)           ICOM_CALL1(EnumUndoable,p,a)
199 #define IOleUndoManager_EnumRedoable(p,a)           ICOM_CALL1(EnumRedoable,p,a)
200 #define IOleUndoManager_GetLastUndoDescription(p,a) ICOM_CALL1(GetLastUndoDescription,p,a)
201 #define IOleUndoManager_GetLastRedoDescription(p,a) ICOM_CALL1(GetLastRedoDescription,p,a)
202 #define IOleUndoManager_Enable(p,a)                 ICOM_CALL1(Enable,p,a)
203 #endif
204
205
206 /*****************************************************************************
207  * IOleUndoUnit interface
208  */
209 #define ICOM_INTERFACE IOleUndoUnit
210 #define IOleUndoUnit_METHODS \
211         ICOM_METHOD1(HRESULT,Do, IOleUndoManager*,pUndoManager) \
212         ICOM_METHOD1(HRESULT,GetDescription, BSTR*,pBstr) \
213         ICOM_METHOD2(HRESULT,GetUnitType, CLSID*,pClsid, LONG*,plID) \
214         ICOM_METHOD (HRESULT,OnNextAdd)
215 #define IOleUndoUnit_IMETHODS \
216         IUnknown_IMETHODS \
217         IOleUndoUnit_METHODS
218 ICOM_DEFINE(IOleUndoUnit,IUnknown)
219 #undef ICOM_INTERFACE
220
221 #ifdef ICOM_CINTERFACE
222 /*** IUnknown methods ***/
223 #define IOleUndoUnit_QueryInterface(p,a,b) ICOM_CALL2(QueryInterface,p,a,b)
224 #define IOleUndoUnit_AddRef(p)             ICOM_CALL (AddRef,p)
225 #define IOleUndoUnit_Release(p)            ICOM_CALL (Release,p)
226 /*** IOleUndoUnit methods ***/
227 #define IOleUndoUnit_Do(p,a)               ICOM_CALL1(Do,p,a)
228 #define IOleUndoUnit_GetDescription(p,a)   ICOM_CALL1(GetDescription,p,a)
229 #define IOleUndoUnit_GetUnitType(p,a,b)    ICOM_CALL2(GetUnitType,p,a,b)
230 #define IOleUndoUnit_OnNextAdd(p)          ICOM_CALL (OnNextAdd,p)
231 #endif
232
233
234
235 /*****************************************************************************
236  * IOleUndoUnit interface
237  */
238 #define ICOM_INTERFACE IOleParentUndoUnit
239 #define IOleParentUndoUnit_METHODS \
240         ICOM_METHOD1(HRESULT,Open, IOleParentUndoUnit*,pPUU) \
241         ICOM_METHOD2(HRESULT,Close, IOleParentUndoUnit*,pPUU, BOOL,fCommit) \
242         ICOM_METHOD1(HRESULT,Add, IOleUndoUnit*,pUU) \
243         ICOM_METHOD1(HRESULT,FindUnit, IOleUndoUnit*,pUU) \
244         ICOM_METHOD1(HRESULT,GetParentState, DWORD*,pdwState)
245 #define IOleParentUndoUnit_IMETHODS \
246         IOleUndoUnit_IMETHODS \
247         IOleParentUndoUnit_METHODS
248 ICOM_DEFINE(IOleParentUndoUnit,IOleUndoUnit)
249 #undef ICOM_INTERFACE
250
251 #ifdef ICOM_CINTERFACE
252 /*** IUnknown methods ***/
253 #define IOleParentUndoUnit_QueryInterface(p,a,b) ICOM_CALL2(QueryInterface,p,a,b)
254 #define IOleParentUndoUnit_AddRef(p)             ICOM_CALL (AddRef,p)
255 #define IOleParentUndoUnit_Release(p)            ICOM_CALL (Release,p)
256 /*** IOleUndoUnit methods ***/
257 #define IOleParentUndoUnit_Do(p,a)               ICOM_CALL1(Do,p,a)
258 #define IOleParentUndoUnit_GetDescription(p,a)   ICOM_CALL1(GetDescription,p,a)
259 #define IOleParentUndoUnit_GetUnitType(p,a,b)    ICOM_CALL2(GetUnitType,p,a,b)
260 #define IOleParentUndoUnit_OnNextAdd(p)          ICOM_CALL (OnNextAdd,p)
261 /*** IOleParentUndoUnit methods ***/
262 #define IOleParentUndoUnit_Open(p,a)             ICOM_CALL1(Open,p,a)
263 #define IOleParentUndoUnit_Close(p,a,b)          ICOM_CALL2(Close,p,a,b)
264 #define IOleParentUndoUnit_Add(p,a)              ICOM_CALL1(Add,p,a)
265 #define IOleParentUndoUnit_FindUnit(p,a)         ICOM_CALL1(FindUnit,p,a)
266 #define IOleParentUndoUnit_GetParentState(p,a,b) ICOM_CALL1(GetParentState,p,a)
267 #endif
268
269
270 /*****************************************************************************
271  * IEnumOleUndoUnits interface
272  */
273 #define ICOM_INTERFACE IEnumOleUndoUnits
274 #define IEnumOleUndoUnits_METHODS \
275         ICOM_METHOD3(HRESULT,Next, ULONG,cElt, IOleUndoUnit**,rgElt, ULONG*,pcEltFetched) \
276         ICOM_METHOD1(HRESULT,Skip, ULONG,cElt) \
277         ICOM_METHOD (HRESULT,Reset) \
278         ICOM_METHOD1(HRESULT,Clone, IEnumOleUndoUnits**,ppEnum)
279 #define IEnumOleUndoUnits_IMETHODS \
280         IUnknown_IMETHODS \
281         IEnumOleUndoUnits_METHODS
282 ICOM_DEFINE(IEnumOleUndoUnits,IUnknown)
283 #undef ICOM_INTERFACE
284
285 #ifdef ICOM_CINTERFACE
286 /*** IUnknown methods ***/
287 #define IEnumOleUndoUnits_QueryInterface(p,a,b) ICOM_CALL2(QueryInterface,p,a,b)
288 #define IEnumOleUndoUnits_AddRef(p)             ICOM_CALL (AddRef,p)
289 #define IEnumOleUndoUnits_Release(p)            ICOM_CALL (Release,p)
290 /*** IEnumOleUndoUnits methods ***/
291 #define IEnumOleUndoUnits_Next(p,a,b,c)         ICOM_CALL3(Next,p,a,b,c)
292 #define IEnumOleUndoUnits_Skip(p,a)             ICOM_CALL1(Skip,p,a)
293 #define IEnumOleUndoUnits_Reset(p,a)            ICOM_CALL (Reset,p,a)
294 #define IEnumOleUndoUnits_Clone(p,a)            ICOM_CALL1(Clone,p,a)
295 #endif
296
297
298
299 #endif /* __WINE_WINE_OBJ_OLEUNDO_H */
300