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
29 #include "mshtml_private.h"
31 #include "wine/debug.h"
33 WINE_DEFAULT_DEBUG_CHANNEL(mshtml
);
37 const IHTMLCommentElementVtbl
*lpIHTMLCommentElementVtbl
;
40 #define HTMLCOMMENT(x) ((IHTMLCommentElement*) &(x)->lpIHTMLCommentElementVtbl)
42 #define HTMLCOMMENT_THIS(iface) DEFINE_THIS(HTMLCommentElement, IHTMLCommentElement, iface)
44 static HRESULT WINAPI
HTMLCommentElement_QueryInterface(IHTMLCommentElement
*iface
,
45 REFIID riid
, void **ppv
)
47 HTMLCommentElement
*This
= HTMLCOMMENT_THIS(iface
);
49 return IHTMLDOMNode_QueryInterface(HTMLDOMNODE(&This
->element
.node
), riid
, ppv
);
52 static ULONG WINAPI
HTMLCommentElement_AddRef(IHTMLCommentElement
*iface
)
54 HTMLCommentElement
*This
= HTMLCOMMENT_THIS(iface
);
56 return IHTMLDOMNode_AddRef(HTMLDOMNODE(&This
->element
.node
));
59 static ULONG WINAPI
HTMLCommentElement_Release(IHTMLCommentElement
*iface
)
61 HTMLCommentElement
*This
= HTMLCOMMENT_THIS(iface
);
63 return IHTMLDOMNode_Release(HTMLDOMNODE(&This
->element
.node
));
66 static HRESULT WINAPI
HTMLCommentElement_GetTypeInfoCount(IHTMLCommentElement
*iface
, UINT
*pctinfo
)
68 HTMLCommentElement
*This
= HTMLCOMMENT_THIS(iface
);
69 FIXME("(%p)->(%p)\n", This
, pctinfo
);
73 static HRESULT WINAPI
HTMLCommentElement_GetTypeInfo(IHTMLCommentElement
*iface
, UINT iTInfo
,
74 LCID lcid
, ITypeInfo
**ppTInfo
)
76 HTMLCommentElement
*This
= HTMLCOMMENT_THIS(iface
);
77 FIXME("(%p)->(%u %u %p)\n", This
, iTInfo
, lcid
, ppTInfo
);
81 static HRESULT WINAPI
HTMLCommentElement_GetIDsOfNames(IHTMLCommentElement
*iface
, REFIID riid
,
82 LPOLESTR
*rgszNames
, UINT cNames
,
83 LCID lcid
, DISPID
*rgDispId
)
85 HTMLCommentElement
*This
= HTMLCOMMENT_THIS(iface
);
86 FIXME("(%p)->(%s %p %u %u %p)\n", This
, debugstr_guid(riid
), rgszNames
, cNames
,
91 static HRESULT WINAPI
HTMLCommentElement_Invoke(IHTMLCommentElement
*iface
, DISPID dispIdMember
,
92 REFIID riid
, LCID lcid
, WORD wFlags
, DISPPARAMS
*pDispParams
,
93 VARIANT
*pVarResult
, EXCEPINFO
*pExcepInfo
, UINT
*puArgErr
)
95 HTMLCommentElement
*This
= HTMLCOMMENT_THIS(iface
);
96 FIXME("(%p)->(%d %s %d %d %p %p %p %p)\n", This
, dispIdMember
, debugstr_guid(riid
),
97 lcid
, wFlags
, pDispParams
, pVarResult
, pExcepInfo
, puArgErr
);
101 static HRESULT WINAPI
HTMLCommentElement_put_text(IHTMLCommentElement
*iface
, BSTR v
)
103 HTMLCommentElement
*This
= HTMLCOMMENT_THIS(iface
);
104 FIXME("(%p)->(%s)\n", This
, debugstr_w(v
));
108 static HRESULT WINAPI
HTMLCommentElement_get_text(IHTMLCommentElement
*iface
, BSTR
*p
)
110 HTMLCommentElement
*This
= HTMLCOMMENT_THIS(iface
);
111 FIXME("(%p)->(%p)\n", This
, p
);
115 static HRESULT WINAPI
HTMLCommentElement_put_atomic(IHTMLCommentElement
*iface
, long v
)
117 HTMLCommentElement
*This
= HTMLCOMMENT_THIS(iface
);
118 FIXME("(%p)->(%ld)\n", This
, v
);
122 static HRESULT WINAPI
HTMLCommentElement_get_atomic(IHTMLCommentElement
*iface
, long *p
)
124 HTMLCommentElement
*This
= HTMLCOMMENT_THIS(iface
);
125 FIXME("(%p)->(%p)\n", This
, p
);
129 #undef HTMLCOMMENT_THIS
131 static const IHTMLCommentElementVtbl HTMLCommentElementVtbl
= {
132 HTMLCommentElement_QueryInterface
,
133 HTMLCommentElement_AddRef
,
134 HTMLCommentElement_Release
,
135 HTMLCommentElement_GetTypeInfoCount
,
136 HTMLCommentElement_GetTypeInfo
,
137 HTMLCommentElement_GetIDsOfNames
,
138 HTMLCommentElement_Invoke
,
139 HTMLCommentElement_put_text
,
140 HTMLCommentElement_get_text
,
141 HTMLCommentElement_put_atomic
,
142 HTMLCommentElement_get_atomic
145 #define HTMLCOMMENT_NODE_THIS(iface) DEFINE_THIS2(HTMLCommentElement, element.node, iface)
147 HRESULT
HTMLCommentElement_QI(HTMLDOMNode
*iface
, REFIID riid
, void **ppv
)
149 HTMLCommentElement
*This
= HTMLCOMMENT_NODE_THIS(iface
);
153 if(IsEqualGUID(&IID_IHTMLCommentElement
, riid
)) {
154 TRACE("(%p)->(IID_IHTMLCommentElement %p)\n", This
, ppv
);
155 *ppv
= HTMLCOMMENT(This
);
157 return HTMLElement_QI(&This
->element
.node
, riid
, ppv
);
160 IUnknown_AddRef((IUnknown
*)*ppv
);
164 void HTMLCommentElement_destructor(HTMLDOMNode
*iface
)
166 HTMLCommentElement
*This
= HTMLCOMMENT_NODE_THIS(iface
);
168 HTMLElement_destructor(&This
->element
.node
);
171 #undef HTMLCOMMENT_NODE_THIS
173 static const NodeImplVtbl HTMLCommentElementImplVtbl
= {
174 HTMLCommentElement_QI
,
175 HTMLCommentElement_destructor
178 static const tid_t HTMLCommentElement_iface_tids
[] = {
183 IHTMLCommentElement_tid
,
186 static dispex_static_data_t HTMLCommentElement_dispex
= {
188 DispHTMLCommentElement_tid
,
190 HTMLCommentElement_iface_tids
193 HTMLElement
*HTMLCommentElement_Create(HTMLDocument
*doc
, nsIDOMNode
*nsnode
)
195 HTMLCommentElement
*ret
= heap_alloc_zero(sizeof(*ret
));
197 ret
->element
.node
.vtbl
= &HTMLCommentElementImplVtbl
;
198 ret
->lpIHTMLCommentElementVtbl
= &HTMLCommentElementVtbl
;
200 init_dispex(&ret
->element
.node
.dispex
, (IUnknown
*)HTMLCOMMENT(ret
), &HTMLCommentElement_dispex
);
201 HTMLElement_Init(&ret
->element
);
202 HTMLDOMNode_Init(doc
, &ret
->element
.node
, nsnode
);
204 return &ret
->element
;