//Auto-generated by kalyptus. DO NOT EDIT.
#include <kurldrag.h>
#include <qstring.h>
#include <kurl.h>
#include <qcstring.h>

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

class KURLDragJBridge : public KURLDrag
{
public:
	KURLDragJBridge(const KURL::List& arg1,QWidget* arg2,const char* arg3) : KURLDrag(arg1,arg2,arg3) {};
	KURLDragJBridge(const KURL::List& arg1,QWidget* arg2) : KURLDrag(arg1,arg2) {};
	KURLDragJBridge(const KURL::List& arg1) : KURLDrag(arg1) {};
	~KURLDragJBridge() {QtSupport::qtKeyDeleted(this);}
	void removeChild(QObject* arg1) {
		if (!QtSupport::eventDelegate(this,"removeChild",(void*)arg1,"org.kde.qt.QObject")) {
			QObject::removeChild(arg1);
		}
		return;
	}
	void customEvent(QCustomEvent* arg1) {
		if (!QtSupport::eventDelegate(this,"customEvent",(void*)arg1,"org.kde.qt.QCustomEvent")) {
			QObject::customEvent(arg1);
		}
		return;
	}
	void timerEvent(QTimerEvent* arg1) {
		if (!QtSupport::eventDelegate(this,"timerEvent",(void*)arg1,"org.kde.qt.QTimerEvent")) {
			QObject::timerEvent(arg1);
		}
		return;
	}
	void childEvent(QChildEvent* arg1) {
		if (!QtSupport::eventDelegate(this,"childEvent",(void*)arg1,"org.kde.qt.QChildEvent")) {
			QObject::childEvent(arg1);
		}
		return;
	}
	void insertChild(QObject* arg1) {
		if (!QtSupport::eventDelegate(this,"insertChild",(void*)arg1,"org.kde.qt.QObject")) {
			QObject::insertChild(arg1);
		}
		return;
	}
	bool eventFilter(QObject* object,QEvent* event) {
		if (!QtSupport::eventFilterDelegate(this,"org.kde.koala.KURLDrag",object,event)) {
			return QObject::eventFilter(object,event);
		} else {
			return TRUE;
		}
	}
};

JNIEXPORT jboolean JNICALL
Java_org_kde_koala_KURLDrag_decode(JNIEnv* env, jclass cls, jobject e, jobjectArray urls)
{
	(void) cls;
static KURL::List* _qlist_urls = 0;
	jboolean xret = (jboolean) KURLDragJBridge::decode((const QMimeSource*) QtSupport::mimeSource(env, e), (KURL::List&)*(KURL::List*) KDESupport::toKURLList(env, urls, &_qlist_urls));
	return xret;
}

JNIEXPORT void JNICALL
Java_org_kde_koala_KURLDrag_dispose(JNIEnv* env, jobject obj)
{
	Java_org_kde_koala_KURLDrag_finalize(env, obj);
	return;
}

JNIEXPORT jbyteArray JNICALL
Java_org_kde_koala_KURLDrag_encodedData(JNIEnv* env, jobject obj, jstring mime)
{
	QByteArray _qbyteArray;
static QCString* _qstring_mime = 0;
	_qbyteArray = ((KURLDrag*) QtSupport::getQt(env, obj))->encodedData((const char*) QtSupport::toCharString(env, mime, &_qstring_mime));
	return QtSupport::fromQByteArray(env, &_qbyteArray);
}

JNIEXPORT void JNICALL
Java_org_kde_koala_KURLDrag_finalize(JNIEnv* env, jobject obj)
{
	if (QtSupport::allocatedInJavaWorld(env, obj) && ((KURLDrag*)QtSupport::getQt(env, obj))->parent() == 0) {
		delete (KURLDrag*)QtSupport::getQt(env, obj);
		QtSupport::setQt(env, obj, 0);
	}
	return;
}

JNIEXPORT jstring JNICALL
Java_org_kde_koala_KURLDrag_format(JNIEnv* env, jobject obj, jint i)
{
	const char* _qstring;
	_qstring = ((KURLDrag*) QtSupport::getQt(env, obj))->format((int) i);
	return QtSupport::fromCharString(env, (char *) _qstring);
}

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

JNIEXPORT void JNICALL
Java_org_kde_koala_KURLDrag_newKURLDrag__Ljava_util_ArrayList_2(JNIEnv* env, jobject obj, jobjectArray urls)
{
static KURL::List* _qlist_urls = 0;
	if (QtSupport::getQt(env, obj) == 0) {
		QtSupport::setQt(env, obj, new KURLDragJBridge((const KURL::List&)*(KURL::List*) KDESupport::toKURLList(env, urls, &_qlist_urls)));
		QtSupport::setObjectForQtKey(env, obj, QtSupport::getQt(env, obj));
	}
	return;
}

JNIEXPORT void JNICALL
Java_org_kde_koala_KURLDrag_newKURLDrag__Ljava_util_ArrayList_2Lorg_kde_qt_QWidget_2(JNIEnv* env, jobject obj, jobjectArray urls, jobject dragSource)
{
static KURL::List* _qlist_urls = 0;
	if (QtSupport::getQt(env, obj) == 0) {
		QtSupport::setQt(env, obj, new KURLDragJBridge((const KURL::List&)*(KURL::List*) KDESupport::toKURLList(env, urls, &_qlist_urls), (QWidget*) QtSupport::getQt(env, dragSource)));
		QtSupport::setObjectForQtKey(env, obj, QtSupport::getQt(env, obj));
	}
	return;
}

JNIEXPORT void JNICALL
Java_org_kde_koala_KURLDrag_newKURLDrag__Ljava_util_ArrayList_2Lorg_kde_qt_QWidget_2Ljava_lang_String_2(JNIEnv* env, jobject obj, jobjectArray urls, jobject dragSource, jstring name)
{
static KURL::List* _qlist_urls = 0;
static QCString* _qstring_name = 0;
	if (QtSupport::getQt(env, obj) == 0) {
		QtSupport::setQt(env, obj, new KURLDragJBridge((const KURL::List&)*(KURL::List*) KDESupport::toKURLList(env, urls, &_qlist_urls), (QWidget*) QtSupport::getQt(env, dragSource), (const char*) QtSupport::toCharString(env, name, &_qstring_name)));
		QtSupport::setObjectForQtKey(env, obj, QtSupport::getQt(env, obj));
	}
	return;
}

JNIEXPORT void JNICALL
Java_org_kde_koala_KURLDrag_setExportAsText(JNIEnv* env, jobject obj, jboolean exp)
{
	((KURLDrag*) QtSupport::getQt(env, obj))->setExportAsText((bool) exp);
	return;
}

JNIEXPORT jobject JNICALL
Java_org_kde_koala_KURLDrag_stringToUrl(JNIEnv* env, jclass cls, jstring s)
{
	(void) cls;
static QCString* _qcstring_s = 0;
	jobject xret = QtSupport::objectForQtKey(env, (void*)new KURL(KURLDragJBridge::stringToUrl((const QCString&)*(QCString*) QtSupport::toQCString(env, s, &_qcstring_s))), "org.kde.koala.KURL", TRUE);
	return xret;
}

JNIEXPORT jstring JNICALL
Java_org_kde_koala_KURLDrag_urlToString(JNIEnv* env, jclass cls, jobject url)
{
	QString  _qstring;
	(void) cls;
	_qstring = KURLDragJBridge::urlToString((const KURL&)*(const KURL*) QtSupport::getQt(env, url));
	return QtSupport::fromQString(env, &_qstring);
}

