kernel32: FindFirstChangeNotification needs a static IO_STATUS_BLOCK.
[wine] / dlls / mshtml / htmldoc3.c
1 /*
2  * Copyright 2005 Jacek Caban for CodeWeavers
3  *
4  * This library is free software; you can redistribute it and/or
5  * modify it under the terms of the GNU Lesser General Public
6  * License as published by the Free Software Foundation; either
7  * version 2.1 of the License, or (at your option) any later version.
8  *
9  * This library is distributed in the hope that it will be useful,
10  * but WITHOUT ANY WARRANTY; without even the implied warranty of
11  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
12  * Lesser General Public License for more details.
13  *
14  * You should have received a copy of the GNU Lesser General Public
15  * License along with this library; if not, write to the Free Software
16  * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
17  */
18
19 #include "config.h"
20
21 #include <stdarg.h>
22 #include <stdio.h>
23
24 #define COBJMACROS
25
26 #include "windef.h"
27 #include "winbase.h"
28 #include "winuser.h"
29 #include "ole2.h"
30
31 #include "wine/debug.h"
32
33 #include "mshtml_private.h"
34
35 WINE_DEFAULT_DEBUG_CHANNEL(mshtml);
36
37 #define HTMLDOC3_THIS(iface) DEFINE_THIS(HTMLDocument, HTMLDocument3, iface)
38
39 static HRESULT WINAPI HTMLDocument3_QueryInterface(IHTMLDocument3 *iface,
40                                                   REFIID riid, void **ppv)
41 {
42     HTMLDocument *This = HTMLDOC3_THIS(iface);
43     return IHTMLDocument2_QueryInterface(HTMLDOC(This), riid, ppv);
44 }
45
46 static ULONG WINAPI HTMLDocument3_AddRef(IHTMLDocument3 *iface)
47 {
48     HTMLDocument *This = HTMLDOC3_THIS(iface);
49     return IHTMLDocument2_AddRef(HTMLDOC(This));
50 }
51
52 static ULONG WINAPI HTMLDocument3_Release(IHTMLDocument3 *iface)
53 {
54     HTMLDocument *This = HTMLDOC3_THIS(iface);
55     return IHTMLDocument2_Release(HTMLDOC(This));
56 }
57
58 static HRESULT WINAPI HTMLDocument3_GetTypeInfoCount(IHTMLDocument3 *iface, UINT *pctinfo)
59 {
60     HTMLDocument *This = HTMLDOC3_THIS(iface);
61     FIXME("(%p)->(%p)\n", This, pctinfo);
62     return E_NOTIMPL;
63 }
64
65 static HRESULT WINAPI HTMLDocument3_GetTypeInfo(IHTMLDocument3 *iface, UINT iTInfo,
66                                                 LCID lcid, ITypeInfo **ppTInfo)
67 {
68     HTMLDocument *This = HTMLDOC3_THIS(iface);
69     FIXME("(%p)->(%u %lu %p)\n", This, iTInfo, lcid, ppTInfo);
70     return E_NOTIMPL;
71 }
72
73 static HRESULT WINAPI HTMLDocument3_GetIDsOfNames(IHTMLDocument3 *iface, REFIID riid,
74                                                 LPOLESTR *rgszNames, UINT cNames,
75                                                 LCID lcid, DISPID *rgDispId)
76 {
77     HTMLDocument *This = HTMLDOC3_THIS(iface);
78     FIXME("(%p)->(%s %p %u %lu %p)\n", This, debugstr_guid(riid), rgszNames, cNames,
79                                         lcid, rgDispId);
80     return E_NOTIMPL;
81 }
82
83 static HRESULT WINAPI HTMLDocument3_Invoke(IHTMLDocument3 *iface, DISPID dispIdMember,
84                             REFIID riid, LCID lcid, WORD wFlags, DISPPARAMS *pDispParams,
85                             VARIANT *pVarResult, EXCEPINFO *pExcepInfo, UINT *puArgErr)
86 {
87     HTMLDocument *This = HTMLDOC3_THIS(iface);
88     FIXME("(%p)->(%ld %s %ld %d %p %p %p %p)\n", This, dispIdMember, debugstr_guid(riid),
89             lcid, wFlags, pDispParams, pVarResult, pExcepInfo, puArgErr);
90     return E_NOTIMPL;
91 }
92
93 static HRESULT WINAPI HTMLDocument3_releaseCapture(IHTMLDocument3 *iface)
94 {
95     HTMLDocument *This = HTMLDOC3_THIS(iface);
96     FIXME("(%p)\n", This);
97     return E_NOTIMPL;
98 }
99
100 static HRESULT WINAPI HTMLDocument3_recalc(IHTMLDocument3 *iface, VARIANT_BOOL fForce)
101 {
102     HTMLDocument *This = HTMLDOC3_THIS(iface);
103     FIXME("(%p)->(%x)\n", This, fForce);
104     return E_NOTIMPL;
105 }
106
107 static HRESULT WINAPI HTMLDocument3_createTextNode(IHTMLDocument3 *iface, BSTR text,
108                                                    IHTMLDOMNode **newTextNode)
109 {
110     HTMLDocument *This = HTMLDOC3_THIS(iface);
111     FIXME("(%p)->(%s %p)\n", This, debugstr_w(text), newTextNode);
112     return E_NOTIMPL;
113 }
114
115 static HRESULT WINAPI HTMLDocument3_documentElement(IHTMLDocument3 *iface, IHTMLElement **p)
116 {
117     HTMLDocument *This = HTMLDOC3_THIS(iface);
118     FIXME("(%p)->(%p)\n", This, p);
119     return E_NOTIMPL;
120 }
121
122 static HRESULT WINAPI HTMLDocument3_uniqueID(IHTMLDocument3 *iface, BSTR *p)
123 {
124     HTMLDocument *This = HTMLDOC3_THIS(iface);
125     FIXME("(%p)->(%p)\n", This, p);
126     return E_NOTIMPL;
127 }
128
129 static HRESULT WINAPI HTMLDocument3_attachEvent(IHTMLDocument3 *iface, BSTR event,
130                                                 IDispatch* pDisp, VARIANT_BOOL *pfResult)
131 {
132     HTMLDocument *This = HTMLDOC3_THIS(iface);
133     FIXME("(%p)->(%s %p %p)\n", This, debugstr_w(event), pDisp, pfResult);
134     return E_NOTIMPL;
135 }
136
137 static HRESULT WINAPI HTMLDocument3_detachEvent(IHTMLDocument3 *iface, BSTR event,
138                                                 IDispatch *pDisp)
139 {
140     HTMLDocument *This = HTMLDOC3_THIS(iface);
141     FIXME("(%p)->(%s %p)\n", This, debugstr_w(event), pDisp);
142     return E_NOTIMPL;
143 }
144
145 static HRESULT WINAPI HTMLDocument3_put_onrowsdelete(IHTMLDocument3 *iface, VARIANT v)
146 {
147     HTMLDocument *This = HTMLDOC3_THIS(iface);
148     FIXME("(%p)->()\n", This);
149     return E_NOTIMPL;
150 }
151
152 static HRESULT WINAPI HTMLDocument3_get_onrowsdelete(IHTMLDocument3 *iface, VARIANT *p)
153 {
154     HTMLDocument *This = HTMLDOC3_THIS(iface);
155     FIXME("(%p)->(%p)\n", This, p);
156     return E_NOTIMPL;
157 }
158
159 static HRESULT WINAPI HTMLDocument3_put_onrowsinserted(IHTMLDocument3 *iface, VARIANT v)
160 {
161     HTMLDocument *This = HTMLDOC3_THIS(iface);
162     FIXME("(%p)->()\n", This);
163     return E_NOTIMPL;
164 }
165
166 static HRESULT WINAPI HTMLDocument3_get_onrowsinserted(IHTMLDocument3 *iface, VARIANT *p)
167 {
168     HTMLDocument *This = HTMLDOC3_THIS(iface);
169     FIXME("(%p)->(%p)\n", This, p);
170     return E_NOTIMPL;
171 }
172
173 static HRESULT WINAPI HTMLDocument3_put_oncellchange(IHTMLDocument3 *iface, VARIANT v)
174 {
175     HTMLDocument *This = HTMLDOC3_THIS(iface);
176     FIXME("(%p)->()\n", This);
177     return E_NOTIMPL;
178 }
179
180 static HRESULT WINAPI HTMLDocument3_get_oncellchange(IHTMLDocument3 *iface, VARIANT *p)
181 {
182     HTMLDocument *This = HTMLDOC3_THIS(iface);
183     FIXME("(%p)->(%p)\n", This, p);
184     return E_NOTIMPL;
185 }
186
187 static HRESULT WINAPI HTMLDocument3_put_ondatasetchanged(IHTMLDocument3 *iface, VARIANT v)
188 {
189     HTMLDocument *This = HTMLDOC3_THIS(iface);
190     FIXME("(%p)->()\n", This);
191     return E_NOTIMPL;
192 }
193
194 static HRESULT WINAPI HTMLDocument3_get_ondatasetchanged(IHTMLDocument3 *iface, VARIANT *p)
195 {
196     HTMLDocument *This = HTMLDOC3_THIS(iface);
197     FIXME("(%p)->(%p)\n", This, p);
198     return E_NOTIMPL;
199 }
200
201 static HRESULT WINAPI HTMLDocument3_put_ondataavailable(IHTMLDocument3 *iface, VARIANT v)
202 {
203     HTMLDocument *This = HTMLDOC3_THIS(iface);
204     FIXME("(%p)->()\n", This);
205     return E_NOTIMPL;
206 }
207
208 static HRESULT WINAPI HTMLDocument3_get_ondataavailable(IHTMLDocument3 *iface, VARIANT *p)
209 {
210     HTMLDocument *This = HTMLDOC3_THIS(iface);
211     FIXME("(%p)->(%p)\n", This, p);
212     return E_NOTIMPL;
213 }
214
215 static HRESULT WINAPI HTMLDocument3_put_ondatasetcomplete(IHTMLDocument3 *iface, VARIANT v)
216 {
217     HTMLDocument *This = HTMLDOC3_THIS(iface);
218     FIXME("(%p)->()\n", This);
219     return E_NOTIMPL;
220 }
221
222 static HRESULT WINAPI HTMLDocument3_get_ondatasetcomplete(IHTMLDocument3 *iface, VARIANT *p)
223 {
224     HTMLDocument *This = HTMLDOC3_THIS(iface);
225     FIXME("(%p)->(%p)\n", This, p);
226     return E_NOTIMPL;
227 }
228
229 static HRESULT WINAPI HTMLDocument3_put_onpropertychange(IHTMLDocument3 *iface, VARIANT v)
230 {
231     HTMLDocument *This = HTMLDOC3_THIS(iface);
232     FIXME("(%p)->()\n", This);
233     return E_NOTIMPL;
234 }
235
236 static HRESULT WINAPI HTMLDocument3_get_onpropertychange(IHTMLDocument3 *iface, VARIANT *p)
237 {
238     HTMLDocument *This = HTMLDOC3_THIS(iface);
239     FIXME("(%p)->(%p)\n", This, p);
240     return E_NOTIMPL;
241 }
242
243 static HRESULT WINAPI HTMLDocument3_put_dir(IHTMLDocument3 *iface, BSTR v)
244 {
245     HTMLDocument *This = HTMLDOC3_THIS(iface);
246     FIXME("(%p)->(%s)\n", This, debugstr_w(v));
247     return E_NOTIMPL;
248 }
249
250 static HRESULT WINAPI HTMLDocument3_get_dir(IHTMLDocument3 *iface, BSTR *p)
251 {
252     HTMLDocument *This = HTMLDOC3_THIS(iface);
253     FIXME("(%p)->(%p)\n", This, p);
254     return E_NOTIMPL;
255 }
256
257 static HRESULT WINAPI HTMLDocument3_put_oncontextmenu(IHTMLDocument3 *iface, VARIANT v)
258 {
259     HTMLDocument *This = HTMLDOC3_THIS(iface);
260     FIXME("(%p)->()\n", This);
261     return E_NOTIMPL;
262 }
263
264 static HRESULT WINAPI HTMLDocument3_get_oncontextmenu(IHTMLDocument3 *iface, VARIANT *p)
265 {
266     HTMLDocument *This = HTMLDOC3_THIS(iface);
267     FIXME("(%p)->(%p)\n", This, p);
268     return E_NOTIMPL;
269 }
270
271 static HRESULT WINAPI HTMLDocument3_put_onstop(IHTMLDocument3 *iface, VARIANT v)
272 {
273     HTMLDocument *This = HTMLDOC3_THIS(iface);
274     FIXME("(%p)->()\n", This);
275     return E_NOTIMPL;
276 }
277
278 static HRESULT WINAPI HTMLDocument3_get_onstop(IHTMLDocument3 *iface, VARIANT *p)
279 {
280     HTMLDocument *This = HTMLDOC3_THIS(iface);
281     FIXME("(%p)->(%p)\n", This, p);
282     return E_NOTIMPL;
283 }
284
285 static HRESULT WINAPI HTMLDocument3_createDocumentFragment(IHTMLDocument3 *iface,
286                                                            IHTMLDocument2 **ppNewDoc)
287 {
288     HTMLDocument *This = HTMLDOC3_THIS(iface);
289     FIXME("(%p)->(%p)\n", This, ppNewDoc);
290     return E_NOTIMPL;
291 }
292
293 static HRESULT WINAPI HTMLDocument3_get_parentDocument(IHTMLDocument3 *iface,
294                                                        IHTMLDocument2 **p)
295 {
296     HTMLDocument *This = HTMLDOC3_THIS(iface);
297     FIXME("(%p)->(%p)\n", This, p);
298     return E_NOTIMPL;
299 }
300
301 static HRESULT WINAPI HTMLDocument3_put_enableDownload(IHTMLDocument3 *iface,
302                                                        VARIANT_BOOL v)
303 {
304     HTMLDocument *This = HTMLDOC3_THIS(iface);
305     FIXME("(%p)->(%x)\n", This, v);
306     return E_NOTIMPL;
307 }
308
309 static HRESULT WINAPI HTMLDocument3_get_enableDownload(IHTMLDocument3 *iface,
310                                                        VARIANT_BOOL *p)
311 {
312     HTMLDocument *This = HTMLDOC3_THIS(iface);
313     FIXME("(%p)->(%p)\n", This, p);
314     return E_NOTIMPL;
315 }
316
317 static HRESULT WINAPI HTMLDocument3_put_baseUrl(IHTMLDocument3 *iface, BSTR v)
318 {
319     HTMLDocument *This = HTMLDOC3_THIS(iface);
320     FIXME("(%p)->(%s)\n", This, debugstr_w(v));
321     return E_NOTIMPL;
322 }
323
324 static HRESULT WINAPI HTMLDocument3_get_baseUrl(IHTMLDocument3 *iface, BSTR *p)
325 {
326     HTMLDocument *This = HTMLDOC3_THIS(iface);
327     FIXME("(%p)->(%p)\n", This, p);
328     return E_NOTIMPL;
329 }
330
331 static HRESULT WINAPI HTMLDocument3_get_childNodes(IHTMLDocument3 *iface, IDispatch **p)
332 {
333     HTMLDocument *This = HTMLDOC3_THIS(iface);
334     FIXME("(%p)->(%p)\n", This, p);
335     return E_NOTIMPL;
336 }
337
338 static HRESULT WINAPI HTMLDocument3_put_inheritStyleSheets(IHTMLDocument3 *iface,
339                                                            VARIANT_BOOL v)
340 {
341     HTMLDocument *This = HTMLDOC3_THIS(iface);
342     FIXME("(%p)->()\n", This);
343     return E_NOTIMPL;
344 }
345
346 static HRESULT WINAPI HTMLDocument3_get_inheritStyleSheets(IHTMLDocument3 *iface,
347                                                            VARIANT_BOOL *p)
348 {
349     HTMLDocument *This = HTMLDOC3_THIS(iface);
350     FIXME("(%p)->(%p)\n", This, p);
351     return E_NOTIMPL;
352 }
353
354 static HRESULT WINAPI HTMLDocument3_put_onbeforeeditfocus(IHTMLDocument3 *iface, VARIANT v)
355 {
356     HTMLDocument *This = HTMLDOC3_THIS(iface);
357     FIXME("(%p)->()\n", This);
358     return E_NOTIMPL;
359 }
360
361 static HRESULT WINAPI HTMLDocument3_get_onbeforeeditfocus(IHTMLDocument3 *iface, VARIANT *p)
362 {
363     HTMLDocument *This = HTMLDOC3_THIS(iface);
364     FIXME("(%p)->(%p)\n", This, p);
365     return E_NOTIMPL;
366 }
367
368 static HRESULT WINAPI HTMLDocument3_getElementsByName(IHTMLDocument3 *iface, BSTR v,
369                                                       IHTMLElementCollection **ppelColl)
370 {
371     HTMLDocument *This = HTMLDOC3_THIS(iface);
372     FIXME("(%p)->(%s %p)\n", This, debugstr_w(v), ppelColl);
373     return E_NOTIMPL;
374 }
375
376
377 static HRESULT WINAPI HTMLDocument3_getElementById(IHTMLDocument3 *iface, BSTR v,
378                                                    IHTMLElement **pel)
379 {
380     HTMLDocument *This = HTMLDOC3_THIS(iface);
381     FIXME("(%p)->(%s %p)\n", This, debugstr_w(v), pel);
382     return E_NOTIMPL;
383 }
384
385
386 static HRESULT WINAPI HTMLDocument3_getElementsByTagName(IHTMLDocument3 *iface, BSTR v,
387                                                          IHTMLElementCollection **pelColl)
388 {
389     HTMLDocument *This = HTMLDOC3_THIS(iface);
390     FIXME("(%p)->(%s %p)\n", This, debugstr_w(v), pelColl);
391     return E_NOTIMPL;
392 }
393
394 static const IHTMLDocument3Vtbl HTMLDocument3Vtbl = {
395     HTMLDocument3_QueryInterface,
396     HTMLDocument3_AddRef,
397     HTMLDocument3_Release,
398     HTMLDocument3_GetTypeInfoCount,
399     HTMLDocument3_GetTypeInfo,
400     HTMLDocument3_GetIDsOfNames,
401     HTMLDocument3_Invoke,
402     HTMLDocument3_releaseCapture,
403     HTMLDocument3_recalc,
404     HTMLDocument3_createTextNode,
405     HTMLDocument3_documentElement,
406     HTMLDocument3_uniqueID,
407     HTMLDocument3_attachEvent,
408     HTMLDocument3_detachEvent,
409     HTMLDocument3_put_onrowsdelete,
410     HTMLDocument3_get_onrowsdelete,
411     HTMLDocument3_put_onrowsinserted,
412     HTMLDocument3_get_onrowsinserted,
413     HTMLDocument3_put_oncellchange,
414     HTMLDocument3_get_oncellchange,
415     HTMLDocument3_put_ondatasetchanged,
416     HTMLDocument3_get_ondatasetchanged,
417     HTMLDocument3_put_ondataavailable,
418     HTMLDocument3_get_ondataavailable,
419     HTMLDocument3_put_ondatasetcomplete,
420     HTMLDocument3_get_ondatasetcomplete,
421     HTMLDocument3_put_onpropertychange,
422     HTMLDocument3_get_onpropertychange,
423     HTMLDocument3_put_dir,
424     HTMLDocument3_get_dir,
425     HTMLDocument3_put_oncontextmenu,
426     HTMLDocument3_get_oncontextmenu,
427     HTMLDocument3_put_onstop,
428     HTMLDocument3_get_onstop,
429     HTMLDocument3_createDocumentFragment,
430     HTMLDocument3_get_parentDocument,
431     HTMLDocument3_put_enableDownload,
432     HTMLDocument3_get_enableDownload,
433     HTMLDocument3_put_baseUrl,
434     HTMLDocument3_get_baseUrl,
435     HTMLDocument3_get_childNodes,
436     HTMLDocument3_put_inheritStyleSheets,
437     HTMLDocument3_get_inheritStyleSheets,
438     HTMLDocument3_put_onbeforeeditfocus,
439     HTMLDocument3_get_onbeforeeditfocus,
440     HTMLDocument3_getElementsByName,
441     HTMLDocument3_getElementById,
442     HTMLDocument3_getElementsByTagName
443 };
444
445 void HTMLDocument_HTMLDocument3_Init(HTMLDocument *This)
446 {
447     This->lpHTMLDocument3Vtbl = &HTMLDocument3Vtbl;
448 }