2 * Copyright 2010 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);
38 const IHTMLEmbedElementVtbl *lpIHTMLEmbedElementVtbl;
41 #define HTMLEMBED(x) (&(x)->lpIHTMLEmbedElementVtbl)
43 #define HTMLEMBED_THIS(iface) DEFINE_THIS(HTMLEmbedElement, IHTMLEmbedElement, iface)
45 static HRESULT WINAPI HTMLEmbedElement_QueryInterface(IHTMLEmbedElement *iface,
46 REFIID riid, void **ppv)
48 HTMLEmbedElement *This = HTMLEMBED_THIS(iface);
50 return IHTMLDOMNode_QueryInterface(HTMLDOMNODE(&This->element.node), riid, ppv);
53 static ULONG WINAPI HTMLEmbedElement_AddRef(IHTMLEmbedElement *iface)
55 HTMLEmbedElement *This = HTMLEMBED_THIS(iface);
57 return IHTMLDOMNode_AddRef(HTMLDOMNODE(&This->element.node));
60 static ULONG WINAPI HTMLEmbedElement_Release(IHTMLEmbedElement *iface)
62 HTMLEmbedElement *This = HTMLEMBED_THIS(iface);
64 return IHTMLDOMNode_Release(HTMLDOMNODE(&This->element.node));
67 static HRESULT WINAPI HTMLEmbedElement_GetTypeInfoCount(IHTMLEmbedElement *iface, UINT *pctinfo)
69 HTMLEmbedElement *This = HTMLEMBED_THIS(iface);
70 return IDispatchEx_GetTypeInfoCount(DISPATCHEX(&This->element.node.dispex), pctinfo);
73 static HRESULT WINAPI HTMLEmbedElement_GetTypeInfo(IHTMLEmbedElement *iface, UINT iTInfo,
74 LCID lcid, ITypeInfo **ppTInfo)
76 HTMLEmbedElement *This = HTMLEMBED_THIS(iface);
77 return IDispatchEx_GetTypeInfo(DISPATCHEX(&This->element.node.dispex), iTInfo, lcid, ppTInfo);
80 static HRESULT WINAPI HTMLEmbedElement_GetIDsOfNames(IHTMLEmbedElement *iface, REFIID riid,
81 LPOLESTR *rgszNames, UINT cNames, LCID lcid, DISPID *rgDispId)
83 HTMLEmbedElement *This = HTMLEMBED_THIS(iface);
84 return IDispatchEx_GetIDsOfNames(DISPATCHEX(&This->element.node.dispex), riid, rgszNames, cNames, lcid, rgDispId);
87 static HRESULT WINAPI HTMLEmbedElement_Invoke(IHTMLEmbedElement *iface, DISPID dispIdMember,
88 REFIID riid, LCID lcid, WORD wFlags, DISPPARAMS *pDispParams,
89 VARIANT *pVarResult, EXCEPINFO *pExcepInfo, UINT *puArgErr)
91 HTMLEmbedElement *This = HTMLEMBED_THIS(iface);
92 return IDispatchEx_Invoke(DISPATCHEX(&This->element.node.dispex), dispIdMember, riid, lcid, wFlags, pDispParams,
93 pVarResult, pExcepInfo, puArgErr);
96 static HRESULT WINAPI HTMLEmbedElement_put_hidden(IHTMLEmbedElement *iface, BSTR v)
98 HTMLEmbedElement *This = HTMLEMBED_THIS(iface);
99 FIXME("(%p)->(%s)\n", This, debugstr_w(v));
103 static HRESULT WINAPI HTMLEmbedElement_get_hidden(IHTMLEmbedElement *iface, BSTR *p)
105 HTMLEmbedElement *This = HTMLEMBED_THIS(iface);
106 FIXME("(%p)->(%p)\n", This, p);
110 static HRESULT WINAPI HTMLEmbedElement_get_palete(IHTMLEmbedElement *iface, BSTR *p)
112 HTMLEmbedElement *This = HTMLEMBED_THIS(iface);
113 FIXME("(%p)->(%p)\n", This, p);
117 static HRESULT WINAPI HTMLEmbedElement_get_pluginspage(IHTMLEmbedElement *iface, BSTR *p)
119 HTMLEmbedElement *This = HTMLEMBED_THIS(iface);
120 FIXME("(%p)->(%p)\n", This, p);
124 static HRESULT WINAPI HTMLEmbedElement_put_src(IHTMLEmbedElement *iface, BSTR v)
126 HTMLEmbedElement *This = HTMLEMBED_THIS(iface);
127 FIXME("(%p)->(%s)\n", This, debugstr_w(v));
131 static HRESULT WINAPI HTMLEmbedElement_get_src(IHTMLEmbedElement *iface, BSTR *p)
133 HTMLEmbedElement *This = HTMLEMBED_THIS(iface);
134 FIXME("(%p)->(%p)\n", This, p);
138 static HRESULT WINAPI HTMLEmbedElement_put_units(IHTMLEmbedElement *iface, BSTR v)
140 HTMLEmbedElement *This = HTMLEMBED_THIS(iface);
141 FIXME("(%p)->(%s)\n", This, debugstr_w(v));
145 static HRESULT WINAPI HTMLEmbedElement_get_units(IHTMLEmbedElement *iface, BSTR *p)
147 HTMLEmbedElement *This = HTMLEMBED_THIS(iface);
148 FIXME("(%p)->(%p)\n", This, p);
152 static HRESULT WINAPI HTMLEmbedElement_put_name(IHTMLEmbedElement *iface, BSTR v)
154 HTMLEmbedElement *This = HTMLEMBED_THIS(iface);
155 FIXME("(%p)->(%s)\n", This, debugstr_w(v));
159 static HRESULT WINAPI HTMLEmbedElement_get_name(IHTMLEmbedElement *iface, BSTR *p)
161 HTMLEmbedElement *This = HTMLEMBED_THIS(iface);
162 FIXME("(%p)->(%p)\n", This, p);
166 static HRESULT WINAPI HTMLEmbedElement_put_width(IHTMLEmbedElement *iface, VARIANT v)
168 HTMLEmbedElement *This = HTMLEMBED_THIS(iface);
169 FIXME("(%p)->(%s)\n", This, debugstr_variant(&v));
173 static HRESULT WINAPI HTMLEmbedElement_get_width(IHTMLEmbedElement *iface, VARIANT *p)
175 HTMLEmbedElement *This = HTMLEMBED_THIS(iface);
176 FIXME("(%p)->(%p)\n", This, p);
180 static HRESULT WINAPI HTMLEmbedElement_put_height(IHTMLEmbedElement *iface, VARIANT v)
182 HTMLEmbedElement *This = HTMLEMBED_THIS(iface);
183 FIXME("(%p)->(%s)\n", This, debugstr_variant(&v));
187 static HRESULT WINAPI HTMLEmbedElement_get_height(IHTMLEmbedElement *iface, VARIANT *p)
189 HTMLEmbedElement *This = HTMLEMBED_THIS(iface);
190 FIXME("(%p)->(%p)\n", This, p);
194 #undef HTMLEMBED_THIS
196 static const IHTMLEmbedElementVtbl HTMLEmbedElementVtbl = {
197 HTMLEmbedElement_QueryInterface,
198 HTMLEmbedElement_AddRef,
199 HTMLEmbedElement_Release,
200 HTMLEmbedElement_GetTypeInfoCount,
201 HTMLEmbedElement_GetTypeInfo,
202 HTMLEmbedElement_GetIDsOfNames,
203 HTMLEmbedElement_Invoke,
204 HTMLEmbedElement_put_hidden,
205 HTMLEmbedElement_get_hidden,
206 HTMLEmbedElement_get_palete,
207 HTMLEmbedElement_get_pluginspage,
208 HTMLEmbedElement_put_src,
209 HTMLEmbedElement_get_src,
210 HTMLEmbedElement_put_units,
211 HTMLEmbedElement_get_units,
212 HTMLEmbedElement_put_name,
213 HTMLEmbedElement_get_name,
214 HTMLEmbedElement_put_width,
215 HTMLEmbedElement_get_width,
216 HTMLEmbedElement_put_height,
217 HTMLEmbedElement_get_height
220 #define HTMLEMBED_NODE_THIS(iface) DEFINE_THIS2(HTMLEmbedElement, element.node, iface)
222 static HRESULT HTMLEmbedElement_QI(HTMLDOMNode *iface, REFIID riid, void **ppv)
224 HTMLEmbedElement *This = HTMLEMBED_NODE_THIS(iface);
226 if(IsEqualGUID(&IID_IUnknown, riid)) {
227 TRACE("(%p)->(IID_IUnknown %p)\n", This, ppv);
228 *ppv = HTMLEMBED(This);
229 }else if(IsEqualGUID(&IID_IDispatch, riid)) {
230 TRACE("(%p)->(IID_IDispatch %p)\n", This, ppv);
231 *ppv = HTMLEMBED(This);
232 }else if(IsEqualGUID(&IID_IHTMLEmbedElement, riid)) {
233 TRACE("(%p)->(IID_IHTMLEmbedElement %p)\n", This, ppv);
234 *ppv = HTMLEMBED(This);
236 return HTMLElement_QI(&This->element.node, riid, ppv);
239 IUnknown_AddRef((IUnknown*)*ppv);
243 static void HTMLEmbedElement_destructor(HTMLDOMNode *iface)
245 HTMLEmbedElement *This = HTMLEMBED_NODE_THIS(iface);
247 HTMLElement_destructor(&This->element.node);
250 #undef HTMLEMBED_NODE_THIS
252 static const NodeImplVtbl HTMLEmbedElementImplVtbl = {
254 HTMLEmbedElement_destructor,
258 static const tid_t HTMLEmbedElement_iface_tids[] = {
260 IHTMLEmbedElement_tid,
263 static dispex_static_data_t HTMLEmbedElement_dispex = {
267 HTMLEmbedElement_iface_tids
270 HTMLElement *HTMLEmbedElement_Create(HTMLDocumentNode *doc, nsIDOMHTMLElement *nselem)
272 HTMLEmbedElement *ret = heap_alloc_zero(sizeof(*ret));
274 ret->lpIHTMLEmbedElementVtbl = &HTMLEmbedElementVtbl;
275 ret->element.node.vtbl = &HTMLEmbedElementImplVtbl;
277 HTMLElement_Init(&ret->element, doc, nselem, &HTMLEmbedElement_dispex);
278 return &ret->element;