mshtml: Added IHTMLElement2::get_clientWidth implementation.
[wine/multimedia.git] / dlls / mshtml / htmlelem2.c
blobd68d0f4ec8db976e1fbf63f4a1ffc3ef1a12d8eb
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 FIXME("(%p)->(%p)\n", This, pctinfo);
60 return E_NOTIMPL;
63 static HRESULT WINAPI HTMLElement2_GetTypeInfo(IHTMLElement2 *iface, UINT iTInfo,
64 LCID lcid, ITypeInfo **ppTInfo)
66 HTMLElement *This = HTMLELEM2_THIS(iface);
67 FIXME("(%p)->(%u %u %p)\n", This, iTInfo, lcid, ppTInfo);
68 return E_NOTIMPL;
71 static HRESULT WINAPI HTMLElement2_GetIDsOfNames(IHTMLElement2 *iface, REFIID riid,
72 LPOLESTR *rgszNames, UINT cNames,
73 LCID lcid, DISPID *rgDispId)
75 HTMLElement *This = HTMLELEM2_THIS(iface);
76 FIXME("(%p)->(%s %p %u %u %p)\n", This, debugstr_guid(riid), rgszNames, cNames,
77 lcid, rgDispId);
78 return E_NOTIMPL;
81 static HRESULT WINAPI HTMLElement2_Invoke(IHTMLElement2 *iface, DISPID dispIdMember,
82 REFIID riid, LCID lcid, WORD wFlags, DISPPARAMS *pDispParams,
83 VARIANT *pVarResult, EXCEPINFO *pExcepInfo, UINT *puArgErr)
85 HTMLElement *This = HTMLELEM2_THIS(iface);
86 FIXME("(%p)->(%d %s %d %d %p %p %p %p)\n", This, dispIdMember, debugstr_guid(riid),
87 lcid, wFlags, pDispParams, pVarResult, pExcepInfo, puArgErr);
88 return E_NOTIMPL;
91 static HRESULT WINAPI HTMLElement2_get_scopeName(IHTMLElement2 *iface, BSTR *p)
93 HTMLElement *This = HTMLELEM2_THIS(iface);
94 FIXME("(%p)->(%p)\n", This, p);
95 return E_NOTIMPL;
98 static HRESULT WINAPI HTMLElement2_setCapture(IHTMLElement2 *iface, VARIANT_BOOL containerCapture)
100 HTMLElement *This = HTMLELEM2_THIS(iface);
101 FIXME("(%p)->(%x)\n", This, containerCapture);
102 return E_NOTIMPL;
105 static HRESULT WINAPI HTMLElement2_releaseCapture(IHTMLElement2 *iface)
107 HTMLElement *This = HTMLELEM2_THIS(iface);
108 FIXME("(%p)\n", This);
109 return E_NOTIMPL;
112 static HRESULT WINAPI HTMLElement2_put_onlosecapture(IHTMLElement2 *iface, VARIANT v)
114 HTMLElement *This = HTMLELEM2_THIS(iface);
115 FIXME("(%p)->()\n", This);
116 return E_NOTIMPL;
119 static HRESULT WINAPI HTMLElement2_get_onlosecapture(IHTMLElement2 *iface, VARIANT *p)
121 HTMLElement *This = HTMLELEM2_THIS(iface);
122 FIXME("(%p)->(%p)\n", This, p);
123 return E_NOTIMPL;
126 static HRESULT WINAPI HTMLElement2_componentFromPoint(IHTMLElement2 *iface,
127 long x, long y, BSTR *component)
129 HTMLElement *This = HTMLELEM2_THIS(iface);
130 FIXME("(%p)->(%ld %ld %p)\n", This, x, y, component);
131 return E_NOTIMPL;
134 static HRESULT WINAPI HTMLElement2_doScroll(IHTMLElement2 *iface, VARIANT component)
136 HTMLElement *This = HTMLELEM2_THIS(iface);
137 FIXME("(%p)->()\n", This);
138 return E_NOTIMPL;
141 static HRESULT WINAPI HTMLElement2_put_onscroll(IHTMLElement2 *iface, VARIANT v)
143 HTMLElement *This = HTMLELEM2_THIS(iface);
144 FIXME("(%p)->()\n", This);
145 return E_NOTIMPL;
148 static HRESULT WINAPI HTMLElement2_get_onscroll(IHTMLElement2 *iface, VARIANT *p)
150 HTMLElement *This = HTMLELEM2_THIS(iface);
151 FIXME("(%p)->(%p)\n", This, p);
152 return E_NOTIMPL;
155 static HRESULT WINAPI HTMLElement2_put_ondrag(IHTMLElement2 *iface, VARIANT v)
157 HTMLElement *This = HTMLELEM2_THIS(iface);
158 FIXME("(%p)->()\n", This);
159 return E_NOTIMPL;
162 static HRESULT WINAPI HTMLElement2_get_ondrag(IHTMLElement2 *iface, VARIANT *p)
164 HTMLElement *This = HTMLELEM2_THIS(iface);
165 FIXME("(%p)->(%p)\n", This, p);
166 return E_NOTIMPL;
169 static HRESULT WINAPI HTMLElement2_put_ondragend(IHTMLElement2 *iface, VARIANT v)
171 HTMLElement *This = HTMLELEM2_THIS(iface);
172 FIXME("(%p)->()\n", This);
173 return E_NOTIMPL;
176 static HRESULT WINAPI HTMLElement2_get_ondragend(IHTMLElement2 *iface, VARIANT *p)
178 HTMLElement *This = HTMLELEM2_THIS(iface);
179 FIXME("(%p)->(%p)\n", This, p);
180 return E_NOTIMPL;
183 static HRESULT WINAPI HTMLElement2_put_ondragenter(IHTMLElement2 *iface, VARIANT v)
185 HTMLElement *This = HTMLELEM2_THIS(iface);
186 FIXME("(%p)->()\n", This);
187 return E_NOTIMPL;
190 static HRESULT WINAPI HTMLElement2_get_ondragenter(IHTMLElement2 *iface, VARIANT *p)
192 HTMLElement *This = HTMLELEM2_THIS(iface);
193 FIXME("(%p)->(%p)\n", This, p);
194 return E_NOTIMPL;
197 static HRESULT WINAPI HTMLElement2_put_ondragover(IHTMLElement2 *iface, VARIANT v)
199 HTMLElement *This = HTMLELEM2_THIS(iface);
200 FIXME("(%p)->()\n", This);
201 return E_NOTIMPL;
204 static HRESULT WINAPI HTMLElement2_get_ondragover(IHTMLElement2 *iface, VARIANT *p)
206 HTMLElement *This = HTMLELEM2_THIS(iface);
207 FIXME("(%p)->(%p)\n", This, p);
208 return E_NOTIMPL;
211 static HRESULT WINAPI HTMLElement2_put_ondragleave(IHTMLElement2 *iface, VARIANT v)
213 HTMLElement *This = HTMLELEM2_THIS(iface);
214 FIXME("(%p)->()\n", This);
215 return E_NOTIMPL;
218 static HRESULT WINAPI HTMLElement2_get_ondragleave(IHTMLElement2 *iface, VARIANT *p)
220 HTMLElement *This = HTMLELEM2_THIS(iface);
221 FIXME("(%p)->(%p)\n", This, p);
222 return E_NOTIMPL;
225 static HRESULT WINAPI HTMLElement2_put_ondrop(IHTMLElement2 *iface, VARIANT v)
227 HTMLElement *This = HTMLELEM2_THIS(iface);
228 FIXME("(%p)->()\n", This);
229 return E_NOTIMPL;
232 static HRESULT WINAPI HTMLElement2_get_ondrop(IHTMLElement2 *iface, VARIANT *p)
234 HTMLElement *This = HTMLELEM2_THIS(iface);
235 FIXME("(%p)->(%p)\n", This, p);
236 return E_NOTIMPL;
239 static HRESULT WINAPI HTMLElement2_put_onbeforecut(IHTMLElement2 *iface, VARIANT v)
241 HTMLElement *This = HTMLELEM2_THIS(iface);
242 FIXME("(%p)->()\n", This);
243 return E_NOTIMPL;
246 static HRESULT WINAPI HTMLElement2_get_onbeforecut(IHTMLElement2 *iface, VARIANT *p)
248 HTMLElement *This = HTMLELEM2_THIS(iface);
249 FIXME("(%p)->(%p)\n", This, p);
250 return E_NOTIMPL;
253 static HRESULT WINAPI HTMLElement2_put_oncut(IHTMLElement2 *iface, VARIANT v)
255 HTMLElement *This = HTMLELEM2_THIS(iface);
256 FIXME("(%p)->()\n", This);
257 return E_NOTIMPL;
260 static HRESULT WINAPI HTMLElement2_get_oncut(IHTMLElement2 *iface, VARIANT *p)
262 HTMLElement *This = HTMLELEM2_THIS(iface);
263 FIXME("(%p)->(%p)\n", This, p);
264 return E_NOTIMPL;
267 static HRESULT WINAPI HTMLElement2_put_onbeforecopy(IHTMLElement2 *iface, VARIANT v)
269 HTMLElement *This = HTMLELEM2_THIS(iface);
270 FIXME("(%p)->()\n", This);
271 return E_NOTIMPL;
274 static HRESULT WINAPI HTMLElement2_get_onbeforecopy(IHTMLElement2 *iface, VARIANT *p)
276 HTMLElement *This = HTMLELEM2_THIS(iface);
277 FIXME("(%p)->(%p)\n", This, p);
278 return E_NOTIMPL;
281 static HRESULT WINAPI HTMLElement2_put_oncopy(IHTMLElement2 *iface, VARIANT v)
283 HTMLElement *This = HTMLELEM2_THIS(iface);
284 FIXME("(%p)->()\n", This);
285 return E_NOTIMPL;
288 static HRESULT WINAPI HTMLElement2_get_oncopy(IHTMLElement2 *iface, VARIANT *p)
290 HTMLElement *This = HTMLELEM2_THIS(iface);
291 FIXME("(%p)->(%p)\n", This, p);
292 return E_NOTIMPL;
295 static HRESULT WINAPI HTMLElement2_put_onbeforepaste(IHTMLElement2 *iface, VARIANT v)
297 HTMLElement *This = HTMLELEM2_THIS(iface);
298 FIXME("(%p)->()\n", This);
299 return E_NOTIMPL;
302 static HRESULT WINAPI HTMLElement2_get_onbeforepaste(IHTMLElement2 *iface, VARIANT *p)
304 HTMLElement *This = HTMLELEM2_THIS(iface);
305 FIXME("(%p)->(%p)\n", This, p);
306 return E_NOTIMPL;
309 static HRESULT WINAPI HTMLElement2_put_onpaste(IHTMLElement2 *iface, VARIANT v)
311 HTMLElement *This = HTMLELEM2_THIS(iface);
312 FIXME("(%p)->()\n", This);
313 return E_NOTIMPL;
316 static HRESULT WINAPI HTMLElement2_get_onpaste(IHTMLElement2 *iface, VARIANT *p)
318 HTMLElement *This = HTMLELEM2_THIS(iface);
319 FIXME("(%p)->(%p)\n", This, p);
320 return E_NOTIMPL;
323 static HRESULT WINAPI HTMLElement2_get_currentStyle(IHTMLElement2 *iface, IHTMLCurrentStyle **p)
325 HTMLElement *This = HTMLELEM2_THIS(iface);
326 FIXME("(%p)->(%p)\n", This, p);
327 return E_NOTIMPL;
330 static HRESULT WINAPI HTMLElement2_put_onpropertychange(IHTMLElement2 *iface, VARIANT v)
332 HTMLElement *This = HTMLELEM2_THIS(iface);
333 FIXME("(%p)->()\n", This);
334 return E_NOTIMPL;
337 static HRESULT WINAPI HTMLElement2_get_onpropertychange(IHTMLElement2 *iface, VARIANT *p)
339 HTMLElement *This = HTMLELEM2_THIS(iface);
340 FIXME("(%p)->(%p)\n", This, p);
341 return E_NOTIMPL;
344 static HRESULT WINAPI HTMLElement2_getClientRects(IHTMLElement2 *iface, IHTMLRectCollection **pRectCol)
346 HTMLElement *This = HTMLELEM2_THIS(iface);
347 FIXME("(%p)->(%p)\n", This, pRectCol);
348 return E_NOTIMPL;
351 static HRESULT WINAPI HTMLElement2_getBoundingClientRect(IHTMLElement2 *iface, IHTMLRect **pRect)
353 HTMLElement *This = HTMLELEM2_THIS(iface);
354 FIXME("(%p)->(%p)\n", This, pRect);
355 return E_NOTIMPL;
358 static HRESULT WINAPI HTMLElement2_setExpression(IHTMLElement2 *iface, BSTR propname,
359 BSTR expression, BSTR language)
361 HTMLElement *This = HTMLELEM2_THIS(iface);
362 FIXME("(%p)->(%s %s %s)\n", This, debugstr_w(propname), debugstr_w(expression),
363 debugstr_w(language));
364 return E_NOTIMPL;
367 static HRESULT WINAPI HTMLElement2_getExpression(IHTMLElement2 *iface, BSTR propname,
368 VARIANT *expression)
370 HTMLElement *This = HTMLELEM2_THIS(iface);
371 FIXME("(%p)->(%s %p)\n", This, debugstr_w(propname), expression);
372 return E_NOTIMPL;
375 static HRESULT WINAPI HTMLElement2_removeExpression(IHTMLElement2 *iface, BSTR propname,
376 VARIANT_BOOL *pfSuccess)
378 HTMLElement *This = HTMLELEM2_THIS(iface);
379 FIXME("(%p)->(%s %p)\n", This, debugstr_w(propname), pfSuccess);
380 return E_NOTIMPL;
383 static HRESULT WINAPI HTMLElement2_put_tabIndex(IHTMLElement2 *iface, short v)
385 HTMLElement *This = HTMLELEM2_THIS(iface);
386 FIXME("(%p)->(%d)\n", This, v);
387 return E_NOTIMPL;
390 static HRESULT WINAPI HTMLElement2_get_tabIndex(IHTMLElement2 *iface, short *p)
392 HTMLElement *This = HTMLELEM2_THIS(iface);
393 FIXME("(%p)->(%p)\n", This, p);
394 return E_NOTIMPL;
397 static HRESULT WINAPI HTMLElement2_focus(IHTMLElement2 *iface)
399 HTMLElement *This = HTMLELEM2_THIS(iface);
400 nsIDOMNSHTMLElement *nselem;
401 nsresult nsres;
403 TRACE("(%p)\n", This);
405 nsres = nsIDOMHTMLElement_QueryInterface(This->nselem, &IID_nsIDOMNSHTMLElement, (void**)&nselem);
406 if(NS_SUCCEEDED(nsres)) {
407 nsIDOMNSHTMLElement_focus(nselem);
408 nsIDOMNSHTMLElement_Release(nselem);
409 }else {
410 ERR("Could not get nsIDOMHTMLNSElement: %08x\n", nsres);
413 return S_OK;
416 static HRESULT WINAPI HTMLElement2_put_accessKey(IHTMLElement2 *iface, BSTR v)
418 HTMLElement *This = HTMLELEM2_THIS(iface);
419 VARIANT var;
421 static WCHAR accessKeyW[] = {'a','c','c','e','s','s','K','e','y',0};
423 TRACE("(%p)->(%s)\n", This, debugstr_w(v));
425 V_VT(&var) = VT_BSTR;
426 V_BSTR(&var) = v;
427 return IHTMLElement_setAttribute(HTMLELEM(This), accessKeyW, var, 0);
430 static HRESULT WINAPI HTMLElement2_get_accessKey(IHTMLElement2 *iface, BSTR *p)
432 HTMLElement *This = HTMLELEM2_THIS(iface);
433 FIXME("(%p)->(%p)\n", This, p);
434 return E_NOTIMPL;
437 static HRESULT WINAPI HTMLElement2_put_onblur(IHTMLElement2 *iface, VARIANT v)
439 HTMLElement *This = HTMLELEM2_THIS(iface);
440 FIXME("(%p)->()\n", This);
441 return E_NOTIMPL;
444 static HRESULT WINAPI HTMLElement2_get_onblur(IHTMLElement2 *iface, VARIANT *p)
446 HTMLElement *This = HTMLELEM2_THIS(iface);
447 FIXME("(%p)->(%p)\n", This, p);
448 return E_NOTIMPL;
451 static HRESULT WINAPI HTMLElement2_put_onfocus(IHTMLElement2 *iface, VARIANT v)
453 HTMLElement *This = HTMLELEM2_THIS(iface);
454 FIXME("(%p)->()\n", This);
455 return E_NOTIMPL;
458 static HRESULT WINAPI HTMLElement2_get_onfocus(IHTMLElement2 *iface, VARIANT *p)
460 HTMLElement *This = HTMLELEM2_THIS(iface);
461 FIXME("(%p)->(%p)\n", This, p);
462 return E_NOTIMPL;
465 static HRESULT WINAPI HTMLElement2_put_onresize(IHTMLElement2 *iface, VARIANT v)
467 HTMLElement *This = HTMLELEM2_THIS(iface);
468 FIXME("(%p)->()\n", This);
469 return E_NOTIMPL;
472 static HRESULT WINAPI HTMLElement2_get_onresize(IHTMLElement2 *iface, VARIANT *p)
474 HTMLElement *This = HTMLELEM2_THIS(iface);
475 FIXME("(%p)->(%p)\n", This, p);
476 return E_NOTIMPL;
479 static HRESULT WINAPI HTMLElement2_blur(IHTMLElement2 *iface)
481 HTMLElement *This = HTMLELEM2_THIS(iface);
482 FIXME("(%p)\n", This);
483 return E_NOTIMPL;
486 static HRESULT WINAPI HTMLElement2_addFilter(IHTMLElement2 *iface, IUnknown *pUnk)
488 HTMLElement *This = HTMLELEM2_THIS(iface);
489 FIXME("(%p)->(%p)\n", This, pUnk);
490 return E_NOTIMPL;
493 static HRESULT WINAPI HTMLElement2_removeFilter(IHTMLElement2 *iface, IUnknown *pUnk)
495 HTMLElement *This = HTMLELEM2_THIS(iface);
496 FIXME("(%p)->(%p)\n", This, pUnk);
497 return E_NOTIMPL;
500 static HRESULT WINAPI HTMLElement2_get_clientHeight(IHTMLElement2 *iface, long *p)
502 HTMLElement *This = HTMLELEM2_THIS(iface);
503 FIXME("(%p)->(%p)\n", This, p);
504 return E_NOTIMPL;
507 static HRESULT WINAPI HTMLElement2_get_clientWidth(IHTMLElement2 *iface, long *p)
509 HTMLElement *This = HTMLELEM2_THIS(iface);
510 nsIDOMNSHTMLElement *nselem;
511 PRInt32 width=0;
512 nsresult nsres;
514 TRACE("(%p)->(%p)\n", This, p);
516 nsres = nsIDOMHTMLElement_QueryInterface(This->nselem, &IID_nsIDOMNSHTMLElement, (void**)&nselem);
517 if(NS_SUCCEEDED(nsres)) {
518 nsIDOMNSHTMLElement_GetClientWidth(nselem, &width);
519 nsIDOMNSHTMLElement_Release(nselem);
520 }else {
521 ERR("Could not get nsIDOMHTMLNSElement: %08x\n", nsres);
524 *p = width;
525 return S_OK;
528 static HRESULT WINAPI HTMLElement2_get_clientTop(IHTMLElement2 *iface, long *p)
530 HTMLElement *This = HTMLELEM2_THIS(iface);
531 FIXME("(%p)->(%p)\n", This, p);
532 return E_NOTIMPL;
535 static HRESULT WINAPI HTMLElement2_get_clientLeft(IHTMLElement2 *iface, long *p)
537 HTMLElement *This = HTMLELEM2_THIS(iface);
538 FIXME("(%p)->(%p)\n", This, p);
539 return E_NOTIMPL;
542 static HRESULT WINAPI HTMLElement2_attachEvent(IHTMLElement2 *iface, BSTR event,
543 IDispatch *pDisp, VARIANT_BOOL *pfResult)
545 HTMLElement *This = HTMLELEM2_THIS(iface);
546 FIXME("(%p)->(%s %p %p)\n", This, debugstr_w(event), pDisp, pfResult);
547 return E_NOTIMPL;
550 static HRESULT WINAPI HTMLElement2_detachEvent(IHTMLElement2 *iface, BSTR event, IDispatch *pDisp)
552 HTMLElement *This = HTMLELEM2_THIS(iface);
553 FIXME("(%p)->(%s %p)\n", This, debugstr_w(event), pDisp);
554 return E_NOTIMPL;
557 static HRESULT WINAPI HTMLElement2_get_readyState(IHTMLElement2 *iface, VARIANT *p)
559 HTMLElement *This = HTMLELEM2_THIS(iface);
560 FIXME("(%p)->(%p)\n", This, p);
561 return E_NOTIMPL;
564 static HRESULT WINAPI HTMLElement2_put_onreadystatechange(IHTMLElement2 *iface, VARIANT v)
566 HTMLElement *This = HTMLELEM2_THIS(iface);
567 FIXME("(%p)->()\n", This);
568 return E_NOTIMPL;
571 static HRESULT WINAPI HTMLElement2_get_onreadystatechange(IHTMLElement2 *iface, VARIANT *p)
573 HTMLElement *This = HTMLELEM2_THIS(iface);
574 FIXME("(%p)->(%p)\n", This, p);
575 return E_NOTIMPL;
578 static HRESULT WINAPI HTMLElement2_put_onrowsdelete(IHTMLElement2 *iface, VARIANT v)
580 HTMLElement *This = HTMLELEM2_THIS(iface);
581 FIXME("(%p)->()\n", This);
582 return E_NOTIMPL;
585 static HRESULT WINAPI HTMLElement2_get_onrowsdelete(IHTMLElement2 *iface, VARIANT *p)
587 HTMLElement *This = HTMLELEM2_THIS(iface);
588 FIXME("(%p)->(%p)\n", This, p);
589 return E_NOTIMPL;
592 static HRESULT WINAPI HTMLElement2_put_onrowsinserted(IHTMLElement2 *iface, VARIANT v)
594 HTMLElement *This = HTMLELEM2_THIS(iface);
595 FIXME("(%p)->()\n", This);
596 return E_NOTIMPL;
599 static HRESULT WINAPI HTMLElement2_get_onrowsinserted(IHTMLElement2 *iface, VARIANT *p)
601 HTMLElement *This = HTMLELEM2_THIS(iface);
602 FIXME("(%p)->(%p)\n", This, p);
603 return E_NOTIMPL;
606 static HRESULT WINAPI HTMLElement2_put_oncellchange(IHTMLElement2 *iface, VARIANT v)
608 HTMLElement *This = HTMLELEM2_THIS(iface);
609 FIXME("(%p)->()\n", This);
610 return E_NOTIMPL;
613 static HRESULT WINAPI HTMLElement2_get_oncellchange(IHTMLElement2 *iface, VARIANT *p)
615 HTMLElement *This = HTMLELEM2_THIS(iface);
616 FIXME("(%p)->(%p)\n", This, p);
617 return E_NOTIMPL;
620 static HRESULT WINAPI HTMLElement2_put_dir(IHTMLElement2 *iface, BSTR v)
622 HTMLElement *This = HTMLELEM2_THIS(iface);
623 FIXME("(%p)->(%s)\n", This, debugstr_w(v));
624 return E_NOTIMPL;
627 static HRESULT WINAPI HTMLElement2_get_dir(IHTMLElement2 *iface, BSTR *p)
629 HTMLElement *This = HTMLELEM2_THIS(iface);
631 TRACE("(%p)->(%p)\n", This, p);
633 *p = NULL;
635 if(This->nselem) {
636 nsAString dir_str;
637 nsresult nsres;
639 nsAString_Init(&dir_str, NULL);
641 nsres = nsIDOMHTMLElement_GetDir(This->nselem, &dir_str);
642 if(NS_SUCCEEDED(nsres)) {
643 const PRUnichar *dir;
644 nsAString_GetData(&dir_str, &dir);
645 if(*dir)
646 *p = SysAllocString(dir);
647 }else {
648 ERR("GetDir failed: %08x\n", nsres);
651 nsAString_Finish(&dir_str);
654 TRACE("ret %s\n", debugstr_w(*p));
655 return S_OK;
658 static HRESULT WINAPI HTMLElement2_createControlRange(IHTMLElement2 *iface, IDispatch **range)
660 HTMLElement *This = HTMLELEM2_THIS(iface);
661 FIXME("(%p)->(%p)\n", This, range);
662 return E_NOTIMPL;
665 static HRESULT WINAPI HTMLElement2_get_scrollHeight(IHTMLElement2 *iface, long *p)
667 HTMLElement *This = HTMLELEM2_THIS(iface);
668 FIXME("(%p)->(%p)\n", This, p);
669 return E_NOTIMPL;
672 static HRESULT WINAPI HTMLElement2_get_scrollWidth(IHTMLElement2 *iface, long *p)
674 HTMLElement *This = HTMLELEM2_THIS(iface);
675 FIXME("(%p)->(%p)\n", This, p);
676 return E_NOTIMPL;
679 static HRESULT WINAPI HTMLElement2_put_scrollTop(IHTMLElement2 *iface, long v)
681 HTMLElement *This = HTMLELEM2_THIS(iface);
682 nsIDOMNSHTMLElement *nselem;
683 nsresult nsres;
685 TRACE("(%p)->(%ld)\n", This, v);
687 if(!This->nselem) {
688 FIXME("NULL nselem\n");
689 return E_NOTIMPL;
692 nsres = nsIDOMHTMLElement_QueryInterface(This->nselem, &IID_nsIDOMNSHTMLElement, (void**)&nselem);
693 if(NS_SUCCEEDED(nsres)) {
694 nsIDOMNSHTMLElement_SetScrollTop(nselem, v);
695 nsIDOMNSHTMLElement_Release(nselem);
696 }else {
697 ERR("Could not get nsIDOMNSHTMLElement interface: %08x\n", nsres);
700 return S_OK;
703 static HRESULT WINAPI HTMLElement2_get_scrollTop(IHTMLElement2 *iface, long *p)
705 HTMLElement *This = HTMLELEM2_THIS(iface);
706 FIXME("(%p)->(%p)\n", This, p);
707 return E_NOTIMPL;
710 static HRESULT WINAPI HTMLElement2_put_scrollLeft(IHTMLElement2 *iface, long v)
712 HTMLElement *This = HTMLELEM2_THIS(iface);
713 nsIDOMNSHTMLElement *nselem;
714 nsresult nsres;
716 TRACE("(%p)->(%ld)\n", This, v);
718 if(!This->nselem) {
719 FIXME("NULL nselem\n");
720 return E_NOTIMPL;
723 nsres = nsIDOMHTMLElement_QueryInterface(This->nselem, &IID_nsIDOMNSHTMLElement, (void**)&nselem);
724 if(NS_SUCCEEDED(nsres)) {
725 nsIDOMNSHTMLElement_SetScrollLeft(nselem, v);
726 nsIDOMNSHTMLElement_Release(nselem);
727 }else {
728 ERR("Could not get nsIDOMNSHTMLElement interface: %08x\n", nsres);
731 return S_OK;
734 static HRESULT WINAPI HTMLElement2_get_scrollLeft(IHTMLElement2 *iface, long *p)
736 HTMLElement *This = HTMLELEM2_THIS(iface);
737 FIXME("(%p)->(%p)\n", This, p);
738 return E_NOTIMPL;
741 static HRESULT WINAPI HTMLElement2_clearAttributes(IHTMLElement2 *iface)
743 HTMLElement *This = HTMLELEM2_THIS(iface);
744 FIXME("(%p)\n", This);
745 return E_NOTIMPL;
748 static HRESULT WINAPI HTMLElement2_mergeAttributes(IHTMLElement2 *iface, IHTMLElement *mergeThis)
750 HTMLElement *This = HTMLELEM2_THIS(iface);
751 FIXME("(%p)->(%p)\n", This, mergeThis);
752 return E_NOTIMPL;
755 static HRESULT WINAPI HTMLElement2_put_oncontextmenu(IHTMLElement2 *iface, VARIANT v)
757 HTMLElement *This = HTMLELEM2_THIS(iface);
758 FIXME("(%p)->()\n", This);
759 return E_NOTIMPL;
762 static HRESULT WINAPI HTMLElement2_get_oncontextmenu(IHTMLElement2 *iface, VARIANT *p)
764 HTMLElement *This = HTMLELEM2_THIS(iface);
765 FIXME("(%p)->(%p)\n", This, p);
766 return E_NOTIMPL;
769 static HRESULT WINAPI HTMLElement2_insertAdjecentElement(IHTMLElement2 *iface, BSTR where,
770 IHTMLElement *insertedElement, IHTMLElement **inserted)
772 HTMLElement *This = HTMLELEM2_THIS(iface);
773 FIXME("(%p)->(%s %p %p)\n", This, debugstr_w(where), insertedElement, inserted);
774 return E_NOTIMPL;
777 static HRESULT WINAPI HTMLElement2_applyElement(IHTMLElement2 *iface, IHTMLElement *apply,
778 BSTR where, IHTMLElement **applied)
780 HTMLElement *This = HTMLELEM2_THIS(iface);
781 FIXME("(%p)->(%p %s %p)\n", This, apply, debugstr_w(where), applied);
782 return E_NOTIMPL;
785 static HRESULT WINAPI HTMLElement2_getAdjecentText(IHTMLElement2 *iface, BSTR where, BSTR *text)
787 HTMLElement *This = HTMLELEM2_THIS(iface);
788 FIXME("(%p)->(%s %p)\n", This, debugstr_w(where), text);
789 return E_NOTIMPL;
792 static HRESULT WINAPI HTMLElement2_replaceAdjecentText(IHTMLElement2 *iface, BSTR where,
793 BSTR newText, BSTR *oldText)
795 HTMLElement *This = HTMLELEM2_THIS(iface);
796 FIXME("(%p)->(%s %s %p)\n", This, debugstr_w(where), debugstr_w(newText), oldText);
797 return E_NOTIMPL;
800 static HRESULT WINAPI HTMLElement2_get_canHandleChildren(IHTMLElement2 *iface, VARIANT_BOOL *p)
802 HTMLElement *This = HTMLELEM2_THIS(iface);
803 FIXME("(%p)->(%p)\n", This, p);
804 return E_NOTIMPL;
807 static HRESULT WINAPI HTMLElement2_addBehavior(IHTMLElement2 *iface, BSTR bstrUrl,
808 VARIANT *pvarFactory, long *pCookie)
810 HTMLElement *This = HTMLELEM2_THIS(iface);
811 FIXME("(%p)->(%s %p %p)\n", This, debugstr_w(bstrUrl), pvarFactory, pCookie);
812 return E_NOTIMPL;
815 static HRESULT WINAPI HTMLElement2_removeBehavior(IHTMLElement2 *iface, long cookie,
816 VARIANT_BOOL *pfResult)
818 HTMLElement *This = HTMLELEM2_THIS(iface);
819 FIXME("(%p)->(%ld %p)\n", This, cookie, pfResult);
820 return E_NOTIMPL;
823 static HRESULT WINAPI HTMLElement2_get_runtimeStyle(IHTMLElement2 *iface, IHTMLStyle **p)
825 HTMLElement *This = HTMLELEM2_THIS(iface);
826 FIXME("(%p)->(%p)\n", This, p);
827 return E_NOTIMPL;
830 static HRESULT WINAPI HTMLElement2_get_behaviorUrns(IHTMLElement2 *iface, IDispatch **p)
832 HTMLElement *This = HTMLELEM2_THIS(iface);
833 FIXME("(%p)->(%p)\n", This, p);
834 return E_NOTIMPL;
837 static HRESULT WINAPI HTMLElement2_put_tagUrn(IHTMLElement2 *iface, BSTR v)
839 HTMLElement *This = HTMLELEM2_THIS(iface);
840 FIXME("(%p)->(%s)\n", This, debugstr_w(v));
841 return E_NOTIMPL;
844 static HRESULT WINAPI HTMLElement2_get_tagUrn(IHTMLElement2 *iface, BSTR *p)
846 HTMLElement *This = HTMLELEM2_THIS(iface);
847 FIXME("(%p)->(%p)\n", This, p);
848 return E_NOTIMPL;
851 static HRESULT WINAPI HTMLElement2_put_onbeforeeditfocus(IHTMLElement2 *iface, VARIANT vv)
853 HTMLElement *This = HTMLELEM2_THIS(iface);
854 FIXME("(%p)->()\n", This);
855 return E_NOTIMPL;
858 static HRESULT WINAPI HTMLElement2_get_onbeforeeditfocus(IHTMLElement2 *iface, VARIANT *p)
860 HTMLElement *This = HTMLELEM2_THIS(iface);
861 FIXME("(%p)->(%p)\n", This, p);
862 return E_NOTIMPL;
865 static HRESULT WINAPI HTMLElement2_get_readyStateValue(IHTMLElement2 *iface, long *p)
867 HTMLElement *This = HTMLELEM2_THIS(iface);
868 FIXME("(%p)->(%p)\n", This, p);
869 return E_NOTIMPL;
872 static HRESULT WINAPI HTMLElement2_getElementByTagName(IHTMLElement2 *iface, BSTR v,
873 IHTMLElementCollection **pelColl)
875 HTMLElement *This = HTMLELEM2_THIS(iface);
876 FIXME("(%p)->(%s %p)\n", This, debugstr_w(v), pelColl);
877 return E_NOTIMPL;
880 #undef HTMLELEM2_THIS
882 static const IHTMLElement2Vtbl HTMLElement2Vtbl = {
883 HTMLElement2_QueryInterface,
884 HTMLElement2_AddRef,
885 HTMLElement2_Release,
886 HTMLElement2_GetTypeInfoCount,
887 HTMLElement2_GetTypeInfo,
888 HTMLElement2_GetIDsOfNames,
889 HTMLElement2_Invoke,
890 HTMLElement2_get_scopeName,
891 HTMLElement2_setCapture,
892 HTMLElement2_releaseCapture,
893 HTMLElement2_put_onlosecapture,
894 HTMLElement2_get_onlosecapture,
895 HTMLElement2_componentFromPoint,
896 HTMLElement2_doScroll,
897 HTMLElement2_put_onscroll,
898 HTMLElement2_get_onscroll,
899 HTMLElement2_put_ondrag,
900 HTMLElement2_get_ondrag,
901 HTMLElement2_put_ondragend,
902 HTMLElement2_get_ondragend,
903 HTMLElement2_put_ondragenter,
904 HTMLElement2_get_ondragenter,
905 HTMLElement2_put_ondragover,
906 HTMLElement2_get_ondragover,
907 HTMLElement2_put_ondragleave,
908 HTMLElement2_get_ondragleave,
909 HTMLElement2_put_ondrop,
910 HTMLElement2_get_ondrop,
911 HTMLElement2_put_onbeforecut,
912 HTMLElement2_get_onbeforecut,
913 HTMLElement2_put_oncut,
914 HTMLElement2_get_oncut,
915 HTMLElement2_put_onbeforecopy,
916 HTMLElement2_get_onbeforecopy,
917 HTMLElement2_put_oncopy,
918 HTMLElement2_get_oncopy,
919 HTMLElement2_put_onbeforepaste,
920 HTMLElement2_get_onbeforepaste,
921 HTMLElement2_put_onpaste,
922 HTMLElement2_get_onpaste,
923 HTMLElement2_get_currentStyle,
924 HTMLElement2_put_onpropertychange,
925 HTMLElement2_get_onpropertychange,
926 HTMLElement2_getClientRects,
927 HTMLElement2_getBoundingClientRect,
928 HTMLElement2_setExpression,
929 HTMLElement2_getExpression,
930 HTMLElement2_removeExpression,
931 HTMLElement2_put_tabIndex,
932 HTMLElement2_get_tabIndex,
933 HTMLElement2_focus,
934 HTMLElement2_put_accessKey,
935 HTMLElement2_get_accessKey,
936 HTMLElement2_put_onblur,
937 HTMLElement2_get_onblur,
938 HTMLElement2_put_onfocus,
939 HTMLElement2_get_onfocus,
940 HTMLElement2_put_onresize,
941 HTMLElement2_get_onresize,
942 HTMLElement2_blur,
943 HTMLElement2_addFilter,
944 HTMLElement2_removeFilter,
945 HTMLElement2_get_clientHeight,
946 HTMLElement2_get_clientWidth,
947 HTMLElement2_get_clientTop,
948 HTMLElement2_get_clientLeft,
949 HTMLElement2_attachEvent,
950 HTMLElement2_detachEvent,
951 HTMLElement2_get_readyState,
952 HTMLElement2_put_onreadystatechange,
953 HTMLElement2_get_onreadystatechange,
954 HTMLElement2_put_onrowsdelete,
955 HTMLElement2_get_onrowsdelete,
956 HTMLElement2_put_onrowsinserted,
957 HTMLElement2_get_onrowsinserted,
958 HTMLElement2_put_oncellchange,
959 HTMLElement2_get_oncellchange,
960 HTMLElement2_put_dir,
961 HTMLElement2_get_dir,
962 HTMLElement2_createControlRange,
963 HTMLElement2_get_scrollHeight,
964 HTMLElement2_get_scrollWidth,
965 HTMLElement2_put_scrollTop,
966 HTMLElement2_get_scrollTop,
967 HTMLElement2_put_scrollLeft,
968 HTMLElement2_get_scrollLeft,
969 HTMLElement2_clearAttributes,
970 HTMLElement2_mergeAttributes,
971 HTMLElement2_put_oncontextmenu,
972 HTMLElement2_get_oncontextmenu,
973 HTMLElement2_insertAdjecentElement,
974 HTMLElement2_applyElement,
975 HTMLElement2_getAdjecentText,
976 HTMLElement2_replaceAdjecentText,
977 HTMLElement2_get_canHandleChildren,
978 HTMLElement2_addBehavior,
979 HTMLElement2_removeBehavior,
980 HTMLElement2_get_runtimeStyle,
981 HTMLElement2_get_behaviorUrns,
982 HTMLElement2_put_tagUrn,
983 HTMLElement2_get_tagUrn,
984 HTMLElement2_put_onbeforeeditfocus,
985 HTMLElement2_get_onbeforeeditfocus,
986 HTMLElement2_get_readyStateValue,
987 HTMLElement2_getElementByTagName,
990 void HTMLElement2_Init(HTMLElement *This)
992 This->lpHTMLElement2Vtbl = &HTMLElement2Vtbl;