Add spawnvp to the portability lib.
[wine] / include / wine / obj_oleobj.h
1 /*
2  * Defines IOleObject COM and other oleidl.h interfaces
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_OLEOBJ_H
24 #define __WINE_WINE_OBJ_OLEOBJ_H
25
26 struct tagMSG;
27 struct tagLOGPALETTE;
28
29 #ifdef __cplusplus
30 extern "C" {
31 #endif /* defined(__cplusplus) */
32
33 /*****************************************************************************
34  * Declare the structures
35  */
36 typedef struct tagOBJECTDESCRIPTOR
37 {
38         ULONG cbSize;
39         CLSID clsid;
40         DWORD dwDrawAspect;
41         SIZEL sizel;
42         POINTL pointl;
43         DWORD dwStatus;
44         DWORD dwFullUserTypeName;
45         DWORD dwSrcOfCopy;
46 } OBJECTDESCRIPTOR, *LPOBJECTDESCRIPTOR;
47
48 typedef enum tagOLEMISC
49 {
50         OLEMISC_RECOMPOSEONRESIZE = 0x1,
51         OLEMISC_ONLYICONIC = 0x2,
52         OLEMISC_INSERTNOTREPLACE = 0x4,
53         OLEMISC_STATIC = 0x8,
54         OLEMISC_CANTLINKINSIDE = 0x10,
55         OLEMISC_CANLINKBYOLE1 = 0x20,
56         OLEMISC_ISLINKOBJECT = 0x40,
57         OLEMISC_INSIDEOUT = 0x80,
58         OLEMISC_ACTIVATEWHENVISIBLE = 0x100,
59         OLEMISC_RENDERINGISDEVICEINDEPENDENT = 0x200,
60         OLEMISC_INVISIBLEATRUNTIME = 0x400,
61         OLEMISC_ALWAYSRUN = 0x800,
62         OLEMISC_ACTSLIKEBUTTON = 0x1000,
63         OLEMISC_ACTSLIKELABEL = 0x2000,
64         OLEMISC_NOUIACTIVATE = 0x4000,
65         OLEMISC_ALIGNABLE = 0x8000,
66         OLEMISC_SIMPLEFRAME = 0x10000,
67         OLEMISC_SETCLIENTSITEFIRST = 0x20000,
68         OLEMISC_IMEMODE = 0x40000,
69         OLEMISC_IGNOREACTIVATEWHENVISIBLE = 0x80000,
70         OLEMISC_WANTSTOMENUMERGE = 0x100000,
71         OLEMISC_SUPPORTSMULTILEVELUNDO = 0x200000
72 } OLEMISC;
73
74 typedef enum tagOLEVERBATTRIB
75 {
76         OLEVERBATTRIB_NEVERDIRTIES = 1,
77         OLEVERBATTRIB_ONCONTAINERMENU = 2
78 } OLEVERBATTRIB;
79
80 /*****************************************************************************
81  * Predeclare the interfaces
82  */
83 DEFINE_OLEGUID(IID_IOleObject,  0x00000112L, 0, 0);
84 typedef struct IOleObject IOleObject, *LPOLEOBJECT;
85
86 DEFINE_OLEGUID(IID_IOleAdviseHolder,  0x00000111L, 0, 0);
87 typedef struct IOleAdviseHolder IOleAdviseHolder, *LPOLEADVISEHOLDER;
88
89 DEFINE_OLEGUID(IID_IEnumOLEVERB,  0x00000104L, 0, 0);
90 typedef struct IEnumOLEVERB IEnumOLEVERB, *LPENUMOLEVERB;
91
92 /*****************************************************************************
93  * IOleObject interface
94  */
95 #define ICOM_INTERFACE IOleObject
96 #define IOleObject_METHODS \
97         ICOM_METHOD1(HRESULT,SetClientSite, IOleClientSite*,pClientSite) \
98         ICOM_METHOD1(HRESULT,GetClientSite, IOleClientSite**,ppClientSite) \
99         ICOM_METHOD2(HRESULT,SetHostNames, LPCOLESTR,szContainerApp, LPCOLESTR,szContainerObj) \
100         ICOM_METHOD1(HRESULT,Close, DWORD,dwSaveOption) \
101         ICOM_METHOD2(HRESULT,SetMoniker, DWORD,dwWhichMoniker, IMoniker*,pmk) \
102         ICOM_METHOD3(HRESULT,GetMoniker, DWORD,dwAssign, DWORD,dwWhichMoniker, IMoniker**,ppmk) \
103         ICOM_METHOD3(HRESULT,InitFromData, IDataObject*,pDataObject, BOOL,fCreation, DWORD,dwReserved) \
104         ICOM_METHOD2(HRESULT,GetClipboardData, DWORD,dwReserved, IDataObject**,ppDataObject) \
105         ICOM_METHOD6(HRESULT,DoVerb, LONG,iVerb, struct tagMSG*,lpmsg, IOleClientSite*,pActiveSite, LONG,lindex, HWND,hwndParent, LPCRECT,lprcPosRect) \
106         ICOM_METHOD1(HRESULT,EnumVerbs, IEnumOLEVERB**,ppEnumOleVerb) \
107         ICOM_METHOD (HRESULT,Update) \
108         ICOM_METHOD (HRESULT,IsUpToDate) \
109         ICOM_METHOD1(HRESULT,GetUserClassID, CLSID*,pClsid) \
110         ICOM_METHOD2(HRESULT,GetUserType, DWORD,dwFormOfType, LPOLESTR*,pszUserType) \
111         ICOM_METHOD2(HRESULT,SetExtent, DWORD,dwDrawAspect, SIZEL*,psizel) \
112         ICOM_METHOD2(HRESULT,GetExtent, DWORD,dwDrawAspect, SIZEL*,psizel) \
113         ICOM_METHOD2(HRESULT,Advise, IAdviseSink*,pAdvSink, DWORD*,pdwConnection) \
114         ICOM_METHOD1(HRESULT,Unadvise, DWORD,dwConnection) \
115         ICOM_METHOD1(HRESULT,EnumAdvise, IEnumSTATDATA**,ppenumAdvise) \
116         ICOM_METHOD2(HRESULT,GetMiscStatus, DWORD,dwAspect, DWORD*,pdwStatus) \
117         ICOM_METHOD1(HRESULT,SetColorScheme, struct tagLOGPALETTE*,pLogpal)
118 #define IOleObject_IMETHODS \
119         IUnknown_IMETHODS \
120         IOleObject_METHODS
121 ICOM_DEFINE(IOleObject,IUnknown)
122 #undef ICOM_INTERFACE
123
124 /*** IUnknown methods ***/
125 #define IOleObject_QueryInterface(p,a,b)      ICOM_CALL2(QueryInterface,p,a,b)
126 #define IOleObject_AddRef(p)                  ICOM_CALL (AddRef,p)
127 #define IOleObject_Release(p)                 ICOM_CALL (Release,p)
128 /*** IOleObject methods ***/
129 #define IOleObject_SetClientSite(p,a)       ICOM_CALL1(SetClientSite,p,a)
130 #define IOleObject_GetClientSite(p,a,b)     ICOM_CALL1(GetClientSite,p,a)
131 #define IOleObject_SetHostNames(p,a,b)      ICOM_CALL2(SetHostNames,p,a,b)
132 #define IOleObject_Close(p,a,b)             ICOM_CALL1(Close,p,a)
133 #define IOleObject_SetMoniker(p,a,b)        ICOM_CALL2(SetMoniker,p,a,b)
134 #define IOleObject_GetMoniker(p,a,b)        ICOM_CALL3(GetMoniker,p,a,b,c)
135 #define IOleObject_InitFromData(p,a,b)      ICOM_CALL3(InitFromData,p,a,b,c)
136 #define IOleObject_GetClipboardData(p,a,b)  ICOM_CALL2(GetClipboardData,p,a,b)
137 #define IOleObject_DoVerb(p,a,b)            ICOM_CALL6(DoVerb,p,a,b,c,d,e,f)
138 #define IOleObject_EnumVerbs(p,a,b)         ICOM_CALL1(EnumVerbs,p,a)
139 #define IOleObject_Update(p,a,b)            ICOM_CALL (Update,p)
140 #define IOleObject_IsUpToDate(p,a,b)        ICOM_CALL (IsUpToDate,p)
141 #define IOleObject_GetUserClassID(p,a,b)    ICOM_CALL1(GetUserClassID,p,a)
142 #define IOleObject_GetUserType(p,a,b)       ICOM_CALL2(GetUserType,p,a,b)
143 #define IOleObject_SetExtent(p,a,b)         ICOM_CALL2(SetExtent,p,a,b)
144 #define IOleObject_GetExtent(p,a,b)         ICOM_CALL2(GetExtent,p,a,b)
145 #define IOleObject_Advise(p,a,b)            ICOM_CALL2(Advise,p,a,b)
146 #define IOleObject_Unadvise(p,a,b)          ICOM_CALL1(Unadvise,p,a)
147 #define IOleObject_EnumAdvise(p,a,b)        ICOM_CALL1(EnumAdvise,p,a)
148 #define IOleObject_GetMiscStatus(p,a,b)     ICOM_CALL2(GetMiscStatus,p,a,b)
149 #define IOleObject_SetColorScheme(p,a,b)    ICOM_CALL1(SetColorScheme,p,a)
150
151
152 /*****************************************************************************
153  * IOleAdviseHolder interface
154  */
155 #define ICOM_INTERFACE IOleAdviseHolder
156 #define IOleAdviseHolder_METHODS \
157         ICOM_METHOD2(HRESULT,Advise, IAdviseSink*,pAdvise, DWORD*,pdwConnection) \
158         ICOM_METHOD1(HRESULT,Unadvise, DWORD,dwConnection) \
159         ICOM_METHOD1(HRESULT,EnumAdvise, IEnumSTATDATA**,ppenumAdvise) \
160         ICOM_METHOD1(HRESULT,SendOnRename, IMoniker*,pmk) \
161         ICOM_METHOD (HRESULT,SendOnSave) \
162         ICOM_METHOD (HRESULT,SendOnClose)
163 #define IOleAdviseHolder_IMETHODS \
164         IUnknown_IMETHODS \
165         IOleAdviseHolder_METHODS
166 ICOM_DEFINE(IOleAdviseHolder,IUnknown)
167 #undef ICOM_INTERFACE
168
169 /*** IUnknown methods ***/
170 #define IOleAdviseHolder_QueryInterface(p,a,b)      ICOM_CALL2(QueryInterface,p,a,b)
171 #define IOleAdviseHolder_AddRef(p)                  ICOM_CALL (AddRef,p)
172 #define IOleAdviseHolder_Release(p)                 ICOM_CALL (Release,p)
173 /*** IOleAdviseHolder methods ***/
174 #define IOleAdviseHolder_Advise(p,a,b)              ICOM_CALL2(Advise,p,a,b)
175 #define IOleAdviseHolder_Unadvise(p,a)              ICOM_CALL1(Unadvise,p,a)
176 #define IOleAdviseHolder_EnumAdvise(p,a)            ICOM_CALL1(EnumAdvise,p,a)
177 #define IOleAdviseHolder_SendOnRename(p,a)          ICOM_CALL1(SendOnRename,p,a)
178 #define IOleAdviseHolder_SendOnSave(p)              ICOM_CALL (SendOnSave,p)
179 #define IOleAdviseHolder_SendOnClose(p)             ICOM_CALL (SendOnClose,p)
180
181
182 /*****************************************************************************
183  *  IEnumOLEVERB interface
184  */
185 #define ICOM_INTERFACE IEnumOLEVERB
186 #define IEnumOLEVERB_METHODS \
187         ICOM_METHOD3(HRESULT,Next, ULONG,celt, LPOLEVERB,rgelt, ULONG*,pceltFetched) \
188         ICOM_METHOD1(HRESULT,Skip, ULONG,celt) \
189         ICOM_METHOD (HRESULT,Reset) \
190         ICOM_METHOD1(HRESULT,Clone, IEnumOLEVERB**,ppenum)
191 #define IEnumOLEVERB_IMETHODS \
192         IUnknown_IMETHODS \
193         IEnumOLEVERB_METHODS
194 ICOM_DEFINE(IEnumOLEVERB,IUnknown)
195 #undef ICOM_INTERFACE
196
197 /*** IUnknown methods ***/
198 #define IEnumOLEVERB_QueryInterface(p,a,b)  ICOM_ICALL2(IUnknown,QueryInterface,p,a,b)
199 #define IEnumOLEVERB_AddRef(p)              ICOM_ICALL (IUnknown,AddRef,p)
200 #define IEnumOLEVERB_Release(p)             ICOM_ICALL (IUnknown,Release,p)
201 /*** IEnumOLEVERB methods ***/
202 #define IEnumOLEVERB_Next(p,a,b,c)          ICOM_CALL3(Next,p,a,b,c)
203 #define IEnumOLEVERB_Skip(p,a)              ICOM_CALL1(Skip,p,a)
204 #define IEnumOLEVERB_Reset(p,a)             ICOM_CALL (Reset,p)
205 #define IEnumOLEVERB_Clone(p,a)             ICOM_CALL1(Clone,p,a)
206
207 #ifdef __cplusplus
208 } /* extern "C" */
209 #endif /* defined(__cplusplus) */
210
211 #endif /* __WINE_WINE_OBJ_OLEOBJ_H */
212