//Auto-generated by kalyptus. DO NOT EDIT.
#include <dom/dom_xml.h>
#include <dom/dom_element.h>
#include <dom/css_value.h>
#include <dom/dom2_range.h>
#include <dom/dom_text.h>
#include <dom/dom_string.h>
#include <dom/dom_node.h>
#include <dom/css_stylesheet.h>
#include <dom/dom_doc.h>
#include <dom/dom2_views.h>
#include <dom/dom2_events.h>
#include <dom/dom2_traversal.h>

#include <qtjava/QtSupport.h>
#include <tdejava/TDESupport.h>
#include <tdejava/Document.h>

class DocumentJBridge : public DOM::Document
{
public:
	DocumentJBridge() : DOM::Document() {};
	DocumentJBridge(bool arg1) : DOM::Document(arg1) {};
	DocumentJBridge(const DOM::Document& arg1) : DOM::Document(arg1) {};
	DocumentJBridge(const DOM::Node& arg1) : DOM::Document(arg1) {};
};

JNIEXPORT void JNICALL
Java_org_trinitydesktop_koala_Document_abort(JNIEnv* env, jobject obj)
{
	((DOM::Document*) QtSupport::getQt(env, obj))->abort();
	return;
}

JNIEXPORT void JNICALL
Java_org_trinitydesktop_koala_Document_addStyleSheet(JNIEnv* env, jobject obj, jobject sheet)
{
	((DOM::Document*) QtSupport::getQt(env, obj))->addStyleSheet((const DOM::StyleSheet&)*(const DOM::StyleSheet*) QtSupport::getQt(env, sheet));
	return;
}

JNIEXPORT jboolean JNICALL
Java_org_trinitydesktop_koala_Document_async(JNIEnv* env, jobject obj)
{
	jboolean xret = (jboolean) ((DOM::Document*) QtSupport::getQt(env, obj))->async();
	return xret;
}

JNIEXPORT jstring JNICALL
Java_org_trinitydesktop_koala_Document_completeURL(JNIEnv* env, jobject obj, jstring url)
{
	DOM::DOMString  _qstring;
static DOM::DOMString* _domstring_url = 0;
	_qstring = ((DOM::Document*) QtSupport::getQt(env, obj))->completeURL((DOM::DOMString)*(DOM::DOMString*) KDESupport::toDOMString(env, url, &_domstring_url));
	return KDESupport::fromDOMString(env, &_qstring);
}

JNIEXPORT jobject JNICALL
Java_org_trinitydesktop_koala_Document_createAttributeNS(JNIEnv* env, jobject obj, jstring namespaceURI, jstring qualifiedName)
{
static DOM::DOMString* _domstring_namespaceURI = 0;
static DOM::DOMString* _domstring_qualifiedName = 0;
	jobject xret = QtSupport::objectForQtKey(env, (void*)new DOM::Attr(((DOM::Document*) QtSupport::getQt(env, obj))->createAttributeNS((DOM::DOMString)*(DOM::DOMString*) KDESupport::toDOMString(env, namespaceURI, &_domstring_namespaceURI), (DOM::DOMString)*(DOM::DOMString*) KDESupport::toDOMString(env, qualifiedName, &_domstring_qualifiedName))), "org.trinitydesktop.koala.Attr", true);
	return xret;
}

JNIEXPORT jobject JNICALL
Java_org_trinitydesktop_koala_Document_createAttribute(JNIEnv* env, jobject obj, jstring name)
{
static DOM::DOMString* _domstring_name = 0;
	jobject xret = QtSupport::objectForQtKey(env, (void*)new DOM::Attr(((DOM::Document*) QtSupport::getQt(env, obj))->createAttribute((DOM::DOMString)*(DOM::DOMString*) KDESupport::toDOMString(env, name, &_domstring_name))), "org.trinitydesktop.koala.Attr", true);
	return xret;
}

JNIEXPORT jobject JNICALL
Java_org_trinitydesktop_koala_Document_createCDATASection(JNIEnv* env, jobject obj, jstring data)
{
static DOM::DOMString* _domstring_data = 0;
	jobject xret = QtSupport::objectForQtKey(env, (void*)new DOM::CDATASection(((DOM::Document*) QtSupport::getQt(env, obj))->createCDATASection((DOM::DOMString)*(DOM::DOMString*) KDESupport::toDOMString(env, data, &_domstring_data))), "org.trinitydesktop.koala.CDATASection", true);
	return xret;
}

