//Auto-generated by kalyptus. DO NOT EDIT.
#include <qdom.h>
#include <qstringlist.h>
#include <kxmlguibuilder.h>

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

class KXMLGUIBuilderJBridge : public KXMLGUIBuilder
{
public:
	KXMLGUIBuilderJBridge(QWidget* arg1) : KXMLGUIBuilder(arg1) {};
	~KXMLGUIBuilderJBridge() {QtSupport::qtKeyDeleted(this);}
};

JNIEXPORT jobject JNICALL
Java_org_kde_koala_KXMLGUIBuilder_builderClient(JNIEnv* env, jobject obj)
{
	jobject xret = QtSupport::objectForQtKey(env, (void*)((KXMLGUIBuilder*) QtSupport::getQt(env, obj))->builderClient(), "org.kde.koala.KXMLGUIClientInterface");
	return xret;
}

JNIEXPORT jobject JNICALL
Java_org_kde_koala_KXMLGUIBuilder_builderInstance(JNIEnv* env, jobject obj)
{
	jobject xret = QtSupport::objectForQtKey(env, (void*)((KXMLGUIBuilder*) QtSupport::getQt(env, obj))->builderInstance(), "org.kde.koala.KInstanceInterface");
	return xret;
}

JNIEXPORT jobject JNICALL
Java_org_kde_koala_KXMLGUIBuilder_containerTags(JNIEnv* env, jobject obj)
{
	QStringList  _qlist;
	_qlist = ((KXMLGUIBuilder*) QtSupport::getQt(env, obj))->containerTags();
	return (jobject) QtSupport::arrayWithQStringList(env, (QStringList*) &_qlist);
}

JNIEXPORT jobject JNICALL
Java_org_kde_koala_KXMLGUIBuilder_createContainer(JNIEnv* env, jobject obj, jobject parent, jint index, jobject element, jintArray id)
{
	int* _int_id = QtSupport::toIntPtr(env, id);
	jobject xret = QtSupport::objectForQtKey(env, (void*)((KXMLGUIBuilder*) QtSupport::getQt(env, obj))->createContainer((QWidget*) QtSupport::getQt(env, parent), (int) index, (const QDomElement&)*(const QDomElement*) QtSupport::getQt(env, element),  (int&) *_int_id), "org.kde.qt.QWidget");
	env->SetIntArrayRegion(id, 0, 1, (jint *) _int_id);
	return xret;
}

JNIEXPORT jint JNICALL
Java_org_kde_koala_KXMLGUIBuilder_createCustomElement(JNIEnv* env, jobject obj, jobject parent, jint index, jobject element)
{
	jint xret = (jint) ((KXMLGUIBuilder*) QtSupport::getQt(env, obj))->createCustomElement((QWidget*) QtSupport::getQt(env, parent), (int) index, (const QDomElement&)*(const QDomElement*) QtSupport::getQt(env, element));
	return xret;
}

JNIEXPORT jobject JNICALL
Java_org_kde_koala_KXMLGUIBuilder_customTags(JNIEnv* env, jobject obj)
{
	QStringList  _qlist;
	_qlist = ((KXMLGUIBuilder*) QtSupport::getQt(env, obj))->customTags();
	return (jobject) QtSupport::arrayWithQStringList(env, (QStringList*) &_qlist);
}

JNIEXPORT void JNICALL
Java_org_kde_koala_KXMLGUIBuilder_dispose(JNIEnv* env, jobject obj)
{
	Java_org_kde_koala_KXMLGUIBuilder_finalize(env, obj);
	return;
}

JNIEXPORT void JNICALL
Java_org_kde_koala_KXMLGUIBuilder_finalize(JNIEnv* env, jobject obj)
{
	if (QtSupport::allocatedInJavaWorld(env, obj)) {
		delete (KXMLGUIBuilder*)QtSupport::getQt(env, obj);
		QtSupport::setQt(env, obj, 0);
	}
	return;
}

JNIEXPORT void JNICALL
Java_org_kde_koala_KXMLGUIBuilder_finalizeGUI(JNIEnv* env, jobject obj, jobject client)
{
	((KXMLGUIBuilder*) QtSupport::getQt(env, obj))->finalizeGUI((KXMLGUIClient*) QtSupport::getQt(env, client));
	return;
}

JNIEXPORT jboolean JNICALL
Java_org_kde_koala_KXMLGUIBuilder_isDisposed(JNIEnv* env, jobject obj)
{
	return (QtSupport::getQt(env, obj) == 0);
}

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

JNIEXPORT void JNICALL
Java_org_kde_koala_KXMLGUIBuilder_removeContainer(JNIEnv* env, jobject obj, jobject container, jobject parent, jobject element, jint id)
{
	((KXMLGUIBuilder*) QtSupport::getQt(env, obj))->removeContainer((QWidget*) QtSupport::getQt(env, container), (QWidget*) QtSupport::getQt(env, parent), (QDomElement&)*(QDomElement*) QtSupport::getQt(env, element), (int) id);
	return;
}

JNIEXPORT void JNICALL
Java_org_kde_koala_KXMLGUIBuilder_removeCustomElement(JNIEnv* env, jobject obj, jobject parent, jint id)
{
	((KXMLGUIBuilder*) QtSupport::getQt(env, obj))->removeCustomElement((QWidget*) QtSupport::getQt(env, parent), (int) id);
	return;
}

JNIEXPORT void JNICALL
Java_org_kde_koala_KXMLGUIBuilder_setBuilderClient(JNIEnv* env, jobject obj, jobject client)
{
	((KXMLGUIBuilder*) QtSupport::getQt(env, obj))->setBuilderClient((KXMLGUIClient*) QtSupport::getQt(env, client));
	return;
}

JNIEXPORT void JNICALL
Java_org_kde_koala_KXMLGUIBuilder_setBuilderInstance(JNIEnv* env, jobject obj, jobject instance)
{
	((KXMLGUIBuilder*) QtSupport::getQt(env, obj))->setBuilderInstance((KInstance*) QtSupport::getQt(env, instance));
	return;
}

JNIEXPORT jobject JNICALL
Java_org_kde_koala_KXMLGUIBuilder_widget(JNIEnv* env, jobject obj)
{
	jobject xret = QtSupport::objectForQtKey(env, (void*)((KXMLGUIBuilder*) QtSupport::getQt(env, obj))->widget(), "org.kde.qt.QWidget");
	return xret;
}

