gdi32: Disable the freetype mmap sharing on Mac OS.
[wine] / dlls / mshtml / htmlwindow.c
1 /*
2  * Copyright 2006 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 "winnls.h"
30 #include "ole2.h"
31
32 #include "wine/debug.h"
33 #include "wine/unicode.h"
34
35 #include "mshtml_private.h"
36 #include "resource.h"
37
38 WINE_DEFAULT_DEBUG_CHANNEL(mshtml);
39
40 #define HTMLWINDOW2_THIS(iface) DEFINE_THIS(HTMLWindow, HTMLWindow2, iface)
41
42 static HRESULT WINAPI HTMLWindow2_QueryInterface(IHTMLWindow2 *iface, REFIID riid, void **ppv)
43 {
44     HTMLWindow *This = HTMLWINDOW2_THIS(iface);
45
46     *ppv = NULL;
47
48     if(IsEqualGUID(&IID_IUnknown, riid)) {
49         TRACE("(%p)->(IID_IUnknown %p)\n", This, ppv);
50         *ppv = HTMLWINDOW2(This);
51     }else if(IsEqualGUID(&IID_IDispatch, riid)) {
52         TRACE("(%p)->(IID_IDispatch %p)\n", This, ppv);
53         *ppv = HTMLWINDOW2(This);
54     }else if(IsEqualGUID(&IID_IHTMLFramesCollection2, riid)) {
55         TRACE("(%p)->(IID_IHTMLFramesCollection2 %p)\n", This, ppv);
56         *ppv = HTMLWINDOW2(This);
57     }else if(IsEqualGUID(&IID_IHTMLWindow2, riid)) {
58         TRACE("(%p)->(IID_IHTMLWindow2 %p)\n", This, ppv);
59         *ppv = HTMLWINDOW2(This);
60     }
61
62     if(*ppv) {
63         IUnknown_AddRef((IUnknown*)*ppv);
64         return S_OK;
65     }
66
67     WARN("(%p)->(%s %p)\n", This, debugstr_guid(riid), ppv);
68     return E_NOINTERFACE;
69 }
70
71 static ULONG WINAPI HTMLWindow2_AddRef(IHTMLWindow2 *iface)
72 {
73     HTMLWindow *This = HTMLWINDOW2_THIS(iface);
74     LONG ref = InterlockedIncrement(&This->ref);
75
76     TRACE("(%p) ref=%d\n", This, ref);
77
78     return ref;
79 }
80
81 static ULONG WINAPI HTMLWindow2_Release(IHTMLWindow2 *iface)
82 {
83     HTMLWindow *This = HTMLWINDOW2_THIS(iface);
84     LONG ref = InterlockedDecrement(&This->ref);
85
86     TRACE("(%p) ref=%d\n", This, ref);
87
88     if(!ref)
89         mshtml_free(This);
90
91     return ref;
92 }
93
94 static HRESULT WINAPI HTMLWindow2_GetTypeInfoCount(IHTMLWindow2 *iface, UINT *pctinfo)
95 {
96     HTMLWindow *This = HTMLWINDOW2_THIS(iface);
97     FIXME("(%p)->(%p)\n", This, pctinfo);
98     return E_NOTIMPL;
99 }
100
101 static HRESULT WINAPI HTMLWindow2_GetTypeInfo(IHTMLWindow2 *iface, UINT iTInfo,
102                                               LCID lcid, ITypeInfo **ppTInfo)
103 {
104     HTMLWindow *This = HTMLWINDOW2_THIS(iface);
105     FIXME("(%p)->(%u %u %p)\n", This, iTInfo, lcid, ppTInfo);
106     return E_NOTIMPL;
107 }
108
109 static HRESULT WINAPI HTMLWindow2_GetIDsOfNames(IHTMLWindow2 *iface, REFIID riid,
110                                                 LPOLESTR *rgszNames, UINT cNames,
111                                                 LCID lcid, DISPID *rgDispId)
112 {
113     HTMLWindow *This = HTMLWINDOW2_THIS(iface);
114     FIXME("(%p)->(%s %p %u %u %p)\n", This, debugstr_guid(riid), rgszNames, cNames,
115                                         lcid, rgDispId);
116     return E_NOTIMPL;
117 }
118
119 static HRESULT WINAPI HTMLWindow2_Invoke(IHTMLWindow2 *iface, DISPID dispIdMember,
120                             REFIID riid, LCID lcid, WORD wFlags, DISPPARAMS *pDispParams,
121                             VARIANT *pVarResult, EXCEPINFO *pExcepInfo, UINT *puArgErr)
122 {
123     HTMLWindow *This = HTMLWINDOW2_THIS(iface);
124     FIXME("(%p)->(%d %s %d %d %p %p %p %p)\n", This, dispIdMember, debugstr_guid(riid),
125             lcid, wFlags, pDispParams, pVarResult, pExcepInfo, puArgErr);
126     return E_NOTIMPL;
127 }
128
129 static HRESULT WINAPI HTMLWindow2_item(IHTMLWindow2 *iface, VARIANT *pvarIndex, VARIANT *pvarResult)
130 {
131     HTMLWindow *This = HTMLWINDOW2_THIS(iface);
132     FIXME("(%p)->(%p %p)\n", This, pvarIndex, pvarResult);
133     return E_NOTIMPL;
134 }
135
136 static HRESULT WINAPI HTMLWindow2_get_length(IHTMLWindow2 *iface, long *p)
137 {
138     HTMLWindow *This = HTMLWINDOW2_THIS(iface);
139     FIXME("(%p)->(%p)\n", This, p);
140     return E_NOTIMPL;
141 }
142
143 static HRESULT WINAPI HTMLWindow2_get_frames(IHTMLWindow2 *iface, IHTMLFramesCollection2 **p)
144 {
145     HTMLWindow *This = HTMLWINDOW2_THIS(iface);
146     FIXME("(%p)->(%p)\n", This, p);
147     return E_NOTIMPL;
148 }
149
150 static HRESULT WINAPI HTMLWindow2_put_defaultStatus(IHTMLWindow2 *iface, BSTR v)
151 {
152     HTMLWindow *This = HTMLWINDOW2_THIS(iface);
153     FIXME("(%p)->(%s)\n", This, debugstr_w(v));
154     return E_NOTIMPL;
155 }
156
157 static HRESULT WINAPI HTMLWindow2_get_defaultStatus(IHTMLWindow2 *iface, BSTR *p)
158 {
159     HTMLWindow *This = HTMLWINDOW2_THIS(iface);
160     FIXME("(%p)->(%p)\n", This, p);
161     return E_NOTIMPL;
162 }
163
164 static HRESULT WINAPI HTMLWindow2_put_status(IHTMLWindow2 *iface, BSTR v)
165 {
166     HTMLWindow *This = HTMLWINDOW2_THIS(iface);
167     FIXME("(%p)->(%s)\n", This, debugstr_w(v));
168     return E_NOTIMPL;
169 }
170
171 static HRESULT WINAPI HTMLWindow2_get_status(IHTMLWindow2 *iface, BSTR *p)
172 {
173     HTMLWindow *This = HTMLWINDOW2_THIS(iface);
174     FIXME("(%p)->(%p)\n", This, p);
175     return E_NOTIMPL;
176 }
177
178 static HRESULT WINAPI HTMLWindow2_setTimeout(IHTMLWindow2 *iface, BSTR expression,
179         long msec, VARIANT *language, long *timerID)
180 {
181     HTMLWindow *This = HTMLWINDOW2_THIS(iface);
182     FIXME("(%p)->(%s %ld %p %p)\n", This, debugstr_w(expression), msec, language, timerID);
183     return E_NOTIMPL;
184 }
185
186 static HRESULT WINAPI HTMLWindow2_clearTimeout(IHTMLWindow2 *iface, long timerID)
187 {
188     HTMLWindow *This = HTMLWINDOW2_THIS(iface);
189     FIXME("(%p)->(%ld)\n", This, timerID);
190     return E_NOTIMPL;
191 }
192
193 static HRESULT WINAPI HTMLWindow2_alert(IHTMLWindow2 *iface, BSTR message)
194 {
195     HTMLWindow *This = HTMLWINDOW2_THIS(iface);
196     FIXME("(%p)->(%s)\n", This, debugstr_w(message));
197     return E_NOTIMPL;
198 }
199
200 static HRESULT WINAPI HTMLWindow2_confirm(IHTMLWindow2 *iface, BSTR message,
201         VARIANT_BOOL *confirmed)
202 {
203     HTMLWindow *This = HTMLWINDOW2_THIS(iface);
204     FIXME("(%p)->(%s %p)\n", This, debugstr_w(message), confirmed);
205     return E_NOTIMPL;
206 }
207
208 static HRESULT WINAPI HTMLWindow2_prompt(IHTMLWindow2 *iface, BSTR message,
209         BSTR dststr, VARIANT *textdata)
210 {
211     HTMLWindow *This = HTMLWINDOW2_THIS(iface);
212     FIXME("(%p)->(%s %s %p)\n", This, debugstr_w(message), debugstr_w(dststr), textdata);
213     return E_NOTIMPL;
214 }
215
216 static HRESULT WINAPI HTMLWindow2_get_Image(IHTMLWindow2 *iface, IHTMLImageElementFactory **p)
217 {
218     HTMLWindow *This = HTMLWINDOW2_THIS(iface);
219     FIXME("(%p)->(%p)\n", This, p);
220     return E_NOTIMPL;
221 }
222
223 static HRESULT WINAPI HTMLWindow2_get_location(IHTMLWindow2 *iface, IHTMLLocation **p)
224 {
225     HTMLWindow *This = HTMLWINDOW2_THIS(iface);
226     FIXME("(%p)->(%p)\n", This, p);
227     return E_NOTIMPL;
228 }
229
230 static HRESULT WINAPI HTMLWindow2_get_history(IHTMLWindow2 *iface, IOmHistory **p)
231 {
232     HTMLWindow *This = HTMLWINDOW2_THIS(iface);
233     FIXME("(%p)->(%p)\n", This, p);
234     return E_NOTIMPL;
235 }
236
237 static HRESULT WINAPI HTMLWindow2_close(IHTMLWindow2 *iface)
238 {
239     HTMLWindow *This = HTMLWINDOW2_THIS(iface);
240     FIXME("(%p)->()\n", This);
241     return E_NOTIMPL;
242 }
243
244 static HRESULT WINAPI HTMLWindow2_put_opener(IHTMLWindow2 *iface, VARIANT v)
245 {
246     HTMLWindow *This = HTMLWINDOW2_THIS(iface);
247     FIXME("(%p)->(v(%d))\n", This, V_VT(&v));
248     return E_NOTIMPL;
249 }
250
251 static HRESULT WINAPI HTMLWindow2_get_opener(IHTMLWindow2 *iface, VARIANT *p)
252 {
253     HTMLWindow *This = HTMLWINDOW2_THIS(iface);
254     FIXME("(%p)->(%p)\n", This, p);
255     return E_NOTIMPL;
256 }
257
258 static HRESULT WINAPI HTMLWindow2_get_navigator(IHTMLWindow2 *iface, IOmNavigator **p)
259 {
260     HTMLWindow *This = HTMLWINDOW2_THIS(iface);
261     FIXME("(%p)->(%p)\n", This, p);
262     return E_NOTIMPL;
263 }
264
265 static HRESULT WINAPI HTMLWindow2_put_name(IHTMLWindow2 *iface, BSTR v)
266 {
267     HTMLWindow *This = HTMLWINDOW2_THIS(iface);
268     FIXME("(%p)->(%s)\n", This, debugstr_w(v));
269     return E_NOTIMPL;
270 }
271
272 static HRESULT WINAPI HTMLWindow2_get_name(IHTMLWindow2 *iface, BSTR *p)
273 {
274     HTMLWindow *This = HTMLWINDOW2_THIS(iface);
275     FIXME("(%p)->(%p)\n", This, p);
276     return E_NOTIMPL;
277 }
278
279 static HRESULT WINAPI HTMLWindow2_get_parent(IHTMLWindow2 *iface, IHTMLWindow2 **p)
280 {
281     HTMLWindow *This = HTMLWINDOW2_THIS(iface);
282     FIXME("(%p)->(%p)\n", This, p);
283     return E_NOTIMPL;
284 }
285
286 static HRESULT WINAPI HTMLWindow2_open(IHTMLWindow2 *iface, BSTR url, BSTR name,
287          BSTR features, VARIANT_BOOL replace, IHTMLWindow2 **pomWindowResult)
288 {
289     HTMLWindow *This = HTMLWINDOW2_THIS(iface);
290     FIXME("(%p)->(%s %s %s %x %p)\n", This, debugstr_w(url), debugstr_w(name),
291           debugstr_w(features), replace, pomWindowResult);
292     return E_NOTIMPL;
293 }
294
295 static HRESULT WINAPI HTMLWindow2_get_self(IHTMLWindow2 *iface, IHTMLWindow2 **p)
296 {
297     HTMLWindow *This = HTMLWINDOW2_THIS(iface);
298     FIXME("(%p)->(%p)\n", This, p);
299     return E_NOTIMPL;
300 }
301
302 static HRESULT WINAPI HTMLWindow2_get_top(IHTMLWindow2 *iface, IHTMLWindow2 **p)
303 {
304     HTMLWindow *This = HTMLWINDOW2_THIS(iface);
305     FIXME("(%p)->(%p)\n", This, p);
306     return E_NOTIMPL;
307 }
308
309 static HRESULT WINAPI HTMLWindow2_get_window(IHTMLWindow2 *iface, IHTMLWindow2 **p)
310 {
311     HTMLWindow *This = HTMLWINDOW2_THIS(iface);
312     FIXME("(%p)->(%p)\n", This, p);
313     return E_NOTIMPL;
314 }
315
316 static HRESULT WINAPI HTMLWindow2_navigate(IHTMLWindow2 *iface, BSTR url)
317 {
318     HTMLWindow *This = HTMLWINDOW2_THIS(iface);
319     FIXME("(%p)->(%s)\n", This, debugstr_w(url));
320     return E_NOTIMPL;
321 }
322
323 static HRESULT WINAPI HTMLWindow2_put_onfocus(IHTMLWindow2 *iface, VARIANT v)
324 {
325     HTMLWindow *This = HTMLWINDOW2_THIS(iface);
326     FIXME("(%p)->(v(%d))\n", This, V_VT(&v));
327     return E_NOTIMPL;
328 }
329
330 static HRESULT WINAPI HTMLWindow2_get_onfocus(IHTMLWindow2 *iface, VARIANT *p)
331 {
332     HTMLWindow *This = HTMLWINDOW2_THIS(iface);
333     FIXME("(%p)->(%p)\n", This, p);
334     return E_NOTIMPL;
335 }
336
337 static HRESULT WINAPI HTMLWindow2_put_onblur(IHTMLWindow2 *iface, VARIANT v)
338 {
339     HTMLWindow *This = HTMLWINDOW2_THIS(iface);
340     FIXME("(%p)->(v(%d))\n", This, V_VT(&v));
341     return E_NOTIMPL;
342 }
343
344 static HRESULT WINAPI HTMLWindow2_get_onblur(IHTMLWindow2 *iface, VARIANT *p)
345 {
346     HTMLWindow *This = HTMLWINDOW2_THIS(iface);
347     FIXME("(%p)->(%p)\n", This, p);
348     return E_NOTIMPL;
349 }
350
351 static HRESULT WINAPI HTMLWindow2_put_onload(IHTMLWindow2 *iface, VARIANT v)
352 {
353     HTMLWindow *This = HTMLWINDOW2_THIS(iface);
354     FIXME("(%p)->(v(%d))\n", This, V_VT(&v));
355     return E_NOTIMPL;
356 }
357
358 static HRESULT WINAPI HTMLWindow2_get_onload(IHTMLWindow2 *iface, VARIANT *p)
359 {
360     HTMLWindow *This = HTMLWINDOW2_THIS(iface);
361     FIXME("(%p)->(%p)\n", This, p);
362     return E_NOTIMPL;
363 }
364
365 static HRESULT WINAPI HTMLWindow2_put_onbeforeunload(IHTMLWindow2 *iface, VARIANT v)
366 {
367     HTMLWindow *This = HTMLWINDOW2_THIS(iface);
368     FIXME("(%p)->(v(%d))\n", This, V_VT(&v));
369     return E_NOTIMPL;
370 }
371
372 static HRESULT WINAPI HTMLWindow2_get_onbeforeunload(IHTMLWindow2 *iface, VARIANT *p)
373 {
374     HTMLWindow *This = HTMLWINDOW2_THIS(iface);
375     FIXME("(%p)->(%p)\n", This, p);
376     return E_NOTIMPL;
377 }
378
379 static HRESULT WINAPI HTMLWindow2_put_onunload(IHTMLWindow2 *iface, VARIANT v)
380 {
381     HTMLWindow *This = HTMLWINDOW2_THIS(iface);
382     FIXME("(%p)->(v(%d))\n", This, V_VT(&v));
383     return E_NOTIMPL;
384 }
385
386 static HRESULT WINAPI HTMLWindow2_get_onunload(IHTMLWindow2 *iface, VARIANT *p)
387 {
388     HTMLWindow *This = HTMLWINDOW2_THIS(iface);
389     FIXME("(%p)->(%p)\n", This, p);
390     return E_NOTIMPL;
391 }
392
393 static HRESULT WINAPI HTMLWindow2_put_onhelp(IHTMLWindow2 *iface, VARIANT v)
394 {
395     HTMLWindow *This = HTMLWINDOW2_THIS(iface);
396     FIXME("(%p)->(v(%d))\n", This, V_VT(&v));
397     return E_NOTIMPL;
398 }
399
400 static HRESULT WINAPI HTMLWindow2_get_onhelp(IHTMLWindow2 *iface, VARIANT *p)
401 {
402     HTMLWindow *This = HTMLWINDOW2_THIS(iface);
403     FIXME("(%p)->(%p)\n", This, p);
404     return E_NOTIMPL;
405 }
406
407 static HRESULT WINAPI HTMLWindow2_put_onerror(IHTMLWindow2 *iface, VARIANT v)
408 {
409     HTMLWindow *This = HTMLWINDOW2_THIS(iface);
410     FIXME("(%p)->(v(%d))\n", This, V_VT(&v));
411     return E_NOTIMPL;
412 }
413
414 static HRESULT WINAPI HTMLWindow2_get_onerror(IHTMLWindow2 *iface, VARIANT *p)
415 {
416     HTMLWindow *This = HTMLWINDOW2_THIS(iface);
417     FIXME("(%p)->(%p)\n", This, p);
418     return E_NOTIMPL;
419 }
420
421 static HRESULT WINAPI HTMLWindow2_put_onresize(IHTMLWindow2 *iface, VARIANT v)
422 {
423     HTMLWindow *This = HTMLWINDOW2_THIS(iface);
424     FIXME("(%p)->(v(%d))\n", This, V_VT(&v));
425     return E_NOTIMPL;
426 }
427
428 static HRESULT WINAPI HTMLWindow2_get_onresize(IHTMLWindow2 *iface, VARIANT *p)
429 {
430     HTMLWindow *This = HTMLWINDOW2_THIS(iface);
431     FIXME("(%p)->(%p)\n", This, p);
432     return E_NOTIMPL;
433 }
434
435 static HRESULT WINAPI HTMLWindow2_put_onscroll(IHTMLWindow2 *iface, VARIANT v)
436 {
437     HTMLWindow *This = HTMLWINDOW2_THIS(iface);
438     FIXME("(%p)->(v(%d))\n", This, V_VT(&v));
439     return E_NOTIMPL;
440 }
441
442 static HRESULT WINAPI HTMLWindow2_get_onscroll(IHTMLWindow2 *iface, VARIANT *p)
443 {
444     HTMLWindow *This = HTMLWINDOW2_THIS(iface);
445     FIXME("(%p)->(%p)\n", This, p);
446     return E_NOTIMPL;
447 }
448
449 static HRESULT WINAPI HTMLWindow2_get_document(IHTMLWindow2 *iface, IHTMLDocument2 **p)
450 {
451     HTMLWindow *This = HTMLWINDOW2_THIS(iface);
452     FIXME("(%p)->(%p)\n", This, p);
453     return E_NOTIMPL;
454 }
455
456 static HRESULT WINAPI HTMLWindow2_get_event(IHTMLWindow2 *iface, IHTMLEventObj **p)
457 {
458     HTMLWindow *This = HTMLWINDOW2_THIS(iface);
459     FIXME("(%p)->(%p)\n", This, p);
460     return E_NOTIMPL;
461 }
462
463 static HRESULT WINAPI HTMLWindow2_get__newEnum(IHTMLWindow2 *iface, IUnknown **p)
464 {
465     HTMLWindow *This = HTMLWINDOW2_THIS(iface);
466     FIXME("(%p)->(%p)\n", This, p);
467     return E_NOTIMPL;
468 }
469
470 static HRESULT WINAPI HTMLWindow2_showModalDialog(IHTMLWindow2 *iface, BSTR dialog,
471         VARIANT *varArgIn, VARIANT *varOptions, VARIANT *varArgOut)
472 {
473     HTMLWindow *This = HTMLWINDOW2_THIS(iface);
474     FIXME("(%p)->(%s %p %p %p)\n", This, debugstr_w(dialog), varArgIn, varOptions, varArgOut);
475     return E_NOTIMPL;
476 }
477
478 static HRESULT WINAPI HTMLWindow2_showHelp(IHTMLWindow2 *iface, BSTR helpURL, VARIANT helpArg,
479         BSTR features)
480 {
481     HTMLWindow *This = HTMLWINDOW2_THIS(iface);
482     FIXME("(%p)->(%s v(%d) %s)\n", This, debugstr_w(helpURL), V_VT(&helpArg), debugstr_w(features));
483     return E_NOTIMPL;
484 }
485
486 static HRESULT WINAPI HTMLWindow2_get_screen(IHTMLWindow2 *iface, IHTMLScreen **p)
487 {
488     HTMLWindow *This = HTMLWINDOW2_THIS(iface);
489     FIXME("(%p)->(%p)\n", This, p);
490     return E_NOTIMPL;
491 }
492
493 static HRESULT WINAPI HTMLWindow2_get_Option(IHTMLWindow2 *iface, IHTMLOptionElementFactory **p)
494 {
495     HTMLWindow *This = HTMLWINDOW2_THIS(iface);
496     FIXME("(%p)->(%p)\n", This, p);
497     return E_NOTIMPL;
498 }
499
500 static HRESULT WINAPI HTMLWindow2_focus(IHTMLWindow2 *iface)
501 {
502     HTMLWindow *This = HTMLWINDOW2_THIS(iface);
503     FIXME("(%p)->()\n", This);
504     return E_NOTIMPL;
505 }
506
507 static HRESULT WINAPI HTMLWindow2_get_closed(IHTMLWindow2 *iface, VARIANT_BOOL *p)
508 {
509     HTMLWindow *This = HTMLWINDOW2_THIS(iface);
510     FIXME("(%p)->(%p)\n", This, p);
511     return E_NOTIMPL;
512 }
513
514 static HRESULT WINAPI HTMLWindow2_blur(IHTMLWindow2 *iface)
515 {
516     HTMLWindow *This = HTMLWINDOW2_THIS(iface);
517     FIXME("(%p)->()\n", This);
518     return E_NOTIMPL;
519 }
520
521 static HRESULT WINAPI HTMLWindow2_scroll(IHTMLWindow2 *iface, long x, long y)
522 {
523     HTMLWindow *This = HTMLWINDOW2_THIS(iface);
524     FIXME("(%p)->(%ld %ld)\n", This, x, y);
525     return E_NOTIMPL;
526 }
527
528 static HRESULT WINAPI HTMLWindow2_get_clientInformation(IHTMLWindow2 *iface, IOmNavigator **p)
529 {
530     HTMLWindow *This = HTMLWINDOW2_THIS(iface);
531     FIXME("(%p)->(%p)\n", This, p);
532     return E_NOTIMPL;
533 }
534
535 static HRESULT WINAPI HTMLWindow2_setInterval(IHTMLWindow2 *iface, BSTR expression,
536         long msec, VARIANT *language, long *timerID)
537 {
538     HTMLWindow *This = HTMLWINDOW2_THIS(iface);
539     FIXME("(%p)->(%s %ld %p %p)\n", This, debugstr_w(expression), msec, language, timerID);
540     return E_NOTIMPL;
541 }
542
543 static HRESULT WINAPI HTMLWindow2_clearInterval(IHTMLWindow2 *iface, long timerID)
544 {
545     HTMLWindow *This = HTMLWINDOW2_THIS(iface);
546     FIXME("(%p)->(%ld)\n", This, timerID);
547     return E_NOTIMPL;
548 }
549
550 static HRESULT WINAPI HTMLWindow2_put_offscreenBuffering(IHTMLWindow2 *iface, VARIANT v)
551 {
552     HTMLWindow *This = HTMLWINDOW2_THIS(iface);
553     FIXME("(%p)->(v(%d))\n", This, V_VT(&v));
554     return E_NOTIMPL;
555 }
556
557 static HRESULT WINAPI HTMLWindow2_get_offscreenBuffering(IHTMLWindow2 *iface, VARIANT *p)
558 {
559     HTMLWindow *This = HTMLWINDOW2_THIS(iface);
560     FIXME("(%p)->(%p)\n", This, p);
561     return E_NOTIMPL;
562 }
563
564 static HRESULT WINAPI HTMLWindow2_execScript(IHTMLWindow2 *iface, BSTR scode, BSTR language,
565         VARIANT *pvarRet)
566 {
567     HTMLWindow *This = HTMLWINDOW2_THIS(iface);
568     FIXME("(%p)->(%s %s %p)\n", This, debugstr_w(scode), debugstr_w(language), pvarRet);
569     return E_NOTIMPL;
570 }
571
572 static HRESULT WINAPI HTMLWindow2_toString(IHTMLWindow2 *iface, BSTR *String)
573 {
574     HTMLWindow *This = HTMLWINDOW2_THIS(iface);
575     FIXME("(%p)->(%p)\n", This, String);
576     return E_NOTIMPL;
577 }
578
579 static HRESULT WINAPI HTMLWindow2_scrollBy(IHTMLWindow2 *iface, long x, long y)
580 {
581     HTMLWindow *This = HTMLWINDOW2_THIS(iface);
582     FIXME("(%p)->(%ld %ld)\n", This, x, y);
583     return E_NOTIMPL;
584 }
585
586 static HRESULT WINAPI HTMLWindow2_scrollTo(IHTMLWindow2 *iface, long x, long y)
587 {
588     HTMLWindow *This = HTMLWINDOW2_THIS(iface);
589     FIXME("(%p)->(%ld %ld)\n", This, x, y);
590     return E_NOTIMPL;
591 }
592
593 static HRESULT WINAPI HTMLWindow2_moveTo(IHTMLWindow2 *iface, long x, long y)
594 {
595     HTMLWindow *This = HTMLWINDOW2_THIS(iface);
596     FIXME("(%p)->(%ld %ld)\n", This, x, y);
597     return E_NOTIMPL;
598 }
599
600 static HRESULT WINAPI HTMLWindow2_moveBy(IHTMLWindow2 *iface, long x, long y)
601 {
602     HTMLWindow *This = HTMLWINDOW2_THIS(iface);
603     FIXME("(%p)->(%ld %ld)\n", This, x, y);
604     return E_NOTIMPL;
605 }
606
607 static HRESULT WINAPI HTMLWindow2_resizeTo(IHTMLWindow2 *iface, long x, long y)
608 {
609     HTMLWindow *This = HTMLWINDOW2_THIS(iface);
610     FIXME("(%p)->(%ld %ld)\n", This, x, y);
611     return E_NOTIMPL;
612 }
613
614 static HRESULT WINAPI HTMLWindow2_resizeBy(IHTMLWindow2 *iface, long x, long y)
615 {
616     HTMLWindow *This = HTMLWINDOW2_THIS(iface);
617     FIXME("(%p)->(%ld %ld)\n", This, x, y);
618     return E_NOTIMPL;
619 }
620
621 static HRESULT WINAPI HTMLWindow2_get_external(IHTMLWindow2 *iface, IDispatch **p)
622 {
623     HTMLWindow *This = HTMLWINDOW2_THIS(iface);
624     FIXME("(%p)->(%p)\n", This, p);
625     return E_NOTIMPL;
626 }
627
628 #undef HTMLWINDOW2_THIS
629
630 static const IHTMLWindow2Vtbl HTMLWindow2Vtbl = {
631     HTMLWindow2_QueryInterface,
632     HTMLWindow2_AddRef,
633     HTMLWindow2_Release,
634     HTMLWindow2_GetTypeInfoCount,
635     HTMLWindow2_GetTypeInfo,
636     HTMLWindow2_GetIDsOfNames,
637     HTMLWindow2_Invoke,
638     HTMLWindow2_item,
639     HTMLWindow2_get_length,
640     HTMLWindow2_get_frames,
641     HTMLWindow2_put_defaultStatus,
642     HTMLWindow2_get_defaultStatus,
643     HTMLWindow2_put_status,
644     HTMLWindow2_get_status,
645     HTMLWindow2_setTimeout,
646     HTMLWindow2_clearTimeout,
647     HTMLWindow2_alert,
648     HTMLWindow2_confirm,
649     HTMLWindow2_prompt,
650     HTMLWindow2_get_Image,
651     HTMLWindow2_get_location,
652     HTMLWindow2_get_history,
653     HTMLWindow2_close,
654     HTMLWindow2_put_opener,
655     HTMLWindow2_get_opener,
656     HTMLWindow2_get_navigator,
657     HTMLWindow2_put_name,
658     HTMLWindow2_get_name,
659     HTMLWindow2_get_parent,
660     HTMLWindow2_open,
661     HTMLWindow2_get_self,
662     HTMLWindow2_get_top,
663     HTMLWindow2_get_window,
664     HTMLWindow2_navigate,
665     HTMLWindow2_put_onfocus,
666     HTMLWindow2_get_onfocus,
667     HTMLWindow2_put_onblur,
668     HTMLWindow2_get_onblur,
669     HTMLWindow2_put_onload,
670     HTMLWindow2_get_onload,
671     HTMLWindow2_put_onbeforeunload,
672     HTMLWindow2_get_onbeforeunload,
673     HTMLWindow2_put_onunload,
674     HTMLWindow2_get_onunload,
675     HTMLWindow2_put_onhelp,
676     HTMLWindow2_get_onhelp,
677     HTMLWindow2_put_onerror,
678     HTMLWindow2_get_onerror,
679     HTMLWindow2_put_onresize,
680     HTMLWindow2_get_onresize,
681     HTMLWindow2_put_onscroll,
682     HTMLWindow2_get_onscroll,
683     HTMLWindow2_get_document,
684     HTMLWindow2_get_event,
685     HTMLWindow2_get__newEnum,
686     HTMLWindow2_showModalDialog,
687     HTMLWindow2_showHelp,
688     HTMLWindow2_get_screen,
689     HTMLWindow2_get_Option,
690     HTMLWindow2_focus,
691     HTMLWindow2_get_closed,
692     HTMLWindow2_blur,
693     HTMLWindow2_scroll,
694     HTMLWindow2_get_clientInformation,
695     HTMLWindow2_setInterval,
696     HTMLWindow2_clearInterval,
697     HTMLWindow2_put_offscreenBuffering,
698     HTMLWindow2_get_offscreenBuffering,
699     HTMLWindow2_execScript,
700     HTMLWindow2_toString,
701     HTMLWindow2_scrollBy,
702     HTMLWindow2_scrollTo,
703     HTMLWindow2_moveTo,
704     HTMLWindow2_moveBy,
705     HTMLWindow2_resizeTo,
706     HTMLWindow2_resizeBy,
707     HTMLWindow2_get_external
708 };
709
710 HTMLWindow *HTMLWindow_Create(HTMLDocument *doc)
711 {
712     HTMLWindow *ret = mshtml_alloc(sizeof(HTMLWindow));
713
714     ret->lpHTMLWindow2Vtbl = &HTMLWindow2Vtbl;
715     ret->ref = 1;
716     ret->nswindow = NULL;
717     ret->doc = doc;
718
719     if(doc->nscontainer) {
720         nsresult nsres;
721
722         nsres = nsIWebBrowser_GetContentDOMWindow(doc->nscontainer->webbrowser, &ret->nswindow);
723         if(NS_FAILED(nsres))
724             ERR("GetContentDOMWindow failed: %08x\n", nsres);
725     }
726
727     return ret;
728 }
729
730 HTMLWindow *nswindow_to_window(nsIDOMWindow *nswindow)
731 {
732     return NULL;
733 }