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"
32 #include "htmlevent.h"
34 WINE_DEFAULT_DEBUG_CHANNEL(mshtml);
36 #define HTMLELEM3_THIS(iface) DEFINE_THIS(HTMLElement, HTMLElement3, iface)
38 static HRESULT WINAPI HTMLElement3_QueryInterface(IHTMLElement3 *iface,
39 REFIID riid, void **ppv)
41 HTMLElement *This = HTMLELEM3_THIS(iface);
42 return IHTMLElement_QueryInterface(HTMLELEM(This), riid, ppv);
45 static ULONG WINAPI HTMLElement3_AddRef(IHTMLElement3 *iface)
47 HTMLElement *This = HTMLELEM3_THIS(iface);
48 return IHTMLElement_AddRef(HTMLELEM(This));
51 static ULONG WINAPI HTMLElement3_Release(IHTMLElement3 *iface)
53 HTMLElement *This = HTMLELEM3_THIS(iface);
54 return IHTMLElement_Release(HTMLELEM(This));
57 static HRESULT WINAPI HTMLElement3_GetTypeInfoCount(IHTMLElement3 *iface, UINT *pctinfo)
59 HTMLElement *This = HTMLELEM3_THIS(iface);
60 return IDispatchEx_GetTypeInfoCount(DISPATCHEX(&This->node.dispex), pctinfo);
63 static HRESULT WINAPI HTMLElement3_GetTypeInfo(IHTMLElement3 *iface, UINT iTInfo,
64 LCID lcid, ITypeInfo **ppTInfo)
66 HTMLElement *This = HTMLELEM3_THIS(iface);
67 return IDispatchEx_GetTypeInfo(DISPATCHEX(&This->node.dispex), iTInfo, lcid, ppTInfo);
70 static HRESULT WINAPI HTMLElement3_GetIDsOfNames(IHTMLElement3 *iface, REFIID riid,
71 LPOLESTR *rgszNames, UINT cNames,
72 LCID lcid, DISPID *rgDispId)
74 HTMLElement *This = HTMLELEM3_THIS(iface);
75 return IDispatchEx_GetIDsOfNames(DISPATCHEX(&This->node.dispex), riid, rgszNames, cNames, lcid, rgDispId);
78 static HRESULT WINAPI HTMLElement3_Invoke(IHTMLElement3 *iface, DISPID dispIdMember,
79 REFIID riid, LCID lcid, WORD wFlags, DISPPARAMS *pDispParams,
80 VARIANT *pVarResult, EXCEPINFO *pExcepInfo, UINT *puArgErr)
82 HTMLElement *This = HTMLELEM3_THIS(iface);
83 return IDispatchEx_Invoke(DISPATCHEX(&This->node.dispex), dispIdMember, riid, lcid,
84 wFlags, pDispParams, pVarResult, pExcepInfo, puArgErr);
87 static HRESULT WINAPI HTMLElement3_mergeAttributes(IHTMLElement3 *iface, IHTMLElement *mergeThis, VARIANT *pvarFlags)
89 HTMLElement *This = HTMLELEM3_THIS(iface);
90 FIXME("(%p)->(%p %p)\n", This, mergeThis, pvarFlags);
94 static HRESULT WINAPI HTMLElement3_get_isMultiLine(IHTMLElement3 *iface, VARIANT_BOOL *p)
96 HTMLElement *This = HTMLELEM3_THIS(iface);
97 FIXME("(%p)->(%p)\n", This, p);
101 static HRESULT WINAPI HTMLElement3_get_canHaveHTML(IHTMLElement3 *iface, VARIANT_BOOL *p)
103 HTMLElement *This = HTMLELEM3_THIS(iface);
104 FIXME("(%p)->(%p)\n", This, p);
108 static HRESULT WINAPI HTMLElement3_put_onlayoutcomplete(IHTMLElement3 *iface, VARIANT v)
110 HTMLElement *This = HTMLELEM3_THIS(iface);
111 FIXME("(%p)->(%s)\n", This, debugstr_variant(&v));
115 static HRESULT WINAPI HTMLElement3_get_onlayoutcomplete(IHTMLElement3 *iface, VARIANT *p)
117 HTMLElement *This = HTMLELEM3_THIS(iface);
118 FIXME("(%p)->(%p)\n", This, p);
122 static HRESULT WINAPI HTMLElement3_put_onpage(IHTMLElement3 *iface, VARIANT v)
124 HTMLElement *This = HTMLELEM3_THIS(iface);
125 FIXME("(%p)->(%s)\n", This, debugstr_variant(&v));
129 static HRESULT WINAPI HTMLElement3_get_onpage(IHTMLElement3 *iface, VARIANT *p)
131 HTMLElement *This = HTMLELEM3_THIS(iface);
132 FIXME("(%p)->(%p)\n", This, p);
136 static HRESULT WINAPI HTMLElement3_put_inflateBlock(IHTMLElement3 *iface, VARIANT_BOOL v)
138 HTMLElement *This = HTMLELEM3_THIS(iface);
139 FIXME("(%p)->(%x)\n", This, v);
143 static HRESULT WINAPI HTMLElement3_get_inflateBlock(IHTMLElement3 *iface, VARIANT_BOOL *p)
145 HTMLElement *This = HTMLELEM3_THIS(iface);
146 FIXME("(%p)->(%p)\n", This, p);
150 static HRESULT WINAPI HTMLElement3_put_onbeforedeactivate(IHTMLElement3 *iface, VARIANT v)
152 HTMLElement *This = HTMLELEM3_THIS(iface);
153 FIXME("(%p)->(%s)\n", This, debugstr_variant(&v));
157 static HRESULT WINAPI HTMLElement3_get_onbeforedeactivate(IHTMLElement3 *iface, VARIANT *p)
159 HTMLElement *This = HTMLELEM3_THIS(iface);
160 FIXME("(%p)->(%p)\n", This, p);
164 static HRESULT WINAPI HTMLElement3_setActive(IHTMLElement3 *iface)
166 HTMLElement *This = HTMLELEM3_THIS(iface);
167 FIXME("(%p)\n", This);
171 static HRESULT WINAPI HTMLElement3_put_contentEditable(IHTMLElement3 *iface, BSTR v)
173 HTMLElement *This = HTMLELEM3_THIS(iface);
174 FIXME("(%p)->(%s)\n", This, debugstr_w(v));
178 static HRESULT WINAPI HTMLElement3_get_contentEditable(IHTMLElement3 *iface, BSTR *p)
180 HTMLElement *This = HTMLELEM3_THIS(iface);
181 FIXME("(%p)->(%p)\n", This, p);
185 static HRESULT WINAPI HTMLElement3_get_isContentEditable(IHTMLElement3 *iface, VARIANT_BOOL *p)
187 HTMLElement *This = HTMLELEM3_THIS(iface);
188 FIXME("(%p)->(%p)\n", This, p);
192 static HRESULT WINAPI HTMLElement3_put_hideFocus(IHTMLElement3 *iface, VARIANT_BOOL v)
194 HTMLElement *This = HTMLELEM3_THIS(iface);
195 FIXME("(%p)->(%x)\n", This, v);
199 static HRESULT WINAPI HTMLElement3_get_hideFocus(IHTMLElement3 *iface, VARIANT_BOOL *p)
201 HTMLElement *This = HTMLELEM3_THIS(iface);
202 FIXME("(%p)->(%p)\n", This, p);
206 static const WCHAR disabledW[] = {'d','i','s','a','b','l','e','d',0};
208 static HRESULT WINAPI HTMLElement3_put_disabled(IHTMLElement3 *iface, VARIANT_BOOL v)
210 HTMLElement *This = HTMLELEM3_THIS(iface);
214 TRACE("(%p)->(%x)\n", This, v);
216 if(This->node.vtbl->put_disabled)
217 return This->node.vtbl->put_disabled(&This->node, v);
219 hres = dispex_get_dprop_ref(&This->node.dispex, disabledW, TRUE, &var);
229 static HRESULT WINAPI HTMLElement3_get_disabled(IHTMLElement3 *iface, VARIANT_BOOL *p)
231 HTMLElement *This = HTMLELEM3_THIS(iface);
235 TRACE("(%p)->(%p)\n", This, p);
237 if(This->node.vtbl->get_disabled)
238 return This->node.vtbl->get_disabled(&This->node, p);
240 hres = dispex_get_dprop_ref(&This->node.dispex, disabledW, FALSE, &var);
241 if(hres == DISP_E_UNKNOWNNAME) {
248 if(V_VT(var) != VT_BOOL) {
249 FIXME("vt %d\n", V_VT(var));
257 static HRESULT WINAPI HTMLElement3_get_isDisabled(IHTMLElement3 *iface, VARIANT_BOOL *p)
259 HTMLElement *This = HTMLELEM3_THIS(iface);
260 FIXME("(%p)->(%p)\n", This, p);
264 static HRESULT WINAPI HTMLElement3_put_onmove(IHTMLElement3 *iface, VARIANT v)
266 HTMLElement *This = HTMLELEM3_THIS(iface);
267 FIXME("(%p)->(%s)\n", This, debugstr_variant(&v));
271 static HRESULT WINAPI HTMLElement3_get_onmove(IHTMLElement3 *iface, VARIANT *p)
273 HTMLElement *This = HTMLELEM3_THIS(iface);
274 FIXME("(%p)->(%p)\n", This, p);
278 static HRESULT WINAPI HTMLElement3_put_oncontrolselect(IHTMLElement3 *iface, VARIANT v)
280 HTMLElement *This = HTMLELEM3_THIS(iface);
281 FIXME("(%p)->(%s)\n", This, debugstr_variant(&v));
285 static HRESULT WINAPI HTMLElement3_get_oncontrolselect(IHTMLElement3 *iface, VARIANT *p)
287 HTMLElement *This = HTMLELEM3_THIS(iface);
288 FIXME("(%p)->(%p)\n", This, p);
292 static HRESULT WINAPI HTMLElement3_fireEvent(IHTMLElement3 *iface, BSTR bstrEventName,
293 VARIANT *pvarEventObject, VARIANT_BOOL *pfCancelled)
295 HTMLElement *This = HTMLELEM3_THIS(iface);
297 TRACE("(%p)->(%s %s %p)\n", This, debugstr_w(bstrEventName), debugstr_variant(pvarEventObject),
300 return dispatch_event(&This->node, bstrEventName, pvarEventObject, pfCancelled);
303 static HRESULT WINAPI HTMLElement3_put_onresizestart(IHTMLElement3 *iface, VARIANT v)
305 HTMLElement *This = HTMLELEM3_THIS(iface);
306 FIXME("(%p)->(%s)\n", This, debugstr_variant(&v));
310 static HRESULT WINAPI HTMLElement3_get_onresizestart(IHTMLElement3 *iface, VARIANT *p)
312 HTMLElement *This = HTMLELEM3_THIS(iface);
313 FIXME("(%p)->(%p)\n", This, p);
317 static HRESULT WINAPI HTMLElement3_put_onresizeend(IHTMLElement3 *iface, VARIANT v)
319 HTMLElement *This = HTMLELEM3_THIS(iface);
320 FIXME("(%p)->(%s)\n", This, debugstr_variant(&v));
324 static HRESULT WINAPI HTMLElement3_get_onresizeend(IHTMLElement3 *iface, VARIANT *p)
326 HTMLElement *This = HTMLELEM3_THIS(iface);
327 FIXME("(%p)->(%p)\n", This, p);
331 static HRESULT WINAPI HTMLElement3_put_onmovestart(IHTMLElement3 *iface, VARIANT v)
333 HTMLElement *This = HTMLELEM3_THIS(iface);
334 FIXME("(%p)->(%s)\n", This, debugstr_variant(&v));
338 static HRESULT WINAPI HTMLElement3_get_onmovestart(IHTMLElement3 *iface, VARIANT *p)
340 HTMLElement *This = HTMLELEM3_THIS(iface);
341 FIXME("(%p)->(%p)\n", This, p);
345 static HRESULT WINAPI HTMLElement3_put_onmoveend(IHTMLElement3 *iface, VARIANT v)
347 HTMLElement *This = HTMLELEM3_THIS(iface);
348 FIXME("(%p)->(%s)\n", This, debugstr_variant(&v));
352 static HRESULT WINAPI HTMLElement3_get_onmoveend(IHTMLElement3 *iface, VARIANT *p)
354 HTMLElement *This = HTMLELEM3_THIS(iface);
355 FIXME("(%p)->(%p)\n", This, p);
359 static HRESULT WINAPI HTMLElement3_put_onmousecenter(IHTMLElement3 *iface, VARIANT v)
361 HTMLElement *This = HTMLELEM3_THIS(iface);
362 FIXME("(%p)->(%s)\n", This, debugstr_variant(&v));
366 static HRESULT WINAPI HTMLElement3_get_onmousecenter(IHTMLElement3 *iface, VARIANT *p)
368 HTMLElement *This = HTMLELEM3_THIS(iface);
369 FIXME("(%p)->(%p)\n", This, p);
373 static HRESULT WINAPI HTMLElement3_put_onmouseleave(IHTMLElement3 *iface, VARIANT v)
375 HTMLElement *This = HTMLELEM3_THIS(iface);
376 FIXME("(%p)->(%s)\n", This, debugstr_variant(&v));
380 static HRESULT WINAPI HTMLElement3_get_onmouseleave(IHTMLElement3 *iface, VARIANT *p)
382 HTMLElement *This = HTMLELEM3_THIS(iface);
383 FIXME("(%p)->(%p)\n", This, p);
387 static HRESULT WINAPI HTMLElement3_put_onactivate(IHTMLElement3 *iface, VARIANT v)
389 HTMLElement *This = HTMLELEM3_THIS(iface);
390 FIXME("(%p)->(%s)\n", This, debugstr_variant(&v));
394 static HRESULT WINAPI HTMLElement3_get_onactivate(IHTMLElement3 *iface, VARIANT *p)
396 HTMLElement *This = HTMLELEM3_THIS(iface);
397 FIXME("(%p)->(%p)\n", This, p);
401 static HRESULT WINAPI HTMLElement3_put_ondeactivate(IHTMLElement3 *iface, VARIANT v)
403 HTMLElement *This = HTMLELEM3_THIS(iface);
404 FIXME("(%p)->(%s)\n", This, debugstr_variant(&v));
408 static HRESULT WINAPI HTMLElement3_get_ondeactivate(IHTMLElement3 *iface, VARIANT *p)
410 HTMLElement *This = HTMLELEM3_THIS(iface);
411 FIXME("(%p)->(%p)\n", This, p);
415 static HRESULT WINAPI HTMLElement3_dragDrop(IHTMLElement3 *iface, VARIANT_BOOL *pfRet)
417 HTMLElement *This = HTMLELEM3_THIS(iface);
418 FIXME("(%p)->(%p)\n", This, pfRet);
422 static HRESULT WINAPI HTMLElement3_get_glyphMode(IHTMLElement3 *iface, LONG *p)
424 HTMLElement *This = HTMLELEM3_THIS(iface);
425 FIXME("(%p)->(%p)\n", This, p);
429 #undef HTMLELEM2_THIS
431 static const IHTMLElement3Vtbl HTMLElement3Vtbl = {
432 HTMLElement3_QueryInterface,
434 HTMLElement3_Release,
435 HTMLElement3_GetTypeInfoCount,
436 HTMLElement3_GetTypeInfo,
437 HTMLElement3_GetIDsOfNames,
439 HTMLElement3_mergeAttributes,
440 HTMLElement3_get_isMultiLine,
441 HTMLElement3_get_canHaveHTML,
442 HTMLElement3_put_onlayoutcomplete,
443 HTMLElement3_get_onlayoutcomplete,
444 HTMLElement3_put_onpage,
445 HTMLElement3_get_onpage,
446 HTMLElement3_put_inflateBlock,
447 HTMLElement3_get_inflateBlock,
448 HTMLElement3_put_onbeforedeactivate,
449 HTMLElement3_get_onbeforedeactivate,
450 HTMLElement3_setActive,
451 HTMLElement3_put_contentEditable,
452 HTMLElement3_get_contentEditable,
453 HTMLElement3_get_isContentEditable,
454 HTMLElement3_put_hideFocus,
455 HTMLElement3_get_hideFocus,
456 HTMLElement3_put_disabled,
457 HTMLElement3_get_disabled,
458 HTMLElement3_get_isDisabled,
459 HTMLElement3_put_onmove,
460 HTMLElement3_get_onmove,
461 HTMLElement3_put_oncontrolselect,
462 HTMLElement3_get_oncontrolselect,
463 HTMLElement3_fireEvent,
464 HTMLElement3_put_onresizestart,
465 HTMLElement3_get_onresizestart,
466 HTMLElement3_put_onresizeend,
467 HTMLElement3_get_onresizeend,
468 HTMLElement3_put_onmovestart,
469 HTMLElement3_get_onmovestart,
470 HTMLElement3_put_onmoveend,
471 HTMLElement3_get_onmoveend,
472 HTMLElement3_put_onmousecenter,
473 HTMLElement3_get_onmousecenter,
474 HTMLElement3_put_onmouseleave,
475 HTMLElement3_get_onmouseleave,
476 HTMLElement3_put_onactivate,
477 HTMLElement3_get_onactivate,
478 HTMLElement3_put_ondeactivate,
479 HTMLElement3_get_ondeactivate,
480 HTMLElement3_dragDrop,
481 HTMLElement3_get_glyphMode
484 void HTMLElement3_Init(HTMLElement *This)
486 This->lpHTMLElement3Vtbl = &HTMLElement3Vtbl;