gdi32/tests: Fix a compiler warning.
[wine] / dlls / mshtml / htmlelem2.c
1 /*
2  * Copyright 2006 Jacek Caban for CodeWeavers
3  *
4  * This library is free software; you can redistribute it and/or
5  * modify it under the terms of the GNU Lesser General Public
6  * License as published by the Free Software Foundation; either
7  * version 2.1 of the License, or (at your option) any later version.
8  *
9  * This library is distributed in the hope that it will be useful,
10  * but WITHOUT ANY WARRANTY; without even the implied warranty of
11  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
12  * Lesser General Public License for more details.
13  *
14  * You should have received a copy of the GNU Lesser General Public
15  * License along with this library; if not, write to the Free Software
16  * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
17  */
18
19 #include "config.h"
20
21 #include <stdarg.h>
22 #include <stdio.h>
23
24 #define COBJMACROS
25
26 #include "windef.h"
27 #include "winbase.h"
28 #include "winuser.h"
29 #include "winnls.h"
30 #include "ole2.h"
31
32 #include "wine/debug.h"
33 #include "wine/unicode.h"
34
35 #include "mshtml_private.h"
36
37 WINE_DEFAULT_DEBUG_CHANNEL(mshtml);
38
39 #define HTMLELEM2_THIS(iface) DEFINE_THIS(HTMLElement, HTMLElement2, iface)
40
41 static HRESULT WINAPI HTMLElement2_QueryInterface(IHTMLElement2 *iface,
42                                                   REFIID riid, void **ppv)
43 {
44     HTMLElement *This = HTMLELEM2_THIS(iface);
45     return IHTMLElement_QueryInterface(HTMLELEM(This), riid, ppv);
46 }
47
48 static ULONG WINAPI HTMLElement2_AddRef(IHTMLElement2 *iface)
49 {
50     HTMLElement *This = HTMLELEM2_THIS(iface);
51     return IHTMLElement_AddRef(HTMLELEM(This));
52 }
53
54 static ULONG WINAPI HTMLElement2_Release(IHTMLElement2 *iface)
55 {
56     HTMLElement *This = HTMLELEM2_THIS(iface);
57     return IHTMLElement_Release(HTMLELEM(This));
58 }
59
60 static HRESULT WINAPI HTMLElement2_GetTypeInfoCount(IHTMLElement2 *iface, UINT *pctinfo)
61 {
62     HTMLElement *This = HTMLELEM2_THIS(iface);
63     FIXME("(%p)->(%p)\n", This, pctinfo);
64     return E_NOTIMPL;
65 }
66
67 static HRESULT WINAPI HTMLElement2_GetTypeInfo(IHTMLElement2 *iface, UINT iTInfo,
68                                                LCID lcid, ITypeInfo **ppTInfo)
69 {
70     HTMLElement *This = HTMLELEM2_THIS(iface);
71     FIXME("(%p)->(%u %u %p)\n", This, iTInfo, lcid, ppTInfo);
72     return E_NOTIMPL;
73 }
74
75 static HRESULT WINAPI HTMLElement2_GetIDsOfNames(IHTMLElement2 *iface, REFIID riid,
76                                                 LPOLESTR *rgszNames, UINT cNames,
77                                                 LCID lcid, DISPID *rgDispId)
78 {
79     HTMLElement *This = HTMLELEM2_THIS(iface);
80     FIXME("(%p)->(%s %p %u %u %p)\n", This, debugstr_guid(riid), rgszNames, cNames,
81                                         lcid, rgDispId);
82     return E_NOTIMPL;
83 }
84
85 static HRESULT WINAPI HTMLElement2_Invoke(IHTMLElement2 *iface, DISPID dispIdMember,
86                             REFIID riid, LCID lcid, WORD wFlags, DISPPARAMS *pDispParams,
87                             VARIANT *pVarResult, EXCEPINFO *pExcepInfo, UINT *puArgErr)
88 {
89     HTMLElement *This = HTMLELEM2_THIS(iface);
90     FIXME("(%p)->(%d %s %d %d %p %p %p %p)\n", This, dispIdMember, debugstr_guid(riid),
91             lcid, wFlags, pDispParams, pVarResult, pExcepInfo, puArgErr);
92     return E_NOTIMPL;
93 }
94
95 static HRESULT WINAPI HTMLElement2_get_scopeName(IHTMLElement2 *iface, BSTR *p)
96 {
97     HTMLElement *This = HTMLELEM2_THIS(iface);
98     FIXME("(%p)->(%p)\n", This, p);
99     return E_NOTIMPL;
100 }
101
102 static HRESULT WINAPI HTMLElement2_setCapture(IHTMLElement2 *iface, VARIANT_BOOL containerCapture)
103 {
104     HTMLElement *This = HTMLELEM2_THIS(iface);
105     FIXME("(%p)->(%x)\n", This, containerCapture);
106     return E_NOTIMPL;
107 }
108
109 static HRESULT WINAPI HTMLElement2_releaseCapture(IHTMLElement2 *iface)
110 {
111     HTMLElement *This = HTMLELEM2_THIS(iface);
112     FIXME("(%p)\n", This);
113     return E_NOTIMPL;
114 }
115
116 static HRESULT WINAPI HTMLElement2_put_onlosecapture(IHTMLElement2 *iface, VARIANT v)
117 {
118     HTMLElement *This = HTMLELEM2_THIS(iface);
119     FIXME("(%p)->()\n", This);
120     return E_NOTIMPL;
121 }
122
123 static HRESULT WINAPI HTMLElement2_get_onlosecapture(IHTMLElement2 *iface, VARIANT *p)
124 {
125     HTMLElement *This = HTMLELEM2_THIS(iface);
126     FIXME("(%p)->(%p)\n", This, p);
127     return E_NOTIMPL;
128 }
129
130 static HRESULT WINAPI HTMLElement2_componentFromPoint(IHTMLElement2 *iface,
131                                                       long x, long y, BSTR *component)
132 {
133     HTMLElement *This = HTMLELEM2_THIS(iface);
134     FIXME("(%p)->(%ld %ld %p)\n", This, x, y, component);
135     return E_NOTIMPL;
136 }
137
138 static HRESULT WINAPI HTMLElement2_doScroll(IHTMLElement2 *iface, VARIANT component)
139 {
140     HTMLElement *This = HTMLELEM2_THIS(iface);
141     FIXME("(%p)->()\n", This);
142     return E_NOTIMPL;
143 }
144
145 static HRESULT WINAPI HTMLElement2_put_onscroll(IHTMLElement2 *iface, VARIANT v)
146 {
147     HTMLElement *This = HTMLELEM2_THIS(iface);
148     FIXME("(%p)->()\n", This);
149     return E_NOTIMPL;
150 }
151
152 static HRESULT WINAPI HTMLElement2_get_onscroll(IHTMLElement2 *iface, VARIANT *p)
153 {
154     HTMLElement *This = HTMLELEM2_THIS(iface);
155     FIXME("(%p)->(%p)\n", This, p);
156     return E_NOTIMPL;
157 }
158
159 static HRESULT WINAPI HTMLElement2_put_ondrag(IHTMLElement2 *iface, VARIANT v)
160 {
161     HTMLElement *This = HTMLELEM2_THIS(iface);
162     FIXME("(%p)->()\n", This);
163     return E_NOTIMPL;
164 }
165
166 static HRESULT WINAPI HTMLElement2_get_ondrag(IHTMLElement2 *iface, VARIANT *p)
167 {
168     HTMLElement *This = HTMLELEM2_THIS(iface);
169     FIXME("(%p)->(%p)\n", This, p);
170     return E_NOTIMPL;
171 }
172
173 static HRESULT WINAPI HTMLElement2_put_ondragend(IHTMLElement2 *iface, VARIANT v)
174 {
175     HTMLElement *This = HTMLELEM2_THIS(iface);
176     FIXME("(%p)->()\n", This);
177     return E_NOTIMPL;
178 }
179
180 static HRESULT WINAPI HTMLElement2_get_ondragend(IHTMLElement2 *iface, VARIANT *p)
181 {
182     HTMLElement *This = HTMLELEM2_THIS(iface);
183     FIXME("(%p)->(%p)\n", This, p);
184     return E_NOTIMPL;
185 }
186
187 static HRESULT WINAPI HTMLElement2_put_ondragenter(IHTMLElement2 *iface, VARIANT v)
188 {
189     HTMLElement *This = HTMLELEM2_THIS(iface);
190     FIXME("(%p)->()\n", This);
191     return E_NOTIMPL;
192 }
193
194 static HRESULT WINAPI HTMLElement2_get_ondragenter(IHTMLElement2 *iface, VARIANT *p)
195 {
196     HTMLElement *This = HTMLELEM2_THIS(iface);
197     FIXME("(%p)->(%p)\n", This, p);
198     return E_NOTIMPL;
199 }
200
201 static HRESULT WINAPI HTMLElement2_put_ondragover(IHTMLElement2 *iface, VARIANT v)
202 {
203     HTMLElement *This = HTMLELEM2_THIS(iface);
204     FIXME("(%p)->()\n", This);
205     return E_NOTIMPL;
206 }
207
208 static HRESULT WINAPI HTMLElement2_get_ondragover(IHTMLElement2 *iface, VARIANT *p)
209 {
210     HTMLElement *This = HTMLELEM2_THIS(iface);
211     FIXME("(%p)->(%p)\n", This, p);
212     return E_NOTIMPL;
213 }
214
215 static HRESULT WINAPI HTMLElement2_put_ondragleave(IHTMLElement2 *iface, VARIANT v)
216 {
217     HTMLElement *This = HTMLELEM2_THIS(iface);
218     FIXME("(%p)->()\n", This);
219     return E_NOTIMPL;
220 }
221
222 static HRESULT WINAPI HTMLElement2_get_ondragleave(IHTMLElement2 *iface, VARIANT *p)
223 {
224     HTMLElement *This = HTMLELEM2_THIS(iface);
225     FIXME("(%p)->(%p)\n", This, p);
226     return E_NOTIMPL;
227 }
228
229 static HRESULT WINAPI HTMLElement2_put_ondrop(IHTMLElement2 *iface, VARIANT v)
230 {
231     HTMLElement *This = HTMLELEM2_THIS(iface);
232     FIXME("(%p)->()\n", This);
233     return E_NOTIMPL;
234 }
235
236 static HRESULT WINAPI HTMLElement2_get_ondrop(IHTMLElement2 *iface, VARIANT *p)
237 {
238     HTMLElement *This = HTMLELEM2_THIS(iface);
239     FIXME("(%p)->(%p)\n", This, p);
240     return E_NOTIMPL;
241 }
242
243 static HRESULT WINAPI HTMLElement2_put_onbeforecut(IHTMLElement2 *iface, VARIANT v)
244 {
245     HTMLElement *This = HTMLELEM2_THIS(iface);
246     FIXME("(%p)->()\n", This);
247     return E_NOTIMPL;
248 }
249
250 static HRESULT WINAPI HTMLElement2_get_onbeforecut(IHTMLElement2 *iface, VARIANT *p)
251 {
252     HTMLElement *This = HTMLELEM2_THIS(iface);
253     FIXME("(%p)->(%p)\n", This, p);
254     return E_NOTIMPL;
255 }
256
257 static HRESULT WINAPI HTMLElement2_put_oncut(IHTMLElement2 *iface, VARIANT v)
258 {
259     HTMLElement *This = HTMLELEM2_THIS(iface);
260     FIXME("(%p)->()\n", This);
261     return E_NOTIMPL;
262 }
263
264 static HRESULT WINAPI HTMLElement2_get_oncut(IHTMLElement2 *iface, VARIANT *p)
265 {
266     HTMLElement *This = HTMLELEM2_THIS(iface);
267     FIXME("(%p)->(%p)\n", This, p);
268     return E_NOTIMPL;
269 }
270
271 static HRESULT WINAPI HTMLElement2_put_onbeforecopy(IHTMLElement2 *iface, VARIANT v)
272 {
273     HTMLElement *This = HTMLELEM2_THIS(iface);
274     FIXME("(%p)->()\n", This);
275     return E_NOTIMPL;
276 }
277
278 static HRESULT WINAPI HTMLElement2_get_onbeforecopy(IHTMLElement2 *iface, VARIANT *p)
279 {
280     HTMLElement *This = HTMLELEM2_THIS(iface);
281     FIXME("(%p)->(%p)\n", This, p);
282     return E_NOTIMPL;
283 }
284
285 static HRESULT WINAPI HTMLElement2_put_oncopy(IHTMLElement2 *iface, VARIANT v)
286 {
287     HTMLElement *This = HTMLELEM2_THIS(iface);
288     FIXME("(%p)->()\n", This);
289     return E_NOTIMPL;
290 }
291
292 static HRESULT WINAPI HTMLElement2_get_oncopy(IHTMLElement2 *iface, VARIANT *p)
293 {
294     HTMLElement *This = HTMLELEM2_THIS(iface);
295     FIXME("(%p)->(%p)\n", This, p);
296     return E_NOTIMPL;
297 }
298
299 static HRESULT WINAPI HTMLElement2_put_onbeforepaste(IHTMLElement2 *iface, VARIANT v)
300 {
301     HTMLElement *This = HTMLELEM2_THIS(iface);
302     FIXME("(%p)->()\n", This);
303     return E_NOTIMPL;
304 }
305
306 static HRESULT WINAPI HTMLElement2_get_onbeforepaste(IHTMLElement2 *iface, VARIANT *p)
307 {
308     HTMLElement *This = HTMLELEM2_THIS(iface);
309     FIXME("(%p)->(%p)\n", This, p);
310     return E_NOTIMPL;
311 }
312
313 static HRESULT WINAPI HTMLElement2_put_onpaste(IHTMLElement2 *iface, VARIANT v)
314 {
315     HTMLElement *This = HTMLELEM2_THIS(iface);
316     FIXME("(%p)->()\n", This);
317     return E_NOTIMPL;
318 }
319
320 static HRESULT WINAPI HTMLElement2_get_onpaste(IHTMLElement2 *iface, VARIANT *p)
321 {
322     HTMLElement *This = HTMLELEM2_THIS(iface);
323     FIXME("(%p)->(%p)\n", This, p);
324     return E_NOTIMPL;
325 }
326
327 static HRESULT WINAPI HTMLElement2_get_currentStyle(IHTMLElement2 *iface, IHTMLCurrentStyle **p)
328 {
329     HTMLElement *This = HTMLELEM2_THIS(iface);
330     FIXME("(%p)->(%p)\n", This, p);
331     return E_NOTIMPL;
332 }
333
334 static HRESULT WINAPI HTMLElement2_put_onpropertychange(IHTMLElement2 *iface, VARIANT v)
335 {
336     HTMLElement *This = HTMLELEM2_THIS(iface);
337     FIXME("(%p)->()\n", This);
338     return E_NOTIMPL;
339 }
340
341 static HRESULT WINAPI HTMLElement2_get_onpropertychange(IHTMLElement2 *iface, VARIANT *p)
342 {
343     HTMLElement *This = HTMLELEM2_THIS(iface);
344     FIXME("(%p)->(%p)\n", This, p);
345     return E_NOTIMPL;
346 }
347
348 static HRESULT WINAPI HTMLElement2_getClientRects(IHTMLElement2 *iface, IHTMLRectCollection **pRectCol)
349 {
350     HTMLElement *This = HTMLELEM2_THIS(iface);
351     FIXME("(%p)->(%p)\n", This, pRectCol);
352     return E_NOTIMPL;
353 }
354
355 static HRESULT WINAPI HTMLElement2_getBoundingClientRect(IHTMLElement2 *iface, IHTMLRect **pRect)
356 {
357     HTMLElement *This = HTMLELEM2_THIS(iface);
358     FIXME("(%p)->(%p)\n", This, pRect);
359     return E_NOTIMPL;
360 }
361
362 static HRESULT WINAPI HTMLElement2_setExpression(IHTMLElement2 *iface, BSTR propname,
363                                                  BSTR expression, BSTR language)
364 {
365     HTMLElement *This = HTMLELEM2_THIS(iface);
366     FIXME("(%p)->(%s %s %s)\n", This, debugstr_w(propname), debugstr_w(expression),
367           debugstr_w(language));
368     return E_NOTIMPL;
369 }
370
371 static HRESULT WINAPI HTMLElement2_getExpression(IHTMLElement2 *iface, BSTR propname,
372                                                  VARIANT *expression)
373 {
374     HTMLElement *This = HTMLELEM2_THIS(iface);
375     FIXME("(%p)->(%s %p)\n", This, debugstr_w(propname), expression);
376     return E_NOTIMPL;
377 }
378
379 static HRESULT WINAPI HTMLElement2_removeExpression(IHTMLElement2 *iface, BSTR propname,
380                                                     VARIANT_BOOL *pfSuccess)
381 {
382     HTMLElement *This = HTMLELEM2_THIS(iface);
383     FIXME("(%p)->(%s %p)\n", This, debugstr_w(propname), pfSuccess);
384     return E_NOTIMPL;
385 }
386
387 static HRESULT WINAPI HTMLElement2_put_tabIndex(IHTMLElement2 *iface, short v)
388 {
389     HTMLElement *This = HTMLELEM2_THIS(iface);
390     FIXME("(%p)->(%d)\n", This, v);
391     return E_NOTIMPL;
392 }
393
394 static HRESULT WINAPI HTMLElement2_get_tabIndex(IHTMLElement2 *iface, short *p)
395 {
396     HTMLElement *This = HTMLELEM2_THIS(iface);
397     FIXME("(%p)->(%p)\n", This, p);
398     return E_NOTIMPL;
399 }
400
401 static HRESULT WINAPI HTMLElement2_focus(IHTMLElement2 *iface)
402 {
403     HTMLElement *This = HTMLELEM2_THIS(iface);
404     FIXME("(%p)\n", This);
405     return E_NOTIMPL;
406 }
407
408 static HRESULT WINAPI HTMLElement2_put_accessKey(IHTMLElement2 *iface, BSTR v)
409 {
410     HTMLElement *This = HTMLELEM2_THIS(iface);
411     FIXME("(%p)->(%s)\n", This, debugstr_w(v));
412     return E_NOTIMPL;
413 }
414
415 static HRESULT WINAPI HTMLElement2_get_accessKey(IHTMLElement2 *iface, BSTR *p)
416 {
417     HTMLElement *This = HTMLELEM2_THIS(iface);
418     FIXME("(%p)->(%p)\n", This, p);
419     return E_NOTIMPL;
420 }
421
422 static HRESULT WINAPI HTMLElement2_put_onblur(IHTMLElement2 *iface, VARIANT v)
423 {
424     HTMLElement *This = HTMLELEM2_THIS(iface);
425     FIXME("(%p)->()\n", This);
426     return E_NOTIMPL;
427 }
428
429 static HRESULT WINAPI HTMLElement2_get_onblur(IHTMLElement2 *iface, VARIANT *p)
430 {
431     HTMLElement *This = HTMLELEM2_THIS(iface);
432     FIXME("(%p)->(%p)\n", This, p);
433     return E_NOTIMPL;
434 }
435
436 static HRESULT WINAPI HTMLElement2_put_onfocus(IHTMLElement2 *iface, VARIANT v)
437 {
438     HTMLElement *This = HTMLELEM2_THIS(iface);
439     FIXME("(%p)->()\n", This);
440     return E_NOTIMPL;
441 }
442
443 static HRESULT WINAPI HTMLElement2_get_onfocus(IHTMLElement2 *iface, VARIANT *p)
444 {
445     HTMLElement *This = HTMLELEM2_THIS(iface);
446     FIXME("(%p)->(%p)\n", This, p);
447     return E_NOTIMPL;
448 }
449
450 static HRESULT WINAPI HTMLElement2_put_onresize(IHTMLElement2 *iface, VARIANT v)
451 {
452     HTMLElement *This = HTMLELEM2_THIS(iface);
453     FIXME("(%p)->()\n", This);
454     return E_NOTIMPL;
455 }
456
457 static HRESULT WINAPI HTMLElement2_get_onresize(IHTMLElement2 *iface, VARIANT *p)
458 {
459     HTMLElement *This = HTMLELEM2_THIS(iface);
460     FIXME("(%p)->(%p)\n", This, p);
461     return E_NOTIMPL;
462 }
463
464 static HRESULT WINAPI HTMLElement2_blur(IHTMLElement2 *iface)
465 {
466     HTMLElement *This = HTMLELEM2_THIS(iface);
467     FIXME("(%p)\n", This);
468     return E_NOTIMPL;
469 }
470
471 static HRESULT WINAPI HTMLElement2_addFilter(IHTMLElement2 *iface, IUnknown *pUnk)
472 {
473     HTMLElement *This = HTMLELEM2_THIS(iface);
474     FIXME("(%p)->(%p)\n", This, pUnk);
475     return E_NOTIMPL;
476 }
477
478 static HRESULT WINAPI HTMLElement2_removeFilter(IHTMLElement2 *iface, IUnknown *pUnk)
479 {
480     HTMLElement *This = HTMLELEM2_THIS(iface);
481     FIXME("(%p)->(%p)\n", This, pUnk);
482     return E_NOTIMPL;
483 }
484
485 static HRESULT WINAPI HTMLElement2_get_clientHeight(IHTMLElement2 *iface, long *p)
486 {
487     HTMLElement *This = HTMLELEM2_THIS(iface);
488     FIXME("(%p)->(%p)\n", This, p);
489     return E_NOTIMPL;
490 }
491
492 static HRESULT WINAPI HTMLElement2_get_clientWidth(IHTMLElement2 *iface, long *p)
493 {
494     HTMLElement *This = HTMLELEM2_THIS(iface);
495     FIXME("(%p)->(%p)\n", This, p);
496     return E_NOTIMPL;
497 }
498
499 static HRESULT WINAPI HTMLElement2_get_clientTop(IHTMLElement2 *iface, long *p)
500 {
501     HTMLElement *This = HTMLELEM2_THIS(iface);
502     FIXME("(%p)->(%p)\n", This, p);
503     return E_NOTIMPL;
504 }
505
506 static HRESULT WINAPI HTMLElement2_get_clientLeft(IHTMLElement2 *iface, long *p)
507 {
508     HTMLElement *This = HTMLELEM2_THIS(iface);
509     FIXME("(%p)->(%p)\n", This, p);
510     return E_NOTIMPL;
511 }
512
513 static HRESULT WINAPI HTMLElement2_attachEvent(IHTMLElement2 *iface, BSTR event,
514                                                IDispatch *pDisp, VARIANT_BOOL *pfResult)
515 {
516     HTMLElement *This = HTMLELEM2_THIS(iface);
517     FIXME("(%p)->(%s %p %p)\n", This, debugstr_w(event), pDisp, pfResult);
518     return E_NOTIMPL;
519 }
520
521 static HRESULT WINAPI HTMLElement2_detachEvent(IHTMLElement2 *iface, BSTR event, IDispatch *pDisp)
522 {
523     HTMLElement *This = HTMLELEM2_THIS(iface);
524     FIXME("(%p)->(%s %p)\n", This, debugstr_w(event), pDisp);
525     return E_NOTIMPL;
526 }
527
528 static HRESULT WINAPI HTMLElement2_get_readyState(IHTMLElement2 *iface, VARIANT *p)
529 {
530     HTMLElement *This = HTMLELEM2_THIS(iface);
531     FIXME("(%p)->(%p)\n", This, p);
532     return E_NOTIMPL;
533 }
534
535 static HRESULT WINAPI HTMLElement2_put_onreadystatechange(IHTMLElement2 *iface, VARIANT v)
536 {
537     HTMLElement *This = HTMLELEM2_THIS(iface);
538     FIXME("(%p)->()\n", This);
539     return E_NOTIMPL;
540 }
541
542 static HRESULT WINAPI HTMLElement2_get_onreadystatechange(IHTMLElement2 *iface, VARIANT *p)
543 {
544     HTMLElement *This = HTMLELEM2_THIS(iface);
545     FIXME("(%p)->(%p)\n", This, p);
546     return E_NOTIMPL;
547 }
548
549 static HRESULT WINAPI HTMLElement2_put_onrowsdelete(IHTMLElement2 *iface, VARIANT v)
550 {
551     HTMLElement *This = HTMLELEM2_THIS(iface);
552     FIXME("(%p)->()\n", This);
553     return E_NOTIMPL;
554 }
555
556 static HRESULT WINAPI HTMLElement2_get_onrowsdelete(IHTMLElement2 *iface, VARIANT *p)
557 {
558     HTMLElement *This = HTMLELEM2_THIS(iface);
559     FIXME("(%p)->(%p)\n", This, p);
560     return E_NOTIMPL;
561 }
562
563 static HRESULT WINAPI HTMLElement2_put_onrowsinserted(IHTMLElement2 *iface, VARIANT v)
564 {
565     HTMLElement *This = HTMLELEM2_THIS(iface);
566     FIXME("(%p)->()\n", This);
567     return E_NOTIMPL;
568 }
569
570 static HRESULT WINAPI HTMLElement2_get_onrowsinserted(IHTMLElement2 *iface, VARIANT *p)
571 {
572     HTMLElement *This = HTMLELEM2_THIS(iface);
573     FIXME("(%p)->(%p)\n", This, p);
574     return E_NOTIMPL;
575 }
576
577 static HRESULT WINAPI HTMLElement2_put_oncellchange(IHTMLElement2 *iface, VARIANT v)
578 {
579     HTMLElement *This = HTMLELEM2_THIS(iface);
580     FIXME("(%p)->()\n", This);
581     return E_NOTIMPL;
582 }
583
584 static HRESULT WINAPI HTMLElement2_get_oncellchange(IHTMLElement2 *iface, VARIANT *p)
585 {
586     HTMLElement *This = HTMLELEM2_THIS(iface);
587     FIXME("(%p)->(%p)\n", This, p);
588     return E_NOTIMPL;
589 }
590
591 static HRESULT WINAPI HTMLElement2_put_dir(IHTMLElement2 *iface, BSTR v)
592 {
593     HTMLElement *This = HTMLELEM2_THIS(iface);
594     FIXME("(%p)->(%s)\n", This, debugstr_w(v));
595     return E_NOTIMPL;
596 }
597
598 static HRESULT WINAPI HTMLElement2_get_dir(IHTMLElement2 *iface, BSTR *p)
599 {
600     HTMLElement *This = HTMLELEM2_THIS(iface);
601
602     TRACE("(%p)->(%p)\n", This, p);
603
604     *p = NULL;
605
606     if(This->nselem) {
607         nsAString dir_str;
608         nsresult nsres;
609
610         nsAString_Init(&dir_str, NULL);
611
612         nsres = nsIDOMHTMLElement_GetDir(This->nselem, &dir_str);
613         if(NS_SUCCEEDED(nsres)) {
614             const PRUnichar *dir;
615             nsAString_GetData(&dir_str, &dir, NULL);
616             if(*dir)
617                 *p = SysAllocString(dir);
618         }else {
619             ERR("GetDir failed: %08x\n", nsres);
620         }
621
622         nsAString_Finish(&dir_str);
623     }
624
625     TRACE("ret %s\n", debugstr_w(*p));
626     return S_OK;
627 }
628
629 static HRESULT WINAPI HTMLElement2_createControlRange(IHTMLElement2 *iface, IDispatch **range)
630 {
631     HTMLElement *This = HTMLELEM2_THIS(iface);
632     FIXME("(%p)->(%p)\n", This, range);
633     return E_NOTIMPL;
634 }
635
636 static HRESULT WINAPI HTMLElement2_get_scrollHeight(IHTMLElement2 *iface, long *p)
637 {
638     HTMLElement *This = HTMLELEM2_THIS(iface);
639     FIXME("(%p)->(%p)\n", This, p);
640     return E_NOTIMPL;
641 }
642
643 static HRESULT WINAPI HTMLElement2_get_scrollWidth(IHTMLElement2 *iface, long *p)
644 {
645     HTMLElement *This = HTMLELEM2_THIS(iface);
646     FIXME("(%p)->(%p)\n", This, p);
647     return E_NOTIMPL;
648 }
649
650 static HRESULT WINAPI HTMLElement2_put_scrollTop(IHTMLElement2 *iface, long v)
651 {
652     HTMLElement *This = HTMLELEM2_THIS(iface);
653     nsIDOMNSHTMLElement *nselem;
654     nsresult nsres;
655
656     TRACE("(%p)->(%ld)\n", This, v);
657
658     nsres = nsIDOMHTMLElement_QueryInterface(This->nselem, &IID_nsIDOMNSHTMLElement, (void**)&nselem);
659     if(NS_SUCCEEDED(nsres)) {
660         nsIDOMNSHTMLElement_SetScrollTop(nselem, v);
661         nsIDOMNSHTMLElement_Release(nselem);
662     }else {
663         ERR("Could not get nsIDOMNSHTMLElement interface: %08x\n", nsres);
664     }
665
666     return S_OK;
667 }
668
669 static HRESULT WINAPI HTMLElement2_get_scrollTop(IHTMLElement2 *iface, long *p)
670 {
671     HTMLElement *This = HTMLELEM2_THIS(iface);
672     FIXME("(%p)->(%p)\n", This, p);
673     return E_NOTIMPL;
674 }
675
676 static HRESULT WINAPI HTMLElement2_put_scrollLeft(IHTMLElement2 *iface, long v)
677 {
678     HTMLElement *This = HTMLELEM2_THIS(iface);
679     nsIDOMNSHTMLElement *nselem;
680     nsresult nsres;
681
682     TRACE("(%p)->(%ld)\n", This, v);
683
684     nsres = nsIDOMHTMLElement_QueryInterface(This->nselem, &IID_nsIDOMNSHTMLElement, (void**)&nselem);
685     if(NS_SUCCEEDED(nsres)) {
686         nsIDOMNSHTMLElement_SetScrollLeft(nselem, v);
687         nsIDOMNSHTMLElement_Release(nselem);
688     }else {
689         ERR("Could not get nsIDOMNSHTMLElement interface: %08x\n", nsres);
690     }
691
692     return S_OK;
693 }
694
695 static HRESULT WINAPI HTMLElement2_get_scrollLeft(IHTMLElement2 *iface, long *p)
696 {
697     HTMLElement *This = HTMLELEM2_THIS(iface);
698     FIXME("(%p)->(%p)\n", This, p);
699     return E_NOTIMPL;
700 }
701
702 static HRESULT WINAPI HTMLElement2_clearAttributes(IHTMLElement2 *iface)
703 {
704     HTMLElement *This = HTMLELEM2_THIS(iface);
705     FIXME("(%p)\n", This);
706     return E_NOTIMPL;
707 }
708
709 static HRESULT WINAPI HTMLElement2_mergeAttributes(IHTMLElement2 *iface, IHTMLElement *mergeThis)
710 {
711     HTMLElement *This = HTMLELEM2_THIS(iface);
712     FIXME("(%p)->(%p)\n", This, mergeThis);
713     return E_NOTIMPL;
714 }
715
716 static HRESULT WINAPI HTMLElement2_put_oncontextmenu(IHTMLElement2 *iface, VARIANT v)
717 {
718     HTMLElement *This = HTMLELEM2_THIS(iface);
719     FIXME("(%p)->()\n", This);
720     return E_NOTIMPL;
721 }
722
723 static HRESULT WINAPI HTMLElement2_get_oncontextmenu(IHTMLElement2 *iface, VARIANT *p)
724 {
725     HTMLElement *This = HTMLELEM2_THIS(iface);
726     FIXME("(%p)->(%p)\n", This, p);
727     return E_NOTIMPL;
728 }
729
730 static HRESULT WINAPI HTMLElement2_insertAdjecentElement(IHTMLElement2 *iface, BSTR where,
731         IHTMLElement *insertedElement, IHTMLElement **inserted)
732 {
733     HTMLElement *This = HTMLELEM2_THIS(iface);
734     FIXME("(%p)->(%s %p %p)\n", This, debugstr_w(where), insertedElement, inserted);
735     return E_NOTIMPL;
736 }
737
738 static HRESULT WINAPI HTMLElement2_applyElement(IHTMLElement2 *iface, IHTMLElement *apply,
739                                                 BSTR where, IHTMLElement **applied)
740 {
741     HTMLElement *This = HTMLELEM2_THIS(iface);
742     FIXME("(%p)->(%p %s %p)\n", This, apply, debugstr_w(where), applied);
743     return E_NOTIMPL;
744 }
745
746 static HRESULT WINAPI HTMLElement2_getAdjecentText(IHTMLElement2 *iface, BSTR where, BSTR *text)
747 {
748     HTMLElement *This = HTMLELEM2_THIS(iface);
749     FIXME("(%p)->(%s %p)\n", This, debugstr_w(where), text);
750     return E_NOTIMPL;
751 }
752
753 static HRESULT WINAPI HTMLElement2_replaceAdjecentText(IHTMLElement2 *iface, BSTR where,
754                                                        BSTR newText, BSTR *oldText)
755 {
756     HTMLElement *This = HTMLELEM2_THIS(iface);
757     FIXME("(%p)->(%s %s %p)\n", This, debugstr_w(where), debugstr_w(newText), oldText);
758     return E_NOTIMPL;
759 }
760
761 static HRESULT WINAPI HTMLElement2_get_canHandleChildren(IHTMLElement2 *iface, VARIANT_BOOL *p)
762 {
763     HTMLElement *This = HTMLELEM2_THIS(iface);
764     FIXME("(%p)->(%p)\n", This, p);
765     return E_NOTIMPL;
766 }
767
768 static HRESULT WINAPI HTMLElement2_addBehavior(IHTMLElement2 *iface, BSTR bstrUrl,
769                                                VARIANT *pvarFactory, long *pCookie)
770 {
771     HTMLElement *This = HTMLELEM2_THIS(iface);
772     FIXME("(%p)->(%s %p %p)\n", This, debugstr_w(bstrUrl), pvarFactory, pCookie);
773     return E_NOTIMPL;
774 }
775
776 static HRESULT WINAPI HTMLElement2_removeBehavior(IHTMLElement2 *iface, long cookie,
777                                                   VARIANT_BOOL *pfResult)
778 {
779     HTMLElement *This = HTMLELEM2_THIS(iface);
780     FIXME("(%p)->(%ld %p)\n", This, cookie, pfResult);
781     return E_NOTIMPL;
782 }
783
784 static HRESULT WINAPI HTMLElement2_get_runtimeStyle(IHTMLElement2 *iface, IHTMLStyle **p)
785 {
786     HTMLElement *This = HTMLELEM2_THIS(iface);
787     FIXME("(%p)->(%p)\n", This, p);
788     return E_NOTIMPL;
789 }
790
791 static HRESULT WINAPI HTMLElement2_get_behaviorUrns(IHTMLElement2 *iface, IDispatch **p)
792 {
793     HTMLElement *This = HTMLELEM2_THIS(iface);
794     FIXME("(%p)->(%p)\n", This, p);
795     return E_NOTIMPL;
796 }
797
798 static HRESULT WINAPI HTMLElement2_put_tagUrn(IHTMLElement2 *iface, BSTR v)
799 {
800     HTMLElement *This = HTMLELEM2_THIS(iface);
801     FIXME("(%p)->(%s)\n", This, debugstr_w(v));
802     return E_NOTIMPL;
803 }
804
805 static HRESULT WINAPI HTMLElement2_get_tagUrn(IHTMLElement2 *iface, BSTR *p)
806 {
807     HTMLElement *This = HTMLELEM2_THIS(iface);
808     FIXME("(%p)->(%p)\n", This, p);
809     return E_NOTIMPL;
810 }
811
812 static HRESULT WINAPI HTMLElement2_put_onbeforeeditfocus(IHTMLElement2 *iface, VARIANT vv)
813 {
814     HTMLElement *This = HTMLELEM2_THIS(iface);
815     FIXME("(%p)->()\n", This);
816     return E_NOTIMPL;
817 }
818
819 static HRESULT WINAPI HTMLElement2_get_onbeforeeditfocus(IHTMLElement2 *iface, VARIANT *p)
820 {
821     HTMLElement *This = HTMLELEM2_THIS(iface);
822     FIXME("(%p)->(%p)\n", This, p);
823     return E_NOTIMPL;
824 }
825
826 static HRESULT WINAPI HTMLElement2_get_readyStateValue(IHTMLElement2 *iface, long *p)
827 {
828     HTMLElement *This = HTMLELEM2_THIS(iface);
829     FIXME("(%p)->(%p)\n", This, p);
830     return E_NOTIMPL;
831 }
832
833 static HRESULT WINAPI HTMLElement2_getElementByTagName(IHTMLElement2 *iface, BSTR v,
834                                                        IHTMLElementCollection **pelColl)
835 {
836     HTMLElement *This = HTMLELEM2_THIS(iface);
837     FIXME("(%p)->(%s %p)\n", This, debugstr_w(v), pelColl);
838     return E_NOTIMPL;
839 }
840
841 #undef HTMLELEM2_THIS
842
843 static const IHTMLElement2Vtbl HTMLElement2Vtbl = {
844     HTMLElement2_QueryInterface,
845     HTMLElement2_AddRef,
846     HTMLElement2_Release,
847     HTMLElement2_GetTypeInfoCount,
848     HTMLElement2_GetTypeInfo,
849     HTMLElement2_GetIDsOfNames,
850     HTMLElement2_Invoke,
851     HTMLElement2_get_scopeName,
852     HTMLElement2_setCapture,
853     HTMLElement2_releaseCapture,
854     HTMLElement2_put_onlosecapture,
855     HTMLElement2_get_onlosecapture,
856     HTMLElement2_componentFromPoint,
857     HTMLElement2_doScroll,
858     HTMLElement2_put_onscroll,
859     HTMLElement2_get_onscroll,
860     HTMLElement2_put_ondrag,
861     HTMLElement2_get_ondrag,
862     HTMLElement2_put_ondragend,
863     HTMLElement2_get_ondragend,
864     HTMLElement2_put_ondragenter,
865     HTMLElement2_get_ondragenter,
866     HTMLElement2_put_ondragover,
867     HTMLElement2_get_ondragover,
868     HTMLElement2_put_ondragleave,
869     HTMLElement2_get_ondragleave,
870     HTMLElement2_put_ondrop,
871     HTMLElement2_get_ondrop,
872     HTMLElement2_put_onbeforecut,
873     HTMLElement2_get_onbeforecut,
874     HTMLElement2_put_oncut,
875     HTMLElement2_get_oncut,
876     HTMLElement2_put_onbeforecopy,
877     HTMLElement2_get_onbeforecopy,
878     HTMLElement2_put_oncopy,
879     HTMLElement2_get_oncopy,
880     HTMLElement2_put_onbeforepaste,
881     HTMLElement2_get_onbeforepaste,
882     HTMLElement2_put_onpaste,
883     HTMLElement2_get_onpaste,
884     HTMLElement2_get_currentStyle,
885     HTMLElement2_put_onpropertychange,
886     HTMLElement2_get_onpropertychange,
887     HTMLElement2_getClientRects,
888     HTMLElement2_getBoundingClientRect,
889     HTMLElement2_setExpression,
890     HTMLElement2_getExpression,
891     HTMLElement2_removeExpression,
892     HTMLElement2_put_tabIndex,
893     HTMLElement2_get_tabIndex,
894     HTMLElement2_focus,
895     HTMLElement2_put_accessKey,
896     HTMLElement2_get_accessKey,
897     HTMLElement2_put_onblur,
898     HTMLElement2_get_onblur,
899     HTMLElement2_put_onfocus,
900     HTMLElement2_get_onfocus,
901     HTMLElement2_put_onresize,
902     HTMLElement2_get_onresize,
903     HTMLElement2_blur,
904     HTMLElement2_addFilter,
905     HTMLElement2_removeFilter,
906     HTMLElement2_get_clientHeight,
907     HTMLElement2_get_clientWidth,
908     HTMLElement2_get_clientTop,
909     HTMLElement2_get_clientLeft,
910     HTMLElement2_attachEvent,
911     HTMLElement2_detachEvent,
912     HTMLElement2_get_readyState,
913     HTMLElement2_put_onreadystatechange,
914     HTMLElement2_get_onreadystatechange,
915     HTMLElement2_put_onrowsdelete,
916     HTMLElement2_get_onrowsdelete,
917     HTMLElement2_put_onrowsinserted,
918     HTMLElement2_get_onrowsinserted,
919     HTMLElement2_put_oncellchange,
920     HTMLElement2_get_oncellchange,
921     HTMLElement2_put_dir,
922     HTMLElement2_get_dir,
923     HTMLElement2_createControlRange,
924     HTMLElement2_get_scrollHeight,
925     HTMLElement2_get_scrollWidth,
926     HTMLElement2_put_scrollTop,
927     HTMLElement2_get_scrollTop,
928     HTMLElement2_put_scrollLeft,
929     HTMLElement2_get_scrollLeft,
930     HTMLElement2_clearAttributes,
931     HTMLElement2_mergeAttributes,
932     HTMLElement2_put_oncontextmenu,
933     HTMLElement2_get_oncontextmenu,
934     HTMLElement2_insertAdjecentElement,
935     HTMLElement2_applyElement,
936     HTMLElement2_getAdjecentText,
937     HTMLElement2_replaceAdjecentText,
938     HTMLElement2_get_canHandleChildren,
939     HTMLElement2_addBehavior,
940     HTMLElement2_removeBehavior,
941     HTMLElement2_get_runtimeStyle,
942     HTMLElement2_get_behaviorUrns,
943     HTMLElement2_put_tagUrn,
944     HTMLElement2_get_tagUrn,
945     HTMLElement2_put_onbeforeeditfocus,
946     HTMLElement2_get_onbeforeeditfocus,
947     HTMLElement2_get_readyStateValue,
948     HTMLElement2_getElementByTagName,
949 };
950
951 void HTMLElement2_Init(HTMLElement *This)
952 {
953     This->lpHTMLElement2Vtbl = &HTMLElement2Vtbl;
954 }