Commit d147ee13 authored by Jacek Caban's avatar Jacek Caban Committed by Alexandre Julliard

mshtml: Added IHTMLEmbedElement stub implementation.

parent 365e76d2
......@@ -20,6 +20,7 @@ C_SRCS = \
htmlelem2.c \
htmlelem3.c \
htmlelemcol.c \
htmlembed.c \
htmlevent.c \
htmlform.c \
htmlframe.c \
......
......@@ -93,6 +93,7 @@ static REFIID tid_ids[] = {
&DIID_DispHTMLDocument,
&DIID_DispHTMLDOMTextNode,
&DIID_DispHTMLElementCollection,
&DIID_DispHTMLEmbed,
&DIID_DispHTMLFormElement,
&DIID_DispHTMLGenericElement,
&DIID_DispHTMLFrameElement,
......@@ -134,6 +135,7 @@ static REFIID tid_ids[] = {
&IID_IHTMLElement3,
&IID_IHTMLElement4,
&IID_IHTMLElementCollection,
&IID_IHTMLEmbedElement,
&IID_IHTMLEventObj,
&IID_IHTMLFiltersCollection,
&IID_IHTMLFormElement,
......
......@@ -1654,6 +1654,7 @@ HTMLElement *HTMLElement_Create(HTMLDocumentNode *doc, nsIDOMNode *nsnode, BOOL
static const WCHAR wszA[] = {'A',0};
static const WCHAR wszBODY[] = {'B','O','D','Y',0};
static const WCHAR wszEMBED[] = {'E','M','B','E','D',0};
static const WCHAR wszFORM[] = {'F','O','R','M',0};
static const WCHAR wszFRAME[] = {'F','R','A','M','E',0};
static const WCHAR wszIFRAME[] = {'I','F','R','A','M','E',0};
......@@ -1680,6 +1681,8 @@ HTMLElement *HTMLElement_Create(HTMLDocumentNode *doc, nsIDOMNode *nsnode, BOOL
ret = HTMLAnchorElement_Create(doc, nselem);
else if(!strcmpW(class_name, wszBODY))
ret = HTMLBodyElement_Create(doc, nselem);
else if(!strcmpW(class_name, wszEMBED))
ret = HTMLEmbedElement_Create(doc, nselem);
else if(!strcmpW(class_name, wszFORM))
ret = HTMLFormElement_Create(doc, nselem);
else if(!strcmpW(class_name, wszFRAME))
......
/*
* 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"
WINE_DEFAULT_DEBUG_CHANNEL(mshtml);
typedef struct {
HTMLElement element;
const IHTMLEmbedElementVtbl *lpIHTMLEmbedElementVtbl;
} HTMLEmbedElement;
#define HTMLEMBED(x) (&(x)->lpIHTMLEmbedElementVtbl)
#define HTMLEMBED_THIS(iface) DEFINE_THIS(HTMLEmbedElement, IHTMLEmbedElement, iface)
static HRESULT WINAPI HTMLEmbedElement_QueryInterface(IHTMLEmbedElement *iface,
REFIID riid, void **ppv)
{
HTMLEmbedElement *This = HTMLEMBED_THIS(iface);
return IHTMLDOMNode_QueryInterface(HTMLDOMNODE(&This->element.node), riid, ppv);
}
static ULONG WINAPI HTMLEmbedElement_AddRef(IHTMLEmbedElement *iface)
{
HTMLEmbedElement *This = HTMLEMBED_THIS(iface);
return IHTMLDOMNode_AddRef(HTMLDOMNODE(&This->element.node));
}
static ULONG WINAPI HTMLEmbedElement_Release(IHTMLEmbedElement *iface)
{
HTMLEmbedElement *This = HTMLEMBED_THIS(iface);
return IHTMLDOMNode_Release(HTMLDOMNODE(&This->element.node));
}
static HRESULT WINAPI HTMLEmbedElement_GetTypeInfoCount(IHTMLEmbedElement *iface, UINT *pctinfo)
{
HTMLEmbedElement *This = HTMLEMBED_THIS(iface);
return IDispatchEx_GetTypeInfoCount(DISPATCHEX(&This->element.node.dispex), pctinfo);
}
static HRESULT WINAPI HTMLEmbedElement_GetTypeInfo(IHTMLEmbedElement *iface, UINT iTInfo,
LCID lcid, ITypeInfo **ppTInfo)
{
HTMLEmbedElement *This = HTMLEMBED_THIS(iface);
return IDispatchEx_GetTypeInfo(DISPATCHEX(&This->element.node.dispex), iTInfo, lcid, ppTInfo);
}
static HRESULT WINAPI HTMLEmbedElement_GetIDsOfNames(IHTMLEmbedElement *iface, REFIID riid,
LPOLESTR *rgszNames, UINT cNames, LCID lcid, DISPID *rgDispId)
{
HTMLEmbedElement *This = HTMLEMBED_THIS(iface);
return IDispatchEx_GetIDsOfNames(DISPATCHEX(&This->element.node.dispex), riid, rgszNames, cNames, lcid, rgDispId);
}
static HRESULT WINAPI HTMLEmbedElement_Invoke(IHTMLEmbedElement *iface, DISPID dispIdMember,
REFIID riid, LCID lcid, WORD wFlags, DISPPARAMS *pDispParams,
VARIANT *pVarResult, EXCEPINFO *pExcepInfo, UINT *puArgErr)
{
HTMLEmbedElement *This = HTMLEMBED_THIS(iface);
return IDispatchEx_Invoke(DISPATCHEX(&This->element.node.dispex), dispIdMember, riid, lcid, wFlags, pDispParams,
pVarResult, pExcepInfo, puArgErr);
}
static HRESULT WINAPI HTMLEmbedElement_put_hidden(IHTMLEmbedElement *iface, BSTR v)
{
HTMLEmbedElement *This = HTMLEMBED_THIS(iface);
FIXME("(%p)->(%s)\n", This, debugstr_w(v));
return E_NOTIMPL;
}
static HRESULT WINAPI HTMLEmbedElement_get_hidden(IHTMLEmbedElement *iface, BSTR *p)
{
HTMLEmbedElement *This = HTMLEMBED_THIS(iface);
FIXME("(%p)->(%p)\n", This, p);
return E_NOTIMPL;
}
static HRESULT WINAPI HTMLEmbedElement_get_palete(IHTMLEmbedElement *iface, BSTR *p)
{
HTMLEmbedElement *This = HTMLEMBED_THIS(iface);
FIXME("(%p)->(%p)\n", This, p);
return E_NOTIMPL;
}
static HRESULT WINAPI HTMLEmbedElement_get_pluginspage(IHTMLEmbedElement *iface, BSTR *p)
{
HTMLEmbedElement *This = HTMLEMBED_THIS(iface);
FIXME("(%p)->(%p)\n", This, p);
return E_NOTIMPL;
}
static HRESULT WINAPI HTMLEmbedElement_put_src(IHTMLEmbedElement *iface, BSTR v)
{
HTMLEmbedElement *This = HTMLEMBED_THIS(iface);
FIXME("(%p)->(%s)\n", This, debugstr_w(v));
return E_NOTIMPL;
}
static HRESULT WINAPI HTMLEmbedElement_get_src(IHTMLEmbedElement *iface, BSTR *p)
{
HTMLEmbedElement *This = HTMLEMBED_THIS(iface);
FIXME("(%p)->(%p)\n", This, p);
return E_NOTIMPL;
}
static HRESULT WINAPI HTMLEmbedElement_put_units(IHTMLEmbedElement *iface, BSTR v)
{
HTMLEmbedElement *This = HTMLEMBED_THIS(iface);
FIXME("(%p)->(%s)\n", This, debugstr_w(v));
return E_NOTIMPL;
}
static HRESULT WINAPI HTMLEmbedElement_get_units(IHTMLEmbedElement *iface, BSTR *p)
{
HTMLEmbedElement *This = HTMLEMBED_THIS(iface);
FIXME("(%p)->(%p)\n", This, p);
return E_NOTIMPL;
}
static HRESULT WINAPI HTMLEmbedElement_put_name(IHTMLEmbedElement *iface, BSTR v)
{
HTMLEmbedElement *This = HTMLEMBED_THIS(iface);
FIXME("(%p)->(%s)\n", This, debugstr_w(v));
return E_NOTIMPL;
}
static HRESULT WINAPI HTMLEmbedElement_get_name(IHTMLEmbedElement *iface, BSTR *p)
{
HTMLEmbedElement *This = HTMLEMBED_THIS(iface);
FIXME("(%p)->(%p)\n", This, p);
return E_NOTIMPL;
}
static HRESULT WINAPI HTMLEmbedElement_put_width(IHTMLEmbedElement *iface, VARIANT v)
{
HTMLEmbedElement *This = HTMLEMBED_THIS(iface);
FIXME("(%p)->(%s)\n", This, debugstr_variant(&v));
return E_NOTIMPL;
}
static HRESULT WINAPI HTMLEmbedElement_get_width(IHTMLEmbedElement *iface, VARIANT *p)
{
HTMLEmbedElement *This = HTMLEMBED_THIS(iface);
FIXME("(%p)->(%p)\n", This, p);
return E_NOTIMPL;
}
static HRESULT WINAPI HTMLEmbedElement_put_height(IHTMLEmbedElement *iface, VARIANT v)
{
HTMLEmbedElement *This = HTMLEMBED_THIS(iface);
FIXME("(%p)->(%s)\n", This, debugstr_variant(&v));
return E_NOTIMPL;
}
static HRESULT WINAPI HTMLEmbedElement_get_height(IHTMLEmbedElement *iface, VARIANT *p)
{
HTMLEmbedElement *This = HTMLEMBED_THIS(iface);
FIXME("(%p)->(%p)\n", This, p);
return E_NOTIMPL;
}
#undef HTMLEMBED_THIS
static const IHTMLEmbedElementVtbl HTMLEmbedElementVtbl = {
HTMLEmbedElement_QueryInterface,
HTMLEmbedElement_AddRef,
HTMLEmbedElement_Release,
HTMLEmbedElement_GetTypeInfoCount,
HTMLEmbedElement_GetTypeInfo,
HTMLEmbedElement_GetIDsOfNames,
HTMLEmbedElement_Invoke,
HTMLEmbedElement_put_hidden,
HTMLEmbedElement_get_hidden,
HTMLEmbedElement_get_palete,
HTMLEmbedElement_get_pluginspage,
HTMLEmbedElement_put_src,
HTMLEmbedElement_get_src,
HTMLEmbedElement_put_units,
HTMLEmbedElement_get_units,
HTMLEmbedElement_put_name,
HTMLEmbedElement_get_name,
HTMLEmbedElement_put_width,
HTMLEmbedElement_get_width,
HTMLEmbedElement_put_height,
HTMLEmbedElement_get_height
};
#define HTMLEMBED_NODE_THIS(iface) DEFINE_THIS2(HTMLEmbedElement, element.node, iface)
static HRESULT HTMLEmbedElement_QI(HTMLDOMNode *iface, REFIID riid, void **ppv)
{
HTMLEmbedElement *This = HTMLEMBED_NODE_THIS(iface);
if(IsEqualGUID(&IID_IUnknown, riid)) {
TRACE("(%p)->(IID_IUnknown %p)\n", This, ppv);
*ppv = HTMLEMBED(This);
}else if(IsEqualGUID(&IID_IDispatch, riid)) {
TRACE("(%p)->(IID_IDispatch %p)\n", This, ppv);
*ppv = HTMLEMBED(This);
}else if(IsEqualGUID(&IID_IHTMLEmbedElement, riid)) {
TRACE("(%p)->(IID_IHTMLEmbedElement %p)\n", This, ppv);
*ppv = HTMLEMBED(This);
}else {
return HTMLElement_QI(&This->element.node, riid, ppv);
}
IUnknown_AddRef((IUnknown*)*ppv);
return S_OK;
}
static void HTMLEmbedElement_destructor(HTMLDOMNode *iface)
{
HTMLEmbedElement *This = HTMLEMBED_NODE_THIS(iface);
HTMLElement_destructor(&This->element.node);
}
#undef HTMLEMBED_NODE_THIS
static const NodeImplVtbl HTMLEmbedElementImplVtbl = {
HTMLEmbedElement_QI,
HTMLEmbedElement_destructor
};
static const tid_t HTMLEmbedElement_iface_tids[] = {
HTMLELEMENT_TIDS,
IHTMLEmbedElement_tid,
0
};
static dispex_static_data_t HTMLEmbedElement_dispex = {
NULL,
DispHTMLEmbed_tid,
NULL,
HTMLEmbedElement_iface_tids
};
HTMLElement *HTMLEmbedElement_Create(HTMLDocumentNode *doc, nsIDOMHTMLElement *nselem)
{
HTMLEmbedElement *ret = heap_alloc_zero(sizeof(*ret));
ret->lpIHTMLEmbedElementVtbl = &HTMLEmbedElementVtbl;
ret->element.node.vtbl = &HTMLEmbedElementImplVtbl;
HTMLElement_Init(&ret->element, doc, nselem, &HTMLEmbedElement_dispex);
return &ret->element;
}
......@@ -75,6 +75,7 @@ typedef enum {
DispHTMLDocument_tid,
DispHTMLDOMTextNode_tid,
DispHTMLElementCollection_tid,
DispHTMLEmbed_tid,
DispHTMLFormElement_tid,
DispHTMLGenericElement_tid,
DispHTMLFrameElement_tid,
......@@ -116,6 +117,7 @@ typedef enum {
IHTMLElement3_tid,
IHTMLElement4_tid,
IHTMLElementCollection_tid,
IHTMLEmbedElement_tid,
IHTMLEventObj_tid,
IHTMLFiltersCollection_tid,
IHTMLFormElement_tid,
......@@ -806,6 +808,7 @@ HTMLElement *HTMLElement_Create(HTMLDocumentNode*,nsIDOMNode*,BOOL);
HTMLElement *HTMLCommentElement_Create(HTMLDocumentNode*,nsIDOMNode*);
HTMLElement *HTMLAnchorElement_Create(HTMLDocumentNode*,nsIDOMHTMLElement*);
HTMLElement *HTMLBodyElement_Create(HTMLDocumentNode*,nsIDOMHTMLElement*);
HTMLElement *HTMLEmbedElement_Create(HTMLDocumentNode*,nsIDOMHTMLElement*);
HTMLElement *HTMLFormElement_Create(HTMLDocumentNode*,nsIDOMHTMLElement*);
HTMLElement *HTMLFrameElement_Create(HTMLDocumentNode*,nsIDOMHTMLElement*);
HTMLElement *HTMLIFrame_Create(HTMLDocumentNode*,nsIDOMHTMLElement*);
......
......@@ -48,7 +48,7 @@ static const char elem_test_str[] =
"<textarea id=\"X\">text text</textarea>"
"<table id=\"tbl\"><tbody><tr></tr><tr id=\"row2\"><td>td1 text</td><td>td2 text</td></tr></tbody></table>"
"<script id=\"sc\" type=\"text/javascript\"><!--\nfunction Testing() {}\n// -->\n</script>"
"<test /><object></object>"
"<test /><object></object><embed />"
"<img id=\"imgid\" name=\"WineImg\"/>"
"<iframe src=\"about:blank\" id=\"ifr\"></iframe>"
"<form id=\"frm\"></form>"
......@@ -101,7 +101,8 @@ typedef enum {
ET_IFRAME,
ET_FORM,
ET_FRAME,
ET_OBJECT
ET_OBJECT,
ET_EMBED
} elem_type_t;
static const IID * const none_iids[] = {
......@@ -337,6 +338,18 @@ static const IID * const object_iids[] = {
NULL
};
static const IID * const embed_iids[] = {
&IID_IHTMLDOMNode,
&IID_IHTMLDOMNode2,
&IID_IHTMLElement,
&IID_IHTMLElement2,
&IID_IHTMLElement3,
&IID_IHTMLEmbedElement,
&IID_IDispatchEx,
/* FIXME: No IConnectionPointContainer */
NULL
};
static const IID * const iframe_iids[] = {
&IID_IHTMLDOMNode,
&IID_IHTMLDOMNode2,
......@@ -435,7 +448,8 @@ static const elem_type_info_t elem_type_infos[] = {
{"IFRAME", iframe_iids, &DIID_DispHTMLIFrame},
{"FORM", form_iids, &DIID_DispHTMLFormElement},
{"FRAME", frame_iids, &DIID_DispHTMLFrameElement},
{"OBJECT", object_iids, &DIID_DispHTMLObjectElement}
{"OBJECT", object_iids, &DIID_DispHTMLObjectElement},
{"EMBED", embed_iids, &DIID_DispHTMLEmbed}
};
static const char *dbgstr_guid(REFIID riid)
......@@ -5924,6 +5938,7 @@ static void test_elems(IHTMLDocument2 *doc)
ET_SCRIPT,
ET_TEST,
ET_OBJECT,
ET_EMBED,
ET_IMG,
ET_IFRAME,
ET_FORM
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment