Release 960928
[wine/multimedia.git] / include / ole.h
bloba85f105e83125d008359be5571cc9810f7953958
1 /*
2 * ole.h - Declarations for OLESVR and OLECLI
3 */
5 #ifndef __WINE_OLE_H
6 #define __WINE_OLE_H
8 #include "windows.h"
10 typedef LPVOID LPUNKNOWN;
11 typedef LPCSTR OLE_LPCSTR;
13 /* object types */
14 #define OT_LINK 1
15 #define OT_EMBEDDED 2
16 #define OT_STATIC 3
18 /* activate verbs */
19 #define OLEVERB_PRIMARY 0
21 typedef enum
23 OLE_OK,
24 OLE_WAIT_FOR_RELEASE,
25 OLE_BUSY,
26 OLE_ERROR_PROTECT_ONLY,
27 OLE_ERROR_MEMORY,
28 OLE_ERROR_STREAM,
29 OLE_ERROR_STATIC,
30 OLE_ERROR_BLANK,
31 OLE_ERROR_DRAW,
32 OLE_ERROR_METAFILE,
33 OLE_ERROR_ABORT,
34 OLE_ERROR_CLIPBOARD,
35 OLE_ERROR_FORMAT,
36 OLE_ERROR_OBJECT,
37 OLE_ERROR_OPTION,
38 OLE_ERROR_PROTOCOL,
39 OLE_ERROR_ADDRESS,
40 OLE_ERROR_NOT_EQUAL,
41 OLE_ERROR_HANDLE,
42 OLE_ERROR_GENERIC,
43 OLE_ERROR_CLASS,
44 OLE_ERROR_SYNTAX,
45 OLE_ERROR_DATATYPE,
46 OLE_ERROR_PALETTE,
47 OLE_ERROR_NOT_LINK,
48 OLE_ERROR_NOT_EMPTY,
49 OLE_ERROR_SIZE,
50 OLE_ERROR_DRIVE,
51 OLE_ERROR_NETWORK,
52 OLE_ERROR_NAME,
53 OLE_ERROR_TEMPLATE,
54 OLE_ERROR_NEW,
55 OLE_ERROR_EDIT,
56 OLE_ERROR_OPEN,
57 OLE_ERROR_NOT_OPEN,
58 OLE_ERROR_LAUNCH,
59 OLE_ERROR_COMM,
60 OLE_ERROR_TERMINATE,
61 OLE_ERROR_COMMAND,
62 OLE_ERROR_SHOW,
63 OLE_ERROR_DOVERB,
64 OLE_ERROR_ADVISE_NATIVE,
65 OLE_ERROR_ADVISE_PICT,
66 OLE_ERROR_ADVISE_RENAME,
67 OLE_ERROR_POKE_NATIVE,
68 OLE_ERROR_REQUEST_NATIVE,
69 OLE_ERROR_REQUEST_PICT,
70 OLE_ERROR_SERVER_BLOCKED,
71 OLE_ERROR_REGISTRATION,
72 OLE_ERROR_ALREADY_REGISTERED,
73 OLE_ERROR_TASK,
74 OLE_ERROR_OUTOFDATE,
75 OLE_ERROR_CANT_UPDATE_CLIENT,
76 OLE_ERROR_UPDATE,
77 OLE_ERROR_SETDATA_FORMAT,
78 OLE_ERROR_STATIC_FROM_OTHER_OS,
79 OLE_WARN_DELETE_DATA = 1000
80 } OLESTATUS;
82 typedef enum {
83 OLE_SERVER_MULTI,
84 OLE_SERVER_SINGLE
85 } OLE_SERVER_USE;
87 typedef enum {
88 OLE_CHANGED,
89 OLE_SAVED,
90 OLE_CLOSED,
91 OLE_RENAMED,
92 OLE_QUERY_PAINT,
93 OLE_RELEASE,
94 OLE_QUERY_RETRY
95 } OLE_NOTIFICATION;
97 typedef enum {
98 olerender_none,
99 olerender_draw,
100 olerender_format
101 } OLEOPT_RENDER;
103 typedef enum {
104 oleupdate_always,
105 oleupdate_onsave,
106 oleupdate_oncall,
107 oleupdate_onclose,
108 } OLEOPT_UPDATE;
110 typedef LONG LHSERVER;
111 typedef LONG LHSERVERDOC;
112 typedef LONG LHCLIENTDOC;
113 typedef LONG OLECLIPFORMAT;/* dunno about this type, please change/add */
114 typedef OLEOPT_UPDATE* LPOLEOPT_UPDATE;
116 typedef enum {
117 OLE_NONE, /* none */
118 OLE_DELETE, /* delete object */
119 OLE_LNKPASTE, /* link paste */
120 OLE_EMBPASTE, /* paste(and update) */
121 OLE_SHOW,
122 OLE_RUN,
123 OLE_ACTIVATE,
124 OLE_UPDATE,
125 OLE_CLOSE,
126 OLE_RECONNECT,
127 OLE_SETUPDATEOPTIONS,
128 OLE_SERVERRUNLAUNCH, /* unlaunch (terminate?) server */
129 OLE_LOADFROMSTREAM, /* (auto reconnect) */
130 OLE_SETDATA, /* OleSetData */
131 OLE_REQUESTDATA, /* OleRequestData */
132 OLE_OTHER,
133 OLE_CREATE,
134 OLE_CREATEFROMTEMPLATE,
135 OLE_CREATELINKFROMFILE,
136 OLE_COPYFROMLNK,
137 OLE_CREATREFROMFILE,
138 OLE_CREATEINVISIBLE
139 } OLE_RELEASE_METHOD;
141 typedef struct _OLETARGETDEVICE {
142 UINT otdDeviceNameOffset;
143 UINT otdDriverNameOffset;
144 UINT otdPortNameOffset;
145 UINT otdExtDevmodeOffset;
146 UINT otdExtDevmodeSize;
147 UINT otdEnvironmentOffset;
148 UINT otdEnvironmentSize;
149 BYTE otdData[1];
150 /* ... */
151 } OLETARGETDEVICE;
152 typedef struct _OLESTREAM* LPOLESTREAM;
153 typedef struct _OLESTREAMVTBL {
154 DWORD (*Get)(LPOLESTREAM,LPSTR,DWORD);
155 DWORD (*Put)(LPOLESTREAM,LPSTR,DWORD);
156 } OLESTREAMVTBL;
157 typedef OLESTREAMVTBL* LPOLESTREAMVTBL;
158 typedef struct _OLESTREAM {
159 LPOLESTREAMVTBL lpstbl;
160 } OLESTREAM;
161 typedef struct _OLESERVERDOC* LPOLESERVERDOC;
162 typedef struct _OLEOBJECT* LPOLEOBJECT;
163 typedef struct _OLECLIENT* LPOLECLIENT;
164 typedef struct _OLESERVERDOCVTBL {
165 OLESTATUS (*Save)(LPOLESERVERDOC);
166 OLESTATUS (*Close)(LPOLESERVERDOC);
167 OLESTATUS (*SetHostNames)(LPOLESERVERDOC,OLE_LPCSTR,OLE_LPCSTR);
168 OLESTATUS (*SetDocDimensions)(LPOLESERVERDOC,LPRECT16);
169 #undef GetObject /* FIXME */
170 OLESTATUS (*GetObject)(LPOLESERVERDOC,OLE_LPCSTR,LPOLEOBJECT*,LPOLECLIENT);
171 OLESTATUS (*Release)(LPOLESERVERDOC);
172 OLESTATUS (*SetColorScheme)(LPOLESERVERDOC,LPLOGPALETTE);
173 OLESTATUS (*Execute)(LPOLESERVERDOC,HGLOBAL16);
174 } OLESERVERDOCVTBL;
175 typedef OLESERVERDOCVTBL* LPOLESERVERDOCVTBL;
176 typedef struct _OLESERVERDOC {
177 LPOLESERVERDOCVTBL lpvtbl;
178 /* server provided state info */
179 } OLESERVERDOC;
181 typedef struct _OLESERVER* LPOLESERVER;
182 typedef struct _OLESERVERVTBL {
183 OLESTATUS (*Open)(LPOLESERVER,LHSERVERDOC,OLE_LPCSTR,LPOLESERVERDOC *);
184 OLESTATUS (*Create)(LPOLESERVER,LHSERVERDOC,OLE_LPCSTR,OLE_LPCSTR,LPOLESERVERDOC*);
185 OLESTATUS (*CreateFromTemplate)(LPOLESERVER,LHSERVERDOC,OLE_LPCSTR,OLE_LPCSTR,OLE_LPCSTR,LPOLESERVERDOC *);
186 OLESTATUS (*Edit)(LPOLESERVER,LHSERVERDOC,OLE_LPCSTR,OLE_LPCSTR,LPOLESERVERDOC *);
187 OLESTATUS (*Exit)(LPOLESERVER);
188 OLESTATUS (*Release)(LPOLESERVER);
189 OLESTATUS (*Execute)(LPOLESERVER);
190 } OLESERVERVTBL;
191 typedef OLESERVERVTBL *LPOLESERVERVTBL;
192 typedef struct _OLESERVER {
193 LPOLESERVERVTBL lpvtbl;
194 /* server specific data */
195 } OLESERVER;
196 typedef struct _OLECLIENTVTBL {
197 int (*CallBack)(LPOLECLIENT,OLE_NOTIFICATION,LPOLEOBJECT);
198 } OLECLIENTVTBL;
199 typedef OLECLIENTVTBL *LPOLECLIENTVTBL;
201 typedef struct _OLECLIENT {
202 LPOLECLIENTVTBL lpvtbl;
203 /* client data... */
204 } OLECLIENT;
206 typedef struct _OLEOBJECTVTBL {
207 void * (*QueryProtocol)(LPOLEOBJECT,OLE_LPCSTR);
208 OLESTATUS (*Release)(LPOLEOBJECT);
209 OLESTATUS (*Show)(LPOLEOBJECT,BOOL);
210 OLESTATUS (*DoVerb)(LPOLEOBJECT,UINT,BOOL,BOOL);
211 OLESTATUS (*GetData)(LPOLEOBJECT,OLECLIPFORMAT,HANDLE *);
212 OLESTATUS (*SetData)(LPOLEOBJECT,OLECLIPFORMAT,HANDLE);
213 OLESTATUS (*SetTargetDevice)(LPOLEOBJECT,HGLOBAL16);
214 OLESTATUS (*SetBounds)(LPOLEOBJECT,LPRECT16);
215 OLESTATUS (*EnumFormats)(LPOLEOBJECT,OLECLIPFORMAT);
216 OLESTATUS (*SetColorScheme)(LPOLEOBJECT,LPLOGPALETTE);
217 OLESTATUS (*Delete)(LPOLEOBJECT);
218 OLESTATUS (*SetHostNames)(LPOLEOBJECT,OLE_LPCSTR,OLE_LPCSTR);
219 OLESTATUS (*SaveToStream)(LPOLEOBJECT,LPOLESTREAM);
220 OLESTATUS (*Clone)(LPOLEOBJECT,LPOLECLIENT,LHCLIENTDOC,OLE_LPCSTR,LPOLEOBJECT *);
221 OLESTATUS (*CopyFromLink)(LPOLEOBJECT,LPOLECLIENT,LHCLIENTDOC,OLE_LPCSTR,LPOLEOBJECT *);
222 OLESTATUS (*Equal)(LPOLEOBJECT,LPOLEOBJECT);
223 OLESTATUS (*CopyToClipBoard)(LPOLEOBJECT);
224 OLESTATUS (*Draw)(LPOLEOBJECT,HDC,LPRECT16,LPRECT16,HDC);
225 OLESTATUS (*Activate)(LPOLEOBJECT,UINT,BOOL,BOOL,HWND,LPRECT16);
226 OLESTATUS (*Execute)(LPOLEOBJECT,HGLOBAL16,UINT);
227 OLESTATUS (*Close)(LPOLEOBJECT);
228 OLESTATUS (*Update)(LPOLEOBJECT);
229 OLESTATUS (*Reconnect)(LPOLEOBJECT);
230 OLESTATUS (*ObjectConvert)(LPOLEOBJECT,OLE_LPCSTR,LPOLECLIENT,LHCLIENTDOC,OLE_LPCSTR,LPOLEOBJECT*);
231 OLESTATUS (*GetLinkUpdateOptions)(LPOLEOBJECT,LPOLEOPT_UPDATE);
232 OLESTATUS (*SetLinkUpdateOptions)(LPOLEOBJECT,OLEOPT_UPDATE);
233 OLESTATUS (*Rename)(LPOLEOBJECT,OLE_LPCSTR);
234 OLESTATUS (*QueryName)(LPOLEOBJECT,LPSTR,LPUINT16);
235 OLESTATUS (*QueryType)(LPOLEOBJECT,LPLONG);
236 OLESTATUS (*QueryBounds)(LPOLEOBJECT,LPRECT16);
237 OLESTATUS (*QuerySize)(LPOLEOBJECT,LPDWORD);
238 OLESTATUS (*QueryOpen)(LPOLEOBJECT);
239 OLESTATUS (*QueryOutOfDate)(LPOLEOBJECT);
240 OLESTATUS (*QueryReleaseStatus)(LPOLEOBJECT);
241 OLESTATUS (*QueryReleaseError)(LPOLEOBJECT);
242 OLE_RELEASE_METHOD (*QueryReleaseMethod)(LPOLEOBJECT);
243 OLESTATUS (*RequestData)(LPOLEOBJECT,OLECLIPFORMAT);
244 OLESTATUS (*ObjectLong)(LPOLEOBJECT,UINT,LPLONG);
245 } OLEOBJECTVTBL;
246 typedef OLEOBJECTVTBL* LPOLEOBJECTVTBL;
248 typedef struct _OLEOBJECT {
249 LPOLEOBJECTVTBL lpvtbl;
250 } OLEOBJECT;
253 OLESTATUS OleRegisterServer(LPCSTR,LPOLESERVER,LHSERVER *,HINSTANCE,OLE_SERVER_USE);
254 OLESTATUS OleUnblockServer(LHSERVER,BOOL *);
255 OLESTATUS OleRegisterServerDoc(LHSERVER,LPCSTR,LPOLESERVERDOC,LHSERVERDOC *);
256 OLESTATUS OleRegisterClientDoc(LPCSTR,LPCSTR,LONG,LHCLIENTDOC *);
257 OLESTATUS OleRenameClientDoc(LHCLIENTDOC,LPCSTR);
258 OLESTATUS OleRevokeServerDoc(LHSERVERDOC);
259 OLESTATUS OleRevokeClientDoc(LHCLIENTDOC);
260 OLESTATUS OleRevokeServer(LHSERVER);
262 #endif /* __WINE_OLE_H */