JNIEXPORT jobject JNICALL
Java_org_trinitydesktop_koala_Document_createComment(JNIEnv* env, jobject obj, jstring data)
{
static DOM::DOMString* _domstring_data = 0;
	jobject xret = QtSupport::objectForQtKey(env, (void*)new DOM::Comment(((DOM::Document*) QtSupport::getQt(env, obj))->createComment((DOM::DOMString)*(DOM::DOMString*) KDESupport::toDOMString(env, data, &_domstring_data))), "org.trinitydesktop.koala.Comment", true);
	return xret;
}

JNIEXPORT jobject JNICALL
Java_org_trinitydesktop_koala_Document_createDocumentFragment(JNIEnv* env, jobject obj)
{
	jobject xret = QtSupport::objectForQtKey(env, (void*)new DOM::DocumentFragment(((DOM::Document*) QtSupport::getQt(env, obj))->createDocumentFragment()), "org.trinitydesktop.koala.DocumentFragment", true);
	return xret;
}

JNIEXPORT jobject JNICALL
Java_org_trinitydesktop_koala_Document_createElementNS(JNIEnv* env, jobject obj, jstring namespaceURI, jstring qualifiedName)
{
static DOM::DOMString* _domstring_namespaceURI = 0;
static DOM::DOMString* _domstring_qualifiedName = 0;
	jobject xret = QtSupport::objectForQtKey(env, (void*)new DOM::Element(((DOM::Document*) QtSupport::getQt(env, obj))->createElementNS((DOM::DOMString)*(DOM::DOMString*) KDESupport::toDOMString(env, namespaceURI, &_domstring_namespaceURI), (DOM::DOMString)*(DOM::DOMString*) KDESupport::toDOMString(env, qualifiedName, &_domstring_qualifiedName))), "org.trinitydesktop.koala.Element", true);
	return xret;
}

JNIEXPORT jobject JNICALL
Java_org_trinitydesktop_koala_Document_createElement(JNIEnv* env, jobject obj, jstring tagName)
{
static DOM::DOMString* _domstring_tagName = 0;
	jobject xret = QtSupport::objectForQtKey(env, (void*)new DOM::Element(((DOM::Document*) QtSupport::getQt(env, obj))->createElement((DOM::DOMString)*(DOM::DOMString*) KDESupport::toDOMString(env, tagName, &_domstring_tagName))), "org.trinitydesktop.koala.Element", true);
	return xret;
}

JNIEXPORT jobject JNICALL
Java_org_trinitydesktop_koala_Document_createEntityReference(JNIEnv* env, jobject obj, jstring name)
{
static DOM::DOMString* _domstring_name = 0;
	jobject xret = QtSupport::objectForQtKey(env, (void*)new DOM::EntityReference(((DOM::Document*) QtSupport::getQt(env, obj))->createEntityReference((DOM::DOMString)*(DOM::DOMString*) KDESupport::toDOMString(env, name, &_domstring_name))), "org.trinitydesktop.koala.EntityReference", true);
	return xret;
}

JNIEXPORT jobject JNICALL
Java_org_trinitydesktop_koala_Document_createEvent(JNIEnv* env, jobject obj, jstring eventType)
{
static DOM::DOMString* _domstring_eventType = 0;
	jobject xret = QtSupport::objectForQtKey(env, (void*)new DOM::Event(((DOM::Document*) QtSupport::getQt(env, obj))->createEvent((DOM::DOMString)*(DOM::DOMString*) KDESupport::toDOMString(env, eventType, &_domstring_eventType))), "org.trinitydesktop.koala.Event", true);
	return xret;
}

JNIEXPORT jobject JNICALL
Java_org_trinitydesktop_koala_Document_createNodeIterator(JNIEnv* env, jobject obj, jobject root, jlong whatToShow, jobject filter, jboolean entityReferenceExpansion)
{
	jobject xret = QtSupport::objectForQtKey(env, (void*)new DOM::NodeIterator(((DOM::Document*) QtSupport::getQt(env, obj))->createNodeIterator((DOM::Node)*(DOM::Node*) QtSupport::getQt(env, root), (unsigned long) whatToShow, (DOM::NodeFilter)*(DOM::NodeFilter*) QtSupport::getQt(env, filter), (bool) entityReferenceExpansion)), "org.trinitydesktop.koala.NodeIterator", true);
	return xret;
}

JNIEXPORT jobject JNICALL
Java_org_trinitydesktop_koala_Document_createProcessingInstruction(JNIEnv* env, jobject obj, jstring target, jstring data)
{
static DOM::DOMString* _domstring_target = 0;
static DOM::DOMString* _domstring_data = 0;
	jobject xret = QtSupport::objectForQtKey(env, (void*)new DOM::ProcessingInstruction(((DOM::Document*) QtSupport::getQt(env, obj))->createProcessingInstruction((DOM::DOMString)*(DOM::DOMString*) KDESupport::toDOMString(env, target, &_domstring_target), (DOM::DOMString)*(DOM::DOMString*) KDESupport::toDOMString(env, data, &_domstring_data))), "org.trinitydesktop.koala.ProcessingInstruction", true);
	return xret;
}

