Many interface declarations that originated from oleidl.h, oaidl.h and
[wine] / include / wine / obj_control.h
1 /*
2  * Defines the COM interfaces and APIs related to structured data storage.
3  *
4  * Depends on 'obj_base.h'.
5  */
6
7 #ifndef __WINE_WINE_OBJ_CONTROL_H
8 #define __WINE_WINE_OBJ_CONTROL_H
9
10
11 #include "winbase.h"
12
13
14 /*****************************************************************************
15  * Declare the structures
16  */
17
18 typedef struct tagVARIANT_BLOB
19 {
20         DWORD clSize;
21         DWORD rpcReserved;
22         ULONGLONG ahData[1];
23 } wireVARIANT_BLOB;
24
25 typedef struct tagUserVARIANT
26 {
27         wireVARIANT_BLOB pVarBlob;
28 } UserVARIANT;
29
30 typedef struct tagLICINFO
31 {
32         LONG cbLicInfo;
33         BOOL32 fRuntimeKeyAvail;
34         BOOL32 fLicVerified;
35 } LICINFO, *LPLICINFO;
36
37 typedef struct tagCONTROLINFO
38 {
39         ULONG cb;
40         HACCEL32 hAccel;
41         USHORT cAccel;
42         DWORD dwFlags;
43 } CONTROLINFO, *LPCONTROLINFO;
44
45 typedef enum tagCTRLINFO
46 {
47         CTRLINFO_EATS_RETURN = 1,
48         CTRLINFO_EATS_ESCAPE = 2
49 } CTRLINFO;
50
51 typedef struct tagPOINTF
52 {
53         FLOAT x;
54         FLOAT y;
55 } POINTF, *LPPOINTF;
56
57 typedef enum tagXFORMCOORDS
58 {
59         XFORMCOORDS_POSITION = 0x1,
60         XFORMCOORDS_SIZE = 0x2,
61         XFORMCOORDS_HIMETRICTOCONTAINER = 0x4,
62         XFORMCOORDS_CONTAINERTOHIMETRIC = 0x8
63 } XFORMCOORDS;
64
65 typedef enum tagACTIVATEFLAGS
66 {
67         ACTIVATE_WINDOWLESS = 1
68 } ACTIVATE_FLAGS;
69
70 typedef enum tagOLEDCFLAGS
71 {
72         OLEDC_NODRAW = 0x1,
73         OLEDC_PAINTBKGND = 0x2,
74         OLEDC_OFFSCREEN = 0x4
75 } OLEDCFLAGS;
76
77 /*****************************************************************************
78  * Predeclare the interfaces
79  */
80 DEFINE_GUID(IID_IOleControl, 0xb196b288, 0xbab4, 0x101a, 0xb6, 0x9c, 0x00, 0xaa, 0x00, 0x34, 0x1d, 0x07);
81 typedef struct IOleControl IOleControl, *LPOLECONTROL;
82
83 DEFINE_GUID(IID_IOleControlSite, 0xb196b289, 0xbab4, 0x101a, 0xb6, 0x9c, 0x00, 0xaa, 0x00, 0x34, 0x1d, 0x07);
84 typedef struct IOleControlSite IOleControlSite, *LPOLECONTROLSITE;
85
86 DEFINE_GUID(IID_IOleInPlaceSiteEx, 0x9c2cad80L, 0x3424, 0x11cf, 0xb6, 0x70, 0x00, 0xaa, 0x00, 0x4c, 0xd6, 0xd8);
87 typedef struct IOleInPlaceSiteEx IOleInPlaceSiteEx, *LPOLEINPLACESITEEX;
88
89 DEFINE_OLEGUID(IID_IOleInPlaceSiteWindowless,  0x00000000L, 0, 0); /* FIXME - NEED GUID */
90 typedef struct IOleInPlaceSiteWindowless IOleInPlaceSiteWindowless, *LPOLEINPLACESITEWINDOWLESS;
91
92 DEFINE_OLEGUID(IID_IOleInPlaceObjectWindowless,  0x00000000L, 0, 0); /* FIXME - NEED GUID */
93 typedef struct IOleInPlaceObjectWindowless IOleInPlaceObjectWindowless, *LPOLEINPLACEOBJECTWINDOWLESS;
94
95 DEFINE_GUID(IID_IClassFactory2, 0xb196b28f, 0xbab4, 0x101a, 0xb6, 0x9c, 0x00, 0xaa, 0x00, 0x34, 0x1d, 0x07);
96 typedef struct IClassFactory2 IClassFactory2, *LPCLASSFACTORY2;
97
98 /*****************************************************************************
99  * IOleControl interface
100  */
101 #define ICOM_INTERFACE IOleControl
102 #define IOleControl_METHODS \
103         ICOM_METHOD1(HRESULT,GetControlInfo, CONTROLINFO*,pCI); \
104         ICOM_METHOD1(HRESULT,OnMnemonic, MSG32*,pMsg); \
105         ICOM_METHOD1(HRESULT,OnAmbientPropertyChange, DISPID,dispID); \
106         ICOM_METHOD1(HRESULT,FreezeEvents, BOOL32,bFreeze);
107 #define IOleControl_IMETHODS \
108         IUnknown_IMETHODS \
109         IOleControl_METHODS
110 ICOM_DEFINE(IOleControl,IUnknown)
111 #undef ICOM_INTERFACE
112
113 #ifdef ICOM_CINTERFACE
114 /*** IUnknwon methods ***/
115 #define IOleControl_QueryInterface(p,a,b)        ICOM_CALL2(QueryInterface,p,a,b)
116 #define IOleControl_AddRef(p)                    ICOM_CALL (AddRef,p)
117 #define IOleControl_Release(p)                   ICOM_CALL (Release,p)
118 /*** IOleControl methods ***/
119 #define IOleControl_GetControlInfo(p,a)          ICOM_CALL1(GetControlInfo,p,a)
120 #define IOleControl_OnMnemonic(p,a)              ICOM_CALL1(OnMnemonic,p,a)
121 #define IOleControl_OnAmbientPropertyChange(p,a) ICOM_CALL1(OnAmbientPropertyChange,p,a)
122 #define IOleControl_FreezeEvents(p,a)            ICOM_CALL1(FreezeEvents,p,a)
123 #endif
124                                 
125
126 /*****************************************************************************
127  * IOleControlSite interface
128  */
129 #define ICOM_INTERFACE IOleControlSite 
130 #define IOleControlSite_METHODS \
131         ICOM_METHOD (HRESULT,OnControlInfoChanged); \
132         ICOM_METHOD1(HRESULT,LockInPlaceActive, BOOL32,fLock); \
133         ICOM_METHOD3(HRESULT,TransformCoords, POINTL*,pPtlHimetric, POINTF*,pPtfContainer, DWORD,dwFlags); \
134         ICOM_METHOD2(HRESULT,TranslateAccelerator, MSG32*,pMsg, DWORD,grfModifiers) ;\
135         ICOM_METHOD1(HRESULT,OnFocus, BOOL32,fGotFocus); \
136         ICOM_METHOD (HRESULT,ShowPropertyFrame);
137 #define IOleControlSite_IMETHODS \
138         IUnknown_IMETHODS \
139         IOleControlSite_METHODS
140 ICOM_DEFINE(IOleControlSite,IUnknown)
141 #undef ICOM_INTERFACE
142
143 #ifdef ICOM_CINTERFACE
144 /*** IUnknwon methods ***/
145 #define IOleControlSite_QueryInterface(p,a,b)        ICOM_CALL2(QueryInterface,p,a,b)
146 #define IOleControlSite_AddRef(p)                    ICOM_CALL (AddRef,p)
147 #define IOleControlSite_Release(p)                   ICOM_CALL (Release,p)
148 /*** IOleControlSite methods ***/
149 #define IOleControlSite_OnControlInfoChanged(p)      ICOM_CALL1(OnControlInfoChanged,p)
150 #define IOleControlSite_LockInPlaceActive(p,a)       ICOM_CALL1(LockInPlaceActive,p,a)
151 #define IOleControlSite_TransformCoords(p,a,b,c)     ICOM_CALL1(TransformCoords,p,a,b,c)
152 #define IOleControlSite_TranslateAccelerator(p,a,b)  ICOM_CALL1(TranslateAccelerator,p,a,b)
153 #define IOleControlSite_OnFocus(p,a)                 ICOM_CALL1(OnFocus,p,a)
154 #define IOleControlSite_ShowPropertyFrame(p)         ICOM_CALL1(ShowPropertyFrame,p)
155 #endif
156                                 
157                                 
158 /*****************************************************************************
159  * IOleInPlaceSiteEx interface
160  */
161 #define ICOM_INTERFACE IOleInPlaceSiteEx
162 #define IOleInPlaceSiteEx_METHODS \
163         ICOM_METHOD2(HRESULT,OnInPlaceActivateEx, BOOL32*,pfNoRedraw, DWORD,dwFlags); \
164         ICOM_METHOD1(HRESULT,OnInPlaceDeactivateEx, BOOL32,fNoRedraw); \
165         ICOM_METHOD (HRESULT,RequestUIActivate);
166 #define IOleInPlaceSiteEx_IMETHODS \
167         IOleInPlaceSite_IMETHODS \
168         IOleInPlaceSiteEx_METHODS
169 ICOM_DEFINE(IOleInPlaceSiteEx,IOleInPlaceSite)
170 #undef ICOM_INTERFACE
171
172 #ifdef ICOM_CINTERFACE
173 /*** IUnknown methods ***/
174 #define IOleInPlaceSiteEx_QueryInterface(p,a,b)      ICOM_CALL2(QueryInterface,p,a,b)
175 #define IOleInPlaceSiteEx_AddRef(p)                  ICOM_CALL (AddRef,p)
176 #define IOleInPlaceSiteEx_Release(p)                 ICOM_CALL (Release,p)
177 /*** IOleWindow methods ***/
178 #define IOleInPlaceSiteEx_GetWindow(p,a)             ICOM_CALL1(GetWindow,p,a)
179 #define IOleInPlaceSiteEx_ContextSensitiveHelp(p,a)  ICOM_CALL1(ContextSensitiveHelp,p,a)
180 /*** IOleInPlaceSite methods ***/
181 #define IOleInPlaceSiteEx_CanInPlaceActivate(p)      ICOM_CALL (CanInPlaceActivate,p)
182 #define IOleInPlaceSiteEx_OnInPlaceActivate(p)       ICOM_CALL (OnInPlaceActivate,p)
183 #define IOleInPlaceSiteEx_OnUIActivate(p)            ICOM_CALL (OnUIActivate,p)
184 #define IOleInPlaceSiteEx_GetWindowContext(p,a,b,c,d,e) ICOM_CALL5(GetWindowContext,p,a,b,c,d,e)
185 #define IOleInPlaceSiteEx_Scroll(p,a)                ICOM_CALL1(Scroll,p,a)
186 #define IOleInPlaceSiteEx_OnUIDeactivate(p,a)        ICOM_CALL1(OnUIDeactivate,p,a)
187 #define IOleInPlaceSiteEx_OnInPlaceDeactivate(p)     ICOM_CALL (OnInPlaceDeactivate,p)
188 #define IOleInPlaceSiteEx_DiscardUndoState(p)        ICOM_CALL (DiscardUndoState,p)
189 #define IOleInPlaceSiteEx_DeactivateAndUndo(p)       ICOM_CALL (DeactivateAndUndo,p)
190 #define IOleInPlaceSiteEx_OnPosRectChange(p,a)       ICOM_CALL1(OnPosRectChange,p,a)
191 /*** IOleInPlaceSiteEx methods ***/
192 #define IOleInPlaceSiteEx_OnInPlaceActivateEx(p,a,b) ICOM_CALL2(OnInPlaceActivateEx,p,a,b)
193 #define IOleInPlaceSiteEx_OnInPlaceDeactivateEx(p,a) ICOM_CALL1(OnInPlaceDeactivateEx,p,a)
194 #define IOleInPlaceSiteEx_RequestUIActivate(p)       ICOM_CALL (RequestUIActivate,p)
195 #endif
196                                  
197
198 /*****************************************************************************
199  * IOleInPlaceSiteWindowless interface
200  */
201 #define ICOM_INTERFACE IOleInPlaceSiteWindowless
202 #define IOleInPlaceSiteWindowless_METHODS \
203         ICOM_METHOD (HRESULT,CanWindowlessActivate); \
204         ICOM_METHOD (HRESULT,GetCapture); \
205         ICOM_METHOD1(HRESULT,SetCapture, BOOL32,fCapture); \
206         ICOM_METHOD (HRESULT,GetFocus); \
207         ICOM_METHOD1(HRESULT,SetFocus, BOOL32,fFocus); \
208         ICOM_METHOD3(HRESULT,GetDC, LPCRECT32,pRect, DWORD,grfFlags, HDC32*,phDC); \
209         ICOM_METHOD1(HRESULT,ReleaseDC, HDC32,hDC); \
210         ICOM_METHOD2(HRESULT,InvalidateRect, LPCRECT32,pRect, BOOL32,fErase); \
211         ICOM_METHOD2(HRESULT,InvalidateRgn, HRGN32,hRgn, BOOL32,fErase); \
212         ICOM_METHOD4(HRESULT,ScrollRect, INT32,dx, INT32,dy, LPCRECT32,pRectScroll, LPCRECT32,pRectClip); \
213         ICOM_METHOD1(HRESULT,AdjustRect, LPRECT32,prc); \
214         ICOM_METHOD4(HRESULT,OnDefWindowMessage, UINT32,msg, WPARAM32,wParam, LPARAM,lParam, LRESULT*,plResult);
215 #define IOleInPlaceSiteWindowless_IMETHODS \
216         IOleInPlaceSite_IMETHODS \
217         IOleInPlaceSiteWindowless_METHODS
218 ICOM_DEFINE(IOleInPlaceSiteWindowless,IOleInPlaceSite)
219 #undef ICOM_INTERFACE
220
221 #ifdef ICOM_CINTERFACE
222 /*** IUnknown methods ***/
223 #define IOleInPlaceSiteWindowless_QueryInterface(p,a,b)      ICOM_CALL2(QueryInterface,p,a,b)
224 #define IOleInPlaceSiteWindowless_AddRef(p)                  ICOM_CALL (AddRef,p)
225 #define IOleInPlaceSiteWindowless_Release(p)                 ICOM_CALL (Release,p)
226 /*** IOleWindow methods ***/
227 #define IOleInPlaceSiteWindowless_GetWindow(p,a)             ICOM_CALL1(GetWindow,p,a)
228 #define IOleInPlaceSiteWindowless_ContextSensitiveHelp(p,a)  ICOM_CALL1(ContextSensitiveHelp,p,a)
229 /*** IOleInPlaceSitemethods ***/
230 #define IOleInPlaceSiteWindowless_CanInPlaceActivate(p)      ICOM_CALL (CanInPlaceActivate,p)
231 #define IOleInPlaceSiteWindowless_OnInPlaceActivate(p)       ICOM_CALL (OnInPlaceActivate,p)
232 #define IOleInPlaceSiteWindowless_OnUIActivate(p)            ICOM_CALL (OnUIActivate,p)
233 #define IOleInPlaceSiteWindowless_GetWindowContext(p,a,b,c,d,e) ICOM_CALL5(GetWindowContext,p,a,b,c,d,e)
234 #define IOleInPlaceSiteWindowless_Scroll(p,a)                ICOM_CALL1(Scroll,p,a)
235 #define IOleInPlaceSiteWindowless_OnUIDeactivate(p,a)        ICOM_CALL1(OnUIDeactivate,p,a)
236 #define IOleInPlaceSiteWindowless_OnInPlaceDeactivate(p)     ICOM_CALL (OnInPlaceDeactivate,p)
237 #define IOleInPlaceSiteWindowless_DiscardUndoState(p)        ICOM_CALL (DiscardUndoState,p)
238 #define IOleInPlaceSiteWindowless_DeactivateAndUndo(p)       ICOM_CALL (DeactivateAndUndo,p)
239 #define IOleInPlaceSiteWindowless_OnPosRectChange(p,a)       ICOM_CALL1(OnPosRectChange,p,a)
240 /*** IOleInPlaceSitemethods ***/
241 #define IOleInPlaceSiteWindowless_CanWindowlessActivate(p) ICOM_CALL (CanInPlaceActivate,p)
242 #define IOleInPlaceSiteWindowless_GetCapture(p)            ICOM_CALL (OnInPlaceActivate,p)
243 #define IOleInPlaceSiteWindowless_SetCapture(p,a)          ICOM_CALL1(OnUIActivate,p,a)
244 #define IOleInPlaceSiteWindowless_GetFocus(p)              ICOM_CALL (GetWindowContext,p)
245 #define IOleInPlaceSiteWindowless_SetFocus(p,a)            ICOM_CALL1(Scroll,p,a)
246 #define IOleInPlaceSiteWindowless_GetDC(p,a,b,c)           ICOM_CALL3(OnUIDeactivate,p,a,b,c)
247 #define IOleInPlaceSiteWindowless_ReleaseDC(p,a)           ICOM_CALL1(OnInPlaceDeactivate,p,a)
248 #define IOleInPlaceSiteWindowless_InvalidateRect(p,a,b)    ICOM_CALL2(DiscardUndoState,p,a,b)
249 #define IOleInPlaceSiteWindowless_InvalidateRgn(p,a,b)     ICOM_CALL2(DeactivateAndUndo,p,a,b)
250 #define IOleInPlaceSiteWindowless_ScrollRect(p,a,b,c,d)    ICOM_CALL4(OnPosRectChange,p,a,b,c,d)
251 #define IOleInPlaceSiteWindowless_AdjustRect(p,a)          ICOM_CALL1(OnPosRectChange,p,a)
252 #define IOleInPlaceSiteWindowless_OnDefWindowMessage(p,a,b,c,d) ICOM_CALL4(OnPosRectChange,p,a,b,c,d)
253 #endif
254
255
256 /*****************************************************************************
257  * IOleInPlaceObjectWindowless interface
258  */
259 #define ICOM_INTERFACE IOleInPlaceObjectWindowless
260 #define IOleInPlaceObjectWindowless_METHODS \
261         ICOM_METHOD4(HRESULT,OnWindowMessage, UINT32,msg, WPARAM32,wParam, LPARAM,lParam, LRESULT*,plResult); \
262         ICOM_METHOD1(HRESULT,GetDropTarget, IDropTarget**,ppDropTarget);
263 #define IOleInPlaceObjectWindowless_IMETHODS \
264         IOleInPlaceObject_IMETHODS \
265         IOleInPlaceObjectWindowless_METHODS
266 ICOM_DEFINE(IOleInPlaceObjectWindowless,IOleInPlaceObject)
267 #undef ICOM_INTERFACE
268
269 #ifdef ICOM_CINTERFACE
270 /*** IUnknown methods ***/
271 #define IOleInPlaceObjectWindowless_QueryInterface(p,a,b) ICOM_CALL2(QueryInterface,p,a,b)
272 #define IOleInPlaceObjectWindowless_AddRef(p)             ICOM_CALL (AddRef,p)
273 #define IOleInPlaceObjectWindowless_Release(p)            ICOM_CALL (Release,p)
274 /*** IOleWindow methods ***/
275 #define IOleInPlaceObjectWindowless_GetWindow(p,a)             ICOM_CALL1(GetWindow,p,a)
276 #define IOleInPlaceObjectWindowless_ContextSensitiveHelp(p,a)  ICOM_CALL1(ContextSensitiveHelp,p,a)
277 /*** IOleInPlaceObject methods ***/
278 #define IOleInPlaceObjectWindowless_InPlaceDeactivate(p)       ICOM_CALL (InPlaceDeactivate,p)
279 #define IOleInPlaceObjectWindowless_UIDeactivate(p)            ICOM_CALL (UIDeactivate,p)
280 #define IOleInPlaceObjectWindowless_SetObjectRects(p,a,b)      ICOM_CALL2(SetObjectRects,p,a,b)
281 #define IOleInPlaceObjectWindowless_ReactivateAndUndo(p)       ICOM_CALL (ReactivateAndUndo,p)
282 /*** IOleInPlaceObjectWindowless methods ***/
283 #define IOleInPlaceObjectWindowless_OnWindowMessage(p,a,b,c,d) ICOM_CALL4(OnWindowMessage,p,a,b,c,d)
284 #define IOleInPlaceObjectWindowless_GetDropTarget(p,a)         ICOM_CALL1(GetDropTarget,p,a)
285 #endif
286                                  
287
288 /*****************************************************************************
289  * IClassFactory2 interface
290  */
291 #define ICOM_INTERFACE IClassFactory2
292 #define IClassFactory2_METHODS \
293         ICOM_METHOD1(HRESULT,GetLicInfo, LICINFO*,pLicInfo); \
294         ICOM_METHOD2(HRESULT,RequestLicKey, DWORD,dwReserved, BSTR32*,pBstrKey); \
295         ICOM_METHOD5(HRESULT,CreateInstanceLic, IUnknown*,pUnkOuter, IUnknown*,pUnkReserved, REFIID,riid, BSTR32,bstrKey, PVOID*,ppvObj);
296 #define IClassFactory2_IMETHODS \
297         IClassFactory_IMETHODS \
298         IClassFactory2_METHODS
299 ICOM_DEFINE(IClassFactory2,IClassFactory)
300 #undef ICOM_INTERFACE
301
302 #ifdef ICOM_CINTERFACE
303 /*** IUnknwon methods ***/
304 #define IClassFactory2_QueryInterface(p,a,b)      ICOM_CALL2(QueryInterface,p,a,b)
305 #define IClassFactory2_AddRef(p)                  ICOM_CALL (AddRef,p)
306 #define IClassFactory2_Release(p)                 ICOM_CALL (Release,p)
307 /*** IClassFactory methods ***/
308 #define IClassFactory2_CreateInstance(p,a,b,c)    ICOM_CALL3(CreateInstance,p,a,b,c)
309 #define IClassFactory2_LockServer(p,a)            ICOM_CALL1(LockServer,p,a)
310 /*** IClassFactory2 methods ***/
311 #define IClassFactory2_GetLicInfo(p,a)            ICOM_CALL1(GetLicInfo,p,a)
312 #define IClassFactory2_RequestLicKey(p,a,b)       ICOM_CALL2(RequestLicKey,p,a,b)
313 #define IClassFactory2_CreateInstanceLic(p,a,b,c,d,e) ICOM_CALL5(CreateInstanceLic,p,a,b,c,d,e)
314 #endif
315
316
317 #endif /* __WINE_WINE_OBJ_CONTROL_H */
318
319