Commit | Line | Data |
---|---|---|
e658d820 AJ |
1 | /* |
2 | * OLECLI library | |
3 | * | |
4 | * Copyright 1995 Martin von Loewis | |
0799c1a7 AJ |
5 | * |
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. | |
10 | * | |
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. | |
15 | * | |
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 | |
e658d820 AJ |
19 | */ |
20 | ||
21 | /* At the moment, these are only empty stubs. | |
22 | */ | |
4b157457 PS |
23 | |
24 | #include "config.h" | |
25 | ||
e37c6e18 AJ |
26 | #include <stdarg.h> |
27 | ||
3c25c8e9 AJ |
28 | #include "windef.h" |
29 | #include "wine/windef16.h" | |
83f52d11 | 30 | #include "winbase.h" |
fc296da4 | 31 | #include "wingdi.h" |
b34fb35b | 32 | #include "wownt32.h" |
3c25c8e9 | 33 | #include "objbase.h" |
0799c1a7 | 34 | #include "wine/debug.h" |
18aacf15 | 35 | |
0799c1a7 | 36 | WINE_DEFAULT_DEBUG_CHANNEL(ole); |
b4b9fae6 | 37 | |
3c25c8e9 AJ |
38 | typedef enum |
39 | { | |
40 | OLE_OK, | |
41 | OLE_WAIT_FOR_RELEASE, | |
42 | OLE_BUSY, | |
43 | OLE_ERROR_PROTECT_ONLY, | |
44 | OLE_ERROR_MEMORY, | |
45 | OLE_ERROR_STREAM, | |
46 | OLE_ERROR_STATIC, | |
47 | OLE_ERROR_BLANK, | |
48 | OLE_ERROR_DRAW, | |
49 | OLE_ERROR_METAFILE, | |
50 | OLE_ERROR_ABORT, | |
51 | OLE_ERROR_CLIPBOARD, | |
52 | OLE_ERROR_FORMAT, | |
53 | OLE_ERROR_OBJECT, | |
54 | OLE_ERROR_OPTION, | |
55 | OLE_ERROR_PROTOCOL, | |
56 | OLE_ERROR_ADDRESS, | |
57 | OLE_ERROR_NOT_EQUAL, | |
58 | OLE_ERROR_HANDLE, | |
59 | OLE_ERROR_GENERIC, | |
60 | OLE_ERROR_CLASS, | |
61 | OLE_ERROR_SYNTAX, | |
62 | OLE_ERROR_DATATYPE, | |
63 | OLE_ERROR_PALETTE, | |
64 | OLE_ERROR_NOT_LINK, | |
65 | OLE_ERROR_NOT_EMPTY, | |
66 | OLE_ERROR_SIZE, | |
67 | OLE_ERROR_DRIVE, | |
68 | OLE_ERROR_NETWORK, | |
69 | OLE_ERROR_NAME, | |
70 | OLE_ERROR_TEMPLATE, | |
71 | OLE_ERROR_NEW, | |
72 | OLE_ERROR_EDIT, | |
73 | OLE_ERROR_OPEN, | |
74 | OLE_ERROR_NOT_OPEN, | |
75 | OLE_ERROR_LAUNCH, | |
76 | OLE_ERROR_COMM, | |
77 | OLE_ERROR_TERMINATE, | |
78 | OLE_ERROR_COMMAND, | |
79 | OLE_ERROR_SHOW, | |
80 | OLE_ERROR_DOVERB, | |
81 | OLE_ERROR_ADVISE_NATIVE, | |
82 | OLE_ERROR_ADVISE_PICT, | |
83 | OLE_ERROR_ADVISE_RENAME, | |
84 | OLE_ERROR_POKE_NATIVE, | |
85 | OLE_ERROR_REQUEST_NATIVE, | |
86 | OLE_ERROR_REQUEST_PICT, | |
87 | OLE_ERROR_SERVER_BLOCKED, | |
88 | OLE_ERROR_REGISTRATION, | |
89 | OLE_ERROR_ALREADY_REGISTERED, | |
90 | OLE_ERROR_TASK, | |
91 | OLE_ERROR_OUTOFDATE, | |
92 | OLE_ERROR_CANT_UPDATE_CLIENT, | |
93 | OLE_ERROR_UPDATE, | |
94 | OLE_ERROR_SETDATA_FORMAT, | |
95 | OLE_ERROR_STATIC_FROM_OTHER_OS, | |
96 | OLE_WARN_DELETE_DATA = 1000 | |
97 | } OLESTATUS; | |
98 | ||
99 | typedef enum | |
100 | { | |
101 | olerender_none, | |
102 | olerender_draw, | |
103 | olerender_format | |
104 | } OLEOPT_RENDER; | |
105 | ||
106 | typedef enum | |
107 | { | |
108 | oleupdate_always, | |
109 | oleupdate_onsave, | |
110 | oleupdate_oncall, | |
111 | oleupdate_onclose | |
112 | } OLEOPT_UPDATE; | |
113 | ||
114 | typedef enum { | |
115 | OLE_NONE, /* none */ | |
116 | OLE_DELETE, /* delete object */ | |
117 | OLE_LNKPASTE, /* link paste */ | |
118 | OLE_EMBPASTE, /* paste(and update) */ | |
119 | OLE_SHOW, | |
120 | OLE_RUN, | |
121 | OLE_ACTIVATE, | |
122 | OLE_UPDATE, | |
123 | OLE_CLOSE, | |
124 | OLE_RECONNECT, | |
125 | OLE_SETUPDATEOPTIONS, | |
126 | OLE_SERVERRUNLAUNCH, /* unlaunch (terminate?) server */ | |
127 | OLE_LOADFROMSTREAM, /* (auto reconnect) */ | |
128 | OLE_SETDATA, /* OleSetData */ | |
129 | OLE_REQUESTDATA, /* OleRequestData */ | |
130 | OLE_OTHER, | |
131 | OLE_CREATE, | |
132 | OLE_CREATEFROMTEMPLATE, | |
133 | OLE_CREATELINKFROMFILE, | |
134 | OLE_COPYFROMLNK, | |
135 | OLE_CREATREFROMFILE, | |
136 | OLE_CREATEINVISIBLE | |
137 | } OLE_RELEASE_METHOD; | |
138 | ||
139 | typedef LONG LHCLIENTDOC; | |
83755cca | 140 | typedef struct _OLEOBJECT *_LPOLEOBJECT; |
3c25c8e9 AJ |
141 | typedef struct _OLECLIENT *LPOLECLIENT; |
142 | typedef LONG OLECLIPFORMAT;/* dunno about this type, please change/add */ | |
143 | typedef OLEOPT_UPDATE *LPOLEOPT_UPDATE; | |
d07c1004 | 144 | typedef LPCSTR LPCOLESTR16; |
3c25c8e9 AJ |
145 | |
146 | struct _OLESTREAM; | |
147 | ||
148 | typedef struct _OLEOBJECTVTBL { | |
83755cca FG |
149 | void CALLBACK *(*QueryProtocol)(_LPOLEOBJECT,LPCOLESTR16); |
150 | OLESTATUS (CALLBACK *Release)(_LPOLEOBJECT); | |
151 | OLESTATUS (CALLBACK *Show)(_LPOLEOBJECT,BOOL16); | |
152 | OLESTATUS (CALLBACK *DoVerb)(_LPOLEOBJECT,UINT16,BOOL16,BOOL16); | |
153 | OLESTATUS (CALLBACK *GetData)(_LPOLEOBJECT,OLECLIPFORMAT,HANDLE16 *); | |
154 | OLESTATUS (CALLBACK *SetData)(_LPOLEOBJECT,OLECLIPFORMAT,HANDLE16); | |
155 | OLESTATUS (CALLBACK *SetTargetDevice)(_LPOLEOBJECT,HGLOBAL16); | |
156 | OLESTATUS (CALLBACK *SetBounds)(_LPOLEOBJECT,LPRECT16); | |
157 | OLESTATUS (CALLBACK *EnumFormats)(_LPOLEOBJECT,OLECLIPFORMAT); | |
158 | OLESTATUS (CALLBACK *SetColorScheme)(_LPOLEOBJECT,struct tagLOGPALETTE*); | |
159 | OLESTATUS (CALLBACK *Delete)(_LPOLEOBJECT); | |
160 | OLESTATUS (CALLBACK *SetHostNames)(_LPOLEOBJECT,LPCOLESTR16,LPCOLESTR16); | |
161 | OLESTATUS (CALLBACK *SaveToStream)(_LPOLEOBJECT,struct _OLESTREAM*); | |
162 | OLESTATUS (CALLBACK *Clone)(_LPOLEOBJECT,LPOLECLIENT,LHCLIENTDOC,LPCOLESTR16,_LPOLEOBJECT *); | |
163 | OLESTATUS (CALLBACK *CopyFromLink)(_LPOLEOBJECT,LPOLECLIENT,LHCLIENTDOC,LPCOLESTR16,_LPOLEOBJECT *); | |
164 | OLESTATUS (CALLBACK *Equal)(_LPOLEOBJECT,_LPOLEOBJECT); | |
165 | OLESTATUS (CALLBACK *CopyToClipBoard)(_LPOLEOBJECT); | |
166 | OLESTATUS (CALLBACK *Draw)(_LPOLEOBJECT,HDC16,LPRECT16,LPRECT16,HDC16); | |
167 | OLESTATUS (CALLBACK *Activate)(_LPOLEOBJECT,UINT16,BOOL16,BOOL16,HWND16,LPRECT16); | |
168 | OLESTATUS (CALLBACK *Execute)(_LPOLEOBJECT,HGLOBAL16,UINT16); | |
169 | OLESTATUS (CALLBACK *Close)(_LPOLEOBJECT); | |
170 | OLESTATUS (CALLBACK *Update)(_LPOLEOBJECT); | |
171 | OLESTATUS (CALLBACK *Reconnect)(_LPOLEOBJECT); | |
172 | OLESTATUS (CALLBACK *ObjectConvert)(_LPOLEOBJECT,LPCOLESTR16,LPOLECLIENT,LHCLIENTDOC,LPCOLESTR16,_LPOLEOBJECT*); | |
173 | OLESTATUS (CALLBACK *GetLinkUpdateOptions)(_LPOLEOBJECT,LPOLEOPT_UPDATE); | |
174 | OLESTATUS (CALLBACK *SetLinkUpdateOptions)(_LPOLEOBJECT,OLEOPT_UPDATE); | |
175 | OLESTATUS (CALLBACK *Rename)(_LPOLEOBJECT,LPCOLESTR16); | |
176 | OLESTATUS (CALLBACK *QueryName)(_LPOLEOBJECT,LPSTR,LPUINT16); | |
177 | OLESTATUS (CALLBACK *QueryType)(_LPOLEOBJECT,LPLONG); | |
178 | OLESTATUS (CALLBACK *QueryBounds)(_LPOLEOBJECT,LPRECT16); | |
179 | OLESTATUS (CALLBACK *QuerySize)(_LPOLEOBJECT,LPDWORD); | |
180 | OLESTATUS (CALLBACK *QueryOpen)(_LPOLEOBJECT); | |
181 | OLESTATUS (CALLBACK *QueryOutOfDate)(_LPOLEOBJECT); | |
182 | OLESTATUS (CALLBACK *QueryReleaseStatus)(_LPOLEOBJECT); | |
183 | OLESTATUS (CALLBACK *QueryReleaseError)(_LPOLEOBJECT); | |
184 | OLE_RELEASE_METHOD (CALLBACK *QueryReleaseMethod)(_LPOLEOBJECT); | |
185 | OLESTATUS (CALLBACK *RequestData)(_LPOLEOBJECT,OLECLIPFORMAT); | |
186 | OLESTATUS (CALLBACK *ObjectLong)(_LPOLEOBJECT,UINT16,LPLONG); | |
3c25c8e9 AJ |
187 | } OLEOBJECTVTBL; |
188 | typedef OLEOBJECTVTBL *LPOLEOBJECTVTBL; | |
189 | ||
190 | typedef struct _OLEOBJECT | |
191 | { | |
eba47f1d | 192 | const OLEOBJECTVTBL *lpvtbl; |
3c25c8e9 | 193 | } OLEOBJECT; |
e658d820 | 194 | |
2ddd5ce5 | 195 | static LONG OLE_current_handle; |
e658d820 | 196 | |
cf354d8c GP |
197 | /****************************************************************************** |
198 | * OleSavedClientDoc [OLECLI32.45] | |
199 | */ | |
200 | OLESTATUS WINAPI OleSavedClientDoc(LHCLIENTDOC hDoc) | |
201 | { | |
202 | FIXME("(%ld: stub\n", hDoc); | |
203 | return OLE_OK; | |
204 | } | |
205 | ||
b05264fe | 206 | /****************************************************************************** |
2d6457c1 | 207 | * OleRegisterClientDoc [OLECLI32.41] |
e658d820 | 208 | */ |
a3960292 | 209 | OLESTATUS WINAPI OleRegisterClientDoc(LPCSTR classname, LPCSTR docname, |
e658d820 AJ |
210 | LONG reserved, LHCLIENTDOC *hRet ) |
211 | { | |
359f497e | 212 | FIXME("(%s,%s,...): stub\n",classname,docname); |
e658d820 AJ |
213 | *hRet=++OLE_current_handle; |
214 | return OLE_OK; | |
215 | } | |
216 | ||
b05264fe | 217 | /****************************************************************************** |
2d6457c1 | 218 | * OleRenameClientDoc [OLECLI32.43] |
e658d820 | 219 | */ |
a3960292 | 220 | OLESTATUS WINAPI OleRenameClientDoc(LHCLIENTDOC hDoc, LPCSTR newName) |
e658d820 | 221 | { |
359f497e | 222 | FIXME("(%ld,%s,...): stub\n",hDoc, newName); |
e658d820 AJ |
223 | return OLE_OK; |
224 | } | |
225 | ||
b05264fe | 226 | /****************************************************************************** |
2d6457c1 | 227 | * OleRevokeClientDoc [OLECLI32.42] |
e658d820 | 228 | */ |
a3960292 | 229 | OLESTATUS WINAPI OleRevokeClientDoc(LHCLIENTDOC hServerDoc) |
e658d820 | 230 | { |
359f497e | 231 | FIXME("(%ld): stub\n",hServerDoc); |
e658d820 AJ |
232 | return OLE_OK; |
233 | } | |
234 | ||
b05264fe | 235 | /****************************************************************************** |
2d6457c1 | 236 | * OleCreateLinkFromClip [OLECLI32.11] |
e658d820 | 237 | */ |
9a624916 | 238 | OLESTATUS WINAPI OleCreateLinkFromClip( |
e658d820 | 239 | LPCSTR name,LPOLECLIENT olecli,LHCLIENTDOC hclientdoc,LPCSTR xname, |
83755cca | 240 | _LPOLEOBJECT *lpoleob,OLEOPT_RENDER render,OLECLIPFORMAT clipformat |
e658d820 | 241 | ) { |
359f497e | 242 | FIXME("(%s,%p,%08lx,%s,%p,%d,%ld): stub!\n", |
54c2711f | 243 | name,olecli,hclientdoc,xname,lpoleob,render,clipformat); |
e658d820 AJ |
244 | return OLE_OK; |
245 | } | |
246 | ||
b05264fe | 247 | /****************************************************************************** |
2d6457c1 | 248 | * OleQueryLinkFromClip [OLECLI32.9] |
e658d820 | 249 | */ |
a3960292 | 250 | OLESTATUS WINAPI OleQueryLinkFromClip(LPCSTR name,OLEOPT_RENDER render,OLECLIPFORMAT clipformat) { |
359f497e | 251 | FIXME("(%s,%d,%ld): stub!\n",name,render,clipformat); |
e658d820 AJ |
252 | return OLE_OK; |
253 | } | |
cbb95496 | 254 | |
b05264fe | 255 | /****************************************************************************** |
2d6457c1 | 256 | * OleQueryCreateFromClip [OLECLI32.10] |
e658d820 | 257 | */ |
a3960292 | 258 | OLESTATUS WINAPI OleQueryCreateFromClip(LPCSTR name,OLEOPT_RENDER render,OLECLIPFORMAT clipformat) { |
359f497e | 259 | FIXME("(%s,%d,%ld): stub!\n",name,render,clipformat); |
e658d820 AJ |
260 | return OLE_OK; |
261 | } | |
262 | ||
b05264fe | 263 | /****************************************************************************** |
91791032 | 264 | * OleIsDcMeta [OLECLI32.60] |
e658d820 | 265 | */ |
91791032 | 266 | BOOL WINAPI OleIsDcMeta(HDC hdc) |
e658d820 | 267 | { |
b34fb35b | 268 | TRACE("(%p)\n",hdc); |
91791032 | 269 | return GetObjectType( hdc ) == OBJ_METADC; |
e658d820 AJ |
270 | } |
271 | ||
b05264fe | 272 | /****************************************************************************** |
2d6457c1 | 273 | * OleSetHostNames [OLECLI32.15] |
e658d820 | 274 | */ |
83755cca | 275 | OLESTATUS WINAPI OleSetHostNames(_LPOLEOBJECT oleob,LPCSTR name1,LPCSTR name2) { |
359f497e | 276 | FIXME("(%p,%s,%s): stub\n",oleob,name1,name2); |
e658d820 AJ |
277 | return OLE_OK; |
278 | } | |
279 | ||
b05264fe | 280 | /****************************************************************************** |
2d6457c1 | 281 | * OleQueryType [OLECLI32.14] |
e658d820 | 282 | */ |
83755cca | 283 | OLESTATUS WINAPI OleQueryType(_LPOLEOBJECT oleob,LONG*xlong) { |
359f497e | 284 | FIXME("(%p,%p): stub!\n",oleob,xlong); |
e658d820 AJ |
285 | if (!oleob) |
286 | return 0x10; | |
359f497e | 287 | TRACE("Calling OLEOBJECT.QueryType (%p) (%p,%p)\n", |
54c2711f | 288 | oleob->lpvtbl->QueryType,oleob,xlong); |
e658d820 AJ |
289 | return oleob->lpvtbl->QueryType(oleob,xlong); |
290 | } | |
291 | ||
b05264fe | 292 | /****************************************************************************** |
2d6457c1 | 293 | * OleCreateFromClip [OLECLI32.12] |
e658d820 | 294 | */ |
a3960292 | 295 | OLESTATUS WINAPI OleCreateFromClip( |
e658d820 | 296 | LPCSTR name,LPOLECLIENT olecli,LHCLIENTDOC hclientdoc,LPCSTR xname, |
83755cca | 297 | _LPOLEOBJECT *lpoleob,OLEOPT_RENDER render, OLECLIPFORMAT clipformat |
e658d820 | 298 | ) { |
359f497e | 299 | FIXME("(%s,%p,%08lx,%s,%p,%d,%ld): stub!\n", |
54c2711f | 300 | name,olecli,hclientdoc,xname,lpoleob,render,clipformat); |
e658d820 AJ |
301 | /* clipb type, object kreieren entsprechend etc. */ |
302 | return OLE_OK; | |
303 | } |