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