JNIEXPORT jobject JNICALL
Java_org_trinitydesktop_koala_Document_createRange(JNIEnv* env, jobject obj)
{
	jobject xret = QtSupport::objectForQtKey(env, (void*)new DOM::Range(((DOM::Document*) QtSupport::getQt(env, obj))->createRange()), "org.trinitydesktop.koala.Range", true);
	return xret;
}

JNIEXPORT jobject JNICALL
Java_org_trinitydesktop_koala_Document_createTextNode(JNIEnv* env, jobject obj, jstring data)
{
static DOM::DOMString* _domstring_data = 0;
	jobject xret = QtSupport::objectForQtKey(env, (void*)new DOM::Text(((DOM::Document*) QtSupport::getQt(env, obj))->createTextNode((DOM::DOMString)*(DOM::DOMString*) KDESupport::toDOMString(env, data, &_domstring_data))), "org.trinitydesktop.koala.Text", true);
	return xret;
}

JNIEXPORT jobject JNICALL
Java_org_trinitydesktop_koala_Document_createTreeWalker(JNIEnv* env, jobject obj, jobject root, jlong whatToShow, jobject filter, jboolean entityReferenceExpansion)
{
	jobject xret = QtSupport::objectForQtKey(env, (void*)new DOM::TreeWalker(((DOM::Document*) QtSupport::getQt(env, obj))->createTreeWalker((DOM::Node)*(DOM::Node*) QtSupport::getQt(env, root), (unsigned long) whatToShow, (DOM::NodeFilter)*(DOM::NodeFilter*) QtSupport::getQt(env, filter), (bool) entityReferenceExpansion)), "org.trinitydesktop.koala.TreeWalker", true);
	return xret;
}

JNIEXPORT jobject JNICALL
Java_org_trinitydesktop_koala_Document_defaultView(JNIEnv* env, jobject obj)
{
	jobject xret = QtSupport::objectForQtKey(env, (void*)new DOM::AbstractView(((DOM::Document*) QtSupport::getQt(env, obj))->defaultView()), "org.trinitydesktop.koala.AbstractView", true);
	return xret;
}

JNIEXPORT jboolean JNICALL
Java_org_trinitydesktop_koala_Document_designMode(JNIEnv* env, jobject obj)
{
	jboolean xret = (jboolean) ((DOM::Document*) QtSupport::getQt(env, obj))->designMode();
	return xret;
}

JNIEXPORT jobject JNICALL
Java_org_trinitydesktop_koala_Document_doctype(JNIEnv* env, jobject obj)
{
	jobject xret = QtSupport::objectForQtKey(env, (void*)new DOM::DocumentType(((DOM::Document*) QtSupport::getQt(env, obj))->doctype()), "org.trinitydesktop.koala.DocumentType", true);
	return xret;
}

JNIEXPORT jobject JNICALL
Java_org_trinitydesktop_koala_Document_documentElement(JNIEnv* env, jobject obj)
{
	jobject xret = QtSupport::objectForQtKey(env, (void*)new DOM::Element(((DOM::Document*) QtSupport::getQt(env, obj))->documentElement()), "org.trinitydesktop.koala.Element", true);
	return xret;
}

JNIEXPORT jobject JNICALL
Java_org_trinitydesktop_koala_Document_getElementById(JNIEnv* env, jobject obj, jstring elementId)
{
static DOM::DOMString* _domstring_elementId = 0;
	jobject xret = QtSupport::objectForQtKey(env, (void*)new DOM::Element(((DOM::Document*) QtSupport::getQt(env, obj))->getElementById((DOM::DOMString)*(DOM::DOMString*) KDESupport::toDOMString(env, elementId, &_domstring_elementId))), "org.trinitydesktop.koala.Element", true);
	return xret;
}

JNIEXPORT jobject JNICALL
Java_org_trinitydesktop_koala_Document_getElementsByTagNameNS(JNIEnv* env, jobject obj, jstring namespaceURI, jstring localName)
{
	DOM::NodeList  _qlist;
static DOM::DOMString* _domstring_namespaceURI = 0;
static DOM::DOMString* _domstring_localName = 0;
	_qlist = ((DOM::Document*) QtSupport::getQt(env, obj))->getElementsByTagNameNS((DOM::DOMString)*(DOM::DOMString*) KDESupport::toDOMString(env, namespaceURI, &_domstring_namespaceURI), (DOM::DOMString)*(DOM::DOMString*) KDESupport::toDOMString(env, localName, &_domstring_localName));
	return (jobject) KDESupport::arrayWithNodeList(env, (DOM::NodeList *) &_qlist);
}

