//Auto-generated by kalyptus. DO NOT EDIT.
#include <kparts/browserextension.h>
#include <kurl.h>

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

class OpenURLEventJBridge : public KParts::OpenURLEvent
{
public:
	OpenURLEventJBridge(KParts::ReadOnlyPart* arg1,const KURL& arg2,const KParts::URLArgs& arg3) : KParts::OpenURLEvent(arg1,arg2,arg3) {};
	OpenURLEventJBridge(KParts::ReadOnlyPart* arg1,const KURL& arg2) : KParts::OpenURLEvent(arg1,arg2) {};
};

JNIEXPORT jobject JNICALL
Java_org_kde_koala_OpenURLEvent_args(JNIEnv* env, jobject obj)
{
	jobject xret = QtSupport::objectForQtKey(env, (void*)new KParts::URLArgs(((KParts::OpenURLEvent*) QtSupport::getQt(env, obj))->args()), "org.kde.koala.URLArgs", TRUE);
	return xret;
}

JNIEXPORT void JNICALL
Java_org_kde_koala_OpenURLEvent_newOpenURLEvent__Lorg_kde_koala_ReadOnlyPart_2Lorg_kde_koala_KURL_2(JNIEnv* env, jobject obj, jobject part, jobject url)
{
	if (QtSupport::getQt(env, obj) == 0) {
		QtSupport::setQt(env, obj, new OpenURLEventJBridge((KParts::ReadOnlyPart*) QtSupport::getQt(env, part), (const KURL&)*(const KURL*) QtSupport::getQt(env, url)));
		QtSupport::setObjectForQtKey(env, obj, QtSupport::getQt(env, obj));
	}
	return;
}

JNIEXPORT void JNICALL
Java_org_kde_koala_OpenURLEvent_newOpenURLEvent__Lorg_kde_koala_ReadOnlyPart_2Lorg_kde_koala_KURL_2Lorg_kde_koala_URLArgs_2(JNIEnv* env, jobject obj, jobject part, jobject url, jobject args)
{
	if (QtSupport::getQt(env, obj) == 0) {
		QtSupport::setQt(env, obj, new OpenURLEventJBridge((KParts::ReadOnlyPart*) QtSupport::getQt(env, part), (const KURL&)*(const KURL*) QtSupport::getQt(env, url), (const KParts::URLArgs&)*(const KParts::URLArgs*) QtSupport::getQt(env, args)));
		QtSupport::setObjectForQtKey(env, obj, QtSupport::getQt(env, obj));
	}
	return;
}

JNIEXPORT jobject JNICALL
Java_org_kde_koala_OpenURLEvent_part(JNIEnv* env, jobject obj)
{
	jobject xret = QtSupport::objectForQtKey(env, (void*)((KParts::OpenURLEvent*) QtSupport::getQt(env, obj))->part(), "org.kde.koala.ReadOnlyPart");
	return xret;
}

JNIEXPORT jboolean JNICALL
Java_org_kde_koala_OpenURLEvent_test(JNIEnv* env, jclass cls, jobject event)
{
	(void) cls;
	jboolean xret = (jboolean) OpenURLEventJBridge::test((const QEvent*) QtSupport::getQt(env, event));
	return xret;
}

JNIEXPORT jobject JNICALL
Java_org_kde_koala_OpenURLEvent_url(JNIEnv* env, jobject obj)
{
	jobject xret = QtSupport::objectForQtKey(env, (void*)new KURL(((KParts::OpenURLEvent*) QtSupport::getQt(env, obj))->url()), "org.kde.koala.KURL", TRUE);
	return xret;
}

