//Auto-generated by kalyptus. DO NOT EDIT.
#include <dom/dom2_range.h>
#include <dom/dom_string.h>
#include <dom/dom_node.h>
#include <dom/dom_doc.h>

#include <qtjava/QtSupport.h>
#include <kdejava/KDESupport.h>
#include <kdejava/Range.h>

class RangeJBridge : public DOM::Range
{
public:
	RangeJBridge() : DOM::Range() {};
	RangeJBridge(const DOM::Document arg1) : DOM::Range(arg1) {};
	RangeJBridge(const DOM::Range& arg1) : DOM::Range(arg1) {};
	RangeJBridge(const DOM::Node arg1,const long arg2,const DOM::Node arg3,const long arg4) : DOM::Range(arg1,arg2,arg3,arg4) {};
};

JNIEXPORT jboolean JNICALL
Java_org_kde_koala_Range_boundaryPointsValid(JNIEnv* env, jobject obj)
{
	jboolean xret = (jboolean) ((DOM::Range*) QtSupport::getQt(env, obj))->boundaryPointsValid();
	return xret;
}

JNIEXPORT jobject JNICALL
Java_org_kde_koala_Range_cloneContents(JNIEnv* env, jobject obj)
{
	jobject xret = QtSupport::objectForQtKey(env, (void*)new DOM::DocumentFragment(((DOM::Range*) QtSupport::getQt(env, obj))->cloneContents()), "org.kde.koala.DocumentFragment", TRUE);
	return xret;
}

JNIEXPORT jobject JNICALL
Java_org_kde_koala_Range_cloneRange(JNIEnv* env, jobject obj)
{
	jobject xret = QtSupport::objectForQtKey(env, (void*)new DOM::Range(((DOM::Range*) QtSupport::getQt(env, obj))->cloneRange()), "org.kde.koala.Range", TRUE);
	return xret;
}

JNIEXPORT void JNICALL
Java_org_kde_koala_Range_collapse(JNIEnv* env, jobject obj, jboolean toStart)
{
	((DOM::Range*) QtSupport::getQt(env, obj))->collapse((bool) toStart);
	return;
}

JNIEXPORT jboolean JNICALL
Java_org_kde_koala_Range_collapsed(JNIEnv* env, jobject obj)
{
	jboolean xret = (jboolean) ((DOM::Range*) QtSupport::getQt(env, obj))->collapsed();
	return xret;
}

JNIEXPORT jobject JNICALL
Java_org_kde_koala_Range_commonAncestorContainer(JNIEnv* env, jobject obj)
{
	jobject xret = QtSupport::objectForQtKey(env, (void*)new DOM::Node(((DOM::Range*) QtSupport::getQt(env, obj))->commonAncestorContainer()), "org.kde.koala.Node", TRUE);
	return xret;
}

JNIEXPORT jobject JNICALL
Java_org_kde_koala_Range_createContextualFragment(JNIEnv* env, jobject obj, jstring html)
{
static DOM::DOMString* _domstring_html = 0;
	jobject xret = QtSupport::objectForQtKey(env, (void*)new DOM::DocumentFragment(((DOM::Range*) QtSupport::getQt(env, obj))->createContextualFragment((DOM::DOMString)*(DOM::DOMString*) KDESupport::toDOMString(env, html, &_domstring_html))), "org.kde.koala.DocumentFragment", TRUE);
	return xret;
}

JNIEXPORT void JNICALL
Java_org_kde_koala_Range_deleteContents(JNIEnv* env, jobject obj)
{
	((DOM::Range*) QtSupport::getQt(env, obj))->deleteContents();
	return;
}

JNIEXPORT void JNICALL
Java_org_kde_koala_Range_detach(JNIEnv* env, jobject obj)
{
	((DOM::Range*) QtSupport::getQt(env, obj))->detach();
	return;
}

JNIEXPORT jobject JNICALL
Java_org_kde_koala_Range_endContainer(JNIEnv* env, jobject obj)
{
	jobject xret = QtSupport::objectForQtKey(env, (void*)new DOM::Node(((DOM::Range*) QtSupport::getQt(env, obj))->endContainer()), "org.kde.koala.Node", TRUE);
	return xret;
}

JNIEXPORT jlong JNICALL
Java_org_kde_koala_Range_endOffset(JNIEnv* env, jobject obj)
{
	jlong xret = (jlong) ((DOM::Range*) QtSupport::getQt(env, obj))->endOffset();
	return xret;
}

JNIEXPORT jobject JNICALL
Java_org_kde_koala_Range_extractContents(JNIEnv* env, jobject obj)
{
	jobject xret = QtSupport::objectForQtKey(env, (void*)new DOM::DocumentFragment(((DOM::Range*) QtSupport::getQt(env, obj))->extractContents()), "org.kde.koala.DocumentFragment", TRUE);
	return xret;
}

JNIEXPORT void JNICALL
Java_org_kde_koala_Range_insertNode(JNIEnv* env, jobject obj, jobject newNode)
{
	((DOM::Range*) QtSupport::getQt(env, obj))->insertNode((const DOM::Node&)*(const DOM::Node*) QtSupport::getQt(env, newNode));
	return;
}

JNIEXPORT jboolean JNICALL
Java_org_kde_koala_Range_isDetached(JNIEnv* env, jobject obj)
{
	jboolean xret = (jboolean) ((DOM::Range*) QtSupport::getQt(env, obj))->isDetached();
	return xret;
}