JNIEXPORT jobject JNICALL
Java_org_trinitydesktop_koala_Document_getElementsByTagName(JNIEnv* env, jobject obj, jstring tagname)
{
	DOM::NodeList  _qlist;
static DOM::DOMString* _domstring_tagname = 0;
	_qlist = ((DOM::Document*) QtSupport::getQt(env, obj))->getElementsByTagName((DOM::DOMString)*(DOM::DOMString*) KDESupport::toDOMString(env, tagname, &_domstring_tagname));
	return (jobject) KDESupport::arrayWithNodeList(env, (DOM::NodeList *) &_qlist);
}

JNIEXPORT jobject JNICALL
Java_org_trinitydesktop_koala_Document_getOverrideStyle(JNIEnv* env, jobject obj, jobject elt, jstring pseudoElt)
{
static DOM::DOMString* _domstring_pseudoElt = 0;
	jobject xret = QtSupport::objectForQtKey(env, (void*)new DOM::CSSStyleDeclaration(((DOM::Document*) QtSupport::getQt(env, obj))->getOverrideStyle((const DOM::Element&)*(const DOM::Element*) QtSupport::getQt(env, elt), (DOM::DOMString)*(DOM::DOMString*) KDESupport::toDOMString(env, pseudoElt, &_domstring_pseudoElt))), "org.trinitydesktop.koala.CSSStyleDeclaration", true);
	return xret;
}

JNIEXPORT jobject JNICALL
Java_org_trinitydesktop_koala_Document_implementation(JNIEnv* env, jobject obj)
{
	jobject xret = QtSupport::objectForQtKey(env, (void*)new DOM::DOMImplementation(((DOM::Document*) QtSupport::getQt(env, obj))->implementation()), "org.trinitydesktop.koala.DOMImplementation", true);
	return xret;
}

JNIEXPORT jobject JNICALL
Java_org_trinitydesktop_koala_Document_importNode(JNIEnv* env, jobject obj, jobject importedNode, jboolean deep)
{
	jobject xret = QtSupport::objectForQtKey(env, (void*)new DOM::Node(((DOM::Document*) QtSupport::getQt(env, obj))->importNode((const DOM::Node&)*(const DOM::Node*) QtSupport::getQt(env, importedNode), (bool) deep)), "org.trinitydesktop.koala.Node", true);
	return xret;
}

JNIEXPORT jboolean JNICALL
Java_org_trinitydesktop_koala_Document_isHTMLDocument(JNIEnv* env, jobject obj)
{
	jboolean xret = (jboolean) ((DOM::Document*) QtSupport::getQt(env, obj))->isHTMLDocument();
	return xret;
}

JNIEXPORT void JNICALL
Java_org_trinitydesktop_koala_Document_loadXML(JNIEnv* env, jobject obj, jstring source)
{
static DOM::DOMString* _domstring_source = 0;
	((DOM::Document*) QtSupport::getQt(env, obj))->loadXML((DOM::DOMString)*(DOM::DOMString*) KDESupport::toDOMString(env, source, &_domstring_source));
	return;
}

JNIEXPORT void JNICALL
Java_org_trinitydesktop_koala_Document_load(JNIEnv* env, jobject obj, jstring uri)
{
static DOM::DOMString* _domstring_uri = 0;
	((DOM::Document*) QtSupport::getQt(env, obj))->load((DOM::DOMString)*(DOM::DOMString*) KDESupport::toDOMString(env, uri, &_domstring_uri));
	return;
}

JNIEXPORT void JNICALL
Java_org_trinitydesktop_koala_Document_newDocument__(JNIEnv* env, jobject obj)
{
	if (QtSupport::getQt(env, obj) == 0) {
		QtSupport::setQt(env, obj, new DocumentJBridge());
		QtSupport::setObjectForQtKey(env, obj, QtSupport::getQt(env, obj));
	}
	return;
}

JNIEXPORT void JNICALL
Java_org_trinitydesktop_koala_Document_newDocument__Lorg_trinitydesktop_koala_Document_2(JNIEnv* env, jobject obj, jobject other)
{
	if (QtSupport::getQt(env, obj) == 0) {
		QtSupport::setQt(env, obj, new DocumentJBridge((const DOM::Document&)*(const DOM::Document*) QtSupport::getQt(env, other)));
		QtSupport::setObjectForQtKey(env, obj, QtSupport::getQt(env, obj));
	}
	return;
}

