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 "wine/debug.h"
31 #include "mshtml_private.h"
33 WINE_DEFAULT_DEBUG_CHANNEL(mshtml);
38 const IHTMLGenericElementVtbl *lpHTMLGenericElementVtbl;
41 #define HTMLGENERIC(x) ((IHTMLGenericElement*) &(x)->lpHTMLGenericElementVtbl)
43 #define HTMLGENERIC_THIS(iface) DEFINE_THIS(HTMLGenericElement, HTMLGenericElement, iface)
45 static HRESULT WINAPI HTMLGenericElement_QueryInterface(IHTMLGenericElement *iface, REFIID riid, void **ppv)
47 HTMLGenericElement *This = HTMLGENERIC_THIS(iface);
49 return IHTMLDOMNode_QueryInterface(HTMLDOMNODE(&This->element.node), riid, ppv);
52 static ULONG WINAPI HTMLGenericElement_AddRef(IHTMLGenericElement *iface)
54 HTMLGenericElement *This = HTMLGENERIC_THIS(iface);
56 return IHTMLDOMNode_AddRef(HTMLDOMNODE(&This->element.node));
59 static ULONG WINAPI HTMLGenericElement_Release(IHTMLGenericElement *iface)
61 HTMLGenericElement *This = HTMLGENERIC_THIS(iface);
63 return IHTMLDOMNode_Release(HTMLDOMNODE(&This->element.node));
66 static HRESULT WINAPI HTMLGenericElement_GetTypeInfoCount(IHTMLGenericElement *iface, UINT *pctinfo)
68 HTMLGenericElement *This = HTMLGENERIC_THIS(iface);
69 FIXME("(%p)->(%p)\n", This, pctinfo);
73 static HRESULT WINAPI HTMLGenericElement_GetTypeInfo(IHTMLGenericElement *iface, UINT iTInfo,
74 LCID lcid, ITypeInfo **ppTInfo)
76 HTMLGenericElement *This = HTMLGENERIC_THIS(iface);
77 FIXME("(%p)->(%u %u %p)\n", This, iTInfo, lcid, ppTInfo);
81 static HRESULT WINAPI HTMLGenericElement_GetIDsOfNames(IHTMLGenericElement *iface, REFIID riid,
82 LPOLESTR *rgszNames, UINT cNames, LCID lcid, DISPID *rgDispId)
84 HTMLGenericElement *This = HTMLGENERIC_THIS(iface);
85 FIXME("(%p)->(%s %p %u %u %p)\n", This, debugstr_guid(riid), rgszNames, cNames,
90 static HRESULT WINAPI HTMLGenericElement_Invoke(IHTMLGenericElement *iface, DISPID dispIdMember,
91 REFIID riid, LCID lcid, WORD wFlags, DISPPARAMS *pDispParams,
92 VARIANT *pVarResult, EXCEPINFO *pExcepInfo, UINT *puArgErr)
94 HTMLGenericElement *This = HTMLGENERIC_THIS(iface);
95 FIXME("(%p)->(%d %s %d %d %p %p %p %p)\n", This, dispIdMember, debugstr_guid(riid),
96 lcid, wFlags, pDispParams, pVarResult, pExcepInfo, puArgErr);
100 static HRESULT WINAPI HTMLGenericElement_get_recordset(IHTMLGenericElement *iface, IDispatch **p)
102 HTMLGenericElement *This = HTMLGENERIC_THIS(iface);
103 FIXME("(%p)->(%p)\n", This, p);
107 static HRESULT WINAPI HTMLGenericElement_namedRecordset(IHTMLGenericElement *iface,
108 BSTR dataMember, VARIANT *hierarchy, IDispatch **ppRecordset)
110 HTMLGenericElement *This = HTMLGENERIC_THIS(iface);
111 FIXME("(%p)->(%s %p %p)\n", This, debugstr_w(dataMember), hierarchy, ppRecordset);
115 static const IHTMLGenericElementVtbl HTMLGenericElementVtbl = {
116 HTMLGenericElement_QueryInterface,
117 HTMLGenericElement_AddRef,
118 HTMLGenericElement_Release,
119 HTMLGenericElement_GetTypeInfoCount,
120 HTMLGenericElement_GetTypeInfo,
121 HTMLGenericElement_GetIDsOfNames,
122 HTMLGenericElement_Invoke,
123 HTMLGenericElement_get_recordset,
124 HTMLGenericElement_namedRecordset
127 #define HTMLGENERIC_NODE_THIS(iface) DEFINE_THIS2(HTMLGenericElement, element.node, iface)
129 static HRESULT HTMLGenericElement_QI(HTMLDOMNode *iface, REFIID riid, void **ppv)
131 HTMLGenericElement *This = HTMLGENERIC_NODE_THIS(iface);
135 if(IsEqualGUID(&IID_IHTMLGenericElement, riid)) {
136 TRACE("(%p)->(IID_IHTMLGenericElement %p)\n", This, ppv);
137 *ppv = HTMLGENERIC(This);
139 return HTMLElement_QI(&This->element.node, riid, ppv);
142 IUnknown_AddRef((IUnknown*)*ppv);
146 static void HTMLGenericElement_destructor(HTMLDOMNode *iface)
148 HTMLGenericElement *This = HTMLGENERIC_NODE_THIS(iface);
150 HTMLElement_destructor(&This->element.node);
153 #undef HTMLGENERIC_NODE_THIS
155 static const NodeImplVtbl HTMLGenericElementImplVtbl = {
156 HTMLGenericElement_QI,
157 HTMLGenericElement_destructor
160 static const tid_t HTMLGenericElement_iface_tids[] = {
166 IHTMLGenericElement_tid,
170 static dispex_static_data_t HTMLGenericElement_dispex = {
172 DispHTMLGenericElement_tid,
174 HTMLGenericElement_iface_tids
177 HTMLElement *HTMLGenericElement_Create(nsIDOMHTMLElement *nselem)
179 HTMLGenericElement *ret;
181 ret = heap_alloc_zero(sizeof(HTMLGenericElement));
183 ret->lpHTMLGenericElementVtbl = &HTMLGenericElementVtbl;
184 ret->element.node.vtbl = &HTMLGenericElementImplVtbl;
186 init_dispex(&ret->element.node.dispex, (IUnknown*)HTMLGENERIC(ret), &HTMLGenericElement_dispex);
187 HTMLElement_Init(&ret->element);
189 return &ret->element;