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