mshtml: Forward IHTMLelement3::[get|put]_disabled to child object if possible.
[wine/multimedia.git] / dlls / mshtml / htmlelem3.c
blob05805b9a0b774bc79a7a6225642548960a8881f1
1 /*
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
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 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);
90 return E_NOTIMPL;
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);
97 return E_NOTIMPL;
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);
104 return E_NOTIMPL;
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));
111 return E_NOTIMPL;
114 static HRESULT WINAPI HTMLElement3_get_onlayoutcomplete(IHTMLElement3 *iface, VARIANT *p)
116 HTMLElement *This = HTMLELEM3_THIS(iface);
117 FIXME("(%p)->(%p)\n", This, p);
118 return E_NOTIMPL;
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));
125 return E_NOTIMPL;
128 static HRESULT WINAPI HTMLElement3_get_onpage(IHTMLElement3 *iface, VARIANT *p)
130 HTMLElement *This = HTMLELEM3_THIS(iface);
131 FIXME("(%p)->(%p)\n", This, p);
132 return E_NOTIMPL;
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);
139 return E_NOTIMPL;
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);
146 return E_NOTIMPL;
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));
153 return E_NOTIMPL;
156 static HRESULT WINAPI HTMLElement3_get_onbeforedeactivate(IHTMLElement3 *iface, VARIANT *p)
158 HTMLElement *This = HTMLELEM3_THIS(iface);
159 FIXME("(%p)->(%p)\n", This, p);
160 return E_NOTIMPL;
163 static HRESULT WINAPI HTMLElement3_setActive(IHTMLElement3 *iface)
165 HTMLElement *This = HTMLELEM3_THIS(iface);
166 FIXME("(%p)\n", This);
167 return E_NOTIMPL;
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));
174 return E_NOTIMPL;
177 static HRESULT WINAPI HTMLElement3_get_contentEditable(IHTMLElement3 *iface, BSTR *p)
179 HTMLElement *This = HTMLELEM3_THIS(iface);
180 FIXME("(%p)->(%p)\n", This, p);
181 return E_NOTIMPL;
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);
188 return E_NOTIMPL;
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);
195 return E_NOTIMPL;
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);
202 return E_NOTIMPL;
205 static HRESULT WINAPI HTMLElement3_put_disabled(IHTMLElement3 *iface, VARIANT_BOOL v)
207 HTMLElement *This = HTMLELEM3_THIS(iface);
209 TRACE("(%p)->(%x)\n", This, v);
211 if(This->node.vtbl->put_disabled)
212 return This->node.vtbl->put_disabled(&This->node, v);
214 FIXME("No implementation for element\n");
215 return E_NOTIMPL;
218 static HRESULT WINAPI HTMLElement3_get_disabled(IHTMLElement3 *iface, VARIANT_BOOL *p)
220 HTMLElement *This = HTMLELEM3_THIS(iface);
222 TRACE("(%p)->(%p)\n", This, p);
224 if(This->node.vtbl->get_disabled)
225 return This->node.vtbl->get_disabled(&This->node, p);
227 FIXME("No implementation for element\n");
228 return E_NOTIMPL;
231 static HRESULT WINAPI HTMLElement3_get_isDisabled(IHTMLElement3 *iface, VARIANT_BOOL *p)
233 HTMLElement *This = HTMLELEM3_THIS(iface);
234 FIXME("(%p)->(%p)\n", This, p);
235 return E_NOTIMPL;
238 static HRESULT WINAPI HTMLElement3_put_onmove(IHTMLElement3 *iface, VARIANT v)
240 HTMLElement *This = HTMLELEM3_THIS(iface);
241 FIXME("(%p)->(%s)\n", This, debugstr_variant(&v));
242 return E_NOTIMPL;
245 static HRESULT WINAPI HTMLElement3_get_onmove(IHTMLElement3 *iface, VARIANT *p)
247 HTMLElement *This = HTMLELEM3_THIS(iface);
248 FIXME("(%p)->(%p)\n", This, p);
249 return E_NOTIMPL;
252 static HRESULT WINAPI HTMLElement3_put_oncontrolselect(IHTMLElement3 *iface, VARIANT v)
254 HTMLElement *This = HTMLELEM3_THIS(iface);
255 FIXME("(%p)->(%s)\n", This, debugstr_variant(&v));
256 return E_NOTIMPL;
259 static HRESULT WINAPI HTMLElement3_get_oncontrolselect(IHTMLElement3 *iface, VARIANT *p)
261 HTMLElement *This = HTMLELEM3_THIS(iface);
262 FIXME("(%p)->(%p)\n", This, p);
263 return E_NOTIMPL;
266 static HRESULT WINAPI HTMLElement3_fireEvent(IHTMLElement3 *iface, BSTR bstrEventName,
267 VARIANT *pvarEventObject, VARIANT_BOOL *pfCancelled)
269 HTMLElement *This = HTMLELEM3_THIS(iface);
270 FIXME("(%p)->(%s %p %p)\n", This, debugstr_w(bstrEventName), pvarEventObject, pfCancelled);
271 return E_NOTIMPL;
274 static HRESULT WINAPI HTMLElement3_put_onresizestart(IHTMLElement3 *iface, VARIANT v)
276 HTMLElement *This = HTMLELEM3_THIS(iface);
277 FIXME("(%p)->(%s)\n", This, debugstr_variant(&v));
278 return E_NOTIMPL;
281 static HRESULT WINAPI HTMLElement3_get_onresizestart(IHTMLElement3 *iface, VARIANT *p)
283 HTMLElement *This = HTMLELEM3_THIS(iface);
284 FIXME("(%p)->(%p)\n", This, p);
285 return E_NOTIMPL;
288 static HRESULT WINAPI HTMLElement3_put_onresizeend(IHTMLElement3 *iface, VARIANT v)
290 HTMLElement *This = HTMLELEM3_THIS(iface);
291 FIXME("(%p)->(%s)\n", This, debugstr_variant(&v));
292 return E_NOTIMPL;
295 static HRESULT WINAPI HTMLElement3_get_onresizeend(IHTMLElement3 *iface, VARIANT *p)
297 HTMLElement *This = HTMLELEM3_THIS(iface);
298 FIXME("(%p)->(%p)\n", This, p);
299 return E_NOTIMPL;
302 static HRESULT WINAPI HTMLElement3_put_onmovestart(IHTMLElement3 *iface, VARIANT v)
304 HTMLElement *This = HTMLELEM3_THIS(iface);
305 FIXME("(%p)->(%s)\n", This, debugstr_variant(&v));
306 return E_NOTIMPL;
309 static HRESULT WINAPI HTMLElement3_get_onmovestart(IHTMLElement3 *iface, VARIANT *p)
311 HTMLElement *This = HTMLELEM3_THIS(iface);
312 FIXME("(%p)->(%p)\n", This, p);
313 return E_NOTIMPL;
316 static HRESULT WINAPI HTMLElement3_put_onmoveend(IHTMLElement3 *iface, VARIANT v)
318 HTMLElement *This = HTMLELEM3_THIS(iface);
319 FIXME("(%p)->(%s)\n", This, debugstr_variant(&v));
320 return E_NOTIMPL;
323 static HRESULT WINAPI HTMLElement3_get_onmoveend(IHTMLElement3 *iface, VARIANT *p)
325 HTMLElement *This = HTMLELEM3_THIS(iface);
326 FIXME("(%p)->(%p)\n", This, p);
327 return E_NOTIMPL;
330 static HRESULT WINAPI HTMLElement3_put_onmousecenter(IHTMLElement3 *iface, VARIANT v)
332 HTMLElement *This = HTMLELEM3_THIS(iface);
333 FIXME("(%p)->(%s)\n", This, debugstr_variant(&v));
334 return E_NOTIMPL;
337 static HRESULT WINAPI HTMLElement3_get_onmousecenter(IHTMLElement3 *iface, VARIANT *p)
339 HTMLElement *This = HTMLELEM3_THIS(iface);
340 FIXME("(%p)->(%p)\n", This, p);
341 return E_NOTIMPL;
344 static HRESULT WINAPI HTMLElement3_put_onmouseleave(IHTMLElement3 *iface, VARIANT v)
346 HTMLElement *This = HTMLELEM3_THIS(iface);
347 FIXME("(%p)->(%s)\n", This, debugstr_variant(&v));
348 return E_NOTIMPL;
351 static HRESULT WINAPI HTMLElement3_get_onmouseleave(IHTMLElement3 *iface, VARIANT *p)
353 HTMLElement *This = HTMLELEM3_THIS(iface);
354 FIXME("(%p)->(%p)\n", This, p);
355 return E_NOTIMPL;
358 static HRESULT WINAPI HTMLElement3_put_onactivate(IHTMLElement3 *iface, VARIANT v)
360 HTMLElement *This = HTMLELEM3_THIS(iface);
361 FIXME("(%p)->(%s)\n", This, debugstr_variant(&v));
362 return E_NOTIMPL;
365 static HRESULT WINAPI HTMLElement3_get_onactivate(IHTMLElement3 *iface, VARIANT *p)
367 HTMLElement *This = HTMLELEM3_THIS(iface);
368 FIXME("(%p)->(%p)\n", This, p);
369 return E_NOTIMPL;
372 static HRESULT WINAPI HTMLElement3_put_ondeactivate(IHTMLElement3 *iface, VARIANT v)
374 HTMLElement *This = HTMLELEM3_THIS(iface);
375 FIXME("(%p)->(%s)\n", This, debugstr_variant(&v));
376 return E_NOTIMPL;
379 static HRESULT WINAPI HTMLElement3_get_ondeactivate(IHTMLElement3 *iface, VARIANT *p)
381 HTMLElement *This = HTMLELEM3_THIS(iface);
382 FIXME("(%p)->(%p)\n", This, p);
383 return E_NOTIMPL;
386 static HRESULT WINAPI HTMLElement3_dragDrop(IHTMLElement3 *iface, VARIANT_BOOL *pfRet)
388 HTMLElement *This = HTMLELEM3_THIS(iface);
389 FIXME("(%p)->(%p)\n", This, pfRet);
390 return E_NOTIMPL;
393 static HRESULT WINAPI HTMLElement3_get_glyphMode(IHTMLElement3 *iface, LONG *p)
395 HTMLElement *This = HTMLELEM3_THIS(iface);
396 FIXME("(%p)->(%p)\n", This, p);
397 return E_NOTIMPL;
400 #undef HTMLELEM2_THIS
402 static const IHTMLElement3Vtbl HTMLElement3Vtbl = {
403 HTMLElement3_QueryInterface,
404 HTMLElement3_AddRef,
405 HTMLElement3_Release,
406 HTMLElement3_GetTypeInfoCount,
407 HTMLElement3_GetTypeInfo,
408 HTMLElement3_GetIDsOfNames,
409 HTMLElement3_Invoke,
410 HTMLElement3_mergeAttributes,
411 HTMLElement3_get_isMultiLine,
412 HTMLElement3_get_canHaveHTML,
413 HTMLElement3_put_onlayoutcomplete,
414 HTMLElement3_get_onlayoutcomplete,
415 HTMLElement3_put_onpage,
416 HTMLElement3_get_onpage,
417 HTMLElement3_put_inflateBlock,
418 HTMLElement3_get_inflateBlock,
419 HTMLElement3_put_onbeforedeactivate,
420 HTMLElement3_get_onbeforedeactivate,
421 HTMLElement3_setActive,
422 HTMLElement3_put_contentEditable,
423 HTMLElement3_get_contentEditable,
424 HTMLElement3_get_isContentEditable,
425 HTMLElement3_put_hideFocus,
426 HTMLElement3_get_hideFocus,
427 HTMLElement3_put_disabled,
428 HTMLElement3_get_disabled,
429 HTMLElement3_get_isDisabled,
430 HTMLElement3_put_onmove,
431 HTMLElement3_get_onmove,
432 HTMLElement3_put_oncontrolselect,
433 HTMLElement3_get_oncontrolselect,
434 HTMLElement3_fireEvent,
435 HTMLElement3_put_onresizestart,
436 HTMLElement3_get_onresizestart,
437 HTMLElement3_put_onresizeend,
438 HTMLElement3_get_onresizeend,
439 HTMLElement3_put_onmovestart,
440 HTMLElement3_get_onmovestart,
441 HTMLElement3_put_onmoveend,
442 HTMLElement3_get_onmoveend,
443 HTMLElement3_put_onmousecenter,
444 HTMLElement3_get_onmousecenter,
445 HTMLElement3_put_onmouseleave,
446 HTMLElement3_get_onmouseleave,
447 HTMLElement3_put_onactivate,
448 HTMLElement3_get_onactivate,
449 HTMLElement3_put_ondeactivate,
450 HTMLElement3_get_ondeactivate,
451 HTMLElement3_dragDrop,
452 HTMLElement3_get_glyphMode
455 void HTMLElement3_Init(HTMLElement *This)
457 This->lpHTMLElement3Vtbl = &HTMLElement3Vtbl;