credui: Updated French translation.
[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., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, 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 %u %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 %u %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)->(%d %s %d %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_get_documentElement(IHTMLDocument3 *iface, IHTMLElement **p)
116 {
117     HTMLDocument *This = HTMLDOC3_THIS(iface);
118     nsIDOMDocument *nsdoc;
119     HTMLDOMNode *node;
120     nsIDOMElement *nselem = NULL;
121     nsresult nsres;
122
123     TRACE("(%p)->(%p)\n", This, p);
124
125     if(!This->nscontainer) {
126         *p = NULL;
127         return S_OK;
128     }
129
130     nsres = nsIWebNavigation_GetDocument(This->nscontainer->navigation, &nsdoc);
131     if(NS_FAILED(nsres))
132         ERR("GetDocument failed: %08x\n", nsres);
133
134     if(nsdoc) {
135         nsres = nsIDOMHTMLDocument_GetDocumentElement(nsdoc, &nselem);
136         if(NS_FAILED(nsres))
137             ERR("GetDocumentElement failed: %08x\n", nsres);
138     }
139     if(nselem) {
140         node = get_node(This, (nsIDOMNode *)nselem);
141         nsIDOMDocument_Release(nsdoc);
142
143         IHTMLDOMNode_QueryInterface(HTMLDOMNODE(node), &IID_IHTMLElement, (void**)p);
144     }else {
145         *p = NULL;
146     }
147
148     return S_OK;
149 }
150
151 static HRESULT WINAPI HTMLDocument3_uniqueID(IHTMLDocument3 *iface, BSTR *p)
152 {
153     HTMLDocument *This = HTMLDOC3_THIS(iface);
154     FIXME("(%p)->(%p)\n", This, p);
155     return E_NOTIMPL;
156 }
157
158 static HRESULT WINAPI HTMLDocument3_attachEvent(IHTMLDocument3 *iface, BSTR event,
159                                                 IDispatch* pDisp, VARIANT_BOOL *pfResult)
160 {
161     HTMLDocument *This = HTMLDOC3_THIS(iface);
162     FIXME("(%p)->(%s %p %p)\n", This, debugstr_w(event), pDisp, pfResult);
163     return E_NOTIMPL;
164 }
165
166 static HRESULT WINAPI HTMLDocument3_detachEvent(IHTMLDocument3 *iface, BSTR event,
167                                                 IDispatch *pDisp)
168 {
169     HTMLDocument *This = HTMLDOC3_THIS(iface);
170     FIXME("(%p)->(%s %p)\n", This, debugstr_w(event), pDisp);
171     return E_NOTIMPL;
172 }
173
174 static HRESULT WINAPI HTMLDocument3_put_onrowsdelete(IHTMLDocument3 *iface, VARIANT v)
175 {
176     HTMLDocument *This = HTMLDOC3_THIS(iface);
177     FIXME("(%p)->()\n", This);
178     return E_NOTIMPL;
179 }
180
181 static HRESULT WINAPI HTMLDocument3_get_onrowsdelete(IHTMLDocument3 *iface, VARIANT *p)
182 {
183     HTMLDocument *This = HTMLDOC3_THIS(iface);
184     FIXME("(%p)->(%p)\n", This, p);
185     return E_NOTIMPL;
186 }
187
188 static HRESULT WINAPI HTMLDocument3_put_onrowsinserted(IHTMLDocument3 *iface, VARIANT v)
189 {
190     HTMLDocument *This = HTMLDOC3_THIS(iface);
191     FIXME("(%p)->()\n", This);
192     return E_NOTIMPL;
193 }
194
195 static HRESULT WINAPI HTMLDocument3_get_onrowsinserted(IHTMLDocument3 *iface, VARIANT *p)
196 {
197     HTMLDocument *This = HTMLDOC3_THIS(iface);
198     FIXME("(%p)->(%p)\n", This, p);
199     return E_NOTIMPL;
200 }
201
202 static HRESULT WINAPI HTMLDocument3_put_oncellchange(IHTMLDocument3 *iface, VARIANT v)
203 {
204     HTMLDocument *This = HTMLDOC3_THIS(iface);
205     FIXME("(%p)->()\n", This);
206     return E_NOTIMPL;
207 }
208
209 static HRESULT WINAPI HTMLDocument3_get_oncellchange(IHTMLDocument3 *iface, VARIANT *p)
210 {
211     HTMLDocument *This = HTMLDOC3_THIS(iface);
212     FIXME("(%p)->(%p)\n", This, p);
213     return E_NOTIMPL;
214 }
215
216 static HRESULT WINAPI HTMLDocument3_put_ondatasetchanged(IHTMLDocument3 *iface, VARIANT v)
217 {
218     HTMLDocument *This = HTMLDOC3_THIS(iface);
219     FIXME("(%p)->()\n", This);
220     return E_NOTIMPL;
221 }
222
223 static HRESULT WINAPI HTMLDocument3_get_ondatasetchanged(IHTMLDocument3 *iface, VARIANT *p)
224 {
225     HTMLDocument *This = HTMLDOC3_THIS(iface);
226     FIXME("(%p)->(%p)\n", This, p);
227     return E_NOTIMPL;
228 }
229
230 static HRESULT WINAPI HTMLDocument3_put_ondataavailable(IHTMLDocument3 *iface, VARIANT v)
231 {
232     HTMLDocument *This = HTMLDOC3_THIS(iface);
233     FIXME("(%p)->()\n", This);
234     return E_NOTIMPL;
235 }
236
237 static HRESULT WINAPI HTMLDocument3_get_ondataavailable(IHTMLDocument3 *iface, VARIANT *p)
238 {
239     HTMLDocument *This = HTMLDOC3_THIS(iface);
240     FIXME("(%p)->(%p)\n", This, p);
241     return E_NOTIMPL;
242 }
243
244 static HRESULT WINAPI HTMLDocument3_put_ondatasetcomplete(IHTMLDocument3 *iface, VARIANT v)
245 {
246     HTMLDocument *This = HTMLDOC3_THIS(iface);
247     FIXME("(%p)->()\n", This);
248     return E_NOTIMPL;
249 }
250
251 static HRESULT WINAPI HTMLDocument3_get_ondatasetcomplete(IHTMLDocument3 *iface, VARIANT *p)
252 {
253     HTMLDocument *This = HTMLDOC3_THIS(iface);
254     FIXME("(%p)->(%p)\n", This, p);
255     return E_NOTIMPL;
256 }
257
258 static HRESULT WINAPI HTMLDocument3_put_onpropertychange(IHTMLDocument3 *iface, VARIANT v)
259 {
260     HTMLDocument *This = HTMLDOC3_THIS(iface);
261     FIXME("(%p)->()\n", This);
262     return E_NOTIMPL;
263 }
264
265 static HRESULT WINAPI HTMLDocument3_get_onpropertychange(IHTMLDocument3 *iface, VARIANT *p)
266 {
267     HTMLDocument *This = HTMLDOC3_THIS(iface);
268     FIXME("(%p)->(%p)\n", This, p);
269     return E_NOTIMPL;
270 }
271
272 static HRESULT WINAPI HTMLDocument3_put_dir(IHTMLDocument3 *iface, BSTR v)
273 {
274     HTMLDocument *This = HTMLDOC3_THIS(iface);
275     FIXME("(%p)->(%s)\n", This, debugstr_w(v));
276     return E_NOTIMPL;
277 }
278
279 static HRESULT WINAPI HTMLDocument3_get_dir(IHTMLDocument3 *iface, BSTR *p)
280 {
281     HTMLDocument *This = HTMLDOC3_THIS(iface);
282     FIXME("(%p)->(%p)\n", This, p);
283     return E_NOTIMPL;
284 }
285
286 static HRESULT WINAPI HTMLDocument3_put_oncontextmenu(IHTMLDocument3 *iface, VARIANT v)
287 {
288     HTMLDocument *This = HTMLDOC3_THIS(iface);
289     FIXME("(%p)->()\n", This);
290     return E_NOTIMPL;
291 }
292
293 static HRESULT WINAPI HTMLDocument3_get_oncontextmenu(IHTMLDocument3 *iface, VARIANT *p)
294 {
295     HTMLDocument *This = HTMLDOC3_THIS(iface);
296     FIXME("(%p)->(%p)\n", This, p);
297     return E_NOTIMPL;
298 }
299
300 static HRESULT WINAPI HTMLDocument3_put_onstop(IHTMLDocument3 *iface, VARIANT v)
301 {
302     HTMLDocument *This = HTMLDOC3_THIS(iface);
303     FIXME("(%p)->()\n", This);
304     return E_NOTIMPL;
305 }
306
307 static HRESULT WINAPI HTMLDocument3_get_onstop(IHTMLDocument3 *iface, VARIANT *p)
308 {
309     HTMLDocument *This = HTMLDOC3_THIS(iface);
310     FIXME("(%p)->(%p)\n", This, p);
311     return E_NOTIMPL;
312 }
313
314 static HRESULT WINAPI HTMLDocument3_createDocumentFragment(IHTMLDocument3 *iface,
315                                                            IHTMLDocument2 **ppNewDoc)
316 {
317     HTMLDocument *This = HTMLDOC3_THIS(iface);
318     FIXME("(%p)->(%p)\n", This, ppNewDoc);
319     return E_NOTIMPL;
320 }
321
322 static HRESULT WINAPI HTMLDocument3_get_parentDocument(IHTMLDocument3 *iface,
323                                                        IHTMLDocument2 **p)
324 {
325     HTMLDocument *This = HTMLDOC3_THIS(iface);
326     FIXME("(%p)->(%p)\n", This, p);
327     return E_NOTIMPL;
328 }
329
330 static HRESULT WINAPI HTMLDocument3_put_enableDownload(IHTMLDocument3 *iface,
331                                                        VARIANT_BOOL v)
332 {
333     HTMLDocument *This = HTMLDOC3_THIS(iface);
334     FIXME("(%p)->(%x)\n", This, v);
335     return E_NOTIMPL;
336 }
337
338 static HRESULT WINAPI HTMLDocument3_get_enableDownload(IHTMLDocument3 *iface,
339                                                        VARIANT_BOOL *p)
340 {
341     HTMLDocument *This = HTMLDOC3_THIS(iface);
342     FIXME("(%p)->(%p)\n", This, p);
343     return E_NOTIMPL;
344 }
345
346 static HRESULT WINAPI HTMLDocument3_put_baseUrl(IHTMLDocument3 *iface, BSTR v)
347 {
348     HTMLDocument *This = HTMLDOC3_THIS(iface);
349     FIXME("(%p)->(%s)\n", This, debugstr_w(v));
350     return E_NOTIMPL;
351 }
352
353 static HRESULT WINAPI HTMLDocument3_get_baseUrl(IHTMLDocument3 *iface, BSTR *p)
354 {
355     HTMLDocument *This = HTMLDOC3_THIS(iface);
356     FIXME("(%p)->(%p)\n", This, p);
357     return E_NOTIMPL;
358 }
359
360 static HRESULT WINAPI HTMLDocument3_get_childNodes(IHTMLDocument3 *iface, IDispatch **p)
361 {
362     HTMLDocument *This = HTMLDOC3_THIS(iface);
363     FIXME("(%p)->(%p)\n", This, p);
364     return E_NOTIMPL;
365 }
366
367 static HRESULT WINAPI HTMLDocument3_put_inheritStyleSheets(IHTMLDocument3 *iface,
368                                                            VARIANT_BOOL v)
369 {
370     HTMLDocument *This = HTMLDOC3_THIS(iface);
371     FIXME("(%p)->()\n", This);
372     return E_NOTIMPL;
373 }
374
375 static HRESULT WINAPI HTMLDocument3_get_inheritStyleSheets(IHTMLDocument3 *iface,
376                                                            VARIANT_BOOL *p)
377 {
378     HTMLDocument *This = HTMLDOC3_THIS(iface);
379     FIXME("(%p)->(%p)\n", This, p);
380     return E_NOTIMPL;
381 }
382
383 static HRESULT WINAPI HTMLDocument3_put_onbeforeeditfocus(IHTMLDocument3 *iface, VARIANT v)
384 {
385     HTMLDocument *This = HTMLDOC3_THIS(iface);
386     FIXME("(%p)->()\n", This);
387     return E_NOTIMPL;
388 }
389
390 static HRESULT WINAPI HTMLDocument3_get_onbeforeeditfocus(IHTMLDocument3 *iface, VARIANT *p)
391 {
392     HTMLDocument *This = HTMLDOC3_THIS(iface);
393     FIXME("(%p)->(%p)\n", This, p);
394     return E_NOTIMPL;
395 }
396
397 static HRESULT WINAPI HTMLDocument3_getElementsByName(IHTMLDocument3 *iface, BSTR v,
398                                                       IHTMLElementCollection **ppelColl)
399 {
400     HTMLDocument *This = HTMLDOC3_THIS(iface);
401     FIXME("(%p)->(%s %p)\n", This, debugstr_w(v), ppelColl);
402     return E_NOTIMPL;
403 }
404
405
406 static HRESULT WINAPI HTMLDocument3_getElementById(IHTMLDocument3 *iface, BSTR v,
407                                                    IHTMLElement **pel)
408 {
409     HTMLDocument *This = HTMLDOC3_THIS(iface);
410     FIXME("(%p)->(%s %p)\n", This, debugstr_w(v), pel);
411     return E_NOTIMPL;
412 }
413
414
415 static HRESULT WINAPI HTMLDocument3_getElementsByTagName(IHTMLDocument3 *iface, BSTR v,
416                                                          IHTMLElementCollection **pelColl)
417 {
418     HTMLDocument *This = HTMLDOC3_THIS(iface);
419     FIXME("(%p)->(%s %p)\n", This, debugstr_w(v), pelColl);
420     return E_NOTIMPL;
421 }
422
423 #undef HTMLDOC3_THIS
424
425 static const IHTMLDocument3Vtbl HTMLDocument3Vtbl = {
426     HTMLDocument3_QueryInterface,
427     HTMLDocument3_AddRef,
428     HTMLDocument3_Release,
429     HTMLDocument3_GetTypeInfoCount,
430     HTMLDocument3_GetTypeInfo,
431     HTMLDocument3_GetIDsOfNames,
432     HTMLDocument3_Invoke,
433     HTMLDocument3_releaseCapture,
434     HTMLDocument3_recalc,
435     HTMLDocument3_createTextNode,
436     HTMLDocument3_get_documentElement,
437     HTMLDocument3_uniqueID,
438     HTMLDocument3_attachEvent,
439     HTMLDocument3_detachEvent,
440     HTMLDocument3_put_onrowsdelete,
441     HTMLDocument3_get_onrowsdelete,
442     HTMLDocument3_put_onrowsinserted,
443     HTMLDocument3_get_onrowsinserted,
444     HTMLDocument3_put_oncellchange,
445     HTMLDocument3_get_oncellchange,
446     HTMLDocument3_put_ondatasetchanged,
447     HTMLDocument3_get_ondatasetchanged,
448     HTMLDocument3_put_ondataavailable,
449     HTMLDocument3_get_ondataavailable,
450     HTMLDocument3_put_ondatasetcomplete,
451     HTMLDocument3_get_ondatasetcomplete,
452     HTMLDocument3_put_onpropertychange,
453     HTMLDocument3_get_onpropertychange,
454     HTMLDocument3_put_dir,
455     HTMLDocument3_get_dir,
456     HTMLDocument3_put_oncontextmenu,
457     HTMLDocument3_get_oncontextmenu,
458     HTMLDocument3_put_onstop,
459     HTMLDocument3_get_onstop,
460     HTMLDocument3_createDocumentFragment,
461     HTMLDocument3_get_parentDocument,
462     HTMLDocument3_put_enableDownload,
463     HTMLDocument3_get_enableDownload,
464     HTMLDocument3_put_baseUrl,
465     HTMLDocument3_get_baseUrl,
466     HTMLDocument3_get_childNodes,
467     HTMLDocument3_put_inheritStyleSheets,
468     HTMLDocument3_get_inheritStyleSheets,
469     HTMLDocument3_put_onbeforeeditfocus,
470     HTMLDocument3_get_onbeforeeditfocus,
471     HTMLDocument3_getElementsByName,
472     HTMLDocument3_getElementById,
473     HTMLDocument3_getElementsByTagName
474 };
475
476 #define HTMLDOC4_THIS(iface) DEFINE_THIS(HTMLDocument, HTMLDocument4, iface)
477
478 static HRESULT WINAPI HTMLDocument4_QueryInterface(IHTMLDocument4 *iface,
479                                                    REFIID riid, void **ppv)
480 {
481     HTMLDocument *This = HTMLDOC4_THIS(iface);
482     return IHTMLDocument2_QueryInterface(HTMLDOC(This), riid, ppv);
483 }
484
485 static ULONG WINAPI HTMLDocument4_AddRef(IHTMLDocument4 *iface)
486 {
487     HTMLDocument *This = HTMLDOC4_THIS(iface);
488     return IHTMLDocument2_AddRef(HTMLDOC(This));
489 }
490
491 static ULONG WINAPI HTMLDocument4_Release(IHTMLDocument4 *iface)
492 {
493     HTMLDocument *This = HTMLDOC4_THIS(iface);
494     return IHTMLDocument2_Release(HTMLDOC(This));
495 }
496
497 static HRESULT WINAPI HTMLDocument4_GetTypeInfoCount(IHTMLDocument4 *iface, UINT *pctinfo)
498 {
499     HTMLDocument *This = HTMLDOC4_THIS(iface);
500     FIXME("(%p)->(%p)\n", This, pctinfo);
501     return E_NOTIMPL;
502 }
503
504 static HRESULT WINAPI HTMLDocument4_GetTypeInfo(IHTMLDocument4 *iface, UINT iTInfo,
505                                                 LCID lcid, ITypeInfo **ppTInfo)
506 {
507     HTMLDocument *This = HTMLDOC4_THIS(iface);
508     FIXME("(%p)->(%u %u %p)\n", This, iTInfo, lcid, ppTInfo);
509     return E_NOTIMPL;
510 }
511
512 static HRESULT WINAPI HTMLDocument4_GetIDsOfNames(IHTMLDocument4 *iface, REFIID riid,
513                                                 LPOLESTR *rgszNames, UINT cNames,
514                                                 LCID lcid, DISPID *rgDispId)
515 {
516     HTMLDocument *This = HTMLDOC4_THIS(iface);
517     FIXME("(%p)->(%s %p %u %u %p)\n", This, debugstr_guid(riid), rgszNames, cNames,
518                                         lcid, rgDispId);
519     return E_NOTIMPL;
520 }
521
522 static HRESULT WINAPI HTMLDocument4_Invoke(IHTMLDocument4 *iface, DISPID dispIdMember,
523                             REFIID riid, LCID lcid, WORD wFlags, DISPPARAMS *pDispParams,
524                             VARIANT *pVarResult, EXCEPINFO *pExcepInfo, UINT *puArgErr)
525 {
526     HTMLDocument *This = HTMLDOC4_THIS(iface);
527     FIXME("(%p)->(%d %s %d %d %p %p %p %p)\n", This, dispIdMember, debugstr_guid(riid),
528             lcid, wFlags, pDispParams, pVarResult, pExcepInfo, puArgErr);
529     return E_NOTIMPL;
530 }
531
532 static HRESULT WINAPI HTMLDocument4_focus(IHTMLDocument4 *iface)
533 {
534     HTMLDocument *This = HTMLDOC4_THIS(iface);
535     FIXME("(%p)->()\n", This);
536     return E_NOTIMPL;
537 }
538
539 static HRESULT WINAPI HTMLDocument4_hasFocus(IHTMLDocument4 *iface, VARIANT_BOOL *pfFocus)
540 {
541     HTMLDocument *This = HTMLDOC4_THIS(iface);
542     FIXME("(%p)->(%p)\n", This, pfFocus);
543     return E_NOTIMPL;
544 }
545
546 static HRESULT WINAPI HTMLDocument4_put_onselectionchange(IHTMLDocument4 *iface, VARIANT v)
547 {
548     HTMLDocument *This = HTMLDOC4_THIS(iface);
549     FIXME("(%p)->(v)\n", This);
550     return E_NOTIMPL;
551 }
552
553 static HRESULT WINAPI HTMLDocument4_get_onselectionchange(IHTMLDocument4 *iface, VARIANT *p)
554 {
555     HTMLDocument *This = HTMLDOC4_THIS(iface);
556     FIXME("(%p)->(%p)\n", This, p);
557     return E_NOTIMPL;
558 }
559
560 static HRESULT WINAPI HTMLDocument4_get_namespace(IHTMLDocument4 *iface, IDispatch **p)
561 {
562     HTMLDocument *This = HTMLDOC4_THIS(iface);
563     FIXME("(%p)->(%p)\n", This, p);
564     return E_NOTIMPL;
565 }
566
567 static HRESULT WINAPI HTMLDocument4_createDocumentFromUrl(IHTMLDocument4 *iface, BSTR bstrUrl,
568         BSTR bstrOptions, IHTMLDocument2 **newDoc)
569 {
570     HTMLDocument *This = HTMLDOC4_THIS(iface);
571     FIXME("(%p)->(%s %s %p)\n", This, debugstr_w(bstrUrl), debugstr_w(bstrOptions), newDoc);
572     return E_NOTIMPL;
573 }
574
575 static HRESULT WINAPI HTMLDocument4_put_media(IHTMLDocument4 *iface, BSTR v)
576 {
577     HTMLDocument *This = HTMLDOC4_THIS(iface);
578     FIXME("(%p)->(%s)\n", This, debugstr_w(v));
579     return E_NOTIMPL;
580 }
581
582 static HRESULT WINAPI HTMLDocument4_get_media(IHTMLDocument4 *iface, BSTR *p)
583 {
584     HTMLDocument *This = HTMLDOC4_THIS(iface);
585     FIXME("(%p)->(%p)\n", This, p);
586     return E_NOTIMPL;
587 }
588
589 static HRESULT WINAPI HTMLDocument4_createEventObject(IHTMLDocument4 *iface,
590         VARIANT *pvarEventObject, IHTMLEventObj **ppEventObj)
591 {
592     HTMLDocument *This = HTMLDOC4_THIS(iface);
593     FIXME("(%p)->(%p %p)\n", This, pvarEventObject, ppEventObj);
594     return E_NOTIMPL;
595 }
596
597 static HRESULT WINAPI HTMLDocument4_fireEvent(IHTMLDocument4 *iface, BSTR bstrEventName,
598         VARIANT *pvarEventObject, VARIANT_BOOL *pfCanceled)
599 {
600     HTMLDocument *This = HTMLDOC4_THIS(iface);
601     FIXME("(%p)->(%s %p %p)\n", This, debugstr_w(bstrEventName), pvarEventObject, pfCanceled);
602     return E_NOTIMPL;
603 }
604
605 static HRESULT WINAPI HTMLDocument4_createRenderStyle(IHTMLDocument4 *iface, BSTR v,
606         IHTMLRenderStyle **ppIHTMLRenderStyle)
607 {
608     HTMLDocument *This = HTMLDOC4_THIS(iface);
609     FIXME("(%p)->(%s %p)\n", This, debugstr_w(v), ppIHTMLRenderStyle);
610     return E_NOTIMPL;
611 }
612
613 static HRESULT WINAPI HTMLDocument4_put_oncontrolselect(IHTMLDocument4 *iface, VARIANT v)
614 {
615     HTMLDocument *This = HTMLDOC4_THIS(iface);
616     FIXME("(%p)->(v)\n", This);
617     return E_NOTIMPL;
618 }
619
620 static HRESULT WINAPI HTMLDocument4_get_oncontrolselect(IHTMLDocument4 *iface, VARIANT *p)
621 {
622     HTMLDocument *This = HTMLDOC4_THIS(iface);
623     FIXME("(%p)->(%p)\n", This, p);
624     return E_NOTIMPL;
625 }
626
627 static HRESULT WINAPI HTMLDocument4_get_URLEncoded(IHTMLDocument4 *iface, BSTR *p)
628 {
629     HTMLDocument *This = HTMLDOC4_THIS(iface);
630     FIXME("(%p)->(%p)\n", This, p);
631     return E_NOTIMPL;
632 }
633
634 #undef HTMLDOC4_THIS
635
636 static const IHTMLDocument4Vtbl HTMLDocument4Vtbl = {
637     HTMLDocument4_QueryInterface,
638     HTMLDocument4_AddRef,
639     HTMLDocument4_Release,
640     HTMLDocument4_GetTypeInfoCount,
641     HTMLDocument4_GetTypeInfo,
642     HTMLDocument4_GetIDsOfNames,
643     HTMLDocument4_Invoke,
644     HTMLDocument4_focus,
645     HTMLDocument4_hasFocus,
646     HTMLDocument4_put_onselectionchange,
647     HTMLDocument4_get_onselectionchange,
648     HTMLDocument4_get_namespace,
649     HTMLDocument4_createDocumentFromUrl,
650     HTMLDocument4_put_media,
651     HTMLDocument4_get_media,
652     HTMLDocument4_createEventObject,
653     HTMLDocument4_fireEvent,
654     HTMLDocument4_createRenderStyle,
655     HTMLDocument4_put_oncontrolselect,
656     HTMLDocument4_get_oncontrolselect,
657     HTMLDocument4_get_URLEncoded
658 };
659
660 void HTMLDocument_HTMLDocument3_Init(HTMLDocument *This)
661 {
662     This->lpHTMLDocument3Vtbl = &HTMLDocument3Vtbl;
663     This->lpHTMLDocument4Vtbl = &HTMLDocument4Vtbl;
664 }