Make sure edit and listbox controls are of same ASCII/Unicode style as
[wine.git] / include / ole.h
blobd9ef4cbb5f5fb280f50cd31f14f1d2eb11b83bec
1 /*
2 * Declarations for OLESVR and OLECLI
4 * Copyright (C) the Wine project
6 * This library is free software; you can redistribute it and/or
7 * modify it under the terms of the GNU Lesser General Public
8 * License as published by the Free Software Foundation; either
9 * version 2.1 of the License, or (at your option) any later version.
11 * This library is distributed in the hope that it will be useful,
12 * but WITHOUT ANY WARRANTY; without even the implied warranty of
13 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
14 * Lesser General Public License for more details.
16 * You should have received a copy of the GNU Lesser General Public
17 * License along with this library; if not, write to the Free Software
18 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
21 #ifndef __WINE_OLE_H
22 #define __WINE_OLE_H
24 #ifdef __cplusplus
25 extern "C" {
26 #endif
28 #include "windef.h"
29 #include "wine/windef16.h"
30 #include "wine/obj_base.h"
31 #include "wine/obj_misc.h"
32 #include "wine/obj_storage.h"
33 #include "wine/obj_moniker.h"
34 #include "wine/obj_dataobject.h"
35 #include "wine/obj_dragdrop.h"
37 struct tagLOGPALETTE;
39 /* object types */
40 #define OT_LINK 1
41 #define OT_EMBEDDED 2
42 #define OT_STATIC 3
44 /* activate verbs */
45 #define OLEVERB_PRIMARY 0
47 typedef enum
49 OLE_OK,
50 OLE_WAIT_FOR_RELEASE,
51 OLE_BUSY,
52 OLE_ERROR_PROTECT_ONLY,
53 OLE_ERROR_MEMORY,
54 OLE_ERROR_STREAM,
55 OLE_ERROR_STATIC,
56 OLE_ERROR_BLANK,
57 OLE_ERROR_DRAW,
58 OLE_ERROR_METAFILE,
59 OLE_ERROR_ABORT,
60 OLE_ERROR_CLIPBOARD,
61 OLE_ERROR_FORMAT,
62 OLE_ERROR_OBJECT,
63 OLE_ERROR_OPTION,
64 OLE_ERROR_PROTOCOL,
65 OLE_ERROR_ADDRESS,
66 OLE_ERROR_NOT_EQUAL,
67 OLE_ERROR_HANDLE,
68 OLE_ERROR_GENERIC,
69 OLE_ERROR_CLASS,
70 OLE_ERROR_SYNTAX,
71 OLE_ERROR_DATATYPE,
72 OLE_ERROR_PALETTE,
73 OLE_ERROR_NOT_LINK,
74 OLE_ERROR_NOT_EMPTY,
75 OLE_ERROR_SIZE,
76 OLE_ERROR_DRIVE,
77 OLE_ERROR_NETWORK,
78 OLE_ERROR_NAME,
79 OLE_ERROR_TEMPLATE,
80 OLE_ERROR_NEW,
81 OLE_ERROR_EDIT,
82 OLE_ERROR_OPEN,
83 OLE_ERROR_NOT_OPEN,
84 OLE_ERROR_LAUNCH,
85 OLE_ERROR_COMM,
86 OLE_ERROR_TERMINATE,
87 OLE_ERROR_COMMAND,
88 OLE_ERROR_SHOW,
89 OLE_ERROR_DOVERB,
90 OLE_ERROR_ADVISE_NATIVE,
91 OLE_ERROR_ADVISE_PICT,
92 OLE_ERROR_ADVISE_RENAME,
93 OLE_ERROR_POKE_NATIVE,
94 OLE_ERROR_REQUEST_NATIVE,
95 OLE_ERROR_REQUEST_PICT,
96 OLE_ERROR_SERVER_BLOCKED,
97 OLE_ERROR_REGISTRATION,
98 OLE_ERROR_ALREADY_REGISTERED,
99 OLE_ERROR_TASK,
100 OLE_ERROR_OUTOFDATE,
101 OLE_ERROR_CANT_UPDATE_CLIENT,
102 OLE_ERROR_UPDATE,
103 OLE_ERROR_SETDATA_FORMAT,
104 OLE_ERROR_STATIC_FROM_OTHER_OS,
105 OLE_WARN_DELETE_DATA = 1000
106 } OLESTATUS;
108 typedef enum {
109 OLE_SERVER_MULTI,
110 OLE_SERVER_SINGLE
111 } OLE_SERVER_USE;
113 typedef enum {
114 OLE_CHANGED,
115 OLE_SAVED,
116 OLE_CLOSED,
117 OLE_RENAMED,
118 OLE_QUERY_PAINT,
119 OLE_RELEASE,
120 OLE_QUERY_RETRY
121 } OLE_NOTIFICATION;
123 typedef enum {
124 olerender_none,
125 olerender_draw,
126 olerender_format
127 } OLEOPT_RENDER;
129 typedef enum {
130 oleupdate_always,
131 oleupdate_onsave,
132 oleupdate_oncall,
133 oleupdate_onclose
134 } OLEOPT_UPDATE;
136 typedef LONG LHSERVER;
137 typedef LONG LHSERVERDOC;
138 typedef LONG LHCLIENTDOC;
139 typedef LONG OLECLIPFORMAT;/* dunno about this type, please change/add */
140 typedef OLEOPT_UPDATE* LPOLEOPT_UPDATE;
142 typedef enum {
143 OLE_NONE, /* none */
144 OLE_DELETE, /* delete object */
145 OLE_LNKPASTE, /* link paste */
146 OLE_EMBPASTE, /* paste(and update) */
147 OLE_SHOW,
148 OLE_RUN,
149 OLE_ACTIVATE,
150 OLE_UPDATE,
151 OLE_CLOSE,
152 OLE_RECONNECT,
153 OLE_SETUPDATEOPTIONS,
154 OLE_SERVERRUNLAUNCH, /* unlaunch (terminate?) server */
155 OLE_LOADFROMSTREAM, /* (auto reconnect) */
156 OLE_SETDATA, /* OleSetData */
157 OLE_REQUESTDATA, /* OleRequestData */
158 OLE_OTHER,
159 OLE_CREATE,
160 OLE_CREATEFROMTEMPLATE,
161 OLE_CREATELINKFROMFILE,
162 OLE_COPYFROMLNK,
163 OLE_CREATREFROMFILE,
164 OLE_CREATEINVISIBLE
165 } OLE_RELEASE_METHOD;
167 typedef struct _OLETARGETDEVICE {
168 UINT16 otdDeviceNameOffset;
169 UINT16 otdDriverNameOffset;
170 UINT16 otdPortNameOffset;
171 UINT16 otdExtDevmodeOffset;
172 UINT16 otdExtDevmodeSize;
173 UINT16 otdEnvironmentOffset;
174 UINT16 otdEnvironmentSize;
175 BYTE otdData[1];
176 /* ... */
177 } OLETARGETDEVICE;
179 typedef struct _OLESERVERDOC* LPOLESERVERDOC;
180 typedef struct _OLEOBJECT* LPOLEOBJECT;
181 typedef struct _OLECLIENT* LPOLECLIENT;
182 typedef struct _OLESERVERDOCVTBL {
183 OLESTATUS (CALLBACK *Save)(LPOLESERVERDOC);
184 OLESTATUS (CALLBACK *Close)(LPOLESERVERDOC);
185 OLESTATUS (CALLBACK *SetHostNames)(LPOLESERVERDOC,LPCOLESTR16,LPCOLESTR16);
186 OLESTATUS (CALLBACK *SetDocDimensions)(LPOLESERVERDOC,LPRECT16);
187 #ifdef __WINE__
188 /* GetObject is a WINELIB_NAME macro so it cannot be used in Wine itself */
189 OLESTATUS (CALLBACK *pGetObject)(LPOLESERVERDOC,LPCOLESTR16,LPOLEOBJECT*,LPOLECLIENT);
190 #else
191 OLESTATUS (CALLBACK *GetObject)(LPOLESERVERDOC,LPCOLESTR16,LPOLEOBJECT*,LPOLECLIENT);
192 #endif
193 OLESTATUS (CALLBACK *Release)(LPOLESERVERDOC);
194 OLESTATUS (CALLBACK *SetColorScheme)(LPOLESERVERDOC,struct tagLOGPALETTE*);
195 OLESTATUS (CALLBACK *Execute)(LPOLESERVERDOC,HGLOBAL16);
196 } OLESERVERDOCVTBL;
197 typedef OLESERVERDOCVTBL* LPOLESERVERDOCVTBL;
198 typedef struct _OLESERVERDOC {
199 LPOLESERVERDOCVTBL lpvtbl;
200 /* server provided state info */
201 } OLESERVERDOC;
203 typedef struct _OLESERVER* LPOLESERVER;
204 typedef struct _OLESERVERVTBL {
205 OLESTATUS (CALLBACK *Open)(LPOLESERVER,LHSERVERDOC,LPCOLESTR16,LPOLESERVERDOC *);
206 OLESTATUS (CALLBACK *Create)(LPOLESERVER,LHSERVERDOC,LPCOLESTR16,LPCOLESTR16,LPOLESERVERDOC*);
207 OLESTATUS (CALLBACK *CreateFromTemplate)(LPOLESERVER,LHSERVERDOC,LPCOLESTR16,LPCOLESTR16,LPCOLESTR16,LPOLESERVERDOC *);
208 OLESTATUS (CALLBACK *Edit)(LPOLESERVER,LHSERVERDOC,LPCOLESTR16,LPCOLESTR16,LPOLESERVERDOC *);
209 OLESTATUS (CALLBACK *Exit)(LPOLESERVER);
210 OLESTATUS (CALLBACK *Release)(LPOLESERVER);
211 OLESTATUS (CALLBACK *Execute)(LPOLESERVER);
212 } OLESERVERVTBL;
213 typedef OLESERVERVTBL *LPOLESERVERVTBL;
214 typedef struct _OLESERVER {
215 LPOLESERVERVTBL lpvtbl;
216 /* server specific data */
217 } OLESERVER;
218 typedef struct _OLECLIENTVTBL {
219 int (CALLBACK *CallBack)(LPOLECLIENT,OLE_NOTIFICATION,LPOLEOBJECT);
220 } OLECLIENTVTBL;
221 typedef OLECLIENTVTBL *LPOLECLIENTVTBL;
223 typedef struct _OLECLIENT {
224 LPOLECLIENTVTBL lpvtbl;
225 /* client data... */
226 } OLECLIENT;
228 struct _OLESTREAM;
230 typedef struct _OLEOBJECTVTBL {
231 void CALLBACK *(*QueryProtocol)(LPOLEOBJECT,LPCOLESTR16);
232 OLESTATUS (CALLBACK *Release)(LPOLEOBJECT);
233 OLESTATUS (CALLBACK *Show)(LPOLEOBJECT,BOOL16);
234 OLESTATUS (CALLBACK *DoVerb)(LPOLEOBJECT,UINT16,BOOL16,BOOL16);
235 OLESTATUS (CALLBACK *GetData)(LPOLEOBJECT,OLECLIPFORMAT,HANDLE16 *);
236 OLESTATUS (CALLBACK *SetData)(LPOLEOBJECT,OLECLIPFORMAT,HANDLE16);
237 OLESTATUS (CALLBACK *SetTargetDevice)(LPOLEOBJECT,HGLOBAL16);
238 OLESTATUS (CALLBACK *SetBounds)(LPOLEOBJECT,LPRECT16);
239 OLESTATUS (CALLBACK *EnumFormats)(LPOLEOBJECT,OLECLIPFORMAT);
240 OLESTATUS (CALLBACK *SetColorScheme)(LPOLEOBJECT,struct tagLOGPALETTE*);
241 OLESTATUS (CALLBACK *Delete)(LPOLEOBJECT);
242 OLESTATUS (CALLBACK *SetHostNames)(LPOLEOBJECT,LPCOLESTR16,LPCOLESTR16);
243 OLESTATUS (CALLBACK *SaveToStream)(LPOLEOBJECT,struct _OLESTREAM*);
244 OLESTATUS (CALLBACK *Clone)(LPOLEOBJECT,LPOLECLIENT,LHCLIENTDOC,LPCOLESTR16,LPOLEOBJECT *);
245 OLESTATUS (CALLBACK *CopyFromLink)(LPOLEOBJECT,LPOLECLIENT,LHCLIENTDOC,LPCOLESTR16,LPOLEOBJECT *);
246 OLESTATUS (CALLBACK *Equal)(LPOLEOBJECT,LPOLEOBJECT);
247 OLESTATUS (CALLBACK *CopyToClipBoard)(LPOLEOBJECT);
248 OLESTATUS (CALLBACK *Draw)(LPOLEOBJECT,HDC16,LPRECT16,LPRECT16,HDC16);
249 OLESTATUS (CALLBACK *Activate)(LPOLEOBJECT,UINT16,BOOL16,BOOL16,HWND16,LPRECT16);
250 OLESTATUS (CALLBACK *Execute)(LPOLEOBJECT,HGLOBAL16,UINT16);
251 OLESTATUS (CALLBACK *Close)(LPOLEOBJECT);
252 OLESTATUS (CALLBACK *Update)(LPOLEOBJECT);
253 OLESTATUS (CALLBACK *Reconnect)(LPOLEOBJECT);
254 OLESTATUS (CALLBACK *ObjectConvert)(LPOLEOBJECT,LPCOLESTR16,LPOLECLIENT,LHCLIENTDOC,LPCOLESTR16,LPOLEOBJECT*);
255 OLESTATUS (CALLBACK *GetLinkUpdateOptions)(LPOLEOBJECT,LPOLEOPT_UPDATE);
256 OLESTATUS (CALLBACK *SetLinkUpdateOptions)(LPOLEOBJECT,OLEOPT_UPDATE);
257 OLESTATUS (CALLBACK *Rename)(LPOLEOBJECT,LPCOLESTR16);
258 OLESTATUS (CALLBACK *QueryName)(LPOLEOBJECT,LPSTR,LPUINT16);
259 OLESTATUS (CALLBACK *QueryType)(LPOLEOBJECT,LPLONG);
260 OLESTATUS (CALLBACK *QueryBounds)(LPOLEOBJECT,LPRECT16);
261 OLESTATUS (CALLBACK *QuerySize)(LPOLEOBJECT,LPDWORD);
262 OLESTATUS (CALLBACK *QueryOpen)(LPOLEOBJECT);
263 OLESTATUS (CALLBACK *QueryOutOfDate)(LPOLEOBJECT);
264 OLESTATUS (CALLBACK *QueryReleaseStatus)(LPOLEOBJECT);
265 OLESTATUS (CALLBACK *QueryReleaseError)(LPOLEOBJECT);
266 OLE_RELEASE_METHOD (CALLBACK *QueryReleaseMethod)(LPOLEOBJECT);
267 OLESTATUS (CALLBACK *RequestData)(LPOLEOBJECT,OLECLIPFORMAT);
268 OLESTATUS (CALLBACK *ObjectLong)(LPOLEOBJECT,UINT16,LPLONG);
269 } OLEOBJECTVTBL;
270 typedef OLEOBJECTVTBL* LPOLEOBJECTVTBL;
272 typedef struct _OLEOBJECT {
273 LPOLEOBJECTVTBL lpvtbl;
274 } OLEOBJECT;
276 #ifdef __cplusplus
277 } /*extern*/
278 #endif
280 #endif /* __WINE_OLE_H */