2 * Copyright 2006 Jacek Caban for CodeWeavers
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.
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.
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
28 #include "wine/debug.h"
29 #include "wine/unicode.h"
31 #include "mshtml_private.h"
34 WINE_DEFAULT_DEBUG_CHANNEL(mshtml
);
36 static struct list window_list
= LIST_INIT(window_list
);
38 #define HTMLWINDOW2_THIS(iface) DEFINE_THIS(HTMLWindow, HTMLWindow2, iface)
40 static HRESULT WINAPI
HTMLWindow2_QueryInterface(IHTMLWindow2
*iface
, REFIID riid
, void **ppv
)
42 HTMLWindow
*This
= HTMLWINDOW2_THIS(iface
);
46 if(IsEqualGUID(&IID_IUnknown
, riid
)) {
47 TRACE("(%p)->(IID_IUnknown %p)\n", This
, ppv
);
48 *ppv
= HTMLWINDOW2(This
);
49 }else if(IsEqualGUID(&IID_IDispatch
, riid
)) {
50 TRACE("(%p)->(IID_IDispatch %p)\n", This
, ppv
);
51 *ppv
= HTMLWINDOW2(This
);
52 }else if(IsEqualGUID(&IID_IDispatchEx
, riid
)) {
53 TRACE("(%p)->(IID_IDispatchEx %p)\n", This
, ppv
);
54 *ppv
= DISPATCHEX(This
);
55 }else if(IsEqualGUID(&IID_IHTMLFramesCollection2
, riid
)) {
56 TRACE("(%p)->(IID_IHTMLFramesCollection2 %p)\n", This
, ppv
);
57 *ppv
= HTMLWINDOW2(This
);
58 }else if(IsEqualGUID(&IID_IHTMLWindow2
, riid
)) {
59 TRACE("(%p)->(IID_IHTMLWindow2 %p)\n", This
, ppv
);
60 *ppv
= HTMLWINDOW2(This
);
61 }else if(IsEqualGUID(&IID_IHTMLWindow3
, riid
)) {
62 TRACE("(%p)->(IID_IHTMLWindow2 %p)\n", This
, ppv
);
63 *ppv
= HTMLWINDOW3(This
);
64 }else if(dispex_query_interface(&This
->dispex
, riid
, ppv
)) {
65 return *ppv
? S_OK
: E_NOINTERFACE
;
69 IUnknown_AddRef((IUnknown
*)*ppv
);
73 WARN("(%p)->(%s %p)\n", This
, debugstr_guid(riid
), ppv
);
77 static ULONG WINAPI
HTMLWindow2_AddRef(IHTMLWindow2
*iface
)
79 HTMLWindow
*This
= HTMLWINDOW2_THIS(iface
);
80 LONG ref
= InterlockedIncrement(&This
->ref
);
82 TRACE("(%p) ref=%d\n", This
, ref
);
87 static ULONG WINAPI
HTMLWindow2_Release(IHTMLWindow2
*iface
)
89 HTMLWindow
*This
= HTMLWINDOW2_THIS(iface
);
90 LONG ref
= InterlockedDecrement(&This
->ref
);
92 TRACE("(%p) ref=%d\n", This
, ref
);
95 list_remove(&This
->entry
);
102 static HRESULT WINAPI
HTMLWindow2_GetTypeInfoCount(IHTMLWindow2
*iface
, UINT
*pctinfo
)
104 HTMLWindow
*This
= HTMLWINDOW2_THIS(iface
);
106 return IDispatchEx_GetTypeInfoCount(DISPATCHEX(This
), pctinfo
);
109 static HRESULT WINAPI
HTMLWindow2_GetTypeInfo(IHTMLWindow2
*iface
, UINT iTInfo
,
110 LCID lcid
, ITypeInfo
**ppTInfo
)
112 HTMLWindow
*This
= HTMLWINDOW2_THIS(iface
);
114 return IDispatchEx_GetTypeInfo(DISPATCHEX(This
), iTInfo
, lcid
, ppTInfo
);
117 static HRESULT WINAPI
HTMLWindow2_GetIDsOfNames(IHTMLWindow2
*iface
, REFIID riid
,
118 LPOLESTR
*rgszNames
, UINT cNames
,
119 LCID lcid
, DISPID
*rgDispId
)
121 HTMLWindow
*This
= HTMLWINDOW2_THIS(iface
);
123 return IDispatchEx_GetIDsOfNames(DISPATCHEX(This
), riid
, rgszNames
, cNames
, lcid
, rgDispId
);
126 static HRESULT WINAPI
HTMLWindow2_Invoke(IHTMLWindow2
*iface
, DISPID dispIdMember
,
127 REFIID riid
, LCID lcid
, WORD wFlags
, DISPPARAMS
*pDispParams
,
128 VARIANT
*pVarResult
, EXCEPINFO
*pExcepInfo
, UINT
*puArgErr
)
130 HTMLWindow
*This
= HTMLWINDOW2_THIS(iface
);
132 return IDispatchEx_Invoke(DISPATCHEX(This
), dispIdMember
, riid
, lcid
, wFlags
, pDispParams
,
133 pVarResult
, pExcepInfo
, puArgErr
);
136 static HRESULT WINAPI
HTMLWindow2_item(IHTMLWindow2
*iface
, VARIANT
*pvarIndex
, VARIANT
*pvarResult
)
138 HTMLWindow
*This
= HTMLWINDOW2_THIS(iface
);
139 FIXME("(%p)->(%p %p)\n", This
, pvarIndex
, pvarResult
);
143 static HRESULT WINAPI
HTMLWindow2_get_length(IHTMLWindow2
*iface
, long *p
)
145 HTMLWindow
*This
= HTMLWINDOW2_THIS(iface
);
146 FIXME("(%p)->(%p)\n", This
, p
);
150 static HRESULT WINAPI
HTMLWindow2_get_frames(IHTMLWindow2
*iface
, IHTMLFramesCollection2
**p
)
152 HTMLWindow
*This
= HTMLWINDOW2_THIS(iface
);
153 FIXME("(%p)->(%p)\n", This
, p
);
157 static HRESULT WINAPI
HTMLWindow2_put_defaultStatus(IHTMLWindow2
*iface
, BSTR v
)
159 HTMLWindow
*This
= HTMLWINDOW2_THIS(iface
);
160 FIXME("(%p)->(%s)\n", This
, debugstr_w(v
));
164 static HRESULT WINAPI
HTMLWindow2_get_defaultStatus(IHTMLWindow2
*iface
, BSTR
*p
)
166 HTMLWindow
*This
= HTMLWINDOW2_THIS(iface
);
167 FIXME("(%p)->(%p)\n", This
, p
);
171 static HRESULT WINAPI
HTMLWindow2_put_status(IHTMLWindow2
*iface
, BSTR v
)
173 HTMLWindow
*This
= HTMLWINDOW2_THIS(iface
);
174 FIXME("(%p)->(%s)\n", This
, debugstr_w(v
));
178 static HRESULT WINAPI
HTMLWindow2_get_status(IHTMLWindow2
*iface
, BSTR
*p
)
180 HTMLWindow
*This
= HTMLWINDOW2_THIS(iface
);
181 FIXME("(%p)->(%p)\n", This
, p
);
185 static HRESULT WINAPI
HTMLWindow2_setTimeout(IHTMLWindow2
*iface
, BSTR expression
,
186 long msec
, VARIANT
*language
, long *timerID
)
188 HTMLWindow
*This
= HTMLWINDOW2_THIS(iface
);
191 TRACE("(%p)->(%s %ld %p %p)\n", This
, debugstr_w(expression
), msec
, language
, timerID
);
193 V_VT(&expr_var
) = VT_BSTR
;
194 V_BSTR(&expr_var
) = expression
;
196 return IHTMLWindow3_setTimeout(HTMLWINDOW3(This
), &expr_var
, msec
, language
, timerID
);
199 static HRESULT WINAPI
HTMLWindow2_clearTimeout(IHTMLWindow2
*iface
, long timerID
)
201 HTMLWindow
*This
= HTMLWINDOW2_THIS(iface
);
203 TRACE("(%p)->(%ld)\n", This
, timerID
);
205 return clear_task_timer(This
->doc
, FALSE
, timerID
);
208 static HRESULT WINAPI
HTMLWindow2_alert(IHTMLWindow2
*iface
, BSTR message
)
210 HTMLWindow
*This
= HTMLWINDOW2_THIS(iface
);
213 TRACE("(%p)->(%s)\n", This
, debugstr_w(message
));
215 if(!LoadStringW(get_shdoclc(), IDS_MESSAGE_BOX_TITLE
, wszTitle
,
216 sizeof(wszTitle
)/sizeof(WCHAR
))) {
217 WARN("Could not load message box title: %d\n", GetLastError());
221 MessageBoxW(This
->doc
->hwnd
, message
, wszTitle
, MB_ICONWARNING
);
225 static HRESULT WINAPI
HTMLWindow2_confirm(IHTMLWindow2
*iface
, BSTR message
,
226 VARIANT_BOOL
*confirmed
)
228 HTMLWindow
*This
= HTMLWINDOW2_THIS(iface
);
229 FIXME("(%p)->(%s %p)\n", This
, debugstr_w(message
), confirmed
);
233 static HRESULT WINAPI
HTMLWindow2_prompt(IHTMLWindow2
*iface
, BSTR message
,
234 BSTR dststr
, VARIANT
*textdata
)
236 HTMLWindow
*This
= HTMLWINDOW2_THIS(iface
);
237 FIXME("(%p)->(%s %s %p)\n", This
, debugstr_w(message
), debugstr_w(dststr
), textdata
);
241 static HRESULT WINAPI
HTMLWindow2_get_Image(IHTMLWindow2
*iface
, IHTMLImageElementFactory
**p
)
243 HTMLWindow
*This
= HTMLWINDOW2_THIS(iface
);
244 FIXME("(%p)->(%p)\n", This
, p
);
248 static HRESULT WINAPI
HTMLWindow2_get_location(IHTMLWindow2
*iface
, IHTMLLocation
**p
)
250 HTMLWindow
*This
= HTMLWINDOW2_THIS(iface
);
251 FIXME("(%p)->(%p)\n", This
, p
);
255 static HRESULT WINAPI
HTMLWindow2_get_history(IHTMLWindow2
*iface
, IOmHistory
**p
)
257 HTMLWindow
*This
= HTMLWINDOW2_THIS(iface
);
258 FIXME("(%p)->(%p)\n", This
, p
);
262 static HRESULT WINAPI
HTMLWindow2_close(IHTMLWindow2
*iface
)
264 HTMLWindow
*This
= HTMLWINDOW2_THIS(iface
);
265 FIXME("(%p)->()\n", This
);
269 static HRESULT WINAPI
HTMLWindow2_put_opener(IHTMLWindow2
*iface
, VARIANT v
)
271 HTMLWindow
*This
= HTMLWINDOW2_THIS(iface
);
272 FIXME("(%p)->(v(%d))\n", This
, V_VT(&v
));
276 static HRESULT WINAPI
HTMLWindow2_get_opener(IHTMLWindow2
*iface
, VARIANT
*p
)
278 HTMLWindow
*This
= HTMLWINDOW2_THIS(iface
);
279 FIXME("(%p)->(%p)\n", This
, p
);
283 static HRESULT WINAPI
HTMLWindow2_get_navigator(IHTMLWindow2
*iface
, IOmNavigator
**p
)
285 HTMLWindow
*This
= HTMLWINDOW2_THIS(iface
);
287 TRACE("(%p)->(%p)\n", This
, p
);
289 *p
= OmNavigator_Create();
293 static HRESULT WINAPI
HTMLWindow2_put_name(IHTMLWindow2
*iface
, BSTR v
)
295 HTMLWindow
*This
= HTMLWINDOW2_THIS(iface
);
296 FIXME("(%p)->(%s)\n", This
, debugstr_w(v
));
300 static HRESULT WINAPI
HTMLWindow2_get_name(IHTMLWindow2
*iface
, BSTR
*p
)
302 HTMLWindow
*This
= HTMLWINDOW2_THIS(iface
);
303 FIXME("(%p)->(%p)\n", This
, p
);
307 static HRESULT WINAPI
HTMLWindow2_get_parent(IHTMLWindow2
*iface
, IHTMLWindow2
**p
)
309 HTMLWindow
*This
= HTMLWINDOW2_THIS(iface
);
310 FIXME("(%p)->(%p)\n", This
, p
);
314 static HRESULT WINAPI
HTMLWindow2_open(IHTMLWindow2
*iface
, BSTR url
, BSTR name
,
315 BSTR features
, VARIANT_BOOL replace
, IHTMLWindow2
**pomWindowResult
)
317 HTMLWindow
*This
= HTMLWINDOW2_THIS(iface
);
318 FIXME("(%p)->(%s %s %s %x %p)\n", This
, debugstr_w(url
), debugstr_w(name
),
319 debugstr_w(features
), replace
, pomWindowResult
);
323 static HRESULT WINAPI
HTMLWindow2_get_self(IHTMLWindow2
*iface
, IHTMLWindow2
**p
)
325 HTMLWindow
*This
= HTMLWINDOW2_THIS(iface
);
327 TRACE("(%p)->(%p)\n", This
, p
);
329 /* FIXME: We should return kind of proxy window here. */
330 IHTMLWindow2_AddRef(HTMLWINDOW2(This
));
331 *p
= HTMLWINDOW2(This
);
335 static HRESULT WINAPI
HTMLWindow2_get_top(IHTMLWindow2
*iface
, IHTMLWindow2
**p
)
337 HTMLWindow
*This
= HTMLWINDOW2_THIS(iface
);
338 FIXME("(%p)->(%p)\n", This
, p
);
342 static HRESULT WINAPI
HTMLWindow2_get_window(IHTMLWindow2
*iface
, IHTMLWindow2
**p
)
344 HTMLWindow
*This
= HTMLWINDOW2_THIS(iface
);
346 TRACE("(%p)->(%p)\n", This
, p
);
348 /* FIXME: We should return kind of proxy window here. */
349 IHTMLWindow2_AddRef(HTMLWINDOW2(This
));
350 *p
= HTMLWINDOW2(This
);
354 static HRESULT WINAPI
HTMLWindow2_navigate(IHTMLWindow2
*iface
, BSTR url
)
356 HTMLWindow
*This
= HTMLWINDOW2_THIS(iface
);
357 FIXME("(%p)->(%s)\n", This
, debugstr_w(url
));
361 static HRESULT WINAPI
HTMLWindow2_put_onfocus(IHTMLWindow2
*iface
, VARIANT v
)
363 HTMLWindow
*This
= HTMLWINDOW2_THIS(iface
);
364 FIXME("(%p)->(v(%d))\n", This
, V_VT(&v
));
368 static HRESULT WINAPI
HTMLWindow2_get_onfocus(IHTMLWindow2
*iface
, VARIANT
*p
)
370 HTMLWindow
*This
= HTMLWINDOW2_THIS(iface
);
371 FIXME("(%p)->(%p)\n", This
, p
);
375 static HRESULT WINAPI
HTMLWindow2_put_onblur(IHTMLWindow2
*iface
, VARIANT v
)
377 HTMLWindow
*This
= HTMLWINDOW2_THIS(iface
);
378 FIXME("(%p)->(v(%d))\n", This
, V_VT(&v
));
382 static HRESULT WINAPI
HTMLWindow2_get_onblur(IHTMLWindow2
*iface
, VARIANT
*p
)
384 HTMLWindow
*This
= HTMLWINDOW2_THIS(iface
);
385 FIXME("(%p)->(%p)\n", This
, p
);
389 static HRESULT WINAPI
HTMLWindow2_put_onload(IHTMLWindow2
*iface
, VARIANT v
)
391 HTMLWindow
*This
= HTMLWINDOW2_THIS(iface
);
392 FIXME("(%p)->(v(%d))\n", This
, V_VT(&v
));
396 static HRESULT WINAPI
HTMLWindow2_get_onload(IHTMLWindow2
*iface
, VARIANT
*p
)
398 HTMLWindow
*This
= HTMLWINDOW2_THIS(iface
);
399 FIXME("(%p)->(%p)\n", This
, p
);
403 static HRESULT WINAPI
HTMLWindow2_put_onbeforeunload(IHTMLWindow2
*iface
, VARIANT v
)
405 HTMLWindow
*This
= HTMLWINDOW2_THIS(iface
);
406 FIXME("(%p)->(v(%d))\n", This
, V_VT(&v
));
410 static HRESULT WINAPI
HTMLWindow2_get_onbeforeunload(IHTMLWindow2
*iface
, VARIANT
*p
)
412 HTMLWindow
*This
= HTMLWINDOW2_THIS(iface
);
413 FIXME("(%p)->(%p)\n", This
, p
);
417 static HRESULT WINAPI
HTMLWindow2_put_onunload(IHTMLWindow2
*iface
, VARIANT v
)
419 HTMLWindow
*This
= HTMLWINDOW2_THIS(iface
);
420 FIXME("(%p)->(v(%d))\n", This
, V_VT(&v
));
424 static HRESULT WINAPI
HTMLWindow2_get_onunload(IHTMLWindow2
*iface
, VARIANT
*p
)
426 HTMLWindow
*This
= HTMLWINDOW2_THIS(iface
);
427 FIXME("(%p)->(%p)\n", This
, p
);
431 static HRESULT WINAPI
HTMLWindow2_put_onhelp(IHTMLWindow2
*iface
, VARIANT v
)
433 HTMLWindow
*This
= HTMLWINDOW2_THIS(iface
);
434 FIXME("(%p)->(v(%d))\n", This
, V_VT(&v
));
438 static HRESULT WINAPI
HTMLWindow2_get_onhelp(IHTMLWindow2
*iface
, VARIANT
*p
)
440 HTMLWindow
*This
= HTMLWINDOW2_THIS(iface
);
441 FIXME("(%p)->(%p)\n", This
, p
);
445 static HRESULT WINAPI
HTMLWindow2_put_onerror(IHTMLWindow2
*iface
, VARIANT v
)
447 HTMLWindow
*This
= HTMLWINDOW2_THIS(iface
);
448 FIXME("(%p)->(v(%d))\n", This
, V_VT(&v
));
452 static HRESULT WINAPI
HTMLWindow2_get_onerror(IHTMLWindow2
*iface
, VARIANT
*p
)
454 HTMLWindow
*This
= HTMLWINDOW2_THIS(iface
);
455 FIXME("(%p)->(%p)\n", This
, p
);
459 static HRESULT WINAPI
HTMLWindow2_put_onresize(IHTMLWindow2
*iface
, VARIANT v
)
461 HTMLWindow
*This
= HTMLWINDOW2_THIS(iface
);
462 FIXME("(%p)->(v(%d))\n", This
, V_VT(&v
));
466 static HRESULT WINAPI
HTMLWindow2_get_onresize(IHTMLWindow2
*iface
, VARIANT
*p
)
468 HTMLWindow
*This
= HTMLWINDOW2_THIS(iface
);
469 FIXME("(%p)->(%p)\n", This
, p
);
473 static HRESULT WINAPI
HTMLWindow2_put_onscroll(IHTMLWindow2
*iface
, VARIANT v
)
475 HTMLWindow
*This
= HTMLWINDOW2_THIS(iface
);
476 FIXME("(%p)->(v(%d))\n", This
, V_VT(&v
));
480 static HRESULT WINAPI
HTMLWindow2_get_onscroll(IHTMLWindow2
*iface
, VARIANT
*p
)
482 HTMLWindow
*This
= HTMLWINDOW2_THIS(iface
);
483 FIXME("(%p)->(%p)\n", This
, p
);
487 static HRESULT WINAPI
HTMLWindow2_get_document(IHTMLWindow2
*iface
, IHTMLDocument2
**p
)
489 HTMLWindow
*This
= HTMLWINDOW2_THIS(iface
);
491 TRACE("(%p)->(%p)\n", This
, p
);
494 /* FIXME: We should return a wrapper object here */
495 *p
= HTMLDOC(This
->doc
);
496 IHTMLDocument2_AddRef(*p
);
504 static HRESULT WINAPI
HTMLWindow2_get_event(IHTMLWindow2
*iface
, IHTMLEventObj
**p
)
506 HTMLWindow
*This
= HTMLWINDOW2_THIS(iface
);
508 TRACE("(%p)->(%p)\n", This
, p
);
511 IHTMLEventObj_AddRef(This
->event
);
516 static HRESULT WINAPI
HTMLWindow2_get__newEnum(IHTMLWindow2
*iface
, IUnknown
**p
)
518 HTMLWindow
*This
= HTMLWINDOW2_THIS(iface
);
519 FIXME("(%p)->(%p)\n", This
, p
);
523 static HRESULT WINAPI
HTMLWindow2_showModalDialog(IHTMLWindow2
*iface
, BSTR dialog
,
524 VARIANT
*varArgIn
, VARIANT
*varOptions
, VARIANT
*varArgOut
)
526 HTMLWindow
*This
= HTMLWINDOW2_THIS(iface
);
527 FIXME("(%p)->(%s %p %p %p)\n", This
, debugstr_w(dialog
), varArgIn
, varOptions
, varArgOut
);
531 static HRESULT WINAPI
HTMLWindow2_showHelp(IHTMLWindow2
*iface
, BSTR helpURL
, VARIANT helpArg
,
534 HTMLWindow
*This
= HTMLWINDOW2_THIS(iface
);
535 FIXME("(%p)->(%s v(%d) %s)\n", This
, debugstr_w(helpURL
), V_VT(&helpArg
), debugstr_w(features
));
539 static HRESULT WINAPI
HTMLWindow2_get_screen(IHTMLWindow2
*iface
, IHTMLScreen
**p
)
541 HTMLWindow
*This
= HTMLWINDOW2_THIS(iface
);
542 FIXME("(%p)->(%p)\n", This
, p
);
546 static HRESULT WINAPI
HTMLWindow2_get_Option(IHTMLWindow2
*iface
, IHTMLOptionElementFactory
**p
)
548 HTMLWindow
*This
= HTMLWINDOW2_THIS(iface
);
550 TRACE("(%p)->(%p)\n", This
, p
);
552 if(!This
->doc
->option_factory
)
553 This
->doc
->option_factory
= HTMLOptionElementFactory_Create(This
->doc
);
555 *p
= HTMLOPTFACTORY(This
->doc
->option_factory
);
556 IHTMLOptionElementFactory_AddRef(*p
);
561 static HRESULT WINAPI
HTMLWindow2_focus(IHTMLWindow2
*iface
)
563 HTMLWindow
*This
= HTMLWINDOW2_THIS(iface
);
564 FIXME("(%p)->()\n", This
);
568 static HRESULT WINAPI
HTMLWindow2_get_closed(IHTMLWindow2
*iface
, VARIANT_BOOL
*p
)
570 HTMLWindow
*This
= HTMLWINDOW2_THIS(iface
);
571 FIXME("(%p)->(%p)\n", This
, p
);
575 static HRESULT WINAPI
HTMLWindow2_blur(IHTMLWindow2
*iface
)
577 HTMLWindow
*This
= HTMLWINDOW2_THIS(iface
);
578 FIXME("(%p)->()\n", This
);
582 static HRESULT WINAPI
HTMLWindow2_scroll(IHTMLWindow2
*iface
, long x
, long y
)
584 HTMLWindow
*This
= HTMLWINDOW2_THIS(iface
);
585 FIXME("(%p)->(%ld %ld)\n", This
, x
, y
);
589 static HRESULT WINAPI
HTMLWindow2_get_clientInformation(IHTMLWindow2
*iface
, IOmNavigator
**p
)
591 HTMLWindow
*This
= HTMLWINDOW2_THIS(iface
);
592 FIXME("(%p)->(%p)\n", This
, p
);
596 static HRESULT WINAPI
HTMLWindow2_setInterval(IHTMLWindow2
*iface
, BSTR expression
,
597 long msec
, VARIANT
*language
, long *timerID
)
599 HTMLWindow
*This
= HTMLWINDOW2_THIS(iface
);
602 TRACE("(%p)->(%s %ld %p %p)\n", This
, debugstr_w(expression
), msec
, language
, timerID
);
604 V_VT(&expr
) = VT_BSTR
;
605 V_BSTR(&expr
) = expression
;
606 return IHTMLWindow3_setInterval(HTMLWINDOW3(This
), &expr
, msec
, language
, timerID
);
609 static HRESULT WINAPI
HTMLWindow2_clearInterval(IHTMLWindow2
*iface
, long timerID
)
611 HTMLWindow
*This
= HTMLWINDOW2_THIS(iface
);
613 TRACE("(%p)->(%ld)\n", This
, timerID
);
615 return clear_task_timer(This
->doc
, TRUE
, timerID
);
618 static HRESULT WINAPI
HTMLWindow2_put_offscreenBuffering(IHTMLWindow2
*iface
, VARIANT v
)
620 HTMLWindow
*This
= HTMLWINDOW2_THIS(iface
);
621 FIXME("(%p)->(v(%d))\n", This
, V_VT(&v
));
625 static HRESULT WINAPI
HTMLWindow2_get_offscreenBuffering(IHTMLWindow2
*iface
, VARIANT
*p
)
627 HTMLWindow
*This
= HTMLWINDOW2_THIS(iface
);
628 FIXME("(%p)->(%p)\n", This
, p
);
632 static HRESULT WINAPI
HTMLWindow2_execScript(IHTMLWindow2
*iface
, BSTR scode
, BSTR language
,
635 HTMLWindow
*This
= HTMLWINDOW2_THIS(iface
);
636 FIXME("(%p)->(%s %s %p)\n", This
, debugstr_w(scode
), debugstr_w(language
), pvarRet
);
640 static HRESULT WINAPI
HTMLWindow2_toString(IHTMLWindow2
*iface
, BSTR
*String
)
642 HTMLWindow
*This
= HTMLWINDOW2_THIS(iface
);
643 FIXME("(%p)->(%p)\n", This
, String
);
647 static HRESULT WINAPI
HTMLWindow2_scrollBy(IHTMLWindow2
*iface
, long x
, long y
)
649 HTMLWindow
*This
= HTMLWINDOW2_THIS(iface
);
652 TRACE("(%p)->(%ld %ld)\n", This
, x
, y
);
654 nsres
= nsIDOMWindow_ScrollBy(This
->nswindow
, x
, y
);
656 ERR("ScrollBy failed: %08x\n", nsres
);
661 static HRESULT WINAPI
HTMLWindow2_scrollTo(IHTMLWindow2
*iface
, long x
, long y
)
663 HTMLWindow
*This
= HTMLWINDOW2_THIS(iface
);
666 TRACE("(%p)->(%ld %ld)\n", This
, x
, y
);
668 nsres
= nsIDOMWindow_ScrollTo(This
->nswindow
, x
, y
);
670 ERR("ScrollTo failed: %08x\n", nsres
);
675 static HRESULT WINAPI
HTMLWindow2_moveTo(IHTMLWindow2
*iface
, long x
, long y
)
677 HTMLWindow
*This
= HTMLWINDOW2_THIS(iface
);
678 FIXME("(%p)->(%ld %ld)\n", This
, x
, y
);
682 static HRESULT WINAPI
HTMLWindow2_moveBy(IHTMLWindow2
*iface
, long x
, long y
)
684 HTMLWindow
*This
= HTMLWINDOW2_THIS(iface
);
685 FIXME("(%p)->(%ld %ld)\n", This
, x
, y
);
689 static HRESULT WINAPI
HTMLWindow2_resizeTo(IHTMLWindow2
*iface
, long x
, long y
)
691 HTMLWindow
*This
= HTMLWINDOW2_THIS(iface
);
692 FIXME("(%p)->(%ld %ld)\n", This
, x
, y
);
696 static HRESULT WINAPI
HTMLWindow2_resizeBy(IHTMLWindow2
*iface
, long x
, long y
)
698 HTMLWindow
*This
= HTMLWINDOW2_THIS(iface
);
699 FIXME("(%p)->(%ld %ld)\n", This
, x
, y
);
703 static HRESULT WINAPI
HTMLWindow2_get_external(IHTMLWindow2
*iface
, IDispatch
**p
)
705 HTMLWindow
*This
= HTMLWINDOW2_THIS(iface
);
707 TRACE("(%p)->(%p)\n", This
, p
);
711 if(!This
->doc
->hostui
)
714 return IDocHostUIHandler_GetExternal(This
->doc
->hostui
, p
);
717 #undef HTMLWINDOW2_THIS
719 static const IHTMLWindow2Vtbl HTMLWindow2Vtbl
= {
720 HTMLWindow2_QueryInterface
,
723 HTMLWindow2_GetTypeInfoCount
,
724 HTMLWindow2_GetTypeInfo
,
725 HTMLWindow2_GetIDsOfNames
,
728 HTMLWindow2_get_length
,
729 HTMLWindow2_get_frames
,
730 HTMLWindow2_put_defaultStatus
,
731 HTMLWindow2_get_defaultStatus
,
732 HTMLWindow2_put_status
,
733 HTMLWindow2_get_status
,
734 HTMLWindow2_setTimeout
,
735 HTMLWindow2_clearTimeout
,
739 HTMLWindow2_get_Image
,
740 HTMLWindow2_get_location
,
741 HTMLWindow2_get_history
,
743 HTMLWindow2_put_opener
,
744 HTMLWindow2_get_opener
,
745 HTMLWindow2_get_navigator
,
746 HTMLWindow2_put_name
,
747 HTMLWindow2_get_name
,
748 HTMLWindow2_get_parent
,
750 HTMLWindow2_get_self
,
752 HTMLWindow2_get_window
,
753 HTMLWindow2_navigate
,
754 HTMLWindow2_put_onfocus
,
755 HTMLWindow2_get_onfocus
,
756 HTMLWindow2_put_onblur
,
757 HTMLWindow2_get_onblur
,
758 HTMLWindow2_put_onload
,
759 HTMLWindow2_get_onload
,
760 HTMLWindow2_put_onbeforeunload
,
761 HTMLWindow2_get_onbeforeunload
,
762 HTMLWindow2_put_onunload
,
763 HTMLWindow2_get_onunload
,
764 HTMLWindow2_put_onhelp
,
765 HTMLWindow2_get_onhelp
,
766 HTMLWindow2_put_onerror
,
767 HTMLWindow2_get_onerror
,
768 HTMLWindow2_put_onresize
,
769 HTMLWindow2_get_onresize
,
770 HTMLWindow2_put_onscroll
,
771 HTMLWindow2_get_onscroll
,
772 HTMLWindow2_get_document
,
773 HTMLWindow2_get_event
,
774 HTMLWindow2_get__newEnum
,
775 HTMLWindow2_showModalDialog
,
776 HTMLWindow2_showHelp
,
777 HTMLWindow2_get_screen
,
778 HTMLWindow2_get_Option
,
780 HTMLWindow2_get_closed
,
783 HTMLWindow2_get_clientInformation
,
784 HTMLWindow2_setInterval
,
785 HTMLWindow2_clearInterval
,
786 HTMLWindow2_put_offscreenBuffering
,
787 HTMLWindow2_get_offscreenBuffering
,
788 HTMLWindow2_execScript
,
789 HTMLWindow2_toString
,
790 HTMLWindow2_scrollBy
,
791 HTMLWindow2_scrollTo
,
794 HTMLWindow2_resizeTo
,
795 HTMLWindow2_resizeBy
,
796 HTMLWindow2_get_external
799 #define HTMLWINDOW3_THIS(iface) DEFINE_THIS(HTMLWindow, HTMLWindow3, iface)
801 static HRESULT WINAPI
HTMLWindow3_QueryInterface(IHTMLWindow3
*iface
, REFIID riid
, void **ppv
)
803 HTMLWindow
*This
= HTMLWINDOW3_THIS(iface
);
805 return IHTMLWindow2_QueryInterface(HTMLWINDOW2(This
), riid
, ppv
);
808 static ULONG WINAPI
HTMLWindow3_AddRef(IHTMLWindow3
*iface
)
810 HTMLWindow
*This
= HTMLWINDOW3_THIS(iface
);
812 return IHTMLWindow2_AddRef(HTMLWINDOW2(This
));
815 static ULONG WINAPI
HTMLWindow3_Release(IHTMLWindow3
*iface
)
817 HTMLWindow
*This
= HTMLWINDOW3_THIS(iface
);
819 return IHTMLWindow2_Release(HTMLWINDOW2(This
));
822 static HRESULT WINAPI
HTMLWindow3_GetTypeInfoCount(IHTMLWindow3
*iface
, UINT
*pctinfo
)
824 HTMLWindow
*This
= HTMLWINDOW3_THIS(iface
);
826 return IDispatchEx_GetTypeInfoCount(DISPATCHEX(This
), pctinfo
);
829 static HRESULT WINAPI
HTMLWindow3_GetTypeInfo(IHTMLWindow3
*iface
, UINT iTInfo
,
830 LCID lcid
, ITypeInfo
**ppTInfo
)
832 HTMLWindow
*This
= HTMLWINDOW3_THIS(iface
);
834 return IDispatchEx_GetTypeInfo(DISPATCHEX(This
), iTInfo
, lcid
, ppTInfo
);
837 static HRESULT WINAPI
HTMLWindow3_GetIDsOfNames(IHTMLWindow3
*iface
, REFIID riid
,
838 LPOLESTR
*rgszNames
, UINT cNames
,
839 LCID lcid
, DISPID
*rgDispId
)
841 HTMLWindow
*This
= HTMLWINDOW3_THIS(iface
);
843 return IDispatchEx_GetIDsOfNames(DISPATCHEX(This
), riid
, rgszNames
, cNames
, lcid
, rgDispId
);
846 static HRESULT WINAPI
HTMLWindow3_Invoke(IHTMLWindow3
*iface
, DISPID dispIdMember
,
847 REFIID riid
, LCID lcid
, WORD wFlags
, DISPPARAMS
*pDispParams
,
848 VARIANT
*pVarResult
, EXCEPINFO
*pExcepInfo
, UINT
*puArgErr
)
850 HTMLWindow
*This
= HTMLWINDOW3_THIS(iface
);
852 return IDispatchEx_Invoke(DISPATCHEX(This
), dispIdMember
, riid
, lcid
, wFlags
, pDispParams
,
853 pVarResult
, pExcepInfo
, puArgErr
);
856 static HRESULT WINAPI
HTMLWindow3_get_screenLeft(IHTMLWindow3
*iface
, long *p
)
858 HTMLWindow
*This
= HTMLWINDOW3_THIS(iface
);
859 FIXME("(%p)->(%p)\n", This
, p
);
863 static HRESULT WINAPI
HTMLWindow3_get_screenTop(IHTMLWindow3
*iface
, long *p
)
865 HTMLWindow
*This
= HTMLWINDOW3_THIS(iface
);
866 FIXME("(%p)->(%p)\n", This
, p
);
870 static HRESULT WINAPI
HTMLWindow3_attachEvent(IHTMLWindow3
*iface
, BSTR event
, IDispatch
*pDisp
, VARIANT_BOOL
*pfResult
)
872 HTMLWindow
*This
= HTMLWINDOW3_THIS(iface
);
873 FIXME("(%p)->(%s %p %p)\n", This
, debugstr_w(event
), pDisp
, pfResult
);
877 static HRESULT WINAPI
HTMLWindow3_detachEvent(IHTMLWindow3
*iface
, BSTR event
, IDispatch
*pDisp
)
879 HTMLWindow
*This
= HTMLWINDOW3_THIS(iface
);
880 FIXME("(%p)->()\n", This
);
884 static HRESULT
window_set_timer(HTMLWindow
*This
, VARIANT
*expr
, long msec
, VARIANT
*language
,
885 BOOL interval
, long *timer_id
)
887 IDispatch
*disp
= NULL
;
891 disp
= V_DISPATCH(expr
);
892 IDispatch_AddRef(disp
);
896 disp
= script_parse_event(This
->doc
, V_BSTR(expr
));
900 FIXME("unimplemented vt=%d\n", V_VT(expr
));
907 *timer_id
= set_task_timer(This
->doc
, msec
, interval
, disp
);
908 IDispatch_Release(disp
);
913 static HRESULT WINAPI
HTMLWindow3_setTimeout(IHTMLWindow3
*iface
, VARIANT
*expression
, long msec
,
914 VARIANT
*language
, long *timerID
)
916 HTMLWindow
*This
= HTMLWINDOW3_THIS(iface
);
918 TRACE("(%p)->(%p(%d) %ld %p %p)\n", This
, expression
, V_VT(expression
), msec
, language
, timerID
);
920 return window_set_timer(This
, expression
, msec
, language
, FALSE
, timerID
);
923 static HRESULT WINAPI
HTMLWindow3_setInterval(IHTMLWindow3
*iface
, VARIANT
*expression
, long msec
,
924 VARIANT
*language
, long *timerID
)
926 HTMLWindow
*This
= HTMLWINDOW3_THIS(iface
);
928 TRACE("(%p)->(%p %ld %p %p)\n", This
, expression
, msec
, language
, timerID
);
930 return window_set_timer(This
, expression
, msec
, language
, TRUE
, timerID
);
933 static HRESULT WINAPI
HTMLWindow3_print(IHTMLWindow3
*iface
)
935 HTMLWindow
*This
= HTMLWINDOW3_THIS(iface
);
936 FIXME("(%p)\n", This
);
940 static HRESULT WINAPI
HTMLWindow3_put_onbeforeprint(IHTMLWindow3
*iface
, VARIANT v
)
942 HTMLWindow
*This
= HTMLWINDOW3_THIS(iface
);
943 FIXME("(%p)->()\n", This
);
947 static HRESULT WINAPI
HTMLWindow3_get_onbeforeprint(IHTMLWindow3
*iface
, VARIANT
*p
)
949 HTMLWindow
*This
= HTMLWINDOW3_THIS(iface
);
950 FIXME("(%p)->(%p)\n", This
, p
);
954 static HRESULT WINAPI
HTMLWindow3_put_onafterprint(IHTMLWindow3
*iface
, VARIANT v
)
956 HTMLWindow
*This
= HTMLWINDOW3_THIS(iface
);
957 FIXME("(%p)->()\n", This
);
961 static HRESULT WINAPI
HTMLWindow3_get_onafterprint(IHTMLWindow3
*iface
, VARIANT
*p
)
963 HTMLWindow
*This
= HTMLWINDOW3_THIS(iface
);
964 FIXME("(%p)->(%p)\n", This
, p
);
968 static HRESULT WINAPI
HTMLWindow3_get_clipboardData(IHTMLWindow3
*iface
, IHTMLDataTransfer
**p
)
970 HTMLWindow
*This
= HTMLWINDOW3_THIS(iface
);
971 FIXME("(%p)->(%p)\n", This
, p
);
975 static HRESULT WINAPI
HTMLWindow3_showModelessDialog(IHTMLWindow3
*iface
, BSTR url
,
976 VARIANT
*varArgIn
, VARIANT
*options
, IHTMLWindow2
**pDialog
)
978 HTMLWindow
*This
= HTMLWINDOW3_THIS(iface
);
979 FIXME("(%p)->(%s %p %p %p)\n", This
, debugstr_w(url
), varArgIn
, options
, pDialog
);
983 #undef HTMLWINDOW3_THIS
985 static const IHTMLWindow3Vtbl HTMLWindow3Vtbl
= {
986 HTMLWindow3_QueryInterface
,
989 HTMLWindow3_GetTypeInfoCount
,
990 HTMLWindow3_GetTypeInfo
,
991 HTMLWindow3_GetIDsOfNames
,
993 HTMLWindow3_get_screenLeft
,
994 HTMLWindow3_get_screenTop
,
995 HTMLWindow3_attachEvent
,
996 HTMLWindow3_detachEvent
,
997 HTMLWindow3_setTimeout
,
998 HTMLWindow3_setInterval
,
1000 HTMLWindow3_put_onbeforeprint
,
1001 HTMLWindow3_get_onbeforeprint
,
1002 HTMLWindow3_put_onafterprint
,
1003 HTMLWindow3_get_onafterprint
,
1004 HTMLWindow3_get_clipboardData
,
1005 HTMLWindow3_showModelessDialog
1008 #define DISPEX_THIS(iface) DEFINE_THIS(HTMLWindow, IDispatchEx, iface)
1010 static HRESULT WINAPI
WindowDispEx_QueryInterface(IDispatchEx
*iface
, REFIID riid
, void **ppv
)
1012 HTMLWindow
*This
= DISPEX_THIS(iface
);
1014 return IHTMLWindow2_QueryInterface(HTMLWINDOW2(This
), riid
, ppv
);
1017 static ULONG WINAPI
WindowDispEx_AddRef(IDispatchEx
*iface
)
1019 HTMLWindow
*This
= DISPEX_THIS(iface
);
1021 return IHTMLWindow2_AddRef(HTMLWINDOW2(This
));
1024 static ULONG WINAPI
WindowDispEx_Release(IDispatchEx
*iface
)
1026 HTMLWindow
*This
= DISPEX_THIS(iface
);
1028 return IHTMLWindow2_Release(HTMLWINDOW2(This
));
1031 static HRESULT WINAPI
WindowDispEx_GetTypeInfoCount(IDispatchEx
*iface
, UINT
*pctinfo
)
1033 HTMLWindow
*This
= DISPEX_THIS(iface
);
1035 TRACE("(%p)->(%p)\n", This
, pctinfo
);
1037 return IDispatchEx_GetTypeInfoCount(DISPATCHEX(&This
->dispex
), pctinfo
);
1040 static HRESULT WINAPI
WindowDispEx_GetTypeInfo(IDispatchEx
*iface
, UINT iTInfo
,
1041 LCID lcid
, ITypeInfo
**ppTInfo
)
1043 HTMLWindow
*This
= DISPEX_THIS(iface
);
1045 TRACE("(%p)->(%u %u %p)\n", This
, iTInfo
, lcid
, ppTInfo
);
1047 return IDispatchEx_GetTypeInfo(DISPATCHEX(&This
->dispex
), iTInfo
, lcid
, ppTInfo
);
1050 static HRESULT WINAPI
WindowDispEx_GetIDsOfNames(IDispatchEx
*iface
, REFIID riid
,
1051 LPOLESTR
*rgszNames
, UINT cNames
,
1052 LCID lcid
, DISPID
*rgDispId
)
1054 HTMLWindow
*This
= DISPEX_THIS(iface
);
1056 TRACE("(%p)->(%s %p %u %u %p)\n", This
, debugstr_guid(riid
), rgszNames
, cNames
,
1059 /* FIXME: Use script dispatch */
1061 return IDispatchEx_GetIDsOfNames(DISPATCHEX(&This
->dispex
), riid
, rgszNames
, cNames
, lcid
, rgDispId
);
1064 static HRESULT WINAPI
WindowDispEx_Invoke(IDispatchEx
*iface
, DISPID dispIdMember
,
1065 REFIID riid
, LCID lcid
, WORD wFlags
, DISPPARAMS
*pDispParams
,
1066 VARIANT
*pVarResult
, EXCEPINFO
*pExcepInfo
, UINT
*puArgErr
)
1068 HTMLWindow
*This
= DISPEX_THIS(iface
);
1070 TRACE("(%p)->(%d %s %d %d %p %p %p %p)\n", This
, dispIdMember
, debugstr_guid(riid
),
1071 lcid
, wFlags
, pDispParams
, pVarResult
, pExcepInfo
, puArgErr
);
1073 /* FIXME: Use script dispatch */
1075 return IDispatchEx_Invoke(DISPATCHEX(&This
->dispex
), dispIdMember
, riid
, lcid
, wFlags
, pDispParams
,
1076 pVarResult
, pExcepInfo
, puArgErr
);
1079 static HRESULT WINAPI
WindowDispEx_GetDispID(IDispatchEx
*iface
, BSTR bstrName
, DWORD grfdex
, DISPID
*pid
)
1081 HTMLWindow
*This
= DISPEX_THIS(iface
);
1083 TRACE("(%p)->(%s %x %p)\n", This
, debugstr_w(bstrName
), grfdex
, pid
);
1085 return IDispatchEx_GetDispID(DISPATCHEX(&This
->dispex
), bstrName
, grfdex
, pid
);
1088 static HRESULT WINAPI
WindowDispEx_InvokeEx(IDispatchEx
*iface
, DISPID id
, LCID lcid
, WORD wFlags
, DISPPARAMS
*pdp
,
1089 VARIANT
*pvarRes
, EXCEPINFO
*pei
, IServiceProvider
*pspCaller
)
1091 HTMLWindow
*This
= DISPEX_THIS(iface
);
1093 TRACE("(%p)->(%x %x %x %p %p %p %p)\n", This
, id
, lcid
, wFlags
, pdp
, pvarRes
, pei
, pspCaller
);
1095 return IDispatchEx_InvokeEx(DISPATCHEX(&This
->dispex
), id
, lcid
, wFlags
, pdp
, pvarRes
, pei
, pspCaller
);
1098 static HRESULT WINAPI
WindowDispEx_DeleteMemberByName(IDispatchEx
*iface
, BSTR bstrName
, DWORD grfdex
)
1100 HTMLWindow
*This
= DISPEX_THIS(iface
);
1102 TRACE("(%p)->(%s %x)\n", This
, debugstr_w(bstrName
), grfdex
);
1104 return IDispatchEx_DeleteMemberByName(DISPATCHEX(&This
->dispex
), bstrName
, grfdex
);
1107 static HRESULT WINAPI
WindowDispEx_DeleteMemberByDispID(IDispatchEx
*iface
, DISPID id
)
1109 HTMLWindow
*This
= DISPEX_THIS(iface
);
1111 TRACE("(%p)->(%x)\n", This
, id
);
1113 return IDispatchEx_DeleteMemberByDispID(DISPATCHEX(&This
->dispex
), id
);
1116 static HRESULT WINAPI
WindowDispEx_GetMemberProperties(IDispatchEx
*iface
, DISPID id
, DWORD grfdexFetch
, DWORD
*pgrfdex
)
1118 HTMLWindow
*This
= DISPEX_THIS(iface
);
1120 TRACE("(%p)->(%x %x %p)\n", This
, id
, grfdexFetch
, pgrfdex
);
1122 return IDispatchEx_GetMemberProperties(DISPATCHEX(&This
->dispex
), id
, grfdexFetch
, pgrfdex
);
1125 static HRESULT WINAPI
WindowDispEx_GetMemberName(IDispatchEx
*iface
, DISPID id
, BSTR
*pbstrName
)
1127 HTMLWindow
*This
= DISPEX_THIS(iface
);
1129 TRACE("(%p)->(%x %p)\n", This
, id
, pbstrName
);
1131 return IDispatchEx_GetMemberName(DISPATCHEX(&This
->dispex
), id
, pbstrName
);
1134 static HRESULT WINAPI
WindowDispEx_GetNextDispID(IDispatchEx
*iface
, DWORD grfdex
, DISPID id
, DISPID
*pid
)
1136 HTMLWindow
*This
= DISPEX_THIS(iface
);
1138 TRACE("(%p)->(%x %x %p)\n", This
, grfdex
, id
, pid
);
1140 return IDispatchEx_GetNextDispID(DISPATCHEX(&This
->dispex
), grfdex
, id
, pid
);
1143 static HRESULT WINAPI
WindowDispEx_GetNameSpaceParent(IDispatchEx
*iface
, IUnknown
**ppunk
)
1145 HTMLWindow
*This
= DISPEX_THIS(iface
);
1147 TRACE("(%p)->(%p)\n", This
, ppunk
);
1155 static const IDispatchExVtbl WindowDispExVtbl
= {
1156 WindowDispEx_QueryInterface
,
1157 WindowDispEx_AddRef
,
1158 WindowDispEx_Release
,
1159 WindowDispEx_GetTypeInfoCount
,
1160 WindowDispEx_GetTypeInfo
,
1161 WindowDispEx_GetIDsOfNames
,
1162 WindowDispEx_Invoke
,
1163 WindowDispEx_GetDispID
,
1164 WindowDispEx_InvokeEx
,
1165 WindowDispEx_DeleteMemberByName
,
1166 WindowDispEx_DeleteMemberByDispID
,
1167 WindowDispEx_GetMemberProperties
,
1168 WindowDispEx_GetMemberName
,
1169 WindowDispEx_GetNextDispID
,
1170 WindowDispEx_GetNameSpaceParent
1173 static const tid_t HTMLWindow_iface_tids
[] = {
1178 static dispex_static_data_t HTMLWindow_dispex
= {
1180 DispHTMLWindow2_tid
,
1182 HTMLWindow_iface_tids
1185 HRESULT
HTMLWindow_Create(HTMLDocument
*doc
, nsIDOMWindow
*nswindow
, HTMLWindow
**ret
)
1189 window
= heap_alloc_zero(sizeof(HTMLWindow
));
1191 return E_OUTOFMEMORY
;
1193 window
->lpHTMLWindow2Vtbl
= &HTMLWindow2Vtbl
;
1194 window
->lpHTMLWindow3Vtbl
= &HTMLWindow3Vtbl
;
1195 window
->lpIDispatchExVtbl
= &WindowDispExVtbl
;
1199 init_dispex(&window
->dispex
, (IUnknown
*)HTMLWINDOW2(window
), &HTMLWindow_dispex
);
1202 nsIDOMWindow_AddRef(nswindow
);
1203 window
->nswindow
= nswindow
;
1206 list_add_head(&window_list
, &window
->entry
);
1212 HTMLWindow
*nswindow_to_window(const nsIDOMWindow
*nswindow
)
1216 LIST_FOR_EACH_ENTRY(iter
, &window_list
, HTMLWindow
, entry
) {
1217 if(iter
->nswindow
== nswindow
)