2 * Defines the COM interfaces and APIs from ocidl.h which pertain to Undo/Redo
4 * Depends on 'obj_base.h'.
6 * Copyright (C) 1999 Paul Quinn
8 * This library is free software; you can redistribute it and/or
9 * modify it under the terms of the GNU Lesser General Public
10 * License as published by the Free Software Foundation; either
11 * version 2.1 of the License, or (at your option) any later version.
13 * This library is distributed in the hope that it will be useful,
14 * but WITHOUT ANY WARRANTY; without even the implied warranty of
15 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
16 * Lesser General Public License for more details.
18 * You should have received a copy of the GNU Lesser General Public
19 * License along with this library; if not, write to the Free Software
20 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
23 #ifndef __WINE_WINE_OBJ_OLEUNDO_H
24 #define __WINE_WINE_OBJ_OLEUNDO_H
28 #endif /* defined(__cplusplus) */
30 /*****************************************************************************
31 * Predeclare the interfaces
33 DEFINE_GUID(IID_IQuickActivate
, 0xcf51ed10, 0x62fe, 0x11cf, 0xbf, 0x86, 0x00, 0xa0, 0xc9, 0x03, 0x48, 0x36);
34 typedef struct IQuickActivate IQuickActivate
,*LPQUICKACTIVATE
;
36 DEFINE_GUID(IID_IPointerInactive
, 0x55980ba0, 0x35aa, 0x11cf, 0xb6, 0x71, 0x00, 0xaa, 0x00, 0x4c, 0xd6, 0xd8);
37 typedef struct IPointerInactive IPointerInactive
,*LPPOINTERINACTIVE
;
39 DEFINE_GUID(IID_IAdviseSinkEx
, 0x3af24290, 0x0c96, 0x11ce, 0xa0, 0xcf, 0x00, 0xaa, 0x00, 0x60, 0x0a, 0xb8);
40 typedef struct IAdviseSinkEx IAdviseSinkEx
,*LPADVISESINKEX
;
42 DEFINE_GUID(IID_IOleUndoManager
, 0xd001f200, 0xef97, 0x11ce, 0x9b, 0xc9, 0x00, 0xaa, 0x00, 0x60, 0x8e, 0x01);
43 typedef struct IOleUndoManager IOleUndoManager
,*LPOLEUNDOMANAGER
;
45 DEFINE_GUID(IID_IOleUndoUnit
, 0x894ad3b0, 0xef97, 0x11ce, 0x9b, 0xc9, 0x00, 0xaa, 0x00, 0x60, 0x8e, 0x01);
46 typedef struct IOleUndoUnit IOleUndoUnit
,*LPOLEUNDOUNIT
;
48 DEFINE_GUID(IID_IOleParentUndoUnit
, 0xa1faf330, 0xef97, 0x11ce, 0x9b, 0xc9, 0x00, 0xaa, 0x00, 0x60, 0x8e, 0x01);
49 typedef struct IOleParentUndoUnit IOleParentUndoUnit
,*LPOLEPARENTUNDOUNIT
;
51 DEFINE_GUID(IID_IEnumOleUndoUnits
, 0xb3e7c340, 0xef97, 0x11ce, 0x9b, 0xc9, 0x00, 0xaa, 0x00, 0x60, 0x8e, 0x01);
52 typedef struct IEnumOleUndoUnits IEnumOleUndoUnits
,*LPENUMOLEUNDOUNITS
;
54 /*****************************************************************************
55 * Declare the structures
57 typedef enum tagQACONTAINERFLAGS
59 QACONTAINER_SHOWHATCHING
= 0x1,
60 QACONTAINER_SHOWGRABHANDLES
= 0x2,
61 QACONTAINER_USERMODE
= 0x4,
62 QACONTAINER_DISPLAYASDEFAULT
= 0x8,
63 QACONTAINER_UIDEAD
= 0x10,
64 QACONTAINER_AUTOCLIP
= 0x20,
65 QACONTAINER_MESSAGEREFLECT
= 0x40,
66 QACONTAINER_SUPPORTSMNEMONICS
= 0x80
69 typedef DWORD OLE_COLOR
;
71 typedef struct tagQACONTROL
77 DWORD dwPropNotifyCookie
;
78 DWORD dwPointerActivationPolicy
;
81 typedef struct tagQACONTAINER
84 IOleClientSite
*pClientSite
;
85 IAdviseSinkEx
*pAdviseSink
;
86 IPropertyNotifySink
*pPropertyNotifySink
;
87 IUnknown
*pUnkEventSink
;
92 IOleUndoManager
*pUndoMgr
;
96 struct IBindHost
*pBindHost
;
99 /*****************************************************************************
100 * IQuickActivate interface
102 #define INTERFACE IQuickActivate
103 #define IQuickActivate_METHODS \
105 STDMETHOD(QuickActivate)(THIS_ QACONTAINER *pQaContainer, QACONTROL *pQaControl) PURE; \
106 STDMETHOD(SetContentExtent)(THIS_ LPSIZEL pSizel) PURE; \
107 STDMETHOD(GetContentExtent)(THIS_ LPSIZEL pSizel) PURE;
108 ICOM_DEFINE(IQuickActivate
,IUnknown
)
112 /*** IUnknown methods ***/
113 #define IQuickActivate_QueryInterface(p,a,b) (p)->lpVtbl->QueryInterface(p,a,b)
114 #define IQuickActivate_AddRef(p) (p)->lpVtbl->AddRef(p)
115 #define IQuickActivate_Release(p) (p)->lpVtbl->Release(p)
116 /*** IQuickActivate methods ***/
117 #define IQuickActivate_QuickActivate(p,a,b) (p)->lpVtbl->QuickActivate(p,a,b)
118 #define IQuickActivate_SetContentExtent(p,a) (p)->lpVtbl->SetContentExtent(p,a)
119 #define IQuickActivate_GetContentExtent(p,a) (p)->lpVtbl->GetContentExtent(p,a)
123 /*****************************************************************************
124 * IPointerInactive interface
126 #define INTERFACE IPointerInactive
127 #define IPointerInactive_METHODS \
129 STDMETHOD(GetActivationPolicy)(THIS_ DWORD *pdwPolicy) PURE; \
130 STDMETHOD(OnInactiveMouseMove)(THIS_ LPCRECT pRectBounds, LONG x, LONG y, DWORD grfKeyState) PURE; \
131 STDMETHOD(OnInactiveSetCursor)(THIS_ LPCRECT pRectBounds, LONG x, LONG y, DWORD dwMouseMsg, BOOL fSetAlways) PURE;
132 ICOM_DEFINE(IPointerInactive
,IUnknown
)
136 /*** IUnknown methods ***/
137 #define IPointerInactive_QueryInterface(p,a,b) (p)->lpVtbl->QueryInterface(p,a,b)
138 #define IPointerInactive_AddRef(p) (p)->lpVtbl->AddRef(p)
139 #define IPointerInactive_Release(p) (p)->lpVtbl->Release(p)
140 /*** IPointerInactive methods ***/
141 #define IPointerInactive_GetActivationPolicy(p,a) (p)->lpVtbl->GetActivationPolicy(p,a)
142 #define IPointerInactive_OnInactiveMoveMouse(p,a,b,c,d) (p)->lpVtbl->OnInactiveMoveMouse(p,a,b,c,d)
143 #define IPointerInactive_OnInactiveSetCursor(p,a,b,c,d,e) (p)->lpVtbl->OnInactiveSetCursor(p,a,b,d,e)
147 /*****************************************************************************
148 * IAdviseSinkEx interface
150 #define INTERFACE IAdviseSinkEx
151 #define IAdviseSinkEx_METHODS \
152 IAdviseSink_METHODS \
153 STDMETHOD(OnViewStatusChange)(THIS_ DWORD dwViewStatus) PURE;
154 ICOM_DEFINE(IAdviseSinkEx
,IAdviseSink
)
158 /*** IUnknown methods ***/
159 #define IAdviseSinkEx_QueryInterface(p,a,b) (p)->lpVtbl->QueryInterface(p,a,b)
160 #define IAdviseSinkEx_AddRef(p) (p)->lpVtbl->AddRef(p)
161 #define IAdviseSinkEx_Release(p) (p)->lpVtbl->Release(p)
162 /*** IAdviseSink methods ***/
163 #define IAdviseSinkEx_OnDataChange(p,a,b) (p)->lpVtbl->OnDataChange(p,a,b)
164 #define IAdviseSinkEx_OnViewChange(p,a,b) (p)->lpVtbl->OnViewChange(p,a,b)
165 #define IAdviseSinkEx_OnRename(p,a) (p)->lpVtbl->OnRename(p,a)
166 #define IAdviseSinkEx_OnSave(p) (p)->lpVtbl->OnSave(p)
167 #define IAdviseSinkEx_OnClose(p) (p)->lpVtbl->OnClose(p)
168 /*** IAdviseSinkEx methods ***/
169 #define IAdviseSinkEx_OnViewStatusChange(p,a) (p)->lpVtbl->OnViewStatusChange(p,a)
173 /*****************************************************************************
174 * IOleUndoManager interface
176 #define INTERFACE IOleUndoManager
177 #define IOleUndoManager_METHODS \
179 STDMETHOD(Open)(THIS_ IOleParentUndoUnit *pPUU) PURE; \
180 STDMETHOD(Close)(THIS_ IOleParentUndoUnit *pPUU, BOOL fCommit) PURE; \
181 STDMETHOD(Add)(THIS_ IOleUndoUnit *pUU) PURE; \
182 STDMETHOD(GetOpenParentState)(THIS_ DWORD *pdwState) PURE; \
183 STDMETHOD(DiscardFrom)(THIS_ IOleUndoUnit *pUU) PURE; \
184 STDMETHOD(UndoTo)(THIS_ IOleUndoUnit *pUU) PURE; \
185 STDMETHOD(RedoTo)(THIS_ IOleUndoUnit *pUU) PURE; \
186 STDMETHOD(EnumUndoable)(THIS_ IEnumOleUndoUnits **ppEnum) PURE; \
187 STDMETHOD(EnumRedoable)(THIS_ IEnumOleUndoUnits **ppEnum) PURE; \
188 STDMETHOD(GetLastUndoDescription)(THIS_ BSTR *pBstr) PURE; \
189 STDMETHOD(GetLastRedoDescription)(THIS_ BSTR *pBstr) PURE; \
190 STDMETHOD(Enable)(THIS_ BOOL fEnable) PURE;
191 ICOM_DEFINE(IOleUndoManager
,IUnknown
)
195 /*** IUnknown methods ***/
196 #define IOleUndoManager_QueryInterface(p,a,b) (p)->lpVtbl->QueryInterface(p,a,b)
197 #define IOleUndoManager_AddRef(p) (p)->lpVtbl->AddRef(p)
198 #define IOleUndoManager_Release(p) (p)->lpVtbl->Release(p)
199 /*** IOleUndoManager methods ***/
200 #define IOleUndoManager_Open(p,a) (p)->lpVtbl->Open(p,a)
201 #define IOleUndoManager_Close(p,a,b) (p)->lpVtbl->Close(p,a,b)
202 #define IOleUndoManager_Add(p,a) (p)->lpVtbl->Add(p,a)
203 #define IOleUndoManager_GetOpenParentState(p,a) (p)->lpVtbl->GetOpenParentState(p,a)
204 #define IOleUndoManager_DiscardFrom(p,a) (p)->lpVtbl->DiscardFrom(p,a)
205 #define IOleUndoManager_UndoTo(p,a) (p)->lpVtbl->UndoTo(p,a)
206 #define IOleUndoManager_RedoTo(p,a) (p)->lpVtbl->RedoTo(p,a)
207 #define IOleUndoManager_EnumUndoable(p,a) (p)->lpVtbl->EnumUndoable(p,a)
208 #define IOleUndoManager_EnumRedoable(p,a) (p)->lpVtbl->EnumRedoable(p,a)
209 #define IOleUndoManager_GetLastUndoDescription(p,a) (p)->lpVtbl->GetLastUndoDescription(p,a)
210 #define IOleUndoManager_GetLastRedoDescription(p,a) (p)->lpVtbl->GetLastRedoDescription(p,a)
211 #define IOleUndoManager_Enable(p,a) (p)->lpVtbl->Enable(p,a)
215 /*****************************************************************************
216 * IOleUndoUnit interface
218 #define INTERFACE IOleUndoUnit
219 #define IOleUndoUnit_METHODS \
221 STDMETHOD(Do)(THIS_ IOleUndoManager *pUndoManager) PURE; \
222 STDMETHOD(GetDescription)(THIS_ BSTR *pBstr) PURE; \
223 STDMETHOD(GetUnitType)(THIS_ CLSID *pClsid, LONG *plID) PURE; \
224 STDMETHOD(OnNextAdd)(THIS) PURE;
225 ICOM_DEFINE(IOleUndoUnit
,IUnknown
)
229 /*** IUnknown methods ***/
230 #define IOleUndoUnit_QueryInterface(p,a,b) (p)->lpVtbl->QueryInterface(p,a,b)
231 #define IOleUndoUnit_AddRef(p) (p)->lpVtbl->AddRef(p)
232 #define IOleUndoUnit_Release(p) (p)->lpVtbl->Release(p)
233 /*** IOleUndoUnit methods ***/
234 #define IOleUndoUnit_Do(p,a) (p)->lpVtbl->Do(p,a)
235 #define IOleUndoUnit_GetDescription(p,a) (p)->lpVtbl->GetDescription(p,a)
236 #define IOleUndoUnit_GetUnitType(p,a,b) (p)->lpVtbl->GetUnitType(p,a,b)
237 #define IOleUndoUnit_OnNextAdd(p) (p)->lpVtbl->OnNextAdd(p)
242 /*****************************************************************************
243 * IOleUndoUnit interface
245 #define INTERFACE IOleParentUndoUnit
246 #define IOleParentUndoUnit_METHODS \
247 IOleUndoUnit_METHODS \
248 STDMETHOD(Open)(THIS_ IOleParentUndoUnit *pPUU) PURE; \
249 STDMETHOD(Close)(THIS_ IOleParentUndoUnit *pPUU, BOOL fCommit) PURE; \
250 STDMETHOD(Add)(THIS_ IOleUndoUnit *pUU) PURE; \
251 STDMETHOD(FindUnit)(THIS_ IOleUndoUnit *pUU) PURE; \
252 STDMETHOD(GetParentState)(THIS_ DWORD *pdwState) PURE;
253 ICOM_DEFINE(IOleParentUndoUnit
,IOleUndoUnit
)
257 /*** IUnknown methods ***/
258 #define IOleParentUndoUnit_QueryInterface(p,a,b) (p)->lpVtbl->QueryInterface(p,a,b)
259 #define IOleParentUndoUnit_AddRef(p) (p)->lpVtbl->AddRef(p)
260 #define IOleParentUndoUnit_Release(p) (p)->lpVtbl->Release(p)
261 /*** IOleUndoUnit methods ***/
262 #define IOleParentUndoUnit_Do(p,a) (p)->lpVtbl->Do(p,a)
263 #define IOleParentUndoUnit_GetDescription(p,a) (p)->lpVtbl->GetDescription(p,a)
264 #define IOleParentUndoUnit_GetUnitType(p,a,b) (p)->lpVtbl->GetUnitType(p,a,b)
265 #define IOleParentUndoUnit_OnNextAdd(p) (p)->lpVtbl->OnNextAdd(p)
266 /*** IOleParentUndoUnit methods ***/
267 #define IOleParentUndoUnit_Open(p,a) (p)->lpVtbl->Open(p,a)
268 #define IOleParentUndoUnit_Close(p,a,b) (p)->lpVtbl->Close(p,a,b)
269 #define IOleParentUndoUnit_Add(p,a) (p)->lpVtbl->Add(p,a)
270 #define IOleParentUndoUnit_FindUnit(p,a) (p)->lpVtbl->FindUnit(p,a)
271 #define IOleParentUndoUnit_GetParentState(p,a,b) (p)->lpVtbl->GetParentState(p,a)
275 /*****************************************************************************
276 * IEnumOleUndoUnits interface
278 #define INTERFACE IEnumOleUndoUnits
279 #define IEnumOleUndoUnits_METHODS \
281 STDMETHOD(Next)(THIS_ ULONG cElt, IOleUndoUnit **rgElt, ULONG *pcEltFetched) PURE; \
282 STDMETHOD(Skip)(THIS_ ULONG cElt) PURE; \
283 STDMETHOD(Reset)(THIS) PURE; \
284 STDMETHOD(Clone)(THIS_ IEnumOleUndoUnits **ppEnum) PURE;
285 ICOM_DEFINE(IEnumOleUndoUnits
,IUnknown
)
289 /*** IUnknown methods ***/
290 #define IEnumOleUndoUnits_QueryInterface(p,a,b) (p)->lpVtbl->QueryInterface(p,a,b)
291 #define IEnumOleUndoUnits_AddRef(p) (p)->lpVtbl->AddRef(p)
292 #define IEnumOleUndoUnits_Release(p) (p)->lpVtbl->Release(p)
293 /*** IEnumOleUndoUnits methods ***/
294 #define IEnumOleUndoUnits_Next(p,a,b,c) (p)->lpVtbl->Next(p,a,b,c)
295 #define IEnumOleUndoUnits_Skip(p,a) (p)->lpVtbl->Skip(p,a)
296 #define IEnumOleUndoUnits_Reset(p,a) (p)->lpVtbl->Reset(p,a)
297 #define IEnumOleUndoUnits_Clone(p,a) (p)->lpVtbl->Clone(p,a)
302 #endif /* defined(__cplusplus) */
304 #endif /* __WINE_WINE_OBJ_OLEUNDO_H */