Commit 874fd578 authored by Jacek Caban's avatar Jacek Caban Committed by Alexandre Julliard

mshtml: Added IHTMLElement implementation.

parent ee1e7e50
......@@ -12,6 +12,7 @@ C_SRCS = \
hlink.c \
htmldoc.c \
htmldoc3.c \
htmlelem.c \
htmlnode.c \
main.c \
navigate.c \
......
......@@ -338,11 +338,9 @@ HTMLDOMNode *get_node(HTMLDocument *This, nsIDOMNode *nsnode)
nsIDOMNode_GetNodeType(nsnode, &node_type);
#if 0
if(node_type == NS_ELEMENT_NODE
|| node_type == NS_DOCUMENT_NODE)
HTMLElement_Create(ret);
#endif
return ret;
}
......
......@@ -129,6 +129,17 @@ struct HTMLDOMNode {
HTMLDOMNode *next;
};
typedef struct {
const IHTMLElementVtbl *lpHTMLElementVtbl;
void (*destructor)(IUnknown*);
nsIDOMHTMLElement *nselem;
HTMLDOMNode *node;
IUnknown *impl;
} HTMLElement;
#define HTMLDOC(x) ((IHTMLDocument2*) &(x)->lpHTMLDocument2Vtbl)
#define HTMLDOC3(x) ((IHTMLDocument3*) &(x)->lpHTMLDocument3Vtbl)
#define PERSIST(x) ((IPersist*) &(x)->lpPersistFileVtbl)
......@@ -156,6 +167,7 @@ struct HTMLDOMNode {
#define NSEMBWNDS(x) ((nsIEmbeddingSiteWindow*) &(x)->lpEmbeddingSiteWindowVtbl)
#define NSIFACEREQ(x) ((nsIInterfaceRequestor*) &(x)->lpInterfaceRequestorVtbl)
#define HTMLELEM(x) ((IHTMLElement*) &(x)->lpHTMLElementVtbl)
#define HTMLDOMNODE(x) ((IHTMLDOMNode*) &(x)->lpHTMLDOMNodeVtbl)
#define DEFINE_THIS(cls,ifc,iface) ((cls*)((BYTE*)(iface)-offsetof(cls,lp ## ifc ## Vtbl)))
......@@ -195,6 +207,8 @@ nsIInputStream *create_nsstream(const char*,PRInt32);
IHlink *Hlink_Create(void);
void HTMLElement_Create(HTMLDOMNode*);
HTMLDOMNode *get_node(HTMLDocument*,nsIDOMNode*);
void release_nodes(HTMLDocument*);
......
......@@ -74,7 +74,6 @@ typedef nsISupports nsISHistory;
typedef nsISupports nsISimpleEnumerator;
typedef nsISupports nsIWidget;
typedef nsISupports nsIProtocolHandler;
typedef nsISupports nsIDOMElement;
typedef nsISupports nsIDOMEventTarget;
typedef nsISupports nsIDOMAbstractView;
typedef nsISupports nsIStreamListener;
......@@ -86,6 +85,7 @@ typedef nsISupports nsISelection;
typedef nsISupports nsIPrompt;
typedef nsISupports nsIAuthPrompt;
typedef nsISupports nsIDOMNamedNodeMap;
typedef nsISupports nsIDOMAttr;
[
object,
......@@ -345,6 +345,55 @@ interface nsIDOMNode : nsISupports
[
object,
uuid(a6cf9078-15b3-11d2-932e-00805f8add32)
]
interface nsIDOMElement : nsIDOMNode
{
nsresult GetTagName(nsAString *aTagName);
nsresult GetAttribute(const nsAString *name, nsAString *_retval);
nsresult SetAttribute(const nsAString *name, const nsAString *value);
nsresult RemoveAttribute(const nsAString *name);
nsresult GetAttributeNode(const nsAString *name, nsIDOMAttr **_retval);
nsresult SetAttributeNode(nsIDOMAttr *newAttr, nsIDOMAttr **_retval);
nsresult RemoveAttributeNode(nsIDOMAttr *oldAttr, nsIDOMAttr **_retval);
nsresult GetElementsByTagName(const nsAString *name, nsIDOMNodeList **_retval);
nsresult GetAttributeNS(const nsAString *namespaceURI, const nsAString *localName,
nsAString *_retval);
nsresult SetAttributeNS(const nsAString *namespaceURI, const nsAString *qualifiedName,
const nsAString *value);
nsresult RemoveAttributeNS(const nsAString *namespaceURI, const nsAString *localName);
nsresult GetAttributeNodeNS(const nsAString *namespaceURI, const nsAString *localName,
nsIDOMAttr **_retval);
nsresult SetAttributeNodeNS(nsIDOMAttr *newAttr, nsIDOMAttr **_retval);
nsresult GetElementsByTagNameNS(const nsAString *namespaceURI, const nsAString *localName,
nsIDOMNodeList **_retval);
nsresult HasAttribute(const nsAString *name, PRBool *_retval);
nsresult HasAttributeNS(const nsAString *namespaceURI, const nsAString *localName,
PRBool *_retval);
}
cpp_quote("#undef GetClassName");
[
object,
uuid(a6cf9085-15b3-11d2-932e-00805f8add32)
]
interface nsIDOMHTMLElement : nsIDOMElement
{
nsresult GetId(nsAString *aId);
nsresult SetId(const nsAString *aId);
nsresult GetTitle(nsAString *aTitle);
nsresult SetTitle(const nsAString *aTitle);
nsresult GetLang(nsAString *aLang);
nsresult SetLang(const nsAString *aLang);
nsresult GetDir(nsAString *aDir);
nsresult SetDir(const nsAString *aDir);
nsresult GetClassName(nsAString *aClassName);
nsresult SetClassName(const nsAString *aClassName);
}
[
object,
uuid(a6cf906b-15b3-11d2-932e-00805f8add32)
]
interface nsIDOMWindow : nsISupports
......
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