/***************************************************************************
                            kde_Element.cpp -  description
                             -------------------
    begin                : Wed Feb  6 15:12:26 2002
    copyright            : (C) 2000-2001 Lost Highway Ltd. All rights reserved.
    email                : Lost_Highway@tipitina.demon.co.uk
    generated by         : duke@tipitina on Wed Feb  6 15:12:26 2002, using kalyptus 0.9.
 ***************************************************************************/

/***************************************************************************
 *                                                                         *
 *   This library is free software; you can redistribute it and/or modify  *
 *   it under the terms of the GNU Library General Public License as       *
 *   published by the Free Software Foundation; either version 2 of the    *
 *   License, or (at your option) any later version.                       *
 *                                                                         *
 ***************************************************************************/

extern "C" {
#include "kde_Element.h"
}

#include <dom/dom_element.h>

class ElementBridge : public DOM::Element
{
public:
	ElementBridge() : Element() {}
	ElementBridge(const Node& other) : Element(other) {}
	ElementBridge(const Element& other) : Element(other) {}
	~ElementBridge() {}
};

kde_Element * kde_new_Element(){
	return (kde_Element *) new ElementBridge();
}
kde_Element * kde_new_Element1(kde_DOMNode* other){
	return (kde_Element *) new ElementBridge((DOM::Node&)* (DOM::Node*)other);
}
kde_Element * kde_new_Element2(kde_Element* other){
	return (kde_Element *) new ElementBridge((DOM::Element&)* (DOM::Element*)other);
}
void kde_del_Element( kde_Element* p ){
	delete (ElementBridge*) p;
}
kde_DOMString* kde_Element_tagName( kde_Element* instPointer){
	return (kde_DOMString*)new DOM::DOMString(((ElementBridge*)instPointer)->tagName());
}
kde_DOMString* kde_Element_getAttribute( kde_Element* instPointer,kde_DOMString* name){
	return (kde_DOMString*)new DOM::DOMString(((ElementBridge*)instPointer)->getAttribute((DOM::DOMString&)* (DOM::DOMString*)name));
}
void kde_Element_setAttribute( kde_Element* instPointer,kde_DOMString* name, kde_DOMString* value){
	((ElementBridge*)instPointer)->setAttribute((DOM::DOMString&)* (DOM::DOMString*)name, (DOM::DOMString&)* (DOM::DOMString*)value);
	return;
}
void kde_Element_removeAttribute( kde_Element* instPointer,kde_DOMString* name){
	((ElementBridge*)instPointer)->removeAttribute((DOM::DOMString&)* (DOM::DOMString*)name);
	return;
}
kde_Attr* kde_Element_getAttributeNode( kde_Element* instPointer,kde_DOMString* name){
	return (kde_Attr*)new DOM::Attr(((ElementBridge*)instPointer)->getAttributeNode((DOM::DOMString&)* (DOM::DOMString*)name));
}
kde_Attr* kde_Element_setAttributeNode( kde_Element* instPointer,kde_Attr* newAttr){
	return (kde_Attr*)new DOM::Attr(((ElementBridge*)instPointer)->setAttributeNode((DOM::Attr&)* (DOM::Attr*)newAttr));
}
kde_Attr* kde_Element_removeAttributeNode( kde_Element* instPointer,kde_Attr* oldAttr){
	return (kde_Attr*)new DOM::Attr(((ElementBridge*)instPointer)->removeAttributeNode((DOM::Attr&)* (DOM::Attr*)oldAttr));
}
kde_DOMNodeList* kde_Element_getElementsByTagName( kde_Element* instPointer,kde_DOMString* name){
	return (kde_DOMNodeList*)new DOM::NodeList(((ElementBridge*)instPointer)->getElementsByTagName((DOM::DOMString&)* (DOM::DOMString*)name));
}
kde_DOMNodeList* kde_Element_getElementsByTagNameNS( kde_Element* instPointer,kde_DOMString* namespaceURI, kde_DOMString* localName){
	return (kde_DOMNodeList*)new DOM::NodeList(((ElementBridge*)instPointer)->getElementsByTagNameNS((DOM::DOMString&)* (DOM::DOMString*)namespaceURI, (DOM::DOMString&)* (DOM::DOMString*)localName));
}
kde_DOMString* kde_Element_getAttributeNS( kde_Element* instPointer,kde_DOMString* namespaceURI, kde_DOMString* localName){
	return (kde_DOMString*)new DOM::DOMString(((ElementBridge*)instPointer)->getAttributeNS((DOM::DOMString&)* (DOM::DOMString*)namespaceURI, (DOM::DOMString&)* (DOM::DOMString*)localName));
}
void kde_Element_setAttributeNS( kde_Element* instPointer,kde_DOMString* namespaceURI, kde_DOMString* qualifiedName, kde_DOMString* value){
	((ElementBridge*)instPointer)->setAttributeNS((DOM::DOMString&)* (DOM::DOMString*)namespaceURI, (DOM::DOMString&)* (DOM::DOMString*)qualifiedName, (DOM::DOMString&)* (DOM::DOMString*)value);
	return;
}
void kde_Element_removeAttributeNS( kde_Element* instPointer,kde_DOMString* namespaceURI, kde_DOMString* localName){
	((ElementBridge*)instPointer)->removeAttributeNS((DOM::DOMString&)* (DOM::DOMString*)namespaceURI, (DOM::DOMString&)* (DOM::DOMString*)localName);
	return;
}
kde_Attr* kde_Element_getAttributeNodeNS( kde_Element* instPointer,kde_DOMString* namespaceURI, kde_DOMString* localName){
	return (kde_Attr*)new DOM::Attr(((ElementBridge*)instPointer)->getAttributeNodeNS((DOM::DOMString&)* (DOM::DOMString*)namespaceURI, (DOM::DOMString&)* (DOM::DOMString*)localName));
}
kde_Attr* kde_Element_setAttributeNodeNS( kde_Element* instPointer,kde_Attr* newAttr){
	return (kde_Attr*)new DOM::Attr(((ElementBridge*)instPointer)->setAttributeNodeNS((DOM::Attr&)* (DOM::Attr*)newAttr));
}
int kde_Element_hasAttribute( kde_Element* instPointer,kde_DOMString* name){
	return (int) ((ElementBridge*)instPointer)->hasAttribute((DOM::DOMString&)* (DOM::DOMString*)name);
}
int kde_Element_hasAttributeNS( kde_Element* instPointer,kde_DOMString* namespaceURI, kde_DOMString* localName){
	return (int) ((ElementBridge*)instPointer)->hasAttributeNS((DOM::DOMString&)* (DOM::DOMString*)namespaceURI, (DOM::DOMString&)* (DOM::DOMString*)localName);
}
kde_CSSStyleDeclaration* kde_Element_style( kde_Element* instPointer){
	return (kde_CSSStyleDeclaration*)new DOM::CSSStyleDeclaration(((ElementBridge*)instPointer)->style());
}
int kde_Element_isHTMLElement( kde_Element* instPointer){
	return (int) ((ElementBridge*)instPointer)->isHTMLElement();
}
int kde_Element_khtmlValidAttrName( kde_DOMString* name){
	return (int) ElementBridge::khtmlValidAttrName((DOM::DOMString&)* (DOM::DOMString*)name);
}
int kde_Element_khtmlValidPrefix( kde_DOMString* name){
	return (int) ElementBridge::khtmlValidPrefix((DOM::DOMString&)* (DOM::DOMString*)name);
}
int kde_Element_khtmlValidQualifiedName( kde_DOMString* name){
	return (int) ElementBridge::khtmlValidQualifiedName((DOM::DOMString&)* (DOM::DOMString*)name);
}
int kde_Element_khtmlMalformedQualifiedName( kde_DOMString* name){
	return (int) ElementBridge::khtmlMalformedQualifiedName((DOM::DOMString&)* (DOM::DOMString*)name);
}
int kde_Element_khtmlMalformedPrefix( kde_DOMString* name){
	return (int) ElementBridge::khtmlMalformedPrefix((DOM::DOMString&)* (DOM::DOMString*)name);
}
