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