JNIEXPORT jboolean JNICALL
Java_org_kde_koala_Range_isNull(JNIEnv* env, jobject obj)
{
	jboolean xret = (jboolean) ((DOM::Range*) QtSupport::getQt(env, obj))->isNull();
	return xret;
}

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

JNIEXPORT void JNICALL
Java_org_kde_koala_Range_newRange__Lorg_kde_koala_Document_2(JNIEnv* env, jobject obj, jobject rootContainer)
{
	if (QtSupport::getQt(env, obj) == 0) {
		QtSupport::setQt(env, obj, new RangeJBridge((const DOM::Document)*(const DOM::Document*) QtSupport::getQt(env, rootContainer)));
		QtSupport::setObjectForQtKey(env, obj, QtSupport::getQt(env, obj));
	}
	return;
}

JNIEXPORT void JNICALL
Java_org_kde_koala_Range_newRange__Lorg_kde_koala_Node_2JLorg_kde_koala_Node_2J(JNIEnv* env, jobject obj, jobject startContainer, jlong startOffset, jobject endContainer, jlong endOffset)
{
	if (QtSupport::getQt(env, obj) == 0) {
		QtSupport::setQt(env, obj, new RangeJBridge((const DOM::Node)*(const DOM::Node*) QtSupport::getQt(env, startContainer), (const long) startOffset, (const DOM::Node)*(const DOM::Node*) QtSupport::getQt(env, endContainer), (const long) endOffset));
		QtSupport::setObjectForQtKey(env, obj, QtSupport::getQt(env, obj));
	}
	return;
}

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

JNIEXPORT void JNICALL
Java_org_kde_koala_Range_selectNodeContents(JNIEnv* env, jobject obj, jobject refNode)
{
	((DOM::Range*) QtSupport::getQt(env, obj))->selectNodeContents((const DOM::Node&)*(const DOM::Node*) QtSupport::getQt(env, refNode));
	return;
}

JNIEXPORT void JNICALL
Java_org_kde_koala_Range_selectNode(JNIEnv* env, jobject obj, jobject refNode)
{
	((DOM::Range*) QtSupport::getQt(env, obj))->selectNode((const DOM::Node&)*(const DOM::Node*) QtSupport::getQt(env, refNode));
	return;
}

JNIEXPORT void JNICALL
Java_org_kde_koala_Range_setEndAfter(JNIEnv* env, jobject obj, jobject refNode)
{
	((DOM::Range*) QtSupport::getQt(env, obj))->setEndAfter((const DOM::Node&)*(const DOM::Node*) QtSupport::getQt(env, refNode));
	return;
}

JNIEXPORT void JNICALL
Java_org_kde_koala_Range_setEndBefore(JNIEnv* env, jobject obj, jobject refNode)
{
	((DOM::Range*) QtSupport::getQt(env, obj))->setEndBefore((const DOM::Node&)*(const DOM::Node*) QtSupport::getQt(env, refNode));
	return;
}

JNIEXPORT void JNICALL
Java_org_kde_koala_Range_setEnd(JNIEnv* env, jobject obj, jobject refNode, jlong offset)
{
	((DOM::Range*) QtSupport::getQt(env, obj))->setEnd((const DOM::Node&)*(const DOM::Node*) QtSupport::getQt(env, refNode), (long) offset);
	return;
}

JNIEXPORT void JNICALL
Java_org_kde_koala_Range_setStartAfter(JNIEnv* env, jobject obj, jobject refNode)
{
	((DOM::Range*) QtSupport::getQt(env, obj))->setStartAfter((const DOM::Node&)*(const DOM::Node*) QtSupport::getQt(env, refNode));
	return;
}

JNIEXPORT void JNICALL
Java_org_kde_koala_Range_setStartBefore(JNIEnv* env, jobject obj, jobject refNode)
{
	((DOM::Range*) QtSupport::getQt(env, obj))->setStartBefore((const DOM::Node&)*(const DOM::Node*) QtSupport::getQt(env, refNode));
	return;
}

JNIEXPORT void JNICALL
Java_org_kde_koala_Range_setStart(JNIEnv* env, jobject obj, jobject refNode, jlong offset)
{
	((DOM::Range*) QtSupport::getQt(env, obj))->setStart((const DOM::Node&)*(const DOM::Node*) QtSupport::getQt(env, refNode), (long) offset);
	return;
}

JNIEXPORT jobject JNICALL
Java_org_kde_koala_Range_startContainer(JNIEnv* env, jobject obj)
{
	jobject xret = QtSupport::objectForQtKey(env, (void*)new DOM::Node(((DOM::Range*) QtSupport::getQt(env, obj))->startContainer()), "org.kde.koala.Node", TRUE);
	return xret;
}

JNIEXPORT jlong JNICALL
Java_org_kde_koala_Range_startOffset(JNIEnv* env, jobject obj)
{
	jlong xret = (jlong) ((DOM::Range*) QtSupport::getQt(env, obj))->startOffset();
	return xret;
}

JNIEXPORT void JNICALL
Java_org_kde_koala_Range_surroundContents(JNIEnv* env, jobject obj, jobject newParent)
{
	((DOM::Range*) QtSupport::getQt(env, obj))->surroundContents((const DOM::Node&)*(const DOM::Node*) QtSupport::getQt(env, newParent));
	return;
}

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

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

