2 * Copyright 2008 Jacek Caban for CodeWeavers
4 * This library is free software; you can redistribute it and/or
5 * modify it under the terms of the GNU Lesser General Public
6 * License as published by the Free Software Foundation; either
7 * version 2.1 of the License, or (at your option) any later version.
9 * This library is distributed in the hope that it will be useful,
10 * but WITHOUT ANY WARRANTY; without even the implied warranty of
11 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
12 * Lesser General Public License for more details.
14 * You should have received a copy of the GNU Lesser General Public
15 * License along with this library; if not, write to the Free Software
16 * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
28 #include "wine/debug.h"
29 #include "wine/unicode.h"
31 #include "mshtml_private.h"
33 WINE_DEFAULT_DEBUG_CHANNEL(mshtml);
35 #define HTMLELEM3_THIS(iface) DEFINE_THIS(HTMLElement, HTMLElement3, iface)
37 static HRESULT WINAPI HTMLElement3_QueryInterface(IHTMLElement3 *iface,
38 REFIID riid, void **ppv)
40 HTMLElement *This = HTMLELEM3_THIS(iface);
41 return IHTMLElement_QueryInterface(HTMLELEM(This), riid, ppv);
44 static ULONG WINAPI HTMLElement3_AddRef(IHTMLElement3 *iface)
46 HTMLElement *This = HTMLELEM3_THIS(iface);
47 return IHTMLElement_AddRef(HTMLELEM(This));
50 static ULONG WINAPI HTMLElement3_Release(IHTMLElement3 *iface)
52 HTMLElement *This = HTMLELEM3_THIS(iface);
53 return IHTMLElement_Release(HTMLELEM(This));
56 static HRESULT WINAPI HTMLElement3_GetTypeInfoCount(IHTMLElement3 *iface, UINT *pctinfo)
58 HTMLElement *This = HTMLELEM3_THIS(iface);
59 return IDispatchEx_GetTypeInfoCount(DISPATCHEX(&This->node.dispex), pctinfo);
62 static HRESULT WINAPI HTMLElement3_GetTypeInfo(IHTMLElement3 *iface, UINT iTInfo,
63 LCID lcid, ITypeInfo **ppTInfo)
65 HTMLElement *This = HTMLELEM3_THIS(iface);
66 return IDispatchEx_GetTypeInfo(DISPATCHEX(&This->node.dispex), iTInfo, lcid, ppTInfo);
69 static HRESULT WINAPI HTMLElement3_GetIDsOfNames(IHTMLElement3 *iface, REFIID riid,
70 LPOLESTR *rgszNames, UINT cNames,
71 LCID lcid, DISPID *rgDispId)
73 HTMLElement *This = HTMLELEM3_THIS(iface);
74 return IDispatchEx_GetIDsOfNames(DISPATCHEX(&This->node.dispex), riid, rgszNames, cNames, lcid, rgDispId);
77 static HRESULT WINAPI HTMLElement3_Invoke(IHTMLElement3 *iface, DISPID dispIdMember,
78 REFIID riid, LCID lcid, WORD wFlags, DISPPARAMS *pDispParams,
79 VARIANT *pVarResult, EXCEPINFO *pExcepInfo, UINT *puArgErr)
81 HTMLElement *This = HTMLELEM3_THIS(iface);
82 return IDispatchEx_Invoke(DISPATCHEX(&This->node.dispex), dispIdMember, riid, lcid,
83 wFlags, pDispParams, pVarResult, pExcepInfo, puArgErr);
86 static HRESULT WINAPI HTMLElement3_mergeAttributes(IHTMLElement3 *iface, IHTMLElement *mergeThis, VARIANT *pvarFlags)
88 HTMLElement *This = HTMLELEM3_THIS(iface);
89 FIXME("(%p)->(%p %p)\n", This, mergeThis, pvarFlags);
93 static HRESULT WINAPI HTMLElement3_get_isMultiLine(IHTMLElement3 *iface, VARIANT_BOOL *p)
95 HTMLElement *This = HTMLELEM3_THIS(iface);
96 FIXME("(%p)->(%p)\n", This, p);
100 static HRESULT WINAPI HTMLElement3_get_canHaveHTML(IHTMLElement3 *iface, VARIANT_BOOL *p)
102 HTMLElement *This = HTMLELEM3_THIS(iface);
103 FIXME("(%p)->(%p)\n", This, p);
107 static HRESULT WINAPI HTMLElement3_put_onlayoutcomplete(IHTMLElement3 *iface, VARIANT v)
109 HTMLElement *This = HTMLELEM3_THIS(iface);
110 FIXME("(%p)->(%s)\n", This, debugstr_variant(&v));
114 static HRESULT WINAPI HTMLElement3_get_onlayoutcomplete(IHTMLElement3 *iface, VARIANT *p)
116 HTMLElement *This = HTMLELEM3_THIS(iface);
117 FIXME("(%p)->(%p)\n", This, p);
121 static HRESULT WINAPI HTMLElement3_put_onpage(IHTMLElement3 *iface, VARIANT v)
123 HTMLElement *This = HTMLELEM3_THIS(iface);
124 FIXME("(%p)->(%s)\n", This, debugstr_variant(&v));
128 static HRESULT WINAPI HTMLElement3_get_onpage(IHTMLElement3 *iface, VARIANT *p)
130 HTMLElement *This = HTMLELEM3_THIS(iface);
131 FIXME("(%p)->(%p)\n", This, p);
135 static HRESULT WINAPI HTMLElement3_put_inflateBlock(IHTMLElement3 *iface, VARIANT_BOOL v)
137 HTMLElement *This = HTMLELEM3_THIS(iface);
138 FIXME("(%p)->(%x)\n", This, v);
142 static HRESULT WINAPI HTMLElement3_get_inflateBlock(IHTMLElement3 *iface, VARIANT_BOOL *p)
144 HTMLElement *This = HTMLELEM3_THIS(iface);
145 FIXME("(%p)->(%p)\n", This, p);
149 static HRESULT WINAPI HTMLElement3_put_onbeforedeactivate(IHTMLElement3 *iface, VARIANT v)
151 HTMLElement *This = HTMLELEM3_THIS(iface);
152 FIXME("(%p)->(%s)\n", This, debugstr_variant(&v));
156 static HRESULT WINAPI HTMLElement3_get_onbeforedeactivate(IHTMLElement3 *iface, VARIANT *p)
158 HTMLElement *This = HTMLELEM3_THIS(iface);
159 FIXME("(%p)->(%p)\n", This, p);
163 static HRESULT WINAPI HTMLElement3_setActive(IHTMLElement3 *iface)
165 HTMLElement *This = HTMLELEM3_THIS(iface);
166 FIXME("(%p)\n", This);
170 static HRESULT WINAPI HTMLElement3_put_contentEditable(IHTMLElement3 *iface, BSTR v)
172 HTMLElement *This = HTMLELEM3_THIS(iface);
173 FIXME("(%p)->(%s)\n", This, debugstr_w(v));
177 static HRESULT WINAPI HTMLElement3_get_contentEditable(IHTMLElement3 *iface, BSTR *p)
179 HTMLElement *This = HTMLELEM3_THIS(iface);
180 FIXME("(%p)->(%p)\n", This, p);
184 static HRESULT WINAPI HTMLElement3_get_isContentEditable(IHTMLElement3 *iface, VARIANT_BOOL *p)
186 HTMLElement *This = HTMLELEM3_THIS(iface);
187 FIXME("(%p)->(%p)\n", This, p);
191 static HRESULT WINAPI HTMLElement3_put_hideFocus(IHTMLElement3 *iface, VARIANT_BOOL v)
193 HTMLElement *This = HTMLELEM3_THIS(iface);
194 FIXME("(%p)->(%x)\n", This, v);
198 static HRESULT WINAPI HTMLElement3_get_hideFocus(IHTMLElement3 *iface, VARIANT_BOOL *p)
200 HTMLElement *This = HTMLELEM3_THIS(iface);
201 FIXME("(%p)->(%p)\n", This, p);
205 static const WCHAR disabledW[] = {'d','i','s','a','b','l','e','d',0};
207 static HRESULT WINAPI HTMLElement3_put_disabled(IHTMLElement3 *iface, VARIANT_BOOL v)
209 HTMLElement *This = HTMLELEM3_THIS(iface);
213 TRACE("(%p)->(%x)\n", This, v);
215 if(This->node.vtbl->put_disabled)
216 return This->node.vtbl->put_disabled(&This->node, v);
218 hres = dispex_get_dprop_ref(&This->node.dispex, disabledW, TRUE, &var);
228 static HRESULT WINAPI HTMLElement3_get_disabled(IHTMLElement3 *iface, VARIANT_BOOL *p)
230 HTMLElement *This = HTMLELEM3_THIS(iface);
234 TRACE("(%p)->(%p)\n", This, p);
236 if(This->node.vtbl->get_disabled)
237 return This->node.vtbl->get_disabled(&This->node, p);
239 hres = dispex_get_dprop_ref(&This->node.dispex, disabledW, FALSE, &var);
240 if(hres == DISP_E_UNKNOWNNAME) {
247 if(V_VT(var) != VT_BOOL) {
248 FIXME("vt %d\n", V_VT(var));
256 static HRESULT WINAPI HTMLElement3_get_isDisabled(IHTMLElement3 *iface, VARIANT_BOOL *p)
258 HTMLElement *This = HTMLELEM3_THIS(iface);
259 FIXME("(%p)->(%p)\n", This, p);
263 static HRESULT WINAPI HTMLElement3_put_onmove(IHTMLElement3 *iface, VARIANT v)
265 HTMLElement *This = HTMLELEM3_THIS(iface);
266 FIXME("(%p)->(%s)\n", This, debugstr_variant(&v));
270 static HRESULT WINAPI HTMLElement3_get_onmove(IHTMLElement3 *iface, VARIANT *p)
272 HTMLElement *This = HTMLELEM3_THIS(iface);
273 FIXME("(%p)->(%p)\n", This, p);
277 static HRESULT WINAPI HTMLElement3_put_oncontrolselect(IHTMLElement3 *iface, VARIANT v)
279 HTMLElement *This = HTMLELEM3_THIS(iface);
280 FIXME("(%p)->(%s)\n", This, debugstr_variant(&v));
284 static HRESULT WINAPI HTMLElement3_get_oncontrolselect(IHTMLElement3 *iface, VARIANT *p)
286 HTMLElement *This = HTMLELEM3_THIS(iface);
287 FIXME("(%p)->(%p)\n", This, p);
291 static HRESULT WINAPI HTMLElement3_fireEvent(IHTMLElement3 *iface, BSTR bstrEventName,
292 VARIANT *pvarEventObject, VARIANT_BOOL *pfCancelled)
294 HTMLElement *This = HTMLELEM3_THIS(iface);
295 FIXME("(%p)->(%s %p %p)\n", This, debugstr_w(bstrEventName), pvarEventObject, pfCancelled);
299 static HRESULT WINAPI HTMLElement3_put_onresizestart(IHTMLElement3 *iface, VARIANT v)
301 HTMLElement *This = HTMLELEM3_THIS(iface);
302 FIXME("(%p)->(%s)\n", This, debugstr_variant(&v));
306 static HRESULT WINAPI HTMLElement3_get_onresizestart(IHTMLElement3 *iface, VARIANT *p)
308 HTMLElement *This = HTMLELEM3_THIS(iface);
309 FIXME("(%p)->(%p)\n", This, p);
313 static HRESULT WINAPI HTMLElement3_put_onresizeend(IHTMLElement3 *iface, VARIANT v)
315 HTMLElement *This = HTMLELEM3_THIS(iface);
316 FIXME("(%p)->(%s)\n", This, debugstr_variant(&v));
320 static HRESULT WINAPI HTMLElement3_get_onresizeend(IHTMLElement3 *iface, VARIANT *p)
322 HTMLElement *This = HTMLELEM3_THIS(iface);
323 FIXME("(%p)->(%p)\n", This, p);
327 static HRESULT WINAPI HTMLElement3_put_onmovestart(IHTMLElement3 *iface, VARIANT v)
329 HTMLElement *This = HTMLELEM3_THIS(iface);
330 FIXME("(%p)->(%s)\n", This, debugstr_variant(&v));
334 static HRESULT WINAPI HTMLElement3_get_onmovestart(IHTMLElement3 *iface, VARIANT *p)
336 HTMLElement *This = HTMLELEM3_THIS(iface);
337 FIXME("(%p)->(%p)\n", This, p);
341 static HRESULT WINAPI HTMLElement3_put_onmoveend(IHTMLElement3 *iface, VARIANT v)
343 HTMLElement *This = HTMLELEM3_THIS(iface);
344 FIXME("(%p)->(%s)\n", This, debugstr_variant(&v));
348 static HRESULT WINAPI HTMLElement3_get_onmoveend(IHTMLElement3 *iface, VARIANT *p)
350 HTMLElement *This = HTMLELEM3_THIS(iface);
351 FIXME("(%p)->(%p)\n", This, p);
355 static HRESULT WINAPI HTMLElement3_put_onmousecenter(IHTMLElement3 *iface, VARIANT v)
357 HTMLElement *This = HTMLELEM3_THIS(iface);
358 FIXME("(%p)->(%s)\n", This, debugstr_variant(&v));
362 static HRESULT WINAPI HTMLElement3_get_onmousecenter(IHTMLElement3 *iface, VARIANT *p)
364 HTMLElement *This = HTMLELEM3_THIS(iface);
365 FIXME("(%p)->(%p)\n", This, p);
369 static HRESULT WINAPI HTMLElement3_put_onmouseleave(IHTMLElement3 *iface, VARIANT v)
371 HTMLElement *This = HTMLELEM3_THIS(iface);
372 FIXME("(%p)->(%s)\n", This, debugstr_variant(&v));
376 static HRESULT WINAPI HTMLElement3_get_onmouseleave(IHTMLElement3 *iface, VARIANT *p)
378 HTMLElement *This = HTMLELEM3_THIS(iface);
379 FIXME("(%p)->(%p)\n", This, p);
383 static HRESULT WINAPI HTMLElement3_put_onactivate(IHTMLElement3 *iface, VARIANT v)
385 HTMLElement *This = HTMLELEM3_THIS(iface);
386 FIXME("(%p)->(%s)\n", This, debugstr_variant(&v));
390 static HRESULT WINAPI HTMLElement3_get_onactivate(IHTMLElement3 *iface, VARIANT *p)
392 HTMLElement *This = HTMLELEM3_THIS(iface);
393 FIXME("(%p)->(%p)\n", This, p);
397 static HRESULT WINAPI HTMLElement3_put_ondeactivate(IHTMLElement3 *iface, VARIANT v)
399 HTMLElement *This = HTMLELEM3_THIS(iface);
400 FIXME("(%p)->(%s)\n", This, debugstr_variant(&v));
404 static HRESULT WINAPI HTMLElement3_get_ondeactivate(IHTMLElement3 *iface, VARIANT *p)
406 HTMLElement *This = HTMLELEM3_THIS(iface);
407 FIXME("(%p)->(%p)\n", This, p);
411 static HRESULT WINAPI HTMLElement3_dragDrop(IHTMLElement3 *iface, VARIANT_BOOL *pfRet)
413 HTMLElement *This = HTMLELEM3_THIS(iface);
414 FIXME("(%p)->(%p)\n", This, pfRet);
418 static HRESULT WINAPI HTMLElement3_get_glyphMode(IHTMLElement3 *iface, LONG *p)
420 HTMLElement *This = HTMLELEM3_THIS(iface);
421 FIXME("(%p)->(%p)\n", This, p);
425 #undef HTMLELEM2_THIS
427 static const IHTMLElement3Vtbl HTMLElement3Vtbl = {
428 HTMLElement3_QueryInterface,
430 HTMLElement3_Release,
431 HTMLElement3_GetTypeInfoCount,
432 HTMLElement3_GetTypeInfo,
433 HTMLElement3_GetIDsOfNames,
435 HTMLElement3_mergeAttributes,
436 HTMLElement3_get_isMultiLine,
437 HTMLElement3_get_canHaveHTML,
438 HTMLElement3_put_onlayoutcomplete,
439 HTMLElement3_get_onlayoutcomplete,
440 HTMLElement3_put_onpage,
441 HTMLElement3_get_onpage,
442 HTMLElement3_put_inflateBlock,
443 HTMLElement3_get_inflateBlock,
444 HTMLElement3_put_onbeforedeactivate,
445 HTMLElement3_get_onbeforedeactivate,
446 HTMLElement3_setActive,
447 HTMLElement3_put_contentEditable,
448 HTMLElement3_get_contentEditable,
449 HTMLElement3_get_isContentEditable,
450 HTMLElement3_put_hideFocus,
451 HTMLElement3_get_hideFocus,
452 HTMLElement3_put_disabled,
453 HTMLElement3_get_disabled,
454 HTMLElement3_get_isDisabled,
455 HTMLElement3_put_onmove,
456 HTMLElement3_get_onmove,
457 HTMLElement3_put_oncontrolselect,
458 HTMLElement3_get_oncontrolselect,
459 HTMLElement3_fireEvent,
460 HTMLElement3_put_onresizestart,
461 HTMLElement3_get_onresizestart,
462 HTMLElement3_put_onresizeend,
463 HTMLElement3_get_onresizeend,
464 HTMLElement3_put_onmovestart,
465 HTMLElement3_get_onmovestart,
466 HTMLElement3_put_onmoveend,
467 HTMLElement3_get_onmoveend,
468 HTMLElement3_put_onmousecenter,
469 HTMLElement3_get_onmousecenter,
470 HTMLElement3_put_onmouseleave,
471 HTMLElement3_get_onmouseleave,
472 HTMLElement3_put_onactivate,
473 HTMLElement3_get_onactivate,
474 HTMLElement3_put_ondeactivate,
475 HTMLElement3_get_ondeactivate,
476 HTMLElement3_dragDrop,
477 HTMLElement3_get_glyphMode
480 void HTMLElement3_Init(HTMLElement *This)
482 This->lpHTMLElement3Vtbl = &HTMLElement3Vtbl;