2010-10-27 23:18:42 +02:00
|
|
|
/*
|
|
|
|
* Copyright 2010 Jacek Caban for CodeWeavers
|
|
|
|
*
|
|
|
|
* This library is free software; you can redistribute it and/or
|
|
|
|
* modify it under the terms of the GNU Lesser General Public
|
|
|
|
* License as published by the Free Software Foundation; either
|
|
|
|
* version 2.1 of the License, or (at your option) any later version.
|
|
|
|
*
|
|
|
|
* This library is distributed in the hope that it will be useful,
|
|
|
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
|
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
|
|
|
* Lesser General Public License for more details.
|
|
|
|
*
|
|
|
|
* You should have received a copy of the GNU Lesser General Public
|
|
|
|
* License along with this library; if not, write to the Free Software
|
|
|
|
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
|
|
|
|
*/
|
|
|
|
|
|
|
|
#include <stdarg.h>
|
|
|
|
|
|
|
|
#define COBJMACROS
|
|
|
|
|
|
|
|
#include "windef.h"
|
|
|
|
#include "winbase.h"
|
|
|
|
#include "winuser.h"
|
|
|
|
#include "winreg.h"
|
|
|
|
#include "ole2.h"
|
|
|
|
|
|
|
|
#include "wine/debug.h"
|
|
|
|
|
|
|
|
#include "mshtml_private.h"
|
2010-12-09 16:28:18 +01:00
|
|
|
#include "pluginhost.h"
|
2010-10-27 23:18:42 +02:00
|
|
|
|
|
|
|
WINE_DEFAULT_DEBUG_CHANNEL(mshtml);
|
|
|
|
|
|
|
|
typedef struct {
|
2010-12-09 16:28:18 +01:00
|
|
|
HTMLPluginContainer plugin_container;
|
2010-10-27 23:18:42 +02:00
|
|
|
|
2010-12-06 23:31:42 +01:00
|
|
|
IHTMLObjectElement IHTMLObjectElement_iface;
|
2010-11-12 12:30:49 +01:00
|
|
|
|
|
|
|
nsIDOMHTMLObjectElement *nsobject;
|
2010-10-27 23:18:42 +02:00
|
|
|
} HTMLObjectElement;
|
|
|
|
|
2010-12-06 23:31:42 +01:00
|
|
|
static inline HTMLObjectElement *impl_from_IHTMLObjectElement(IHTMLObjectElement *iface)
|
|
|
|
{
|
|
|
|
return CONTAINING_RECORD(iface, HTMLObjectElement, IHTMLObjectElement_iface);
|
|
|
|
}
|
2010-10-27 23:18:42 +02:00
|
|
|
|
|
|
|
static HRESULT WINAPI HTMLObjectElement_QueryInterface(IHTMLObjectElement *iface,
|
|
|
|
REFIID riid, void **ppv)
|
|
|
|
{
|
2010-12-06 23:31:42 +01:00
|
|
|
HTMLObjectElement *This = impl_from_IHTMLObjectElement(iface);
|
2010-10-27 23:18:42 +02:00
|
|
|
|
2010-12-09 16:28:18 +01:00
|
|
|
return IHTMLDOMNode_QueryInterface(HTMLDOMNODE(&This->plugin_container.element.node), riid, ppv);
|
2010-10-27 23:18:42 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
static ULONG WINAPI HTMLObjectElement_AddRef(IHTMLObjectElement *iface)
|
|
|
|
{
|
2010-12-06 23:31:42 +01:00
|
|
|
HTMLObjectElement *This = impl_from_IHTMLObjectElement(iface);
|
2010-10-27 23:18:42 +02:00
|
|
|
|
2010-12-09 16:28:18 +01:00
|
|
|
return IHTMLDOMNode_AddRef(HTMLDOMNODE(&This->plugin_container.element.node));
|
2010-10-27 23:18:42 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
static ULONG WINAPI HTMLObjectElement_Release(IHTMLObjectElement *iface)
|
|
|
|
{
|
2010-12-06 23:31:42 +01:00
|
|
|
HTMLObjectElement *This = impl_from_IHTMLObjectElement(iface);
|
2010-10-27 23:18:42 +02:00
|
|
|
|
2010-12-09 16:28:18 +01:00
|
|
|
return IHTMLDOMNode_Release(HTMLDOMNODE(&This->plugin_container.element.node));
|
2010-10-27 23:18:42 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
static HRESULT WINAPI HTMLObjectElement_GetTypeInfoCount(IHTMLObjectElement *iface, UINT *pctinfo)
|
|
|
|
{
|
2010-12-06 23:31:42 +01:00
|
|
|
HTMLObjectElement *This = impl_from_IHTMLObjectElement(iface);
|
2010-12-09 16:28:18 +01:00
|
|
|
return IDispatchEx_GetTypeInfoCount(DISPATCHEX(&This->plugin_container.element.node.dispex), pctinfo);
|
2010-10-27 23:18:42 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
static HRESULT WINAPI HTMLObjectElement_GetTypeInfo(IHTMLObjectElement *iface, UINT iTInfo,
|
|
|
|
LCID lcid, ITypeInfo **ppTInfo)
|
|
|
|
{
|
2010-12-06 23:31:42 +01:00
|
|
|
HTMLObjectElement *This = impl_from_IHTMLObjectElement(iface);
|
2010-12-09 16:28:18 +01:00
|
|
|
return IDispatchEx_GetTypeInfo(DISPATCHEX(&This->plugin_container.element.node.dispex), iTInfo, lcid, ppTInfo);
|
2010-10-27 23:18:42 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
static HRESULT WINAPI HTMLObjectElement_GetIDsOfNames(IHTMLObjectElement *iface, REFIID riid,
|
|
|
|
LPOLESTR *rgszNames, UINT cNames,
|
|
|
|
LCID lcid, DISPID *rgDispId)
|
|
|
|
{
|
2010-12-06 23:31:42 +01:00
|
|
|
HTMLObjectElement *This = impl_from_IHTMLObjectElement(iface);
|
2010-12-09 16:28:18 +01:00
|
|
|
return IDispatchEx_GetIDsOfNames(DISPATCHEX(&This->plugin_container.element.node.dispex), riid, rgszNames, cNames, lcid, rgDispId);
|
2010-10-27 23:18:42 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
static HRESULT WINAPI HTMLObjectElement_Invoke(IHTMLObjectElement *iface, DISPID dispIdMember,
|
|
|
|
REFIID riid, LCID lcid, WORD wFlags, DISPPARAMS *pDispParams,
|
|
|
|
VARIANT *pVarResult, EXCEPINFO *pExcepInfo, UINT *puArgErr)
|
|
|
|
{
|
2010-12-06 23:31:42 +01:00
|
|
|
HTMLObjectElement *This = impl_from_IHTMLObjectElement(iface);
|
2010-12-09 16:28:18 +01:00
|
|
|
return IDispatchEx_Invoke(DISPATCHEX(&This->plugin_container.element.node.dispex), dispIdMember, riid, lcid, wFlags, pDispParams,
|
2010-10-27 23:18:42 +02:00
|
|
|
pVarResult, pExcepInfo, puArgErr);
|
|
|
|
}
|
|
|
|
|
|
|
|
static HRESULT WINAPI HTMLObjectElement_get_object(IHTMLObjectElement *iface, IDispatch **p)
|
|
|
|
{
|
2010-12-06 23:31:42 +01:00
|
|
|
HTMLObjectElement *This = impl_from_IHTMLObjectElement(iface);
|
2010-10-27 23:18:42 +02:00
|
|
|
FIXME("(%p)->(%p)\n", This, p);
|
|
|
|
return E_NOTIMPL;
|
|
|
|
}
|
|
|
|
|
|
|
|
static HRESULT WINAPI HTMLObjectElement_get_classid(IHTMLObjectElement *iface, BSTR *p)
|
|
|
|
{
|
2010-12-06 23:31:42 +01:00
|
|
|
HTMLObjectElement *This = impl_from_IHTMLObjectElement(iface);
|
2010-10-27 23:18:42 +02:00
|
|
|
FIXME("(%p)->(%p)\n", This, p);
|
|
|
|
return E_NOTIMPL;
|
|
|
|
}
|
|
|
|
|
|
|
|
static HRESULT WINAPI HTMLObjectElement_get_data(IHTMLObjectElement *iface, BSTR *p)
|
|
|
|
{
|
2010-12-06 23:31:42 +01:00
|
|
|
HTMLObjectElement *This = impl_from_IHTMLObjectElement(iface);
|
2010-10-27 23:18:42 +02:00
|
|
|
FIXME("(%p)->(%p)\n", This, p);
|
|
|
|
return E_NOTIMPL;
|
|
|
|
}
|
|
|
|
|
|
|
|
static HRESULT WINAPI HTMLObjectElement_put_recordset(IHTMLObjectElement *iface, IDispatch *v)
|
|
|
|
{
|
2010-12-06 23:31:42 +01:00
|
|
|
HTMLObjectElement *This = impl_from_IHTMLObjectElement(iface);
|
2010-10-27 23:18:42 +02:00
|
|
|
FIXME("(%p)->(%p)\n", This, v);
|
|
|
|
return E_NOTIMPL;
|
|
|
|
}
|
|
|
|
|
|
|
|
static HRESULT WINAPI HTMLObjectElement_get_recordset(IHTMLObjectElement *iface, IDispatch **p)
|
|
|
|
{
|
2010-12-06 23:31:42 +01:00
|
|
|
HTMLObjectElement *This = impl_from_IHTMLObjectElement(iface);
|
2010-10-27 23:18:42 +02:00
|
|
|
FIXME("(%p)->(%p)\n", This, p);
|
|
|
|
return E_NOTIMPL;
|
|
|
|
}
|
|
|
|
|
|
|
|
static HRESULT WINAPI HTMLObjectElement_put_align(IHTMLObjectElement *iface, BSTR v)
|
|
|
|
{
|
2010-12-06 23:31:42 +01:00
|
|
|
HTMLObjectElement *This = impl_from_IHTMLObjectElement(iface);
|
2010-10-27 23:18:42 +02:00
|
|
|
FIXME("(%p)->(%s)\n", This, debugstr_w(v));
|
|
|
|
return E_NOTIMPL;
|
|
|
|
}
|
|
|
|
|
|
|
|
static HRESULT WINAPI HTMLObjectElement_get_align(IHTMLObjectElement *iface, BSTR *p)
|
|
|
|
{
|
2010-12-06 23:31:42 +01:00
|
|
|
HTMLObjectElement *This = impl_from_IHTMLObjectElement(iface);
|
2010-10-27 23:18:42 +02:00
|
|
|
FIXME("(%p)->(%p)\n", This, p);
|
|
|
|
return E_NOTIMPL;
|
|
|
|
}
|
|
|
|
|
|
|
|
static HRESULT WINAPI HTMLObjectElement_put_name(IHTMLObjectElement *iface, BSTR v)
|
|
|
|
{
|
2010-12-06 23:31:42 +01:00
|
|
|
HTMLObjectElement *This = impl_from_IHTMLObjectElement(iface);
|
2010-10-27 23:18:42 +02:00
|
|
|
FIXME("(%p)->(%s)\n", This, debugstr_w(v));
|
|
|
|
return E_NOTIMPL;
|
|
|
|
}
|
|
|
|
|
|
|
|
static HRESULT WINAPI HTMLObjectElement_get_name(IHTMLObjectElement *iface, BSTR *p)
|
|
|
|
{
|
2010-12-06 23:31:42 +01:00
|
|
|
HTMLObjectElement *This = impl_from_IHTMLObjectElement(iface);
|
2010-10-27 23:18:42 +02:00
|
|
|
FIXME("(%p)->(%p)\n", This, p);
|
|
|
|
return E_NOTIMPL;
|
|
|
|
}
|
|
|
|
|
|
|
|
static HRESULT WINAPI HTMLObjectElement_put_codeBase(IHTMLObjectElement *iface, BSTR v)
|
|
|
|
{
|
2010-12-06 23:31:42 +01:00
|
|
|
HTMLObjectElement *This = impl_from_IHTMLObjectElement(iface);
|
2010-10-27 23:18:42 +02:00
|
|
|
FIXME("(%p)->(%s)\n", This, debugstr_w(v));
|
|
|
|
return E_NOTIMPL;
|
|
|
|
}
|
|
|
|
|
|
|
|
static HRESULT WINAPI HTMLObjectElement_get_codeBase(IHTMLObjectElement *iface, BSTR *p)
|
|
|
|
{
|
2010-12-06 23:31:42 +01:00
|
|
|
HTMLObjectElement *This = impl_from_IHTMLObjectElement(iface);
|
2010-10-27 23:18:42 +02:00
|
|
|
FIXME("(%p)->(%p)\n", This, p);
|
|
|
|
return E_NOTIMPL;
|
|
|
|
}
|
|
|
|
|
|
|
|
static HRESULT WINAPI HTMLObjectElement_put_codeType(IHTMLObjectElement *iface, BSTR v)
|
|
|
|
{
|
2010-12-06 23:31:42 +01:00
|
|
|
HTMLObjectElement *This = impl_from_IHTMLObjectElement(iface);
|
2010-10-27 23:18:42 +02:00
|
|
|
FIXME("(%p)->(%s)\n", This, debugstr_w(v));
|
|
|
|
return E_NOTIMPL;
|
|
|
|
}
|
|
|
|
|
|
|
|
static HRESULT WINAPI HTMLObjectElement_get_codeType(IHTMLObjectElement *iface, BSTR *p)
|
|
|
|
{
|
2010-12-06 23:31:42 +01:00
|
|
|
HTMLObjectElement *This = impl_from_IHTMLObjectElement(iface);
|
2010-10-27 23:18:42 +02:00
|
|
|
FIXME("(%p)->(%p)\n", This, p);
|
|
|
|
return E_NOTIMPL;
|
|
|
|
}
|
|
|
|
|
|
|
|
static HRESULT WINAPI HTMLObjectElement_put_code(IHTMLObjectElement *iface, BSTR v)
|
|
|
|
{
|
2010-12-06 23:31:42 +01:00
|
|
|
HTMLObjectElement *This = impl_from_IHTMLObjectElement(iface);
|
2010-10-27 23:18:42 +02:00
|
|
|
FIXME("(%p)->(%s)\n", This, debugstr_w(v));
|
|
|
|
return E_NOTIMPL;
|
|
|
|
}
|
|
|
|
|
|
|
|
static HRESULT WINAPI HTMLObjectElement_get_code(IHTMLObjectElement *iface, BSTR *p)
|
|
|
|
{
|
2010-12-06 23:31:42 +01:00
|
|
|
HTMLObjectElement *This = impl_from_IHTMLObjectElement(iface);
|
2010-10-27 23:18:42 +02:00
|
|
|
FIXME("(%p)->(%p)\n", This, p);
|
|
|
|
return E_NOTIMPL;
|
|
|
|
}
|
|
|
|
|
|
|
|
static HRESULT WINAPI HTMLObjectElement_get_BaseHref(IHTMLObjectElement *iface, BSTR *p)
|
|
|
|
{
|
2010-12-06 23:31:42 +01:00
|
|
|
HTMLObjectElement *This = impl_from_IHTMLObjectElement(iface);
|
2010-10-27 23:18:42 +02:00
|
|
|
FIXME("(%p)->(%p)\n", This, p);
|
|
|
|
return E_NOTIMPL;
|
|
|
|
}
|
|
|
|
|
|
|
|
static HRESULT WINAPI HTMLObjectElement_put_type(IHTMLObjectElement *iface, BSTR v)
|
|
|
|
{
|
2010-12-06 23:31:42 +01:00
|
|
|
HTMLObjectElement *This = impl_from_IHTMLObjectElement(iface);
|
2010-10-27 23:18:42 +02:00
|
|
|
FIXME("(%p)->(%s)\n", This, debugstr_w(v));
|
|
|
|
return E_NOTIMPL;
|
|
|
|
}
|
|
|
|
|
|
|
|
static HRESULT WINAPI HTMLObjectElement_get_type(IHTMLObjectElement *iface, BSTR *p)
|
|
|
|
{
|
2010-12-06 23:31:42 +01:00
|
|
|
HTMLObjectElement *This = impl_from_IHTMLObjectElement(iface);
|
2010-10-27 23:18:42 +02:00
|
|
|
FIXME("(%p)->(%p)\n", This, p);
|
|
|
|
return E_NOTIMPL;
|
|
|
|
}
|
|
|
|
|
|
|
|
static HRESULT WINAPI HTMLObjectElement_get_form(IHTMLObjectElement *iface, IHTMLFormElement **p)
|
|
|
|
{
|
2010-12-06 23:31:42 +01:00
|
|
|
HTMLObjectElement *This = impl_from_IHTMLObjectElement(iface);
|
2010-10-27 23:18:42 +02:00
|
|
|
FIXME("(%p)->(%p)\n", This, p);
|
|
|
|
return E_NOTIMPL;
|
|
|
|
}
|
|
|
|
|
|
|
|
static HRESULT WINAPI HTMLObjectElement_put_width(IHTMLObjectElement *iface, VARIANT v)
|
|
|
|
{
|
2010-12-06 23:31:42 +01:00
|
|
|
HTMLObjectElement *This = impl_from_IHTMLObjectElement(iface);
|
2010-10-27 23:18:42 +02:00
|
|
|
FIXME("(%p)->(%s)\n", This, debugstr_variant(&v));
|
|
|
|
return E_NOTIMPL;
|
|
|
|
}
|
|
|
|
|
|
|
|
static HRESULT WINAPI HTMLObjectElement_get_width(IHTMLObjectElement *iface, VARIANT *p)
|
|
|
|
{
|
2010-12-06 23:31:42 +01:00
|
|
|
HTMLObjectElement *This = impl_from_IHTMLObjectElement(iface);
|
2010-10-27 23:18:42 +02:00
|
|
|
FIXME("(%p)->(%p)\n", This, p);
|
|
|
|
return E_NOTIMPL;
|
|
|
|
}
|
|
|
|
|
|
|
|
static HRESULT WINAPI HTMLObjectElement_put_height(IHTMLObjectElement *iface, VARIANT v)
|
|
|
|
{
|
2010-12-06 23:31:42 +01:00
|
|
|
HTMLObjectElement *This = impl_from_IHTMLObjectElement(iface);
|
2010-10-27 23:18:42 +02:00
|
|
|
FIXME("(%p)->(%s)\n", This, debugstr_variant(&v));
|
|
|
|
return E_NOTIMPL;
|
|
|
|
}
|
|
|
|
|
|
|
|
static HRESULT WINAPI HTMLObjectElement_get_height(IHTMLObjectElement *iface, VARIANT *p)
|
|
|
|
{
|
2010-12-06 23:31:42 +01:00
|
|
|
HTMLObjectElement *This = impl_from_IHTMLObjectElement(iface);
|
2010-10-27 23:18:42 +02:00
|
|
|
FIXME("(%p)->(%p)\n", This, p);
|
|
|
|
return E_NOTIMPL;
|
|
|
|
}
|
|
|
|
|
|
|
|
static HRESULT WINAPI HTMLObjectElement_get_readyState(IHTMLObjectElement *iface, LONG *p)
|
|
|
|
{
|
2010-12-06 23:31:42 +01:00
|
|
|
HTMLObjectElement *This = impl_from_IHTMLObjectElement(iface);
|
2010-10-27 23:18:42 +02:00
|
|
|
FIXME("(%p)->(%p)\n", This, p);
|
|
|
|
return E_NOTIMPL;
|
|
|
|
}
|
|
|
|
|
|
|
|
static HRESULT WINAPI HTMLObjectElement_put_onreadystatechange(IHTMLObjectElement *iface, VARIANT v)
|
|
|
|
{
|
2010-12-06 23:31:42 +01:00
|
|
|
HTMLObjectElement *This = impl_from_IHTMLObjectElement(iface);
|
2010-10-27 23:18:42 +02:00
|
|
|
FIXME("(%p)->(%s)\n", This, debugstr_variant(&v));
|
|
|
|
return E_NOTIMPL;
|
|
|
|
}
|
|
|
|
|
|
|
|
static HRESULT WINAPI HTMLObjectElement_get_onreadystatechange(IHTMLObjectElement *iface, VARIANT *p)
|
|
|
|
{
|
2010-12-06 23:31:42 +01:00
|
|
|
HTMLObjectElement *This = impl_from_IHTMLObjectElement(iface);
|
2010-10-27 23:18:42 +02:00
|
|
|
FIXME("(%p)->(%p)\n", This, p);
|
|
|
|
return E_NOTIMPL;
|
|
|
|
}
|
|
|
|
|
|
|
|
static HRESULT WINAPI HTMLObjectElement_put_onerror(IHTMLObjectElement *iface, VARIANT v)
|
|
|
|
{
|
2010-12-06 23:31:42 +01:00
|
|
|
HTMLObjectElement *This = impl_from_IHTMLObjectElement(iface);
|
2010-10-27 23:18:42 +02:00
|
|
|
FIXME("(%p)->(%s)\n", This, debugstr_variant(&v));
|
|
|
|
return E_NOTIMPL;
|
|
|
|
}
|
|
|
|
|
|
|
|
static HRESULT WINAPI HTMLObjectElement_get_onerror(IHTMLObjectElement *iface, VARIANT *p)
|
|
|
|
{
|
2010-12-06 23:31:42 +01:00
|
|
|
HTMLObjectElement *This = impl_from_IHTMLObjectElement(iface);
|
2010-10-27 23:18:42 +02:00
|
|
|
FIXME("(%p)->(%p)\n", This, p);
|
|
|
|
return E_NOTIMPL;
|
|
|
|
}
|
|
|
|
|
|
|
|
static HRESULT WINAPI HTMLObjectElement_put_altHtml(IHTMLObjectElement *iface, BSTR v)
|
|
|
|
{
|
2010-12-06 23:31:42 +01:00
|
|
|
HTMLObjectElement *This = impl_from_IHTMLObjectElement(iface);
|
2010-10-27 23:18:42 +02:00
|
|
|
FIXME("(%p)->(%s)\n", This, debugstr_w(v));
|
|
|
|
return E_NOTIMPL;
|
|
|
|
}
|
|
|
|
|
|
|
|
static HRESULT WINAPI HTMLObjectElement_get_altHtml(IHTMLObjectElement *iface, BSTR *p)
|
|
|
|
{
|
2010-12-06 23:31:42 +01:00
|
|
|
HTMLObjectElement *This = impl_from_IHTMLObjectElement(iface);
|
2010-10-27 23:18:42 +02:00
|
|
|
FIXME("(%p)->(%p)\n", This, p);
|
|
|
|
return E_NOTIMPL;
|
|
|
|
}
|
|
|
|
|
|
|
|
static HRESULT WINAPI HTMLObjectElement_put_vspace(IHTMLObjectElement *iface, LONG v)
|
|
|
|
{
|
2010-12-06 23:31:42 +01:00
|
|
|
HTMLObjectElement *This = impl_from_IHTMLObjectElement(iface);
|
2010-10-27 23:18:42 +02:00
|
|
|
FIXME("(%p)->(%d)\n", This, v);
|
|
|
|
return E_NOTIMPL;
|
|
|
|
}
|
|
|
|
|
|
|
|
static HRESULT WINAPI HTMLObjectElement_get_vspace(IHTMLObjectElement *iface, LONG *p)
|
|
|
|
{
|
2010-12-06 23:31:42 +01:00
|
|
|
HTMLObjectElement *This = impl_from_IHTMLObjectElement(iface);
|
2010-11-12 12:30:49 +01:00
|
|
|
PRInt32 vspace;
|
|
|
|
nsresult nsres;
|
|
|
|
|
|
|
|
TRACE("(%p)->(%p)\n", This, p);
|
|
|
|
|
|
|
|
nsres = nsIDOMHTMLObjectElement_GetVspace(This->nsobject, &vspace);
|
|
|
|
if(NS_FAILED(nsres)) {
|
|
|
|
ERR("GetVspace failed: %08x\n", nsres);
|
|
|
|
return E_FAIL;
|
|
|
|
}
|
|
|
|
|
|
|
|
*p = vspace;
|
|
|
|
return S_OK;
|
2010-10-27 23:18:42 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
static HRESULT WINAPI HTMLObjectElement_put_hspace(IHTMLObjectElement *iface, LONG v)
|
|
|
|
{
|
2010-12-06 23:31:42 +01:00
|
|
|
HTMLObjectElement *This = impl_from_IHTMLObjectElement(iface);
|
2010-10-27 23:18:42 +02:00
|
|
|
FIXME("(%p)->(%d)\n", This, v);
|
|
|
|
return E_NOTIMPL;
|
|
|
|
}
|
|
|
|
|
|
|
|
static HRESULT WINAPI HTMLObjectElement_get_hspace(IHTMLObjectElement *iface, LONG *p)
|
|
|
|
{
|
2010-12-06 23:31:42 +01:00
|
|
|
HTMLObjectElement *This = impl_from_IHTMLObjectElement(iface);
|
2010-10-27 23:18:42 +02:00
|
|
|
FIXME("(%p)->(%p)\n", This, p);
|
|
|
|
return E_NOTIMPL;
|
|
|
|
}
|
|
|
|
|
|
|
|
static const IHTMLObjectElementVtbl HTMLObjectElementVtbl = {
|
|
|
|
HTMLObjectElement_QueryInterface,
|
|
|
|
HTMLObjectElement_AddRef,
|
|
|
|
HTMLObjectElement_Release,
|
|
|
|
HTMLObjectElement_GetTypeInfoCount,
|
|
|
|
HTMLObjectElement_GetTypeInfo,
|
|
|
|
HTMLObjectElement_GetIDsOfNames,
|
|
|
|
HTMLObjectElement_Invoke,
|
|
|
|
HTMLObjectElement_get_object,
|
|
|
|
HTMLObjectElement_get_classid,
|
|
|
|
HTMLObjectElement_get_data,
|
|
|
|
HTMLObjectElement_put_recordset,
|
|
|
|
HTMLObjectElement_get_recordset,
|
|
|
|
HTMLObjectElement_put_align,
|
|
|
|
HTMLObjectElement_get_align,
|
|
|
|
HTMLObjectElement_put_name,
|
|
|
|
HTMLObjectElement_get_name,
|
|
|
|
HTMLObjectElement_put_codeBase,
|
|
|
|
HTMLObjectElement_get_codeBase,
|
|
|
|
HTMLObjectElement_put_codeType,
|
|
|
|
HTMLObjectElement_get_codeType,
|
|
|
|
HTMLObjectElement_put_code,
|
|
|
|
HTMLObjectElement_get_code,
|
|
|
|
HTMLObjectElement_get_BaseHref,
|
|
|
|
HTMLObjectElement_put_type,
|
|
|
|
HTMLObjectElement_get_type,
|
|
|
|
HTMLObjectElement_get_form,
|
|
|
|
HTMLObjectElement_put_width,
|
|
|
|
HTMLObjectElement_get_width,
|
|
|
|
HTMLObjectElement_put_height,
|
|
|
|
HTMLObjectElement_get_height,
|
|
|
|
HTMLObjectElement_get_readyState,
|
|
|
|
HTMLObjectElement_put_onreadystatechange,
|
|
|
|
HTMLObjectElement_get_onreadystatechange,
|
|
|
|
HTMLObjectElement_put_onerror,
|
|
|
|
HTMLObjectElement_get_onerror,
|
|
|
|
HTMLObjectElement_put_altHtml,
|
|
|
|
HTMLObjectElement_get_altHtml,
|
|
|
|
HTMLObjectElement_put_vspace,
|
|
|
|
HTMLObjectElement_get_vspace,
|
|
|
|
HTMLObjectElement_put_hspace,
|
|
|
|
HTMLObjectElement_get_hspace
|
|
|
|
};
|
|
|
|
|
2010-12-09 16:28:18 +01:00
|
|
|
#define HTMLOBJECT_NODE_THIS(iface) DEFINE_THIS2(HTMLObjectElement, plugin_container.element.node, iface)
|
2010-10-27 23:18:42 +02:00
|
|
|
|
|
|
|
static HRESULT HTMLObjectElement_QI(HTMLDOMNode *iface, REFIID riid, void **ppv)
|
|
|
|
{
|
|
|
|
HTMLObjectElement *This = HTMLOBJECT_NODE_THIS(iface);
|
|
|
|
|
|
|
|
if(IsEqualGUID(&IID_IUnknown, riid)) {
|
|
|
|
TRACE("(%p)->(IID_IUnknown %p)\n", This, ppv);
|
2010-12-06 23:31:42 +01:00
|
|
|
*ppv = &This->IHTMLObjectElement_iface;
|
2010-10-27 23:18:42 +02:00
|
|
|
}else if(IsEqualGUID(&IID_IDispatch, riid)) {
|
|
|
|
TRACE("(%p)->(IID_IDispatch %p)\n", This, ppv);
|
2010-12-06 23:31:42 +01:00
|
|
|
*ppv = &This->IHTMLObjectElement_iface;
|
2010-10-27 23:18:42 +02:00
|
|
|
}else if(IsEqualGUID(&IID_IHTMLObjectElement, riid)) {
|
|
|
|
TRACE("(%p)->(IID_IHTMLObjectElement %p)\n", This, ppv);
|
2010-12-06 23:31:42 +01:00
|
|
|
*ppv = &This->IHTMLObjectElement_iface;
|
2010-12-09 16:28:18 +01:00
|
|
|
}else if(IsEqualGUID(&IID_HTMLPluginContainer, riid)) {
|
|
|
|
TRACE("(%p)->(IID_HTMLPluginContainer %p)\n", This, ppv);
|
|
|
|
*ppv = &This->plugin_container;
|
|
|
|
return S_OK;
|
2010-10-27 23:18:42 +02:00
|
|
|
}else {
|
2010-12-09 16:28:18 +01:00
|
|
|
return HTMLElement_QI(&This->plugin_container.element.node, riid, ppv);
|
2010-10-27 23:18:42 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
IUnknown_AddRef((IUnknown*)*ppv);
|
|
|
|
return S_OK;
|
|
|
|
}
|
|
|
|
|
|
|
|
static void HTMLObjectElement_destructor(HTMLDOMNode *iface)
|
|
|
|
{
|
|
|
|
HTMLObjectElement *This = HTMLOBJECT_NODE_THIS(iface);
|
|
|
|
|
2010-12-09 16:28:34 +01:00
|
|
|
if(This->plugin_container.plugin_host)
|
|
|
|
This->plugin_container.plugin_host->element = NULL;
|
2010-11-12 12:30:49 +01:00
|
|
|
if(This->nsobject)
|
|
|
|
nsIDOMHTMLObjectElement_Release(This->nsobject);
|
|
|
|
|
2010-12-09 16:28:18 +01:00
|
|
|
HTMLElement_destructor(&This->plugin_container.element.node);
|
2010-10-27 23:18:42 +02:00
|
|
|
}
|
|
|
|
|
2010-11-14 14:42:00 +01:00
|
|
|
static HRESULT HTMLObjectElement_get_readystate(HTMLDOMNode *iface, BSTR *p)
|
|
|
|
{
|
|
|
|
HTMLObjectElement *This = HTMLOBJECT_NODE_THIS(iface);
|
|
|
|
FIXME("(%p)->(%p)\n", This, p);
|
|
|
|
return E_NOTIMPL;
|
|
|
|
}
|
|
|
|
|
2010-10-27 23:18:42 +02:00
|
|
|
#undef HTMLOBJECT_NODE_THIS
|
|
|
|
|
|
|
|
static const NodeImplVtbl HTMLObjectElementImplVtbl = {
|
|
|
|
HTMLObjectElement_QI,
|
2010-11-14 14:41:39 +01:00
|
|
|
HTMLObjectElement_destructor,
|
2010-11-14 14:42:00 +01:00
|
|
|
HTMLElement_clone,
|
|
|
|
NULL,
|
|
|
|
NULL,
|
|
|
|
NULL,
|
|
|
|
NULL,
|
|
|
|
NULL,
|
|
|
|
HTMLObjectElement_get_readystate
|
2010-10-27 23:18:42 +02:00
|
|
|
};
|
|
|
|
|
2010-10-27 23:19:30 +02:00
|
|
|
static const tid_t HTMLObjectElement_iface_tids[] = {
|
|
|
|
HTMLELEMENT_TIDS,
|
|
|
|
IHTMLObjectElement_tid,
|
|
|
|
0
|
|
|
|
};
|
|
|
|
static dispex_static_data_t HTMLObjectElement_dispex = {
|
|
|
|
NULL,
|
|
|
|
DispHTMLObjectElement_tid,
|
|
|
|
NULL,
|
|
|
|
HTMLObjectElement_iface_tids
|
|
|
|
};
|
|
|
|
|
2010-12-01 22:43:14 +01:00
|
|
|
HRESULT HTMLObjectElement_Create(HTMLDocumentNode *doc, nsIDOMHTMLElement *nselem, HTMLElement **elem)
|
2010-10-27 23:18:42 +02:00
|
|
|
{
|
2010-12-01 22:43:14 +01:00
|
|
|
HTMLObjectElement *ret;
|
2010-11-12 12:30:49 +01:00
|
|
|
nsresult nsres;
|
2010-10-27 23:18:42 +02:00
|
|
|
|
2010-12-01 22:43:14 +01:00
|
|
|
ret = heap_alloc_zero(sizeof(*ret));
|
|
|
|
if(!ret)
|
|
|
|
return E_OUTOFMEMORY;
|
|
|
|
|
2010-12-06 23:31:42 +01:00
|
|
|
ret->IHTMLObjectElement_iface.lpVtbl = &HTMLObjectElementVtbl;
|
2010-12-09 16:28:18 +01:00
|
|
|
ret->plugin_container.element.node.vtbl = &HTMLObjectElementImplVtbl;
|
2010-10-27 23:18:42 +02:00
|
|
|
|
2010-11-12 12:30:49 +01:00
|
|
|
nsres = nsIDOMHTMLElement_QueryInterface(nselem, &IID_nsIDOMHTMLObjectElement, (void**)&ret->nsobject);
|
2010-12-01 22:43:14 +01:00
|
|
|
if(NS_FAILED(nsres)) {
|
2010-11-12 12:30:49 +01:00
|
|
|
ERR("Could not get nsIDOMHTMLObjectElement iface: %08x\n", nsres);
|
2010-12-01 22:43:14 +01:00
|
|
|
heap_free(ret);
|
|
|
|
return E_FAIL;
|
|
|
|
}
|
|
|
|
|
2010-12-09 16:28:18 +01:00
|
|
|
HTMLElement_Init(&ret->plugin_container.element, doc, nselem, &HTMLObjectElement_dispex);
|
2010-11-12 12:30:49 +01:00
|
|
|
|
2010-12-09 16:28:18 +01:00
|
|
|
*elem = &ret->plugin_container.element;
|
2010-12-01 22:43:14 +01:00
|
|
|
return S_OK;
|
2010-10-27 23:18:42 +02:00
|
|
|
}
|