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
28 #include "mshtml_private.h"
30 #include "wine/debug.h"
32 WINE_DEFAULT_DEBUG_CHANNEL(mshtml);
36 const IHTMLFrameBase2Vtbl *lpIHTMLFrameBase2Vtbl;
40 nsIDOMHTMLIFrameElement *nsiframe;
43 #define HTMLFRAMEBASE2(x) ((IHTMLFrameBase2*) &(x)->lpIHTMLFrameBase2Vtbl)
45 #define HTMLFRAMEBASE2_THIS(iface) DEFINE_THIS(HTMLIFrame, IHTMLFrameBase2, iface)
47 static HRESULT WINAPI HTMLIFrameBase2_QueryInterface(IHTMLFrameBase2 *iface, REFIID riid, void **ppv)
49 HTMLIFrame *This = HTMLFRAMEBASE2_THIS(iface);
51 return IHTMLDOMNode_QueryInterface(HTMLDOMNODE(&This->element.node), riid, ppv);
54 static ULONG WINAPI HTMLIFrameBase2_AddRef(IHTMLFrameBase2 *iface)
56 HTMLIFrame *This = HTMLFRAMEBASE2_THIS(iface);
58 return IHTMLDOMNode_AddRef(HTMLDOMNODE(&This->element.node));
61 static ULONG WINAPI HTMLIFrameBase2_Release(IHTMLFrameBase2 *iface)
63 HTMLIFrame *This = HTMLFRAMEBASE2_THIS(iface);
65 return IHTMLDOMNode_Release(HTMLDOMNODE(&This->element.node));
68 static HRESULT WINAPI HTMLIFrameBase2_GetTypeInfoCount(IHTMLFrameBase2 *iface, UINT *pctinfo)
70 HTMLIFrame *This = HTMLFRAMEBASE2_THIS(iface);
71 FIXME("(%p)\n", This);
75 static HRESULT WINAPI HTMLIFrameBase2_GetTypeInfo(IHTMLFrameBase2 *iface, UINT iTInfo,
76 LCID lcid, ITypeInfo **ppTInfo)
78 HTMLIFrame *This = HTMLFRAMEBASE2_THIS(iface);
79 FIXME("(%p)\n", This);
83 static HRESULT WINAPI HTMLIFrameBase2_GetIDsOfNames(IHTMLFrameBase2 *iface, REFIID riid,
84 LPOLESTR *rgszNames, UINT cNames, LCID lcid, DISPID *rgDispId)
86 HTMLIFrame *This = HTMLFRAMEBASE2_THIS(iface);
87 FIXME("(%p)\n", This);
91 static HRESULT WINAPI HTMLIFrameBase2_Invoke(IHTMLFrameBase2 *iface, DISPID dispIdMember,
92 REFIID riid, LCID lcid, WORD wFlags, DISPPARAMS *pDispParams,
93 VARIANT *pVarResult, EXCEPINFO *pExcepInfo, UINT *puArgErr)
95 HTMLIFrame *This = HTMLFRAMEBASE2_THIS(iface);
96 FIXME("(%p)\n", This);
100 static HRESULT WINAPI HTMLIFrameBase2_get_contentWindow(IHTMLFrameBase2 *iface, IHTMLWindow2 **p)
102 HTMLIFrame *This = HTMLFRAMEBASE2_THIS(iface);
103 FIXME("(%p)->(%p)\n", This, p);
107 static HRESULT WINAPI HTMLIFrameBase2_put_onload(IHTMLFrameBase2 *iface, VARIANT v)
109 HTMLIFrame *This = HTMLFRAMEBASE2_THIS(iface);
110 FIXME("(%p)->(%s)\n", This, debugstr_variant(&v));
114 static HRESULT WINAPI HTMLIFrameBase2_get_onload(IHTMLFrameBase2 *iface, VARIANT *p)
116 HTMLIFrame *This = HTMLFRAMEBASE2_THIS(iface);
117 FIXME("(%p)->(%p)\n", This, p);
121 static HRESULT WINAPI HTMLIFrameBase2_put_onreadystatechange(IHTMLFrameBase2 *iface, VARIANT v)
123 HTMLIFrame *This = HTMLFRAMEBASE2_THIS(iface);
124 FIXME("(%p)->(%s)\n", This, debugstr_variant(&v));
128 static HRESULT WINAPI HTMLIFrameBase2_get_onreadystatechange(IHTMLFrameBase2 *iface, VARIANT *p)
130 HTMLIFrame *This = HTMLFRAMEBASE2_THIS(iface);
131 FIXME("(%p)->(%p)\n", This, p);
135 static HRESULT WINAPI HTMLIFrameBase2_get_readyState(IHTMLFrameBase2 *iface, BSTR *p)
137 HTMLIFrame *This = HTMLFRAMEBASE2_THIS(iface);
138 FIXME("(%p)->(%p)\n", This, p);
142 static HRESULT WINAPI HTMLIFrameBase2_put_allowTransparency(IHTMLFrameBase2 *iface, VARIANT_BOOL v)
144 HTMLIFrame *This = HTMLFRAMEBASE2_THIS(iface);
145 FIXME("(%p)->(%x)\n", This, v);
149 static HRESULT WINAPI HTMLIFrameBase2_get_allowTransparency(IHTMLFrameBase2 *iface, VARIANT_BOOL *p)
151 HTMLIFrame *This = HTMLFRAMEBASE2_THIS(iface);
152 FIXME("(%p)->(%p)\n", This, p);
156 #undef HTMLFRAMEBASE2_THIS
158 static const IHTMLFrameBase2Vtbl HTMLIFrameBase2Vtbl = {
159 HTMLIFrameBase2_QueryInterface,
160 HTMLIFrameBase2_AddRef,
161 HTMLIFrameBase2_Release,
162 HTMLIFrameBase2_GetTypeInfoCount,
163 HTMLIFrameBase2_GetTypeInfo,
164 HTMLIFrameBase2_GetIDsOfNames,
165 HTMLIFrameBase2_Invoke,
166 HTMLIFrameBase2_get_contentWindow,
167 HTMLIFrameBase2_put_onload,
168 HTMLIFrameBase2_get_onload,
169 HTMLIFrameBase2_put_onreadystatechange,
170 HTMLIFrameBase2_get_onreadystatechange,
171 HTMLIFrameBase2_get_readyState,
172 HTMLIFrameBase2_put_allowTransparency,
173 HTMLIFrameBase2_get_allowTransparency
176 #define HTMLIFRAME_NODE_THIS(iface) DEFINE_THIS2(HTMLIFrame, element.node, iface)
178 static HRESULT HTMLIFrame_QI(HTMLDOMNode *iface, REFIID riid, void **ppv)
180 HTMLIFrame *This = HTMLIFRAME_NODE_THIS(iface);
184 if(IsEqualGUID(&IID_IHTMLFrameBase2, riid)) {
185 TRACE("(%p)->(IID_IHTMLFrameBase2 %p)\n", This, ppv);
186 *ppv = HTMLFRAMEBASE2(This);
188 return HTMLElement_QI(&This->element.node, riid, ppv);
191 IUnknown_AddRef((IUnknown*)*ppv);
195 static void HTMLIFrame_destructor(HTMLDOMNode *iface)
197 HTMLIFrame *This = HTMLIFRAME_NODE_THIS(iface);
200 nsIDOMHTMLIFrameElement_Release(This->nsiframe);
202 HTMLElement_destructor(&This->element.node);
205 #undef HTMLIFRAME_NODE_THIS
207 static const NodeImplVtbl HTMLIFrameImplVtbl = {
209 HTMLIFrame_destructor
212 static const tid_t HTMLIFrame_iface_tids[] = {
222 static dispex_static_data_t HTMLIFrame_dispex = {
226 HTMLIFrame_iface_tids
229 HTMLElement *HTMLIFrame_Create(nsIDOMHTMLElement *nselem)
234 ret = heap_alloc_zero(sizeof(HTMLIFrame));
236 ret->lpIHTMLFrameBase2Vtbl = &HTMLIFrameBase2Vtbl;
237 ret->element.node.vtbl = &HTMLIFrameImplVtbl;
239 init_dispex(&ret->element.node.dispex, (IUnknown*)HTMLFRAMEBASE2(ret), &HTMLIFrame_dispex);
240 HTMLElement_Init(&ret->element);
242 nsres = nsIDOMHTMLElement_QueryInterface(nselem, &IID_nsIDOMHTMLIFrameElement, (void**)&ret->nsiframe);
244 ERR("Could not get nsIDOMHTMLIFrameElement iface: %08x\n", nsres);
246 return &ret->element;