d3drm: Implement CreateMesh method and stubbed IDirect3DRMMesh interface.
[wine/multimedia.git] / dlls / mshtml / htmlmeta.c
blobe80ca13278a36d67a5422e32181dadd8a132050f
1 /*
2 * Copyright 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
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"
30 #include "mshtml_private.h"
32 WINE_DEFAULT_DEBUG_CHANNEL(mshtml);
34 typedef struct {
35 HTMLElement element;
37 IHTMLMetaElement IHTMLMetaElement_iface;
38 } HTMLMetaElement;
40 static inline HTMLMetaElement *impl_from_IHTMLMetaElement(IHTMLMetaElement *iface)
42 return CONTAINING_RECORD(iface, HTMLMetaElement, IHTMLMetaElement_iface);
45 static HRESULT WINAPI HTMLMetaElement_QueryInterface(IHTMLMetaElement *iface, REFIID riid, void **ppv)
47 HTMLMetaElement *This = impl_from_IHTMLMetaElement(iface);
49 return IHTMLDOMNode_QueryInterface(&This->element.node.IHTMLDOMNode_iface, riid, ppv);
52 static ULONG WINAPI HTMLMetaElement_AddRef(IHTMLMetaElement *iface)
54 HTMLMetaElement *This = impl_from_IHTMLMetaElement(iface);
56 return IHTMLDOMNode_AddRef(&This->element.node.IHTMLDOMNode_iface);
59 static ULONG WINAPI HTMLMetaElement_Release(IHTMLMetaElement *iface)
61 HTMLMetaElement *This = impl_from_IHTMLMetaElement(iface);
63 return IHTMLDOMNode_Release(&This->element.node.IHTMLDOMNode_iface);
66 static HRESULT WINAPI HTMLMetaElement_GetTypeInfoCount(IHTMLMetaElement *iface, UINT *pctinfo)
68 HTMLMetaElement *This = impl_from_IHTMLMetaElement(iface);
69 return IDispatchEx_GetTypeInfoCount(&This->element.node.dispex.IDispatchEx_iface, pctinfo);
72 static HRESULT WINAPI HTMLMetaElement_GetTypeInfo(IHTMLMetaElement *iface, UINT iTInfo,
73 LCID lcid, ITypeInfo **ppTInfo)
75 HTMLMetaElement *This = impl_from_IHTMLMetaElement(iface);
76 return IDispatchEx_GetTypeInfo(&This->element.node.dispex.IDispatchEx_iface, iTInfo, lcid,
77 ppTInfo);
80 static HRESULT WINAPI HTMLMetaElement_GetIDsOfNames(IHTMLMetaElement *iface, REFIID riid,
81 LPOLESTR *rgszNames, UINT cNames, LCID lcid, DISPID *rgDispId)
83 HTMLMetaElement *This = impl_from_IHTMLMetaElement(iface);
84 return IDispatchEx_GetIDsOfNames(&This->element.node.dispex.IDispatchEx_iface, riid, rgszNames,
85 cNames, lcid, rgDispId);
88 static HRESULT WINAPI HTMLMetaElement_Invoke(IHTMLMetaElement *iface, DISPID dispIdMember, REFIID riid,
89 LCID lcid, WORD wFlags, DISPPARAMS *pDispParams, VARIANT *pVarResult, EXCEPINFO *pExcepInfo,
90 UINT *puArgErr)
92 HTMLMetaElement *This = impl_from_IHTMLMetaElement(iface);
93 return IDispatchEx_Invoke(&This->element.node.dispex.IDispatchEx_iface, dispIdMember, riid,
94 lcid, wFlags, pDispParams, pVarResult, pExcepInfo, puArgErr);
97 static HRESULT WINAPI HTMLMetaElement_put_httpEquiv(IHTMLMetaElement *iface, BSTR v)
99 HTMLMetaElement *This = impl_from_IHTMLMetaElement(iface);
100 FIXME("(%p)->(%s)\n", This, debugstr_w(v));
101 return E_NOTIMPL;
104 static HRESULT WINAPI HTMLMetaElement_get_httpEquiv(IHTMLMetaElement *iface, BSTR *p)
106 HTMLMetaElement *This = impl_from_IHTMLMetaElement(iface);
107 FIXME("(%p)->(%p)\n", This, p);
108 return E_NOTIMPL;
111 static HRESULT WINAPI HTMLMetaElement_put_content(IHTMLMetaElement *iface, BSTR v)
113 HTMLMetaElement *This = impl_from_IHTMLMetaElement(iface);
114 FIXME("(%p)->(%s)\n", This, debugstr_w(v));
115 return E_NOTIMPL;
118 static HRESULT WINAPI HTMLMetaElement_get_content(IHTMLMetaElement *iface, BSTR *p)
120 HTMLMetaElement *This = impl_from_IHTMLMetaElement(iface);
121 FIXME("(%p)->(%p)\n", This, p);
122 return E_NOTIMPL;
125 static HRESULT WINAPI HTMLMetaElement_put_name(IHTMLMetaElement *iface, BSTR v)
127 HTMLMetaElement *This = impl_from_IHTMLMetaElement(iface);
128 FIXME("(%p)->(%s)\n", This, debugstr_w(v));
129 return E_NOTIMPL;
132 static HRESULT WINAPI HTMLMetaElement_get_name(IHTMLMetaElement *iface, BSTR *p)
134 HTMLMetaElement *This = impl_from_IHTMLMetaElement(iface);
135 FIXME("(%p)->(%p)\n", This, p);
136 return E_NOTIMPL;
139 static HRESULT WINAPI HTMLMetaElement_put_url(IHTMLMetaElement *iface, BSTR v)
141 HTMLMetaElement *This = impl_from_IHTMLMetaElement(iface);
142 FIXME("(%p)->(%s)\n", This, debugstr_w(v));
143 return E_NOTIMPL;
146 static HRESULT WINAPI HTMLMetaElement_get_url(IHTMLMetaElement *iface, BSTR *p)
148 HTMLMetaElement *This = impl_from_IHTMLMetaElement(iface);
149 FIXME("(%p)->(%p)\n", This, p);
150 return E_NOTIMPL;
153 static HRESULT WINAPI HTMLMetaElement_put_charset(IHTMLMetaElement *iface, BSTR v)
155 HTMLMetaElement *This = impl_from_IHTMLMetaElement(iface);
156 FIXME("(%p)->(%s)\n", This, debugstr_w(v));
157 return E_NOTIMPL;
160 static HRESULT WINAPI HTMLMetaElement_get_charset(IHTMLMetaElement *iface, BSTR *p)
162 HTMLMetaElement *This = impl_from_IHTMLMetaElement(iface);
163 FIXME("(%p)->(%p)\n", This, p);
164 return E_NOTIMPL;
167 static const IHTMLMetaElementVtbl HTMLMetaElementVtbl = {
168 HTMLMetaElement_QueryInterface,
169 HTMLMetaElement_AddRef,
170 HTMLMetaElement_Release,
171 HTMLMetaElement_GetTypeInfoCount,
172 HTMLMetaElement_GetTypeInfo,
173 HTMLMetaElement_GetIDsOfNames,
174 HTMLMetaElement_Invoke,
175 HTMLMetaElement_put_httpEquiv,
176 HTMLMetaElement_get_httpEquiv,
177 HTMLMetaElement_put_content,
178 HTMLMetaElement_get_content,
179 HTMLMetaElement_put_name,
180 HTMLMetaElement_get_name,
181 HTMLMetaElement_put_url,
182 HTMLMetaElement_get_url,
183 HTMLMetaElement_put_charset,
184 HTMLMetaElement_get_charset
187 static inline HTMLMetaElement *impl_from_HTMLDOMNode(HTMLDOMNode *iface)
189 return CONTAINING_RECORD(iface, HTMLMetaElement, element.node);
192 static HRESULT HTMLMetaElement_QI(HTMLDOMNode *iface, REFIID riid, void **ppv)
194 HTMLMetaElement *This = impl_from_HTMLDOMNode(iface);
196 if(IsEqualGUID(&IID_IUnknown, riid)) {
197 TRACE("(%p)->(IID_IUnknown %p)\n", This, ppv);
198 *ppv = &This->IHTMLMetaElement_iface;
199 }else if(IsEqualGUID(&IID_IDispatch, riid)) {
200 TRACE("(%p)->(IID_IDispatch %p)\n", This, ppv);
201 *ppv = &This->IHTMLMetaElement_iface;
202 }else if(IsEqualGUID(&IID_IHTMLMetaElement, riid)) {
203 TRACE("(%p)->(IID_IHTMLMetaElement %p)\n", This, ppv);
204 *ppv = &This->IHTMLMetaElement_iface;
205 }else {
206 return HTMLElement_QI(&This->element.node, riid, ppv);
209 IUnknown_AddRef((IUnknown*)*ppv);
210 return S_OK;
213 static void HTMLMetaElement_destructor(HTMLDOMNode *iface)
215 HTMLMetaElement *This = impl_from_HTMLDOMNode(iface);
217 HTMLElement_destructor(&This->element.node);
220 static const NodeImplVtbl HTMLMetaElementImplVtbl = {
221 HTMLMetaElement_QI,
222 HTMLMetaElement_destructor,
223 HTMLElement_clone,
224 HTMLElement_get_attr_col
227 static const tid_t HTMLMetaElement_iface_tids[] = {
228 HTMLELEMENT_TIDS,
229 IHTMLMetaElement_tid,
233 static dispex_static_data_t HTMLMetaElement_dispex = {
234 NULL,
235 DispHTMLMetaElement_tid,
236 NULL,
237 HTMLMetaElement_iface_tids
240 HRESULT HTMLMetaElement_Create(HTMLDocumentNode *doc, nsIDOMHTMLElement *nselem, HTMLElement **elem)
242 HTMLMetaElement *ret;
244 ret = heap_alloc_zero(sizeof(*ret));
245 if(!ret)
246 return E_OUTOFMEMORY;
248 ret->IHTMLMetaElement_iface.lpVtbl = &HTMLMetaElementVtbl;
249 ret->element.node.vtbl = &HTMLMetaElementImplVtbl;
251 HTMLElement_Init(&ret->element, doc, nselem, &HTMLMetaElement_dispex);
253 *elem = &ret->element;
254 return S_OK;