dplayx: Tests for checking the behaviour of groups in a p2p session.
[wine/gsoc_dplay.git] / dlls / mshtml / htmlelem2.c
blobe7319efb74f2891489a114b3acfea34b0bb475ad
1 /*
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
19 #include <stdarg.h>
21 #define COBJMACROS
23 #include "windef.h"
24 #include "winbase.h"
25 #include "winuser.h"
26 #include "ole2.h"
28 #include "wine/debug.h"
29 #include "wine/unicode.h"
31 #include "mshtml_private.h"
33 WINE_DEFAULT_DEBUG_CHANNEL(mshtml);
35 #define HTMLELEM2_THIS(iface) DEFINE_THIS(HTMLElement, HTMLElement2, iface)
37 static HRESULT WINAPI HTMLElement2_QueryInterface(IHTMLElement2 *iface,
38 REFIID riid, void **ppv)
40 HTMLElement *This = HTMLELEM2_THIS(iface);
41 return IHTMLElement_QueryInterface(HTMLELEM(This), riid, ppv);
44 static ULONG WINAPI HTMLElement2_AddRef(IHTMLElement2 *iface)
46 HTMLElement *This = HTMLELEM2_THIS(iface);
47 return IHTMLElement_AddRef(HTMLELEM(This));
50 static ULONG WINAPI HTMLElement2_Release(IHTMLElement2 *iface)
52 HTMLElement *This = HTMLELEM2_THIS(iface);
53 return IHTMLElement_Release(HTMLELEM(This));
56 static HRESULT WINAPI HTMLElement2_GetTypeInfoCount(IHTMLElement2 *iface, UINT *pctinfo)
58 HTMLElement *This = HTMLELEM2_THIS(iface);
59 return IDispatchEx_GetTypeInfoCount(DISPATCHEX(&This->node.dispex), pctinfo);
62 static HRESULT WINAPI HTMLElement2_GetTypeInfo(IHTMLElement2 *iface, UINT iTInfo,
63 LCID lcid, ITypeInfo **ppTInfo)
65 HTMLElement *This = HTMLELEM2_THIS(iface);
66 return IDispatchEx_GetTypeInfo(DISPATCHEX(&This->node.dispex), iTInfo, lcid, ppTInfo);
69 static HRESULT WINAPI HTMLElement2_GetIDsOfNames(IHTMLElement2 *iface, REFIID riid,
70 LPOLESTR *rgszNames, UINT cNames,
71 LCID lcid, DISPID *rgDispId)
73 HTMLElement *This = HTMLELEM2_THIS(iface);
74 return IDispatchEx_GetIDsOfNames(DISPATCHEX(&This->node.dispex), riid, rgszNames, cNames, lcid, rgDispId);
77 static HRESULT WINAPI HTMLElement2_Invoke(IHTMLElement2 *iface, DISPID dispIdMember,
78 REFIID riid, LCID lcid, WORD wFlags, DISPPARAMS *pDispParams,
79 VARIANT *pVarResult, EXCEPINFO *pExcepInfo, UINT *puArgErr)
81 HTMLElement *This = HTMLELEM2_THIS(iface);
82 return IDispatchEx_Invoke(DISPATCHEX(&This->node.dispex), dispIdMember, riid, lcid,
83 wFlags, pDispParams, pVarResult, pExcepInfo, puArgErr);
86 static HRESULT WINAPI HTMLElement2_get_scopeName(IHTMLElement2 *iface, BSTR *p)
88 HTMLElement *This = HTMLELEM2_THIS(iface);
89 FIXME("(%p)->(%p)\n", This, p);
90 return E_NOTIMPL;
93 static HRESULT WINAPI HTMLElement2_setCapture(IHTMLElement2 *iface, VARIANT_BOOL containerCapture)
95 HTMLElement *This = HTMLELEM2_THIS(iface);
96 FIXME("(%p)->(%x)\n", This, containerCapture);
97 return E_NOTIMPL;
100 static HRESULT WINAPI HTMLElement2_releaseCapture(IHTMLElement2 *iface)
102 HTMLElement *This = HTMLELEM2_THIS(iface);
103 FIXME("(%p)\n", This);
104 return E_NOTIMPL;
107 static HRESULT WINAPI HTMLElement2_put_onlosecapture(IHTMLElement2 *iface, VARIANT v)
109 HTMLElement *This = HTMLELEM2_THIS(iface);
110 FIXME("(%p)->()\n", This);
111 return E_NOTIMPL;
114 static HRESULT WINAPI HTMLElement2_get_onlosecapture(IHTMLElement2 *iface, VARIANT *p)
116 HTMLElement *This = HTMLELEM2_THIS(iface);
117 FIXME("(%p)->(%p)\n", This, p);
118 return E_NOTIMPL;
121 static HRESULT WINAPI HTMLElement2_componentFromPoint(IHTMLElement2 *iface,
122 long x, long y, BSTR *component)
124 HTMLElement *This = HTMLELEM2_THIS(iface);
125 FIXME("(%p)->(%ld %ld %p)\n", This, x, y, component);
126 return E_NOTIMPL;
129 static HRESULT WINAPI HTMLElement2_doScroll(IHTMLElement2 *iface, VARIANT component)
131 HTMLElement *This = HTMLELEM2_THIS(iface);
132 FIXME("(%p)->()\n", This);
133 return E_NOTIMPL;
136 static HRESULT WINAPI HTMLElement2_put_onscroll(IHTMLElement2 *iface, VARIANT v)
138 HTMLElement *This = HTMLELEM2_THIS(iface);
139 FIXME("(%p)->()\n", This);
140 return E_NOTIMPL;
143 static HRESULT WINAPI HTMLElement2_get_onscroll(IHTMLElement2 *iface, VARIANT *p)
145 HTMLElement *This = HTMLELEM2_THIS(iface);
146 FIXME("(%p)->(%p)\n", This, p);
147 return E_NOTIMPL;
150 static HRESULT WINAPI HTMLElement2_put_ondrag(IHTMLElement2 *iface, VARIANT v)
152 HTMLElement *This = HTMLELEM2_THIS(iface);
153 FIXME("(%p)->()\n", This);
154 return E_NOTIMPL;
157 static HRESULT WINAPI HTMLElement2_get_ondrag(IHTMLElement2 *iface, VARIANT *p)
159 HTMLElement *This = HTMLELEM2_THIS(iface);
160 FIXME("(%p)->(%p)\n", This, p);
161 return E_NOTIMPL;
164 static HRESULT WINAPI HTMLElement2_put_ondragend(IHTMLElement2 *iface, VARIANT v)
166 HTMLElement *This = HTMLELEM2_THIS(iface);
167 FIXME("(%p)->()\n", This);
168 return E_NOTIMPL;
171 static HRESULT WINAPI HTMLElement2_get_ondragend(IHTMLElement2 *iface, VARIANT *p)
173 HTMLElement *This = HTMLELEM2_THIS(iface);
174 FIXME("(%p)->(%p)\n", This, p);
175 return E_NOTIMPL;
178 static HRESULT WINAPI HTMLElement2_put_ondragenter(IHTMLElement2 *iface, VARIANT v)
180 HTMLElement *This = HTMLELEM2_THIS(iface);
181 FIXME("(%p)->()\n", This);
182 return E_NOTIMPL;
185 static HRESULT WINAPI HTMLElement2_get_ondragenter(IHTMLElement2 *iface, VARIANT *p)
187 HTMLElement *This = HTMLELEM2_THIS(iface);
188 FIXME("(%p)->(%p)\n", This, p);
189 return E_NOTIMPL;
192 static HRESULT WINAPI HTMLElement2_put_ondragover(IHTMLElement2 *iface, VARIANT v)
194 HTMLElement *This = HTMLELEM2_THIS(iface);
195 FIXME("(%p)->()\n", This);
196 return E_NOTIMPL;
199 static HRESULT WINAPI HTMLElement2_get_ondragover(IHTMLElement2 *iface, VARIANT *p)
201 HTMLElement *This = HTMLELEM2_THIS(iface);
202 FIXME("(%p)->(%p)\n", This, p);
203 return E_NOTIMPL;
206 static HRESULT WINAPI HTMLElement2_put_ondragleave(IHTMLElement2 *iface, VARIANT v)
208 HTMLElement *This = HTMLELEM2_THIS(iface);
209 FIXME("(%p)->()\n", This);
210 return E_NOTIMPL;
213 static HRESULT WINAPI HTMLElement2_get_ondragleave(IHTMLElement2 *iface, VARIANT *p)
215 HTMLElement *This = HTMLELEM2_THIS(iface);
216 FIXME("(%p)->(%p)\n", This, p);
217 return E_NOTIMPL;
220 static HRESULT WINAPI HTMLElement2_put_ondrop(IHTMLElement2 *iface, VARIANT v)
222 HTMLElement *This = HTMLELEM2_THIS(iface);
223 FIXME("(%p)->()\n", This);
224 return E_NOTIMPL;
227 static HRESULT WINAPI HTMLElement2_get_ondrop(IHTMLElement2 *iface, VARIANT *p)
229 HTMLElement *This = HTMLELEM2_THIS(iface);
230 FIXME("(%p)->(%p)\n", This, p);
231 return E_NOTIMPL;
234 static HRESULT WINAPI HTMLElement2_put_onbeforecut(IHTMLElement2 *iface, VARIANT v)
236 HTMLElement *This = HTMLELEM2_THIS(iface);
237 FIXME("(%p)->()\n", This);
238 return E_NOTIMPL;
241 static HRESULT WINAPI HTMLElement2_get_onbeforecut(IHTMLElement2 *iface, VARIANT *p)
243 HTMLElement *This = HTMLELEM2_THIS(iface);
244 FIXME("(%p)->(%p)\n", This, p);
245 return E_NOTIMPL;
248 static HRESULT WINAPI HTMLElement2_put_oncut(IHTMLElement2 *iface, VARIANT v)
250 HTMLElement *This = HTMLELEM2_THIS(iface);
251 FIXME("(%p)->()\n", This);
252 return E_NOTIMPL;
255 static HRESULT WINAPI HTMLElement2_get_oncut(IHTMLElement2 *iface, VARIANT *p)
257 HTMLElement *This = HTMLELEM2_THIS(iface);
258 FIXME("(%p)->(%p)\n", This, p);
259 return E_NOTIMPL;
262 static HRESULT WINAPI HTMLElement2_put_onbeforecopy(IHTMLElement2 *iface, VARIANT v)
264 HTMLElement *This = HTMLELEM2_THIS(iface);
265 FIXME("(%p)->()\n", This);
266 return E_NOTIMPL;
269 static HRESULT WINAPI HTMLElement2_get_onbeforecopy(IHTMLElement2 *iface, VARIANT *p)
271 HTMLElement *This = HTMLELEM2_THIS(iface);
272 FIXME("(%p)->(%p)\n", This, p);
273 return E_NOTIMPL;
276 static HRESULT WINAPI HTMLElement2_put_oncopy(IHTMLElement2 *iface, VARIANT v)
278 HTMLElement *This = HTMLELEM2_THIS(iface);
279 FIXME("(%p)->()\n", This);
280 return E_NOTIMPL;
283 static HRESULT WINAPI HTMLElement2_get_oncopy(IHTMLElement2 *iface, VARIANT *p)
285 HTMLElement *This = HTMLELEM2_THIS(iface);
286 FIXME("(%p)->(%p)\n", This, p);
287 return E_NOTIMPL;
290 static HRESULT WINAPI HTMLElement2_put_onbeforepaste(IHTMLElement2 *iface, VARIANT v)
292 HTMLElement *This = HTMLELEM2_THIS(iface);
293 FIXME("(%p)->()\n", This);
294 return E_NOTIMPL;
297 static HRESULT WINAPI HTMLElement2_get_onbeforepaste(IHTMLElement2 *iface, VARIANT *p)
299 HTMLElement *This = HTMLELEM2_THIS(iface);
300 FIXME("(%p)->(%p)\n", This, p);
301 return E_NOTIMPL;
304 static HRESULT WINAPI HTMLElement2_put_onpaste(IHTMLElement2 *iface, VARIANT v)
306 HTMLElement *This = HTMLELEM2_THIS(iface);
307 FIXME("(%p)->()\n", This);
308 return E_NOTIMPL;
311 static HRESULT WINAPI HTMLElement2_get_onpaste(IHTMLElement2 *iface, VARIANT *p)
313 HTMLElement *This = HTMLELEM2_THIS(iface);
314 FIXME("(%p)->(%p)\n", This, p);
315 return E_NOTIMPL;
318 static HRESULT WINAPI HTMLElement2_get_currentStyle(IHTMLElement2 *iface, IHTMLCurrentStyle **p)
320 HTMLElement *This = HTMLELEM2_THIS(iface);
321 FIXME("(%p)->(%p)\n", This, p);
322 return E_NOTIMPL;
325 static HRESULT WINAPI HTMLElement2_put_onpropertychange(IHTMLElement2 *iface, VARIANT v)
327 HTMLElement *This = HTMLELEM2_THIS(iface);
328 FIXME("(%p)->()\n", This);
329 return E_NOTIMPL;
332 static HRESULT WINAPI HTMLElement2_get_onpropertychange(IHTMLElement2 *iface, VARIANT *p)
334 HTMLElement *This = HTMLELEM2_THIS(iface);
335 FIXME("(%p)->(%p)\n", This, p);
336 return E_NOTIMPL;
339 static HRESULT WINAPI HTMLElement2_getClientRects(IHTMLElement2 *iface, IHTMLRectCollection **pRectCol)
341 HTMLElement *This = HTMLELEM2_THIS(iface);
342 FIXME("(%p)->(%p)\n", This, pRectCol);
343 return E_NOTIMPL;
346 static HRESULT WINAPI HTMLElement2_getBoundingClientRect(IHTMLElement2 *iface, IHTMLRect **pRect)
348 HTMLElement *This = HTMLELEM2_THIS(iface);
349 FIXME("(%p)->(%p)\n", This, pRect);
350 return E_NOTIMPL;
353 static HRESULT WINAPI HTMLElement2_setExpression(IHTMLElement2 *iface, BSTR propname,
354 BSTR expression, BSTR language)
356 HTMLElement *This = HTMLELEM2_THIS(iface);
357 FIXME("(%p)->(%s %s %s)\n", This, debugstr_w(propname), debugstr_w(expression),
358 debugstr_w(language));
359 return E_NOTIMPL;
362 static HRESULT WINAPI HTMLElement2_getExpression(IHTMLElement2 *iface, BSTR propname,
363 VARIANT *expression)
365 HTMLElement *This = HTMLELEM2_THIS(iface);
366 FIXME("(%p)->(%s %p)\n", This, debugstr_w(propname), expression);
367 return E_NOTIMPL;
370 static HRESULT WINAPI HTMLElement2_removeExpression(IHTMLElement2 *iface, BSTR propname,
371 VARIANT_BOOL *pfSuccess)
373 HTMLElement *This = HTMLELEM2_THIS(iface);
374 FIXME("(%p)->(%s %p)\n", This, debugstr_w(propname), pfSuccess);
375 return E_NOTIMPL;
378 static HRESULT WINAPI HTMLElement2_put_tabIndex(IHTMLElement2 *iface, short v)
380 HTMLElement *This = HTMLELEM2_THIS(iface);
381 nsIDOMNSHTMLElement *nselem;
382 nsresult nsres;
384 TRACE("(%p)->(%d)\n", This, v);
386 nsres = nsIDOMHTMLElement_QueryInterface(This->nselem, &IID_nsIDOMNSHTMLElement, (void**)&nselem);
387 if(NS_FAILED(nsres)) {
388 ERR("Could not get nsIDOMHTMLNSElement: %08x\n", nsres);
389 return S_OK;
392 nsres = nsIDOMNSHTMLElement_SetTabIndex(nselem, v);
393 nsIDOMNSHTMLElement_Release(nselem);
394 if(NS_FAILED(nsres))
395 ERR("GetTabIndex failed: %08x\n", nsres);
397 return S_OK;
400 static HRESULT WINAPI HTMLElement2_get_tabIndex(IHTMLElement2 *iface, short *p)
402 HTMLElement *This = HTMLELEM2_THIS(iface);
403 nsIDOMNSHTMLElement *nselem;
404 PRInt32 index = 0;
405 nsresult nsres;
407 TRACE("(%p)->(%p)\n", This, p);
409 nsres = nsIDOMHTMLElement_QueryInterface(This->nselem, &IID_nsIDOMNSHTMLElement, (void**)&nselem);
410 if(NS_FAILED(nsres)) {
411 ERR("Could not get nsIDOMHTMLNSElement: %08x\n", nsres);
412 return E_FAIL;
415 nsres = nsIDOMNSHTMLElement_GetTabIndex(nselem, &index);
416 nsIDOMNSHTMLElement_Release(nselem);
417 if(NS_FAILED(nsres)) {
418 ERR("GetTabIndex failed: %08x\n", nsres);
419 return E_FAIL;
422 *p = index;
423 return S_OK;
426 static HRESULT WINAPI HTMLElement2_focus(IHTMLElement2 *iface)
428 HTMLElement *This = HTMLELEM2_THIS(iface);
429 nsIDOMNSHTMLElement *nselem;
430 nsresult nsres;
432 TRACE("(%p)\n", This);
434 nsres = nsIDOMHTMLElement_QueryInterface(This->nselem, &IID_nsIDOMNSHTMLElement, (void**)&nselem);
435 if(NS_SUCCEEDED(nsres)) {
436 nsIDOMNSHTMLElement_focus(nselem);
437 nsIDOMNSHTMLElement_Release(nselem);
438 }else {
439 ERR("Could not get nsIDOMHTMLNSElement: %08x\n", nsres);
442 return S_OK;
445 static HRESULT WINAPI HTMLElement2_put_accessKey(IHTMLElement2 *iface, BSTR v)
447 HTMLElement *This = HTMLELEM2_THIS(iface);
448 VARIANT var;
450 static WCHAR accessKeyW[] = {'a','c','c','e','s','s','K','e','y',0};
452 TRACE("(%p)->(%s)\n", This, debugstr_w(v));
454 V_VT(&var) = VT_BSTR;
455 V_BSTR(&var) = v;
456 return IHTMLElement_setAttribute(HTMLELEM(This), accessKeyW, var, 0);
459 static HRESULT WINAPI HTMLElement2_get_accessKey(IHTMLElement2 *iface, BSTR *p)
461 HTMLElement *This = HTMLELEM2_THIS(iface);
462 FIXME("(%p)->(%p)\n", This, p);
463 return E_NOTIMPL;
466 static HRESULT WINAPI HTMLElement2_put_onblur(IHTMLElement2 *iface, VARIANT v)
468 HTMLElement *This = HTMLELEM2_THIS(iface);
469 FIXME("(%p)->()\n", This);
470 return E_NOTIMPL;
473 static HRESULT WINAPI HTMLElement2_get_onblur(IHTMLElement2 *iface, VARIANT *p)
475 HTMLElement *This = HTMLELEM2_THIS(iface);
476 FIXME("(%p)->(%p)\n", This, p);
477 return E_NOTIMPL;
480 static HRESULT WINAPI HTMLElement2_put_onfocus(IHTMLElement2 *iface, VARIANT v)
482 HTMLElement *This = HTMLELEM2_THIS(iface);
483 FIXME("(%p)->()\n", This);
484 return E_NOTIMPL;
487 static HRESULT WINAPI HTMLElement2_get_onfocus(IHTMLElement2 *iface, VARIANT *p)
489 HTMLElement *This = HTMLELEM2_THIS(iface);
490 FIXME("(%p)->(%p)\n", This, p);
491 return E_NOTIMPL;
494 static HRESULT WINAPI HTMLElement2_put_onresize(IHTMLElement2 *iface, VARIANT v)
496 HTMLElement *This = HTMLELEM2_THIS(iface);
497 FIXME("(%p)->()\n", This);
498 return E_NOTIMPL;
501 static HRESULT WINAPI HTMLElement2_get_onresize(IHTMLElement2 *iface, VARIANT *p)
503 HTMLElement *This = HTMLELEM2_THIS(iface);
504 FIXME("(%p)->(%p)\n", This, p);
505 return E_NOTIMPL;
508 static HRESULT WINAPI HTMLElement2_blur(IHTMLElement2 *iface)
510 HTMLElement *This = HTMLELEM2_THIS(iface);
511 FIXME("(%p)\n", This);
512 return E_NOTIMPL;
515 static HRESULT WINAPI HTMLElement2_addFilter(IHTMLElement2 *iface, IUnknown *pUnk)
517 HTMLElement *This = HTMLELEM2_THIS(iface);
518 FIXME("(%p)->(%p)\n", This, pUnk);
519 return E_NOTIMPL;
522 static HRESULT WINAPI HTMLElement2_removeFilter(IHTMLElement2 *iface, IUnknown *pUnk)
524 HTMLElement *This = HTMLELEM2_THIS(iface);
525 FIXME("(%p)->(%p)\n", This, pUnk);
526 return E_NOTIMPL;
529 static HRESULT WINAPI HTMLElement2_get_clientHeight(IHTMLElement2 *iface, long *p)
531 HTMLElement *This = HTMLELEM2_THIS(iface);
532 nsIDOMNSHTMLElement *nselem;
533 PRInt32 height=0;
534 nsresult nsres;
536 TRACE("(%p)->(%p)\n", This, p);
538 nsres = nsIDOMHTMLElement_QueryInterface(This->nselem, &IID_nsIDOMNSHTMLElement, (void**)&nselem);
539 if(NS_SUCCEEDED(nsres)) {
540 nsIDOMNSHTMLElement_GetClientHeight(nselem, &height);
541 nsIDOMNSHTMLElement_Release(nselem);
542 }else {
543 ERR("Could not get nsIDOMHTMLNSElement: %08x\n", nsres);
546 *p = height;
547 return S_OK;
550 static HRESULT WINAPI HTMLElement2_get_clientWidth(IHTMLElement2 *iface, long *p)
552 HTMLElement *This = HTMLELEM2_THIS(iface);
553 nsIDOMNSHTMLElement *nselem;
554 PRInt32 width=0;
555 nsresult nsres;
557 TRACE("(%p)->(%p)\n", This, p);
559 nsres = nsIDOMHTMLElement_QueryInterface(This->nselem, &IID_nsIDOMNSHTMLElement, (void**)&nselem);
560 if(NS_SUCCEEDED(nsres)) {
561 nsIDOMNSHTMLElement_GetClientWidth(nselem, &width);
562 nsIDOMNSHTMLElement_Release(nselem);
563 }else {
564 ERR("Could not get nsIDOMHTMLNSElement: %08x\n", nsres);
567 *p = width;
568 return S_OK;
571 static HRESULT WINAPI HTMLElement2_get_clientTop(IHTMLElement2 *iface, long *p)
573 HTMLElement *This = HTMLELEM2_THIS(iface);
574 FIXME("(%p)->(%p)\n", This, p);
575 return E_NOTIMPL;
578 static HRESULT WINAPI HTMLElement2_get_clientLeft(IHTMLElement2 *iface, long *p)
580 HTMLElement *This = HTMLELEM2_THIS(iface);
581 FIXME("(%p)->(%p)\n", This, p);
582 return E_NOTIMPL;
585 static HRESULT WINAPI HTMLElement2_attachEvent(IHTMLElement2 *iface, BSTR event,
586 IDispatch *pDisp, VARIANT_BOOL *pfResult)
588 HTMLElement *This = HTMLELEM2_THIS(iface);
589 FIXME("(%p)->(%s %p %p)\n", This, debugstr_w(event), pDisp, pfResult);
590 return E_NOTIMPL;
593 static HRESULT WINAPI HTMLElement2_detachEvent(IHTMLElement2 *iface, BSTR event, IDispatch *pDisp)
595 HTMLElement *This = HTMLELEM2_THIS(iface);
596 FIXME("(%p)->(%s %p)\n", This, debugstr_w(event), pDisp);
597 return E_NOTIMPL;
600 static HRESULT WINAPI HTMLElement2_get_readyState(IHTMLElement2 *iface, VARIANT *p)
602 HTMLElement *This = HTMLELEM2_THIS(iface);
603 FIXME("(%p)->(%p)\n", This, p);
604 return E_NOTIMPL;
607 static HRESULT WINAPI HTMLElement2_put_onreadystatechange(IHTMLElement2 *iface, VARIANT v)
609 HTMLElement *This = HTMLELEM2_THIS(iface);
610 FIXME("(%p)->()\n", This);
611 return E_NOTIMPL;
614 static HRESULT WINAPI HTMLElement2_get_onreadystatechange(IHTMLElement2 *iface, VARIANT *p)
616 HTMLElement *This = HTMLELEM2_THIS(iface);
617 FIXME("(%p)->(%p)\n", This, p);
618 return E_NOTIMPL;
621 static HRESULT WINAPI HTMLElement2_put_onrowsdelete(IHTMLElement2 *iface, VARIANT v)
623 HTMLElement *This = HTMLELEM2_THIS(iface);
624 FIXME("(%p)->()\n", This);
625 return E_NOTIMPL;
628 static HRESULT WINAPI HTMLElement2_get_onrowsdelete(IHTMLElement2 *iface, VARIANT *p)
630 HTMLElement *This = HTMLELEM2_THIS(iface);
631 FIXME("(%p)->(%p)\n", This, p);
632 return E_NOTIMPL;
635 static HRESULT WINAPI HTMLElement2_put_onrowsinserted(IHTMLElement2 *iface, VARIANT v)
637 HTMLElement *This = HTMLELEM2_THIS(iface);
638 FIXME("(%p)->()\n", This);
639 return E_NOTIMPL;
642 static HRESULT WINAPI HTMLElement2_get_onrowsinserted(IHTMLElement2 *iface, VARIANT *p)
644 HTMLElement *This = HTMLELEM2_THIS(iface);
645 FIXME("(%p)->(%p)\n", This, p);
646 return E_NOTIMPL;
649 static HRESULT WINAPI HTMLElement2_put_oncellchange(IHTMLElement2 *iface, VARIANT v)
651 HTMLElement *This = HTMLELEM2_THIS(iface);
652 FIXME("(%p)->()\n", This);
653 return E_NOTIMPL;
656 static HRESULT WINAPI HTMLElement2_get_oncellchange(IHTMLElement2 *iface, VARIANT *p)
658 HTMLElement *This = HTMLELEM2_THIS(iface);
659 FIXME("(%p)->(%p)\n", This, p);
660 return E_NOTIMPL;
663 static HRESULT WINAPI HTMLElement2_put_dir(IHTMLElement2 *iface, BSTR v)
665 HTMLElement *This = HTMLELEM2_THIS(iface);
666 FIXME("(%p)->(%s)\n", This, debugstr_w(v));
667 return E_NOTIMPL;
670 static HRESULT WINAPI HTMLElement2_get_dir(IHTMLElement2 *iface, BSTR *p)
672 HTMLElement *This = HTMLELEM2_THIS(iface);
674 TRACE("(%p)->(%p)\n", This, p);
676 *p = NULL;
678 if(This->nselem) {
679 nsAString dir_str;
680 nsresult nsres;
682 nsAString_Init(&dir_str, NULL);
684 nsres = nsIDOMHTMLElement_GetDir(This->nselem, &dir_str);
685 if(NS_SUCCEEDED(nsres)) {
686 const PRUnichar *dir;
687 nsAString_GetData(&dir_str, &dir);
688 if(*dir)
689 *p = SysAllocString(dir);
690 }else {
691 ERR("GetDir failed: %08x\n", nsres);
694 nsAString_Finish(&dir_str);
697 TRACE("ret %s\n", debugstr_w(*p));
698 return S_OK;
701 static HRESULT WINAPI HTMLElement2_createControlRange(IHTMLElement2 *iface, IDispatch **range)
703 HTMLElement *This = HTMLELEM2_THIS(iface);
704 FIXME("(%p)->(%p)\n", This, range);
705 return E_NOTIMPL;
708 static HRESULT WINAPI HTMLElement2_get_scrollHeight(IHTMLElement2 *iface, long *p)
710 HTMLElement *This = HTMLELEM2_THIS(iface);
711 nsIDOMNSHTMLElement *nselem;
712 PRInt32 height = 0;
713 nsresult nsres;
715 TRACE("(%p)->(%p)\n", This, p);
717 nsres = nsIDOMElement_QueryInterface(This->nselem, &IID_nsIDOMNSHTMLElement, (void**)&nselem);
718 if(NS_SUCCEEDED(nsres)) {
719 nsres = nsIDOMNSHTMLElement_GetScrollHeight(nselem, &height);
720 nsIDOMNSHTMLElement_Release(nselem);
721 if(NS_FAILED(nsres))
722 ERR("GetScrollHeight failed: %08x\n", nsres);
723 }else {
724 ERR("Could not get nsIDOMNSHTMLElement interface: %08x\n", nsres);
727 *p = height;
728 TRACE("*p = %ld\n", *p);
730 return S_OK;
733 static HRESULT WINAPI HTMLElement2_get_scrollWidth(IHTMLElement2 *iface, long *p)
735 HTMLElement *This = HTMLELEM2_THIS(iface);
736 nsIDOMNSHTMLElement *nselem;
737 PRInt32 width = 0;
738 nsresult nsres;
740 TRACE("(%p)->(%p)\n", This, p);
742 nsres = nsIDOMElement_QueryInterface(This->nselem, &IID_nsIDOMNSHTMLElement, (void**)&nselem);
743 if(NS_SUCCEEDED(nsres)) {
744 nsres = nsIDOMNSHTMLElement_GetScrollWidth(nselem, &width);
745 nsIDOMNSHTMLElement_Release(nselem);
746 if(NS_FAILED(nsres))
747 ERR("GetScrollWidth failed: %08x\n", nsres);
748 }else {
749 ERR("Could not get nsIDOMNSHTMLElement interface: %08x\n", nsres);
752 *p = width;
753 TRACE("*p = %ld\n", *p);
755 return S_OK;
758 static HRESULT WINAPI HTMLElement2_put_scrollTop(IHTMLElement2 *iface, long v)
760 HTMLElement *This = HTMLELEM2_THIS(iface);
761 nsIDOMNSHTMLElement *nselem;
762 nsresult nsres;
764 TRACE("(%p)->(%ld)\n", This, v);
766 if(!This->nselem) {
767 FIXME("NULL nselem\n");
768 return E_NOTIMPL;
771 nsres = nsIDOMHTMLElement_QueryInterface(This->nselem, &IID_nsIDOMNSHTMLElement, (void**)&nselem);
772 if(NS_SUCCEEDED(nsres)) {
773 nsIDOMNSHTMLElement_SetScrollTop(nselem, v);
774 nsIDOMNSHTMLElement_Release(nselem);
775 }else {
776 ERR("Could not get nsIDOMNSHTMLElement interface: %08x\n", nsres);
779 return S_OK;
782 static HRESULT WINAPI HTMLElement2_get_scrollTop(IHTMLElement2 *iface, long *p)
784 HTMLElement *This = HTMLELEM2_THIS(iface);
785 nsIDOMNSHTMLElement *nselem;
786 PRInt32 top = 0;
787 nsresult nsres;
789 TRACE("(%p)->(%p)\n", This, p);
791 nsres = nsIDOMElement_QueryInterface(This->nselem, &IID_nsIDOMNSHTMLElement, (void**)&nselem);
792 if(NS_SUCCEEDED(nsres)) {
793 nsres = nsIDOMNSHTMLElement_GetScrollTop(nselem, &top);
794 nsIDOMNSHTMLElement_Release(nselem);
795 if(NS_FAILED(nsres))
796 ERR("GetScrollTop failed: %08x\n", nsres);
797 }else {
798 ERR("Could not get nsIDOMNSHTMLElement interface: %08x\n", nsres);
801 *p = top;
802 TRACE("*p = %ld\n", *p);
804 return S_OK;
807 static HRESULT WINAPI HTMLElement2_put_scrollLeft(IHTMLElement2 *iface, long v)
809 HTMLElement *This = HTMLELEM2_THIS(iface);
810 nsIDOMNSHTMLElement *nselem;
811 nsresult nsres;
813 TRACE("(%p)->(%ld)\n", This, v);
815 if(!This->nselem) {
816 FIXME("NULL nselem\n");
817 return E_NOTIMPL;
820 nsres = nsIDOMHTMLElement_QueryInterface(This->nselem, &IID_nsIDOMNSHTMLElement, (void**)&nselem);
821 if(NS_SUCCEEDED(nsres)) {
822 nsIDOMNSHTMLElement_SetScrollLeft(nselem, v);
823 nsIDOMNSHTMLElement_Release(nselem);
824 }else {
825 ERR("Could not get nsIDOMNSHTMLElement interface: %08x\n", nsres);
828 return S_OK;
831 static HRESULT WINAPI HTMLElement2_get_scrollLeft(IHTMLElement2 *iface, long *p)
833 HTMLElement *This = HTMLELEM2_THIS(iface);
834 FIXME("(%p)->(%p)\n", This, p);
835 return E_NOTIMPL;
838 static HRESULT WINAPI HTMLElement2_clearAttributes(IHTMLElement2 *iface)
840 HTMLElement *This = HTMLELEM2_THIS(iface);
841 FIXME("(%p)\n", This);
842 return E_NOTIMPL;
845 static HRESULT WINAPI HTMLElement2_mergeAttributes(IHTMLElement2 *iface, IHTMLElement *mergeThis)
847 HTMLElement *This = HTMLELEM2_THIS(iface);
848 FIXME("(%p)->(%p)\n", This, mergeThis);
849 return E_NOTIMPL;
852 static HRESULT WINAPI HTMLElement2_put_oncontextmenu(IHTMLElement2 *iface, VARIANT v)
854 HTMLElement *This = HTMLELEM2_THIS(iface);
855 FIXME("(%p)->()\n", This);
856 return E_NOTIMPL;
859 static HRESULT WINAPI HTMLElement2_get_oncontextmenu(IHTMLElement2 *iface, VARIANT *p)
861 HTMLElement *This = HTMLELEM2_THIS(iface);
862 FIXME("(%p)->(%p)\n", This, p);
863 return E_NOTIMPL;
866 static HRESULT WINAPI HTMLElement2_insertAdjecentElement(IHTMLElement2 *iface, BSTR where,
867 IHTMLElement *insertedElement, IHTMLElement **inserted)
869 HTMLElement *This = HTMLELEM2_THIS(iface);
870 FIXME("(%p)->(%s %p %p)\n", This, debugstr_w(where), insertedElement, inserted);
871 return E_NOTIMPL;
874 static HRESULT WINAPI HTMLElement2_applyElement(IHTMLElement2 *iface, IHTMLElement *apply,
875 BSTR where, IHTMLElement **applied)
877 HTMLElement *This = HTMLELEM2_THIS(iface);
878 FIXME("(%p)->(%p %s %p)\n", This, apply, debugstr_w(where), applied);
879 return E_NOTIMPL;
882 static HRESULT WINAPI HTMLElement2_getAdjecentText(IHTMLElement2 *iface, BSTR where, BSTR *text)
884 HTMLElement *This = HTMLELEM2_THIS(iface);
885 FIXME("(%p)->(%s %p)\n", This, debugstr_w(where), text);
886 return E_NOTIMPL;
889 static HRESULT WINAPI HTMLElement2_replaceAdjecentText(IHTMLElement2 *iface, BSTR where,
890 BSTR newText, BSTR *oldText)
892 HTMLElement *This = HTMLELEM2_THIS(iface);
893 FIXME("(%p)->(%s %s %p)\n", This, debugstr_w(where), debugstr_w(newText), oldText);
894 return E_NOTIMPL;
897 static HRESULT WINAPI HTMLElement2_get_canHandleChildren(IHTMLElement2 *iface, VARIANT_BOOL *p)
899 HTMLElement *This = HTMLELEM2_THIS(iface);
900 FIXME("(%p)->(%p)\n", This, p);
901 return E_NOTIMPL;
904 static HRESULT WINAPI HTMLElement2_addBehavior(IHTMLElement2 *iface, BSTR bstrUrl,
905 VARIANT *pvarFactory, long *pCookie)
907 HTMLElement *This = HTMLELEM2_THIS(iface);
908 FIXME("(%p)->(%s %p %p)\n", This, debugstr_w(bstrUrl), pvarFactory, pCookie);
909 return E_NOTIMPL;
912 static HRESULT WINAPI HTMLElement2_removeBehavior(IHTMLElement2 *iface, long cookie,
913 VARIANT_BOOL *pfResult)
915 HTMLElement *This = HTMLELEM2_THIS(iface);
916 FIXME("(%p)->(%ld %p)\n", This, cookie, pfResult);
917 return E_NOTIMPL;
920 static HRESULT WINAPI HTMLElement2_get_runtimeStyle(IHTMLElement2 *iface, IHTMLStyle **p)
922 HTMLElement *This = HTMLELEM2_THIS(iface);
923 FIXME("(%p)->(%p)\n", This, p);
924 return E_NOTIMPL;
927 static HRESULT WINAPI HTMLElement2_get_behaviorUrns(IHTMLElement2 *iface, IDispatch **p)
929 HTMLElement *This = HTMLELEM2_THIS(iface);
930 FIXME("(%p)->(%p)\n", This, p);
931 return E_NOTIMPL;
934 static HRESULT WINAPI HTMLElement2_put_tagUrn(IHTMLElement2 *iface, BSTR v)
936 HTMLElement *This = HTMLELEM2_THIS(iface);
937 FIXME("(%p)->(%s)\n", This, debugstr_w(v));
938 return E_NOTIMPL;
941 static HRESULT WINAPI HTMLElement2_get_tagUrn(IHTMLElement2 *iface, BSTR *p)
943 HTMLElement *This = HTMLELEM2_THIS(iface);
944 FIXME("(%p)->(%p)\n", This, p);
945 return E_NOTIMPL;
948 static HRESULT WINAPI HTMLElement2_put_onbeforeeditfocus(IHTMLElement2 *iface, VARIANT vv)
950 HTMLElement *This = HTMLELEM2_THIS(iface);
951 FIXME("(%p)->()\n", This);
952 return E_NOTIMPL;
955 static HRESULT WINAPI HTMLElement2_get_onbeforeeditfocus(IHTMLElement2 *iface, VARIANT *p)
957 HTMLElement *This = HTMLELEM2_THIS(iface);
958 FIXME("(%p)->(%p)\n", This, p);
959 return E_NOTIMPL;
962 static HRESULT WINAPI HTMLElement2_get_readyStateValue(IHTMLElement2 *iface, long *p)
964 HTMLElement *This = HTMLELEM2_THIS(iface);
965 FIXME("(%p)->(%p)\n", This, p);
966 return E_NOTIMPL;
969 static HRESULT WINAPI HTMLElement2_getElementsByTagName(IHTMLElement2 *iface, BSTR v,
970 IHTMLElementCollection **pelColl)
972 HTMLElement *This = HTMLELEM2_THIS(iface);
973 nsIDOMNodeList *nslist;
974 nsAString tag_str;
975 nsresult nsres;
977 TRACE("(%p)->(%s %p)\n", This, debugstr_w(v), pelColl);
979 nsAString_Init(&tag_str, v);
980 nsres = nsIDOMHTMLElement_GetElementsByTagName(This->nselem, &tag_str, &nslist);
981 nsAString_Finish(&tag_str);
982 if(NS_FAILED(nsres)) {
983 ERR("GetElementByTagName failed: %08x\n", nsres);
984 return E_FAIL;
987 *pelColl = create_collection_from_nodelist(This->node.doc, (IUnknown*)HTMLELEM(This), nslist);
988 nsIDOMNodeList_Release(nslist);
989 return S_OK;
992 #undef HTMLELEM2_THIS
994 static const IHTMLElement2Vtbl HTMLElement2Vtbl = {
995 HTMLElement2_QueryInterface,
996 HTMLElement2_AddRef,
997 HTMLElement2_Release,
998 HTMLElement2_GetTypeInfoCount,
999 HTMLElement2_GetTypeInfo,
1000 HTMLElement2_GetIDsOfNames,
1001 HTMLElement2_Invoke,
1002 HTMLElement2_get_scopeName,
1003 HTMLElement2_setCapture,
1004 HTMLElement2_releaseCapture,
1005 HTMLElement2_put_onlosecapture,
1006 HTMLElement2_get_onlosecapture,
1007 HTMLElement2_componentFromPoint,
1008 HTMLElement2_doScroll,
1009 HTMLElement2_put_onscroll,
1010 HTMLElement2_get_onscroll,
1011 HTMLElement2_put_ondrag,
1012 HTMLElement2_get_ondrag,
1013 HTMLElement2_put_ondragend,
1014 HTMLElement2_get_ondragend,
1015 HTMLElement2_put_ondragenter,
1016 HTMLElement2_get_ondragenter,
1017 HTMLElement2_put_ondragover,
1018 HTMLElement2_get_ondragover,
1019 HTMLElement2_put_ondragleave,
1020 HTMLElement2_get_ondragleave,
1021 HTMLElement2_put_ondrop,
1022 HTMLElement2_get_ondrop,
1023 HTMLElement2_put_onbeforecut,
1024 HTMLElement2_get_onbeforecut,
1025 HTMLElement2_put_oncut,
1026 HTMLElement2_get_oncut,
1027 HTMLElement2_put_onbeforecopy,
1028 HTMLElement2_get_onbeforecopy,
1029 HTMLElement2_put_oncopy,
1030 HTMLElement2_get_oncopy,
1031 HTMLElement2_put_onbeforepaste,
1032 HTMLElement2_get_onbeforepaste,
1033 HTMLElement2_put_onpaste,
1034 HTMLElement2_get_onpaste,
1035 HTMLElement2_get_currentStyle,
1036 HTMLElement2_put_onpropertychange,
1037 HTMLElement2_get_onpropertychange,
1038 HTMLElement2_getClientRects,
1039 HTMLElement2_getBoundingClientRect,
1040 HTMLElement2_setExpression,
1041 HTMLElement2_getExpression,
1042 HTMLElement2_removeExpression,
1043 HTMLElement2_put_tabIndex,
1044 HTMLElement2_get_tabIndex,
1045 HTMLElement2_focus,
1046 HTMLElement2_put_accessKey,
1047 HTMLElement2_get_accessKey,
1048 HTMLElement2_put_onblur,
1049 HTMLElement2_get_onblur,
1050 HTMLElement2_put_onfocus,
1051 HTMLElement2_get_onfocus,
1052 HTMLElement2_put_onresize,
1053 HTMLElement2_get_onresize,
1054 HTMLElement2_blur,
1055 HTMLElement2_addFilter,
1056 HTMLElement2_removeFilter,
1057 HTMLElement2_get_clientHeight,
1058 HTMLElement2_get_clientWidth,
1059 HTMLElement2_get_clientTop,
1060 HTMLElement2_get_clientLeft,
1061 HTMLElement2_attachEvent,
1062 HTMLElement2_detachEvent,
1063 HTMLElement2_get_readyState,
1064 HTMLElement2_put_onreadystatechange,
1065 HTMLElement2_get_onreadystatechange,
1066 HTMLElement2_put_onrowsdelete,
1067 HTMLElement2_get_onrowsdelete,
1068 HTMLElement2_put_onrowsinserted,
1069 HTMLElement2_get_onrowsinserted,
1070 HTMLElement2_put_oncellchange,
1071 HTMLElement2_get_oncellchange,
1072 HTMLElement2_put_dir,
1073 HTMLElement2_get_dir,
1074 HTMLElement2_createControlRange,
1075 HTMLElement2_get_scrollHeight,
1076 HTMLElement2_get_scrollWidth,
1077 HTMLElement2_put_scrollTop,
1078 HTMLElement2_get_scrollTop,
1079 HTMLElement2_put_scrollLeft,
1080 HTMLElement2_get_scrollLeft,
1081 HTMLElement2_clearAttributes,
1082 HTMLElement2_mergeAttributes,
1083 HTMLElement2_put_oncontextmenu,
1084 HTMLElement2_get_oncontextmenu,
1085 HTMLElement2_insertAdjecentElement,
1086 HTMLElement2_applyElement,
1087 HTMLElement2_getAdjecentText,
1088 HTMLElement2_replaceAdjecentText,
1089 HTMLElement2_get_canHandleChildren,
1090 HTMLElement2_addBehavior,
1091 HTMLElement2_removeBehavior,
1092 HTMLElement2_get_runtimeStyle,
1093 HTMLElement2_get_behaviorUrns,
1094 HTMLElement2_put_tagUrn,
1095 HTMLElement2_get_tagUrn,
1096 HTMLElement2_put_onbeforeeditfocus,
1097 HTMLElement2_get_onbeforeeditfocus,
1098 HTMLElement2_get_readyStateValue,
1099 HTMLElement2_getElementsByTagName,
1102 void HTMLElement2_Init(HTMLElement *This)
1104 This->lpHTMLElement2Vtbl = &HTMLElement2Vtbl;