JNIEXPORT void JNICALL
Java_org_trinitydesktop_koala_Document_newDocument__Lorg_trinitydesktop_koala_Node_2(JNIEnv* env, jobject obj, jobject other)
{
	if (QtSupport::getQt(env, obj) == 0) {
		QtSupport::setQt(env, obj, new DocumentJBridge((const DOM::Node&)*(const DOM::Node*) QtSupport::getQt(env, other)));
		QtSupport::setObjectForQtKey(env, obj, QtSupport::getQt(env, obj));
	}
	return;
}

JNIEXPORT void JNICALL
Java_org_trinitydesktop_koala_Document_newDocument__Z(JNIEnv* env, jobject obj, jboolean arg1)
{
	if (QtSupport::getQt(env, obj) == 0) {
		QtSupport::setQt(env, obj, new DocumentJBridge((bool) arg1));
		QtSupport::setObjectForQtKey(env, obj, QtSupport::getQt(env, obj));
	}
	return;
}

JNIEXPORT jstring JNICALL
Java_org_trinitydesktop_koala_Document_preferredStylesheetSet(JNIEnv* env, jobject obj)
{
	DOM::DOMString  _qstring;
	_qstring = ((DOM::Document*) QtSupport::getQt(env, obj))->preferredStylesheetSet();
	return KDESupport::fromDOMString(env, &_qstring);
}

JNIEXPORT void JNICALL
Java_org_trinitydesktop_koala_Document_removeStyleSheet(JNIEnv* env, jobject obj, jobject sheet)
{
	((DOM::Document*) QtSupport::getQt(env, obj))->removeStyleSheet((const DOM::StyleSheet&)*(const DOM::StyleSheet*) QtSupport::getQt(env, sheet));
	return;
}

JNIEXPORT jstring JNICALL
Java_org_trinitydesktop_koala_Document_selectedStylesheetSet(JNIEnv* env, jobject obj)
{
	DOM::DOMString  _qstring;
	_qstring = ((DOM::Document*) QtSupport::getQt(env, obj))->selectedStylesheetSet();
	return KDESupport::fromDOMString(env, &_qstring);
}

JNIEXPORT void JNICALL
Java_org_trinitydesktop_koala_Document_setAsync(JNIEnv* env, jobject obj, jboolean arg1)
{
	((DOM::Document*) QtSupport::getQt(env, obj))->setAsync((bool) arg1);
	return;
}

JNIEXPORT void JNICALL
Java_org_trinitydesktop_koala_Document_setDesignMode(JNIEnv* env, jobject obj, jboolean enable)
{
	((DOM::Document*) QtSupport::getQt(env, obj))->setDesignMode((bool) enable);
	return;
}

JNIEXPORT void JNICALL
Java_org_trinitydesktop_koala_Document_setSelectedStylesheetSet(JNIEnv* env, jobject obj, jstring aString)
{
static DOM::DOMString* _domstring_aString = 0;
	((DOM::Document*) QtSupport::getQt(env, obj))->setSelectedStylesheetSet((DOM::DOMString)*(DOM::DOMString*) KDESupport::toDOMString(env, aString, &_domstring_aString));
	return;
}

JNIEXPORT jobject JNICALL
Java_org_trinitydesktop_koala_Document_styleSheets(JNIEnv* env, jobject obj)
{
	DOM::StyleSheetList  _qlist;
	_qlist = ((DOM::Document*) QtSupport::getQt(env, obj))->styleSheets();
	return (jobject) KDESupport::arrayWithStyleSheetList(env, (DOM::StyleSheetList *) &_qlist);
}

JNIEXPORT jstring JNICALL
Java_org_trinitydesktop_koala_Document_toString(JNIEnv* env, jobject obj)
{
	DOM::DOMString  _qstring;
	_qstring = ((DOM::Document*) QtSupport::getQt(env, obj))->toString();
	return KDESupport::fromDOMString(env, &_qstring);
}

JNIEXPORT void JNICALL
Java_org_trinitydesktop_koala_Document_updateRendering(JNIEnv* env, jobject obj)
{
	((DOM::Document*) QtSupport::getQt(env, obj))->updateRendering();
	return;
}

JNIEXPORT jobject JNICALL
Java_org_trinitydesktop_koala_Document_view(JNIEnv* env, jobject obj)
{
	jobject xret = QtSupport::objectForQtKey(env, (void*)((DOM::Document*) QtSupport::getQt(env, obj))->view(), "org.trinitydesktop.koala.TDEHTMLView");
	return xret;
}

