2 * Copyright 2011,2012 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
29 #include "wine/debug.h"
31 #include "mshtml_private.h"
33 WINE_DEFAULT_DEBUG_CHANNEL(mshtml
);
35 struct HTMLTitleElement
{
38 IHTMLTitleElement IHTMLTitleElement_iface
;
41 static inline HTMLTitleElement
*impl_from_IHTMLTitleElement(IHTMLTitleElement
*iface
)
43 return CONTAINING_RECORD(iface
, HTMLTitleElement
, IHTMLTitleElement_iface
);
46 static HRESULT WINAPI
HTMLTitleElement_QueryInterface(IHTMLTitleElement
*iface
,
47 REFIID riid
, void **ppv
)
49 HTMLTitleElement
*This
= impl_from_IHTMLTitleElement(iface
);
51 return IHTMLDOMNode_QueryInterface(&This
->element
.node
.IHTMLDOMNode_iface
, riid
, ppv
);
54 static ULONG WINAPI
HTMLTitleElement_AddRef(IHTMLTitleElement
*iface
)
56 HTMLTitleElement
*This
= impl_from_IHTMLTitleElement(iface
);
58 return IHTMLDOMNode_AddRef(&This
->element
.node
.IHTMLDOMNode_iface
);
61 static ULONG WINAPI
HTMLTitleElement_Release(IHTMLTitleElement
*iface
)
63 HTMLTitleElement
*This
= impl_from_IHTMLTitleElement(iface
);
65 return IHTMLDOMNode_Release(&This
->element
.node
.IHTMLDOMNode_iface
);
68 static HRESULT WINAPI
HTMLTitleElement_GetTypeInfoCount(IHTMLTitleElement
*iface
, UINT
*pctinfo
)
70 HTMLTitleElement
*This
= impl_from_IHTMLTitleElement(iface
);
72 return IDispatchEx_GetTypeInfoCount(&This
->element
.node
.event_target
.dispex
.IDispatchEx_iface
, pctinfo
);
75 static HRESULT WINAPI
HTMLTitleElement_GetTypeInfo(IHTMLTitleElement
*iface
, UINT iTInfo
,
76 LCID lcid
, ITypeInfo
**ppTInfo
)
78 HTMLTitleElement
*This
= impl_from_IHTMLTitleElement(iface
);
80 return IDispatchEx_GetTypeInfo(&This
->element
.node
.event_target
.dispex
.IDispatchEx_iface
, iTInfo
, lcid
,
84 static HRESULT WINAPI
HTMLTitleElement_GetIDsOfNames(IHTMLTitleElement
*iface
, REFIID riid
,
85 LPOLESTR
*rgszNames
, UINT cNames
, LCID lcid
, DISPID
*rgDispId
)
87 HTMLTitleElement
*This
= impl_from_IHTMLTitleElement(iface
);
89 return IDispatchEx_GetIDsOfNames(&This
->element
.node
.event_target
.dispex
.IDispatchEx_iface
, riid
, rgszNames
,
90 cNames
, lcid
, rgDispId
);
93 static HRESULT WINAPI
HTMLTitleElement_Invoke(IHTMLTitleElement
*iface
, DISPID dispIdMember
,
94 REFIID riid
, LCID lcid
, WORD wFlags
, DISPPARAMS
*pDispParams
,
95 VARIANT
*pVarResult
, EXCEPINFO
*pExcepInfo
, UINT
*puArgErr
)
97 HTMLTitleElement
*This
= impl_from_IHTMLTitleElement(iface
);
99 return IDispatchEx_Invoke(&This
->element
.node
.event_target
.dispex
.IDispatchEx_iface
, dispIdMember
, riid
,
100 lcid
, wFlags
, pDispParams
, pVarResult
, pExcepInfo
, puArgErr
);
103 static HRESULT WINAPI
HTMLTitleElement_put_text(IHTMLTitleElement
*iface
, BSTR v
)
105 HTMLTitleElement
*This
= impl_from_IHTMLTitleElement(iface
);
106 FIXME("(%p)->(%s)\n", This
, debugstr_w(v
));
110 static HRESULT WINAPI
HTMLTitleElement_get_text(IHTMLTitleElement
*iface
, BSTR
*p
)
112 HTMLTitleElement
*This
= impl_from_IHTMLTitleElement(iface
);
113 FIXME("(%p)->(%p)\n", This
, p
);
117 static const IHTMLTitleElementVtbl HTMLTitleElementVtbl
= {
118 HTMLTitleElement_QueryInterface
,
119 HTMLTitleElement_AddRef
,
120 HTMLTitleElement_Release
,
121 HTMLTitleElement_GetTypeInfoCount
,
122 HTMLTitleElement_GetTypeInfo
,
123 HTMLTitleElement_GetIDsOfNames
,
124 HTMLTitleElement_Invoke
,
125 HTMLTitleElement_put_text
,
126 HTMLTitleElement_get_text
129 static inline HTMLTitleElement
*HTMLTitleElement_from_HTMLDOMNode(HTMLDOMNode
*iface
)
131 return CONTAINING_RECORD(iface
, HTMLTitleElement
, element
.node
);
134 static HRESULT
HTMLTitleElement_QI(HTMLDOMNode
*iface
, REFIID riid
, void **ppv
)
136 HTMLTitleElement
*This
= HTMLTitleElement_from_HTMLDOMNode(iface
);
138 TRACE("(%p)->(%s %p)\n", This
, debugstr_mshtml_guid(riid
), ppv
);
140 if(IsEqualGUID(&IID_IHTMLTitleElement
, riid
))
141 *ppv
= &This
->IHTMLTitleElement_iface
;
143 return HTMLElement_QI(&This
->element
.node
, riid
, ppv
);
145 IUnknown_AddRef((IUnknown
*)*ppv
);
149 static void HTMLTitleElement_destructor(HTMLDOMNode
*iface
)
151 HTMLTitleElement
*This
= HTMLTitleElement_from_HTMLDOMNode(iface
);
153 HTMLElement_destructor(&This
->element
.node
);
156 static const NodeImplVtbl HTMLTitleElementImplVtbl
= {
157 &CLSID_HTMLTitleElement
,
159 HTMLTitleElement_destructor
,
162 HTMLElement_handle_event
,
163 HTMLElement_get_attr_col
166 static const tid_t HTMLTitleElement_iface_tids
[] = {
168 IHTMLTitleElement_tid
,
171 static dispex_static_data_t HTMLTitleElement_dispex
= {
173 DispHTMLTitleElement_tid
,
174 HTMLTitleElement_iface_tids
,
175 HTMLElement_init_dispex_info
178 HRESULT
HTMLTitleElement_Create(HTMLDocumentNode
*doc
, nsIDOMElement
*nselem
, HTMLElement
**elem
)
180 HTMLTitleElement
*ret
;
182 ret
= heap_alloc_zero(sizeof(*ret
));
184 return E_OUTOFMEMORY
;
186 ret
->IHTMLTitleElement_iface
.lpVtbl
= &HTMLTitleElementVtbl
;
187 ret
->element
.node
.vtbl
= &HTMLTitleElementImplVtbl
;
189 HTMLElement_Init(&ret
->element
, doc
, nselem
, &HTMLTitleElement_dispex
);
191 *elem
= &ret
->element
;
195 struct HTMLHtmlElement
{
198 IHTMLHtmlElement IHTMLHtmlElement_iface
;
201 static inline HTMLHtmlElement
*impl_from_IHTMLHtmlElement(IHTMLHtmlElement
*iface
)
203 return CONTAINING_RECORD(iface
, HTMLHtmlElement
, IHTMLHtmlElement_iface
);
206 static HRESULT WINAPI
HTMLHtmlElement_QueryInterface(IHTMLHtmlElement
*iface
,
207 REFIID riid
, void **ppv
)
209 HTMLHtmlElement
*This
= impl_from_IHTMLHtmlElement(iface
);
211 return IHTMLDOMNode_QueryInterface(&This
->element
.node
.IHTMLDOMNode_iface
, riid
, ppv
);
214 static ULONG WINAPI
HTMLHtmlElement_AddRef(IHTMLHtmlElement
*iface
)
216 HTMLHtmlElement
*This
= impl_from_IHTMLHtmlElement(iface
);
218 return IHTMLDOMNode_AddRef(&This
->element
.node
.IHTMLDOMNode_iface
);
221 static ULONG WINAPI
HTMLHtmlElement_Release(IHTMLHtmlElement
*iface
)
223 HTMLHtmlElement
*This
= impl_from_IHTMLHtmlElement(iface
);
225 return IHTMLDOMNode_Release(&This
->element
.node
.IHTMLDOMNode_iface
);
228 static HRESULT WINAPI
HTMLHtmlElement_GetTypeInfoCount(IHTMLHtmlElement
*iface
, UINT
*pctinfo
)
230 HTMLHtmlElement
*This
= impl_from_IHTMLHtmlElement(iface
);
232 return IDispatchEx_GetTypeInfoCount(&This
->element
.node
.event_target
.dispex
.IDispatchEx_iface
, pctinfo
);
235 static HRESULT WINAPI
HTMLHtmlElement_GetTypeInfo(IHTMLHtmlElement
*iface
, UINT iTInfo
,
236 LCID lcid
, ITypeInfo
**ppTInfo
)
238 HTMLHtmlElement
*This
= impl_from_IHTMLHtmlElement(iface
);
240 return IDispatchEx_GetTypeInfo(&This
->element
.node
.event_target
.dispex
.IDispatchEx_iface
, iTInfo
, lcid
,
244 static HRESULT WINAPI
HTMLHtmlElement_GetIDsOfNames(IHTMLHtmlElement
*iface
, REFIID riid
,
245 LPOLESTR
*rgszNames
, UINT cNames
,
246 LCID lcid
, DISPID
*rgDispId
)
248 HTMLHtmlElement
*This
= impl_from_IHTMLHtmlElement(iface
);
250 return IDispatchEx_GetIDsOfNames(&This
->element
.node
.event_target
.dispex
.IDispatchEx_iface
, riid
, rgszNames
,
251 cNames
, lcid
, rgDispId
);
254 static HRESULT WINAPI
HTMLHtmlElement_Invoke(IHTMLHtmlElement
*iface
, DISPID dispIdMember
,
255 REFIID riid
, LCID lcid
, WORD wFlags
, DISPPARAMS
*pDispParams
,
256 VARIANT
*pVarResult
, EXCEPINFO
*pExcepInfo
, UINT
*puArgErr
)
258 HTMLHtmlElement
*This
= impl_from_IHTMLHtmlElement(iface
);
260 return IDispatchEx_Invoke(&This
->element
.node
.event_target
.dispex
.IDispatchEx_iface
, dispIdMember
, riid
,
261 lcid
, wFlags
, pDispParams
, pVarResult
, pExcepInfo
, puArgErr
);
264 static HRESULT WINAPI
HTMLHtmlElement_put_version(IHTMLHtmlElement
*iface
, BSTR v
)
266 HTMLHtmlElement
*This
= impl_from_IHTMLHtmlElement(iface
);
267 FIXME("(%p)->(%s)\n", This
, debugstr_w(v
));
271 static HRESULT WINAPI
HTMLHtmlElement_get_version(IHTMLHtmlElement
*iface
, BSTR
*p
)
273 HTMLHtmlElement
*This
= impl_from_IHTMLHtmlElement(iface
);
274 FIXME("(%p)->(%p)\n", This
, p
);
278 static const IHTMLHtmlElementVtbl HTMLHtmlElementVtbl
= {
279 HTMLHtmlElement_QueryInterface
,
280 HTMLHtmlElement_AddRef
,
281 HTMLHtmlElement_Release
,
282 HTMLHtmlElement_GetTypeInfoCount
,
283 HTMLHtmlElement_GetTypeInfo
,
284 HTMLHtmlElement_GetIDsOfNames
,
285 HTMLHtmlElement_Invoke
,
286 HTMLHtmlElement_put_version
,
287 HTMLHtmlElement_get_version
290 static inline HTMLHtmlElement
*HTMLHtmlElement_from_HTMLDOMNode(HTMLDOMNode
*iface
)
292 return CONTAINING_RECORD(iface
, HTMLHtmlElement
, element
.node
);
295 static HRESULT
HTMLHtmlElement_QI(HTMLDOMNode
*iface
, REFIID riid
, void **ppv
)
297 HTMLHtmlElement
*This
= HTMLHtmlElement_from_HTMLDOMNode(iface
);
299 TRACE("(%p)->(%s %p)\n", This
, debugstr_mshtml_guid(riid
), ppv
);
301 if(IsEqualGUID(&IID_IHTMLHtmlElement
, riid
))
302 *ppv
= &This
->IHTMLHtmlElement_iface
;
304 return HTMLElement_QI(&This
->element
.node
, riid
, ppv
);
306 IUnknown_AddRef((IUnknown
*)*ppv
);
310 static void HTMLHtmlElement_destructor(HTMLDOMNode
*iface
)
312 HTMLHtmlElement
*This
= HTMLHtmlElement_from_HTMLDOMNode(iface
);
314 HTMLElement_destructor(&This
->element
.node
);
317 static BOOL
HTMLHtmlElement_is_settable(HTMLDOMNode
*iface
, DISPID dispid
)
320 case DISPID_IHTMLELEMENT_OUTERTEXT
:
327 static const NodeImplVtbl HTMLHtmlElementImplVtbl
= {
328 &CLSID_HTMLHtmlElement
,
330 HTMLHtmlElement_destructor
,
333 HTMLElement_handle_event
,
334 HTMLElement_get_attr_col
,
346 HTMLHtmlElement_is_settable
349 static const tid_t HTMLHtmlElement_iface_tids
[] = {
351 IHTMLHtmlElement_tid
,
354 static dispex_static_data_t HTMLHtmlElement_dispex
= {
356 DispHTMLHtmlElement_tid
,
357 HTMLHtmlElement_iface_tids
,
358 HTMLElement_init_dispex_info
361 HRESULT
HTMLHtmlElement_Create(HTMLDocumentNode
*doc
, nsIDOMElement
*nselem
, HTMLElement
**elem
)
363 HTMLHtmlElement
*ret
;
365 ret
= heap_alloc_zero(sizeof(*ret
));
367 return E_OUTOFMEMORY
;
369 ret
->IHTMLHtmlElement_iface
.lpVtbl
= &HTMLHtmlElementVtbl
;
370 ret
->element
.node
.vtbl
= &HTMLHtmlElementImplVtbl
;
372 HTMLElement_Init(&ret
->element
, doc
, nselem
, &HTMLHtmlElement_dispex
);
374 *elem
= &ret
->element
;
378 struct HTMLMetaElement
{
381 IHTMLMetaElement IHTMLMetaElement_iface
;
384 static inline HTMLMetaElement
*impl_from_IHTMLMetaElement(IHTMLMetaElement
*iface
)
386 return CONTAINING_RECORD(iface
, HTMLMetaElement
, IHTMLMetaElement_iface
);
389 static HRESULT WINAPI
HTMLMetaElement_QueryInterface(IHTMLMetaElement
*iface
, REFIID riid
, void **ppv
)
391 HTMLMetaElement
*This
= impl_from_IHTMLMetaElement(iface
);
393 return IHTMLDOMNode_QueryInterface(&This
->element
.node
.IHTMLDOMNode_iface
, riid
, ppv
);
396 static ULONG WINAPI
HTMLMetaElement_AddRef(IHTMLMetaElement
*iface
)
398 HTMLMetaElement
*This
= impl_from_IHTMLMetaElement(iface
);
400 return IHTMLDOMNode_AddRef(&This
->element
.node
.IHTMLDOMNode_iface
);
403 static ULONG WINAPI
HTMLMetaElement_Release(IHTMLMetaElement
*iface
)
405 HTMLMetaElement
*This
= impl_from_IHTMLMetaElement(iface
);
407 return IHTMLDOMNode_Release(&This
->element
.node
.IHTMLDOMNode_iface
);
410 static HRESULT WINAPI
HTMLMetaElement_GetTypeInfoCount(IHTMLMetaElement
*iface
, UINT
*pctinfo
)
412 HTMLMetaElement
*This
= impl_from_IHTMLMetaElement(iface
);
413 return IDispatchEx_GetTypeInfoCount(&This
->element
.node
.event_target
.dispex
.IDispatchEx_iface
, pctinfo
);
416 static HRESULT WINAPI
HTMLMetaElement_GetTypeInfo(IHTMLMetaElement
*iface
, UINT iTInfo
,
417 LCID lcid
, ITypeInfo
**ppTInfo
)
419 HTMLMetaElement
*This
= impl_from_IHTMLMetaElement(iface
);
420 return IDispatchEx_GetTypeInfo(&This
->element
.node
.event_target
.dispex
.IDispatchEx_iface
, iTInfo
, lcid
,
424 static HRESULT WINAPI
HTMLMetaElement_GetIDsOfNames(IHTMLMetaElement
*iface
, REFIID riid
,
425 LPOLESTR
*rgszNames
, UINT cNames
, LCID lcid
, DISPID
*rgDispId
)
427 HTMLMetaElement
*This
= impl_from_IHTMLMetaElement(iface
);
428 return IDispatchEx_GetIDsOfNames(&This
->element
.node
.event_target
.dispex
.IDispatchEx_iface
, riid
, rgszNames
,
429 cNames
, lcid
, rgDispId
);
432 static HRESULT WINAPI
HTMLMetaElement_Invoke(IHTMLMetaElement
*iface
, DISPID dispIdMember
, REFIID riid
,
433 LCID lcid
, WORD wFlags
, DISPPARAMS
*pDispParams
, VARIANT
*pVarResult
, EXCEPINFO
*pExcepInfo
,
436 HTMLMetaElement
*This
= impl_from_IHTMLMetaElement(iface
);
437 return IDispatchEx_Invoke(&This
->element
.node
.event_target
.dispex
.IDispatchEx_iface
, dispIdMember
, riid
,
438 lcid
, wFlags
, pDispParams
, pVarResult
, pExcepInfo
, puArgErr
);
441 static HRESULT WINAPI
HTMLMetaElement_put_httpEquiv(IHTMLMetaElement
*iface
, BSTR v
)
443 HTMLMetaElement
*This
= impl_from_IHTMLMetaElement(iface
);
444 FIXME("(%p)->(%s)\n", This
, debugstr_w(v
));
448 static HRESULT WINAPI
HTMLMetaElement_get_httpEquiv(IHTMLMetaElement
*iface
, BSTR
*p
)
450 HTMLMetaElement
*This
= impl_from_IHTMLMetaElement(iface
);
451 static const PRUnichar httpEquivW
[] = {'h','t','t','p','-','e','q','u','i','v',0};
453 TRACE("(%p)->(%p)\n", This
, p
);
455 return elem_string_attr_getter(&This
->element
, httpEquivW
, TRUE
, p
);
458 static HRESULT WINAPI
HTMLMetaElement_put_content(IHTMLMetaElement
*iface
, BSTR v
)
460 HTMLMetaElement
*This
= impl_from_IHTMLMetaElement(iface
);
461 FIXME("(%p)->(%s)\n", This
, debugstr_w(v
));
465 static HRESULT WINAPI
HTMLMetaElement_get_content(IHTMLMetaElement
*iface
, BSTR
*p
)
467 HTMLMetaElement
*This
= impl_from_IHTMLMetaElement(iface
);
468 static const PRUnichar contentW
[] = {'c','o','n','t','e','n','t',0};
470 TRACE("(%p)->(%p)\n", This
, p
);
472 return elem_string_attr_getter(&This
->element
, contentW
, TRUE
, p
);
475 static HRESULT WINAPI
HTMLMetaElement_put_name(IHTMLMetaElement
*iface
, BSTR v
)
477 HTMLMetaElement
*This
= impl_from_IHTMLMetaElement(iface
);
478 FIXME("(%p)->(%s)\n", This
, debugstr_w(v
));
482 static HRESULT WINAPI
HTMLMetaElement_get_name(IHTMLMetaElement
*iface
, BSTR
*p
)
484 HTMLMetaElement
*This
= impl_from_IHTMLMetaElement(iface
);
485 static const PRUnichar nameW
[] = {'n','a','m','e',0};
487 TRACE("(%p)->(%p)\n", This
, p
);
489 return elem_string_attr_getter(&This
->element
, nameW
, TRUE
, p
);
492 static HRESULT WINAPI
HTMLMetaElement_put_url(IHTMLMetaElement
*iface
, BSTR v
)
494 HTMLMetaElement
*This
= impl_from_IHTMLMetaElement(iface
);
495 FIXME("(%p)->(%s)\n", This
, debugstr_w(v
));
499 static HRESULT WINAPI
HTMLMetaElement_get_url(IHTMLMetaElement
*iface
, BSTR
*p
)
501 HTMLMetaElement
*This
= impl_from_IHTMLMetaElement(iface
);
502 FIXME("(%p)->(%p)\n", This
, p
);
506 static const WCHAR charsetW
[] = {'c','h','a','r','s','e','t',0};
508 static HRESULT WINAPI
HTMLMetaElement_put_charset(IHTMLMetaElement
*iface
, BSTR v
)
510 HTMLMetaElement
*This
= impl_from_IHTMLMetaElement(iface
);
512 TRACE("(%p)->(%s)\n", This
, debugstr_w(v
));
514 return elem_string_attr_setter(&This
->element
, charsetW
, v
);
517 static HRESULT WINAPI
HTMLMetaElement_get_charset(IHTMLMetaElement
*iface
, BSTR
*p
)
519 HTMLMetaElement
*This
= impl_from_IHTMLMetaElement(iface
);
521 TRACE("(%p)->(%p)\n", This
, p
);
523 return elem_string_attr_getter(&This
->element
, charsetW
, TRUE
, p
);
526 static const IHTMLMetaElementVtbl HTMLMetaElementVtbl
= {
527 HTMLMetaElement_QueryInterface
,
528 HTMLMetaElement_AddRef
,
529 HTMLMetaElement_Release
,
530 HTMLMetaElement_GetTypeInfoCount
,
531 HTMLMetaElement_GetTypeInfo
,
532 HTMLMetaElement_GetIDsOfNames
,
533 HTMLMetaElement_Invoke
,
534 HTMLMetaElement_put_httpEquiv
,
535 HTMLMetaElement_get_httpEquiv
,
536 HTMLMetaElement_put_content
,
537 HTMLMetaElement_get_content
,
538 HTMLMetaElement_put_name
,
539 HTMLMetaElement_get_name
,
540 HTMLMetaElement_put_url
,
541 HTMLMetaElement_get_url
,
542 HTMLMetaElement_put_charset
,
543 HTMLMetaElement_get_charset
546 static inline HTMLMetaElement
*HTMLMetaElement_from_HTMLDOMNode(HTMLDOMNode
*iface
)
548 return CONTAINING_RECORD(iface
, HTMLMetaElement
, element
.node
);
551 static HRESULT
HTMLMetaElement_QI(HTMLDOMNode
*iface
, REFIID riid
, void **ppv
)
553 HTMLMetaElement
*This
= HTMLMetaElement_from_HTMLDOMNode(iface
);
555 if(IsEqualGUID(&IID_IUnknown
, riid
)) {
556 TRACE("(%p)->(IID_IUnknown %p)\n", This
, ppv
);
557 *ppv
= &This
->IHTMLMetaElement_iface
;
558 }else if(IsEqualGUID(&IID_IDispatch
, riid
)) {
559 TRACE("(%p)->(IID_IDispatch %p)\n", This
, ppv
);
560 *ppv
= &This
->IHTMLMetaElement_iface
;
561 }else if(IsEqualGUID(&IID_IHTMLMetaElement
, riid
)) {
562 TRACE("(%p)->(IID_IHTMLMetaElement %p)\n", This
, ppv
);
563 *ppv
= &This
->IHTMLMetaElement_iface
;
565 return HTMLElement_QI(&This
->element
.node
, riid
, ppv
);
568 IUnknown_AddRef((IUnknown
*)*ppv
);
572 static void HTMLMetaElement_destructor(HTMLDOMNode
*iface
)
574 HTMLMetaElement
*This
= HTMLMetaElement_from_HTMLDOMNode(iface
);
576 HTMLElement_destructor(&This
->element
.node
);
579 static const NodeImplVtbl HTMLMetaElementImplVtbl
= {
580 &CLSID_HTMLMetaElement
,
582 HTMLMetaElement_destructor
,
585 HTMLElement_handle_event
,
586 HTMLElement_get_attr_col
589 static const tid_t HTMLMetaElement_iface_tids
[] = {
591 IHTMLMetaElement_tid
,
595 static dispex_static_data_t HTMLMetaElement_dispex
= {
597 DispHTMLMetaElement_tid
,
598 HTMLMetaElement_iface_tids
,
599 HTMLElement_init_dispex_info
602 HRESULT
HTMLMetaElement_Create(HTMLDocumentNode
*doc
, nsIDOMElement
*nselem
, HTMLElement
**elem
)
604 HTMLMetaElement
*ret
;
606 ret
= heap_alloc_zero(sizeof(*ret
));
608 return E_OUTOFMEMORY
;
610 ret
->IHTMLMetaElement_iface
.lpVtbl
= &HTMLMetaElementVtbl
;
611 ret
->element
.node
.vtbl
= &HTMLMetaElementImplVtbl
;
613 HTMLElement_Init(&ret
->element
, doc
, nselem
, &HTMLMetaElement_dispex
);
615 *elem
= &ret
->element
;
619 struct HTMLHeadElement
{
622 IHTMLHeadElement IHTMLHeadElement_iface
;
625 static inline HTMLHeadElement
*impl_from_IHTMLHeadElement(IHTMLHeadElement
*iface
)
627 return CONTAINING_RECORD(iface
, HTMLHeadElement
, IHTMLHeadElement_iface
);
630 static HRESULT WINAPI
HTMLHeadElement_QueryInterface(IHTMLHeadElement
*iface
,
631 REFIID riid
, void **ppv
)
633 HTMLHeadElement
*This
= impl_from_IHTMLHeadElement(iface
);
635 return IHTMLDOMNode_QueryInterface(&This
->element
.node
.IHTMLDOMNode_iface
, riid
, ppv
);
638 static ULONG WINAPI
HTMLHeadElement_AddRef(IHTMLHeadElement
*iface
)
640 HTMLHeadElement
*This
= impl_from_IHTMLHeadElement(iface
);
642 return IHTMLDOMNode_AddRef(&This
->element
.node
.IHTMLDOMNode_iface
);
645 static ULONG WINAPI
HTMLHeadElement_Release(IHTMLHeadElement
*iface
)
647 HTMLHeadElement
*This
= impl_from_IHTMLHeadElement(iface
);
649 return IHTMLDOMNode_Release(&This
->element
.node
.IHTMLDOMNode_iface
);
652 static HRESULT WINAPI
HTMLHeadElement_GetTypeInfoCount(IHTMLHeadElement
*iface
, UINT
*pctinfo
)
654 HTMLHeadElement
*This
= impl_from_IHTMLHeadElement(iface
);
656 return IDispatchEx_GetTypeInfoCount(&This
->element
.node
.event_target
.dispex
.IDispatchEx_iface
, pctinfo
);
659 static HRESULT WINAPI
HTMLHeadElement_GetTypeInfo(IHTMLHeadElement
*iface
, UINT iTInfo
,
660 LCID lcid
, ITypeInfo
**ppTInfo
)
662 HTMLHeadElement
*This
= impl_from_IHTMLHeadElement(iface
);
664 return IDispatchEx_GetTypeInfo(&This
->element
.node
.event_target
.dispex
.IDispatchEx_iface
, iTInfo
, lcid
,
668 static HRESULT WINAPI
HTMLHeadElement_GetIDsOfNames(IHTMLHeadElement
*iface
, REFIID riid
,
669 LPOLESTR
*rgszNames
, UINT cNames
,
670 LCID lcid
, DISPID
*rgDispId
)
672 HTMLHeadElement
*This
= impl_from_IHTMLHeadElement(iface
);
674 return IDispatchEx_GetIDsOfNames(&This
->element
.node
.event_target
.dispex
.IDispatchEx_iface
, riid
, rgszNames
,
675 cNames
, lcid
, rgDispId
);
678 static HRESULT WINAPI
HTMLHeadElement_Invoke(IHTMLHeadElement
*iface
, DISPID dispIdMember
,
679 REFIID riid
, LCID lcid
, WORD wFlags
, DISPPARAMS
*pDispParams
,
680 VARIANT
*pVarResult
, EXCEPINFO
*pExcepInfo
, UINT
*puArgErr
)
682 HTMLHeadElement
*This
= impl_from_IHTMLHeadElement(iface
);
684 return IDispatchEx_Invoke(&This
->element
.node
.event_target
.dispex
.IDispatchEx_iface
, dispIdMember
, riid
,
685 lcid
, wFlags
, pDispParams
, pVarResult
, pExcepInfo
, puArgErr
);
688 static HRESULT WINAPI
HTMLHeadElement_put_profile(IHTMLHeadElement
*iface
, BSTR v
)
690 HTMLHeadElement
*This
= impl_from_IHTMLHeadElement(iface
);
691 FIXME("(%p)->(%s)\n", This
, debugstr_w(v
));
695 static HRESULT WINAPI
HTMLHeadElement_get_profile(IHTMLHeadElement
*iface
, BSTR
*p
)
697 HTMLHeadElement
*This
= impl_from_IHTMLHeadElement(iface
);
698 FIXME("(%p)->(%p)\n", This
, p
);
702 static const IHTMLHeadElementVtbl HTMLHeadElementVtbl
= {
703 HTMLHeadElement_QueryInterface
,
704 HTMLHeadElement_AddRef
,
705 HTMLHeadElement_Release
,
706 HTMLHeadElement_GetTypeInfoCount
,
707 HTMLHeadElement_GetTypeInfo
,
708 HTMLHeadElement_GetIDsOfNames
,
709 HTMLHeadElement_Invoke
,
710 HTMLHeadElement_put_profile
,
711 HTMLHeadElement_get_profile
714 static inline HTMLHeadElement
*impl_from_HTMLDOMNode(HTMLDOMNode
*iface
)
716 return CONTAINING_RECORD(iface
, HTMLHeadElement
, element
.node
);
719 static HRESULT
HTMLHeadElement_QI(HTMLDOMNode
*iface
, REFIID riid
, void **ppv
)
721 HTMLHeadElement
*This
= impl_from_HTMLDOMNode(iface
);
723 TRACE("(%p)->(%s %p)\n", This
, debugstr_mshtml_guid(riid
), ppv
);
725 if(IsEqualGUID(&IID_IHTMLHeadElement
, riid
))
726 *ppv
= &This
->IHTMLHeadElement_iface
;
728 return HTMLElement_QI(&This
->element
.node
, riid
, ppv
);
730 IUnknown_AddRef((IUnknown
*)*ppv
);
734 static void HTMLHeadElement_destructor(HTMLDOMNode
*iface
)
736 HTMLHeadElement
*This
= impl_from_HTMLDOMNode(iface
);
738 HTMLElement_destructor(&This
->element
.node
);
741 static const NodeImplVtbl HTMLHeadElementImplVtbl
= {
742 &CLSID_HTMLHeadElement
,
744 HTMLHeadElement_destructor
,
747 HTMLElement_handle_event
,
748 HTMLElement_get_attr_col
751 static const tid_t HTMLHeadElement_iface_tids
[] = {
753 IHTMLHeadElement_tid
,
756 static dispex_static_data_t HTMLHeadElement_dispex
= {
758 DispHTMLHeadElement_tid
,
759 HTMLHeadElement_iface_tids
,
760 HTMLElement_init_dispex_info
763 HRESULT
HTMLHeadElement_Create(HTMLDocumentNode
*doc
, nsIDOMElement
*nselem
, HTMLElement
**elem
)
765 HTMLHeadElement
*ret
;
767 ret
= heap_alloc_zero(sizeof(*ret
));
769 return E_OUTOFMEMORY
;
771 ret
->IHTMLHeadElement_iface
.lpVtbl
= &HTMLHeadElementVtbl
;
772 ret
->element
.node
.vtbl
= &HTMLHeadElementImplVtbl
;
774 HTMLElement_Init(&ret
->element
, doc
, nselem
, &HTMLHeadElement_dispex
);
776 *elem
= &ret
->element
;