richedit: Fixed bug preventing bold from being set with EM_SETCHARFORMAT.
[wine/multimedia.git] / dlls / mshtml / htmlelem2.c
blobd12c60c9b6b9bc8c14ecff89affbf69e53b6d3b2
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 nsIDOMNSHTMLElement *nselem;
387 nsresult nsres;
389 TRACE("(%p)->(%d)\n", This, v);
391 nsres = nsIDOMHTMLElement_QueryInterface(This->nselem, &IID_nsIDOMNSHTMLElement, (void**)&nselem);
392 if(NS_FAILED(nsres)) {
393 ERR("Could not get nsIDOMHTMLNSElement: %08x\n", nsres);
394 return S_OK;
397 nsres = nsIDOMNSHTMLElement_SetTabIndex(nselem, v);
398 nsIDOMNSHTMLElement_Release(nselem);
399 if(NS_FAILED(nsres))
400 ERR("GetTabIndex failed: %08x\n", nsres);
402 return S_OK;
405 static HRESULT WINAPI HTMLElement2_get_tabIndex(IHTMLElement2 *iface, short *p)
407 HTMLElement *This = HTMLELEM2_THIS(iface);
408 nsIDOMNSHTMLElement *nselem;
409 PRInt32 index = 0;
410 nsresult nsres;
412 TRACE("(%p)->(%p)\n", This, p);
414 nsres = nsIDOMHTMLElement_QueryInterface(This->nselem, &IID_nsIDOMNSHTMLElement, (void**)&nselem);
415 if(NS_FAILED(nsres)) {
416 ERR("Could not get nsIDOMHTMLNSElement: %08x\n", nsres);
417 return E_FAIL;
420 nsres = nsIDOMNSHTMLElement_GetTabIndex(nselem, &index);
421 nsIDOMNSHTMLElement_Release(nselem);
422 if(NS_FAILED(nsres)) {
423 ERR("GetTabIndex failed: %08x\n", nsres);
424 return E_FAIL;
427 *p = index;
428 return S_OK;
431 static HRESULT WINAPI HTMLElement2_focus(IHTMLElement2 *iface)
433 HTMLElement *This = HTMLELEM2_THIS(iface);
434 nsIDOMNSHTMLElement *nselem;
435 nsresult nsres;
437 TRACE("(%p)\n", This);
439 nsres = nsIDOMHTMLElement_QueryInterface(This->nselem, &IID_nsIDOMNSHTMLElement, (void**)&nselem);
440 if(NS_SUCCEEDED(nsres)) {
441 nsIDOMNSHTMLElement_focus(nselem);
442 nsIDOMNSHTMLElement_Release(nselem);
443 }else {
444 ERR("Could not get nsIDOMHTMLNSElement: %08x\n", nsres);
447 return S_OK;
450 static HRESULT WINAPI HTMLElement2_put_accessKey(IHTMLElement2 *iface, BSTR v)
452 HTMLElement *This = HTMLELEM2_THIS(iface);
453 VARIANT var;
455 static WCHAR accessKeyW[] = {'a','c','c','e','s','s','K','e','y',0};
457 TRACE("(%p)->(%s)\n", This, debugstr_w(v));
459 V_VT(&var) = VT_BSTR;
460 V_BSTR(&var) = v;
461 return IHTMLElement_setAttribute(HTMLELEM(This), accessKeyW, var, 0);
464 static HRESULT WINAPI HTMLElement2_get_accessKey(IHTMLElement2 *iface, BSTR *p)
466 HTMLElement *This = HTMLELEM2_THIS(iface);
467 FIXME("(%p)->(%p)\n", This, p);
468 return E_NOTIMPL;
471 static HRESULT WINAPI HTMLElement2_put_onblur(IHTMLElement2 *iface, VARIANT v)
473 HTMLElement *This = HTMLELEM2_THIS(iface);
474 FIXME("(%p)->()\n", This);
475 return E_NOTIMPL;
478 static HRESULT WINAPI HTMLElement2_get_onblur(IHTMLElement2 *iface, VARIANT *p)
480 HTMLElement *This = HTMLELEM2_THIS(iface);
481 FIXME("(%p)->(%p)\n", This, p);
482 return E_NOTIMPL;
485 static HRESULT WINAPI HTMLElement2_put_onfocus(IHTMLElement2 *iface, VARIANT v)
487 HTMLElement *This = HTMLELEM2_THIS(iface);
488 FIXME("(%p)->()\n", This);
489 return E_NOTIMPL;
492 static HRESULT WINAPI HTMLElement2_get_onfocus(IHTMLElement2 *iface, VARIANT *p)
494 HTMLElement *This = HTMLELEM2_THIS(iface);
495 FIXME("(%p)->(%p)\n", This, p);
496 return E_NOTIMPL;
499 static HRESULT WINAPI HTMLElement2_put_onresize(IHTMLElement2 *iface, VARIANT v)
501 HTMLElement *This = HTMLELEM2_THIS(iface);
502 FIXME("(%p)->()\n", This);
503 return E_NOTIMPL;
506 static HRESULT WINAPI HTMLElement2_get_onresize(IHTMLElement2 *iface, VARIANT *p)
508 HTMLElement *This = HTMLELEM2_THIS(iface);
509 FIXME("(%p)->(%p)\n", This, p);
510 return E_NOTIMPL;
513 static HRESULT WINAPI HTMLElement2_blur(IHTMLElement2 *iface)
515 HTMLElement *This = HTMLELEM2_THIS(iface);
516 FIXME("(%p)\n", This);
517 return E_NOTIMPL;
520 static HRESULT WINAPI HTMLElement2_addFilter(IHTMLElement2 *iface, IUnknown *pUnk)
522 HTMLElement *This = HTMLELEM2_THIS(iface);
523 FIXME("(%p)->(%p)\n", This, pUnk);
524 return E_NOTIMPL;
527 static HRESULT WINAPI HTMLElement2_removeFilter(IHTMLElement2 *iface, IUnknown *pUnk)
529 HTMLElement *This = HTMLELEM2_THIS(iface);
530 FIXME("(%p)->(%p)\n", This, pUnk);
531 return E_NOTIMPL;
534 static HRESULT WINAPI HTMLElement2_get_clientHeight(IHTMLElement2 *iface, long *p)
536 HTMLElement *This = HTMLELEM2_THIS(iface);
537 nsIDOMNSHTMLElement *nselem;
538 PRInt32 height=0;
539 nsresult nsres;
541 TRACE("(%p)->(%p)\n", This, p);
543 nsres = nsIDOMHTMLElement_QueryInterface(This->nselem, &IID_nsIDOMNSHTMLElement, (void**)&nselem);
544 if(NS_SUCCEEDED(nsres)) {
545 nsIDOMNSHTMLElement_GetClientHeight(nselem, &height);
546 nsIDOMNSHTMLElement_Release(nselem);
547 }else {
548 ERR("Could not get nsIDOMHTMLNSElement: %08x\n", nsres);
551 *p = height;
552 return S_OK;
555 static HRESULT WINAPI HTMLElement2_get_clientWidth(IHTMLElement2 *iface, long *p)
557 HTMLElement *This = HTMLELEM2_THIS(iface);
558 nsIDOMNSHTMLElement *nselem;
559 PRInt32 width=0;
560 nsresult nsres;
562 TRACE("(%p)->(%p)\n", This, p);
564 nsres = nsIDOMHTMLElement_QueryInterface(This->nselem, &IID_nsIDOMNSHTMLElement, (void**)&nselem);
565 if(NS_SUCCEEDED(nsres)) {
566 nsIDOMNSHTMLElement_GetClientWidth(nselem, &width);
567 nsIDOMNSHTMLElement_Release(nselem);
568 }else {
569 ERR("Could not get nsIDOMHTMLNSElement: %08x\n", nsres);
572 *p = width;
573 return S_OK;
576 static HRESULT WINAPI HTMLElement2_get_clientTop(IHTMLElement2 *iface, long *p)
578 HTMLElement *This = HTMLELEM2_THIS(iface);
579 FIXME("(%p)->(%p)\n", This, p);
580 return E_NOTIMPL;
583 static HRESULT WINAPI HTMLElement2_get_clientLeft(IHTMLElement2 *iface, long *p)
585 HTMLElement *This = HTMLELEM2_THIS(iface);
586 FIXME("(%p)->(%p)\n", This, p);
587 return E_NOTIMPL;
590 static HRESULT WINAPI HTMLElement2_attachEvent(IHTMLElement2 *iface, BSTR event,
591 IDispatch *pDisp, VARIANT_BOOL *pfResult)
593 HTMLElement *This = HTMLELEM2_THIS(iface);
594 FIXME("(%p)->(%s %p %p)\n", This, debugstr_w(event), pDisp, pfResult);
595 return E_NOTIMPL;
598 static HRESULT WINAPI HTMLElement2_detachEvent(IHTMLElement2 *iface, BSTR event, IDispatch *pDisp)
600 HTMLElement *This = HTMLELEM2_THIS(iface);
601 FIXME("(%p)->(%s %p)\n", This, debugstr_w(event), pDisp);
602 return E_NOTIMPL;
605 static HRESULT WINAPI HTMLElement2_get_readyState(IHTMLElement2 *iface, VARIANT *p)
607 HTMLElement *This = HTMLELEM2_THIS(iface);
608 FIXME("(%p)->(%p)\n", This, p);
609 return E_NOTIMPL;
612 static HRESULT WINAPI HTMLElement2_put_onreadystatechange(IHTMLElement2 *iface, VARIANT v)
614 HTMLElement *This = HTMLELEM2_THIS(iface);
615 FIXME("(%p)->()\n", This);
616 return E_NOTIMPL;
619 static HRESULT WINAPI HTMLElement2_get_onreadystatechange(IHTMLElement2 *iface, VARIANT *p)
621 HTMLElement *This = HTMLELEM2_THIS(iface);
622 FIXME("(%p)->(%p)\n", This, p);
623 return E_NOTIMPL;
626 static HRESULT WINAPI HTMLElement2_put_onrowsdelete(IHTMLElement2 *iface, VARIANT v)
628 HTMLElement *This = HTMLELEM2_THIS(iface);
629 FIXME("(%p)->()\n", This);
630 return E_NOTIMPL;
633 static HRESULT WINAPI HTMLElement2_get_onrowsdelete(IHTMLElement2 *iface, VARIANT *p)
635 HTMLElement *This = HTMLELEM2_THIS(iface);
636 FIXME("(%p)->(%p)\n", This, p);
637 return E_NOTIMPL;
640 static HRESULT WINAPI HTMLElement2_put_onrowsinserted(IHTMLElement2 *iface, VARIANT v)
642 HTMLElement *This = HTMLELEM2_THIS(iface);
643 FIXME("(%p)->()\n", This);
644 return E_NOTIMPL;
647 static HRESULT WINAPI HTMLElement2_get_onrowsinserted(IHTMLElement2 *iface, VARIANT *p)
649 HTMLElement *This = HTMLELEM2_THIS(iface);
650 FIXME("(%p)->(%p)\n", This, p);
651 return E_NOTIMPL;
654 static HRESULT WINAPI HTMLElement2_put_oncellchange(IHTMLElement2 *iface, VARIANT v)
656 HTMLElement *This = HTMLELEM2_THIS(iface);
657 FIXME("(%p)->()\n", This);
658 return E_NOTIMPL;
661 static HRESULT WINAPI HTMLElement2_get_oncellchange(IHTMLElement2 *iface, VARIANT *p)
663 HTMLElement *This = HTMLELEM2_THIS(iface);
664 FIXME("(%p)->(%p)\n", This, p);
665 return E_NOTIMPL;
668 static HRESULT WINAPI HTMLElement2_put_dir(IHTMLElement2 *iface, BSTR v)
670 HTMLElement *This = HTMLELEM2_THIS(iface);
671 FIXME("(%p)->(%s)\n", This, debugstr_w(v));
672 return E_NOTIMPL;
675 static HRESULT WINAPI HTMLElement2_get_dir(IHTMLElement2 *iface, BSTR *p)
677 HTMLElement *This = HTMLELEM2_THIS(iface);
679 TRACE("(%p)->(%p)\n", This, p);
681 *p = NULL;
683 if(This->nselem) {
684 nsAString dir_str;
685 nsresult nsres;
687 nsAString_Init(&dir_str, NULL);
689 nsres = nsIDOMHTMLElement_GetDir(This->nselem, &dir_str);
690 if(NS_SUCCEEDED(nsres)) {
691 const PRUnichar *dir;
692 nsAString_GetData(&dir_str, &dir);
693 if(*dir)
694 *p = SysAllocString(dir);
695 }else {
696 ERR("GetDir failed: %08x\n", nsres);
699 nsAString_Finish(&dir_str);
702 TRACE("ret %s\n", debugstr_w(*p));
703 return S_OK;
706 static HRESULT WINAPI HTMLElement2_createControlRange(IHTMLElement2 *iface, IDispatch **range)
708 HTMLElement *This = HTMLELEM2_THIS(iface);
709 FIXME("(%p)->(%p)\n", This, range);
710 return E_NOTIMPL;
713 static HRESULT WINAPI HTMLElement2_get_scrollHeight(IHTMLElement2 *iface, long *p)
715 HTMLElement *This = HTMLELEM2_THIS(iface);
716 FIXME("(%p)->(%p)\n", This, p);
717 return E_NOTIMPL;
720 static HRESULT WINAPI HTMLElement2_get_scrollWidth(IHTMLElement2 *iface, long *p)
722 HTMLElement *This = HTMLELEM2_THIS(iface);
723 FIXME("(%p)->(%p)\n", This, p);
724 return E_NOTIMPL;
727 static HRESULT WINAPI HTMLElement2_put_scrollTop(IHTMLElement2 *iface, long v)
729 HTMLElement *This = HTMLELEM2_THIS(iface);
730 nsIDOMNSHTMLElement *nselem;
731 nsresult nsres;
733 TRACE("(%p)->(%ld)\n", This, v);
735 if(!This->nselem) {
736 FIXME("NULL nselem\n");
737 return E_NOTIMPL;
740 nsres = nsIDOMHTMLElement_QueryInterface(This->nselem, &IID_nsIDOMNSHTMLElement, (void**)&nselem);
741 if(NS_SUCCEEDED(nsres)) {
742 nsIDOMNSHTMLElement_SetScrollTop(nselem, v);
743 nsIDOMNSHTMLElement_Release(nselem);
744 }else {
745 ERR("Could not get nsIDOMNSHTMLElement interface: %08x\n", nsres);
748 return S_OK;
751 static HRESULT WINAPI HTMLElement2_get_scrollTop(IHTMLElement2 *iface, long *p)
753 HTMLElement *This = HTMLELEM2_THIS(iface);
754 FIXME("(%p)->(%p)\n", This, p);
755 return E_NOTIMPL;
758 static HRESULT WINAPI HTMLElement2_put_scrollLeft(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_SetScrollLeft(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_scrollLeft(IHTMLElement2 *iface, long *p)
784 HTMLElement *This = HTMLELEM2_THIS(iface);
785 FIXME("(%p)->(%p)\n", This, p);
786 return E_NOTIMPL;
789 static HRESULT WINAPI HTMLElement2_clearAttributes(IHTMLElement2 *iface)
791 HTMLElement *This = HTMLELEM2_THIS(iface);
792 FIXME("(%p)\n", This);
793 return E_NOTIMPL;
796 static HRESULT WINAPI HTMLElement2_mergeAttributes(IHTMLElement2 *iface, IHTMLElement *mergeThis)
798 HTMLElement *This = HTMLELEM2_THIS(iface);
799 FIXME("(%p)->(%p)\n", This, mergeThis);
800 return E_NOTIMPL;
803 static HRESULT WINAPI HTMLElement2_put_oncontextmenu(IHTMLElement2 *iface, VARIANT v)
805 HTMLElement *This = HTMLELEM2_THIS(iface);
806 FIXME("(%p)->()\n", This);
807 return E_NOTIMPL;
810 static HRESULT WINAPI HTMLElement2_get_oncontextmenu(IHTMLElement2 *iface, VARIANT *p)
812 HTMLElement *This = HTMLELEM2_THIS(iface);
813 FIXME("(%p)->(%p)\n", This, p);
814 return E_NOTIMPL;
817 static HRESULT WINAPI HTMLElement2_insertAdjecentElement(IHTMLElement2 *iface, BSTR where,
818 IHTMLElement *insertedElement, IHTMLElement **inserted)
820 HTMLElement *This = HTMLELEM2_THIS(iface);
821 FIXME("(%p)->(%s %p %p)\n", This, debugstr_w(where), insertedElement, inserted);
822 return E_NOTIMPL;
825 static HRESULT WINAPI HTMLElement2_applyElement(IHTMLElement2 *iface, IHTMLElement *apply,
826 BSTR where, IHTMLElement **applied)
828 HTMLElement *This = HTMLELEM2_THIS(iface);
829 FIXME("(%p)->(%p %s %p)\n", This, apply, debugstr_w(where), applied);
830 return E_NOTIMPL;
833 static HRESULT WINAPI HTMLElement2_getAdjecentText(IHTMLElement2 *iface, BSTR where, BSTR *text)
835 HTMLElement *This = HTMLELEM2_THIS(iface);
836 FIXME("(%p)->(%s %p)\n", This, debugstr_w(where), text);
837 return E_NOTIMPL;
840 static HRESULT WINAPI HTMLElement2_replaceAdjecentText(IHTMLElement2 *iface, BSTR where,
841 BSTR newText, BSTR *oldText)
843 HTMLElement *This = HTMLELEM2_THIS(iface);
844 FIXME("(%p)->(%s %s %p)\n", This, debugstr_w(where), debugstr_w(newText), oldText);
845 return E_NOTIMPL;
848 static HRESULT WINAPI HTMLElement2_get_canHandleChildren(IHTMLElement2 *iface, VARIANT_BOOL *p)
850 HTMLElement *This = HTMLELEM2_THIS(iface);
851 FIXME("(%p)->(%p)\n", This, p);
852 return E_NOTIMPL;
855 static HRESULT WINAPI HTMLElement2_addBehavior(IHTMLElement2 *iface, BSTR bstrUrl,
856 VARIANT *pvarFactory, long *pCookie)
858 HTMLElement *This = HTMLELEM2_THIS(iface);
859 FIXME("(%p)->(%s %p %p)\n", This, debugstr_w(bstrUrl), pvarFactory, pCookie);
860 return E_NOTIMPL;
863 static HRESULT WINAPI HTMLElement2_removeBehavior(IHTMLElement2 *iface, long cookie,
864 VARIANT_BOOL *pfResult)
866 HTMLElement *This = HTMLELEM2_THIS(iface);
867 FIXME("(%p)->(%ld %p)\n", This, cookie, pfResult);
868 return E_NOTIMPL;
871 static HRESULT WINAPI HTMLElement2_get_runtimeStyle(IHTMLElement2 *iface, IHTMLStyle **p)
873 HTMLElement *This = HTMLELEM2_THIS(iface);
874 FIXME("(%p)->(%p)\n", This, p);
875 return E_NOTIMPL;
878 static HRESULT WINAPI HTMLElement2_get_behaviorUrns(IHTMLElement2 *iface, IDispatch **p)
880 HTMLElement *This = HTMLELEM2_THIS(iface);
881 FIXME("(%p)->(%p)\n", This, p);
882 return E_NOTIMPL;
885 static HRESULT WINAPI HTMLElement2_put_tagUrn(IHTMLElement2 *iface, BSTR v)
887 HTMLElement *This = HTMLELEM2_THIS(iface);
888 FIXME("(%p)->(%s)\n", This, debugstr_w(v));
889 return E_NOTIMPL;
892 static HRESULT WINAPI HTMLElement2_get_tagUrn(IHTMLElement2 *iface, BSTR *p)
894 HTMLElement *This = HTMLELEM2_THIS(iface);
895 FIXME("(%p)->(%p)\n", This, p);
896 return E_NOTIMPL;
899 static HRESULT WINAPI HTMLElement2_put_onbeforeeditfocus(IHTMLElement2 *iface, VARIANT vv)
901 HTMLElement *This = HTMLELEM2_THIS(iface);
902 FIXME("(%p)->()\n", This);
903 return E_NOTIMPL;
906 static HRESULT WINAPI HTMLElement2_get_onbeforeeditfocus(IHTMLElement2 *iface, VARIANT *p)
908 HTMLElement *This = HTMLELEM2_THIS(iface);
909 FIXME("(%p)->(%p)\n", This, p);
910 return E_NOTIMPL;
913 static HRESULT WINAPI HTMLElement2_get_readyStateValue(IHTMLElement2 *iface, long *p)
915 HTMLElement *This = HTMLELEM2_THIS(iface);
916 FIXME("(%p)->(%p)\n", This, p);
917 return E_NOTIMPL;
920 static HRESULT WINAPI HTMLElement2_getElementByTagName(IHTMLElement2 *iface, BSTR v,
921 IHTMLElementCollection **pelColl)
923 HTMLElement *This = HTMLELEM2_THIS(iface);
924 FIXME("(%p)->(%s %p)\n", This, debugstr_w(v), pelColl);
925 return E_NOTIMPL;
928 #undef HTMLELEM2_THIS
930 static const IHTMLElement2Vtbl HTMLElement2Vtbl = {
931 HTMLElement2_QueryInterface,
932 HTMLElement2_AddRef,
933 HTMLElement2_Release,
934 HTMLElement2_GetTypeInfoCount,
935 HTMLElement2_GetTypeInfo,
936 HTMLElement2_GetIDsOfNames,
937 HTMLElement2_Invoke,
938 HTMLElement2_get_scopeName,
939 HTMLElement2_setCapture,
940 HTMLElement2_releaseCapture,
941 HTMLElement2_put_onlosecapture,
942 HTMLElement2_get_onlosecapture,
943 HTMLElement2_componentFromPoint,
944 HTMLElement2_doScroll,
945 HTMLElement2_put_onscroll,
946 HTMLElement2_get_onscroll,
947 HTMLElement2_put_ondrag,
948 HTMLElement2_get_ondrag,
949 HTMLElement2_put_ondragend,
950 HTMLElement2_get_ondragend,
951 HTMLElement2_put_ondragenter,
952 HTMLElement2_get_ondragenter,
953 HTMLElement2_put_ondragover,
954 HTMLElement2_get_ondragover,
955 HTMLElement2_put_ondragleave,
956 HTMLElement2_get_ondragleave,
957 HTMLElement2_put_ondrop,
958 HTMLElement2_get_ondrop,
959 HTMLElement2_put_onbeforecut,
960 HTMLElement2_get_onbeforecut,
961 HTMLElement2_put_oncut,
962 HTMLElement2_get_oncut,
963 HTMLElement2_put_onbeforecopy,
964 HTMLElement2_get_onbeforecopy,
965 HTMLElement2_put_oncopy,
966 HTMLElement2_get_oncopy,
967 HTMLElement2_put_onbeforepaste,
968 HTMLElement2_get_onbeforepaste,
969 HTMLElement2_put_onpaste,
970 HTMLElement2_get_onpaste,
971 HTMLElement2_get_currentStyle,
972 HTMLElement2_put_onpropertychange,
973 HTMLElement2_get_onpropertychange,
974 HTMLElement2_getClientRects,
975 HTMLElement2_getBoundingClientRect,
976 HTMLElement2_setExpression,
977 HTMLElement2_getExpression,
978 HTMLElement2_removeExpression,
979 HTMLElement2_put_tabIndex,
980 HTMLElement2_get_tabIndex,
981 HTMLElement2_focus,
982 HTMLElement2_put_accessKey,
983 HTMLElement2_get_accessKey,
984 HTMLElement2_put_onblur,
985 HTMLElement2_get_onblur,
986 HTMLElement2_put_onfocus,
987 HTMLElement2_get_onfocus,
988 HTMLElement2_put_onresize,
989 HTMLElement2_get_onresize,
990 HTMLElement2_blur,
991 HTMLElement2_addFilter,
992 HTMLElement2_removeFilter,
993 HTMLElement2_get_clientHeight,
994 HTMLElement2_get_clientWidth,
995 HTMLElement2_get_clientTop,
996 HTMLElement2_get_clientLeft,
997 HTMLElement2_attachEvent,
998 HTMLElement2_detachEvent,
999 HTMLElement2_get_readyState,
1000 HTMLElement2_put_onreadystatechange,
1001 HTMLElement2_get_onreadystatechange,
1002 HTMLElement2_put_onrowsdelete,
1003 HTMLElement2_get_onrowsdelete,
1004 HTMLElement2_put_onrowsinserted,
1005 HTMLElement2_get_onrowsinserted,
1006 HTMLElement2_put_oncellchange,
1007 HTMLElement2_get_oncellchange,
1008 HTMLElement2_put_dir,
1009 HTMLElement2_get_dir,
1010 HTMLElement2_createControlRange,
1011 HTMLElement2_get_scrollHeight,
1012 HTMLElement2_get_scrollWidth,
1013 HTMLElement2_put_scrollTop,
1014 HTMLElement2_get_scrollTop,
1015 HTMLElement2_put_scrollLeft,
1016 HTMLElement2_get_scrollLeft,
1017 HTMLElement2_clearAttributes,
1018 HTMLElement2_mergeAttributes,
1019 HTMLElement2_put_oncontextmenu,
1020 HTMLElement2_get_oncontextmenu,
1021 HTMLElement2_insertAdjecentElement,
1022 HTMLElement2_applyElement,
1023 HTMLElement2_getAdjecentText,
1024 HTMLElement2_replaceAdjecentText,
1025 HTMLElement2_get_canHandleChildren,
1026 HTMLElement2_addBehavior,
1027 HTMLElement2_removeBehavior,
1028 HTMLElement2_get_runtimeStyle,
1029 HTMLElement2_get_behaviorUrns,
1030 HTMLElement2_put_tagUrn,
1031 HTMLElement2_get_tagUrn,
1032 HTMLElement2_put_onbeforeeditfocus,
1033 HTMLElement2_get_onbeforeeditfocus,
1034 HTMLElement2_get_readyStateValue,
1035 HTMLElement2_getElementByTagName,
1038 void HTMLElement2_Init(HTMLElement *This)
1040 This->lpHTMLElement2Vtbl = &HTMLElement2Vtbl;