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

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

class BrowserExtensionJBridge : public KParts::BrowserExtension
{
public:
	BrowserExtensionJBridge(KParts::ReadOnlyPart* arg1,const char* arg2) : KParts::BrowserExtension(arg1,arg2) {};
	BrowserExtensionJBridge(KParts::ReadOnlyPart* arg1) : KParts::BrowserExtension(arg1) {};
	void setURLArgs(const KParts::URLArgs& arg1) {
		if (!QtSupport::eventDelegate(this,"setURLArgs",(void*)&arg1,"org.kde.koala.URLArgs")) {
			BrowserExtension::setURLArgs(arg1);
		}
		return;
	}
	void removeChild(QObject* arg1) {
		if (!QtSupport::eventDelegate(this,"removeChild",(void*)arg1,"org.kde.qt.QObject")) {
			QObject::removeChild(arg1);
		}
		return;
	}
	void restoreState(QDataStream& arg1) {
		if (!QtSupport::eventDelegate(this,"restoreState",(void*)&arg1,"org.kde.qt.QDataStream")) {
			BrowserExtension::restoreState(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 saveState(QDataStream& arg1) {
		if (!QtSupport::eventDelegate(this,"saveState",(void*)&arg1,"org.kde.qt.QDataStream")) {
			BrowserExtension::saveState(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.BrowserExtension",object,event)) {
			return QObject::eventFilter(object,event);
		} else {
			return TRUE;
		}
	}
};

JNIEXPORT jobject JNICALL
Java_org_kde_koala_BrowserExtension_browserInterface(JNIEnv* env, jobject obj)
{
	jobject xret = QtSupport::objectForQtKey(env, (void*)((KParts::BrowserExtension*) QtSupport::getQt(env, obj))->browserInterface(), "org.kde.koala.BrowserInterface");
	return xret;
}

JNIEXPORT jobject JNICALL
Java_org_kde_koala_BrowserExtension_childObject(JNIEnv* env, jclass cls, jobject arg1)
{
	(void) cls;
	jobject xret = QtSupport::objectForQtKey(env, (void*)BrowserExtensionJBridge::childObject((QObject*) QtSupport::getQt(env, arg1)), "org.kde.koala.BrowserExtension");
	return xret;
}

JNIEXPORT jstring JNICALL
Java_org_kde_koala_BrowserExtension_className(JNIEnv* env, jobject obj)
{
	const char* _qstring;
	_qstring = ((KParts::BrowserExtension*) QtSupport::getQt(env, obj))->className();
	return QtSupport::fromCharString(env, (char *) _qstring);
}

JNIEXPORT jboolean JNICALL
Java_org_kde_koala_BrowserExtension_isActionEnabled(JNIEnv* env, jobject obj, jstring name)
{
static QCString* _qstring_name = 0;
	jboolean xret = (jboolean) ((KParts::BrowserExtension*) QtSupport::getQt(env, obj))->isActionEnabled((const char*) QtSupport::toCharString(env, name, &_qstring_name));
	return xret;
}

JNIEXPORT jboolean JNICALL
Java_org_kde_koala_BrowserExtension_isURLDropHandlingEnabled(JNIEnv* env, jobject obj)
{
	jboolean xret = (jboolean) ((KParts::BrowserExtension*) QtSupport::getQt(env, obj))->isURLDropHandlingEnabled();
	return xret;
}

JNIEXPORT jobject JNICALL
Java_org_kde_koala_BrowserExtension_metaObject(JNIEnv* env, jobject obj)
{
	jobject xret = QtSupport::objectForQtKey(env, (void*)((KParts::BrowserExtension*) QtSupport::getQt(env, obj))->metaObject(), "org.kde.qt.QMetaObject");
	return xret;
}

JNIEXPORT void JNICALL
Java_org_kde_koala_BrowserExtension_newBrowserExtension__Lorg_kde_koala_ReadOnlyPart_2(JNIEnv* env, jobject obj, jobject parent)
{
	if (QtSupport::getQt(env, obj) == 0) {
		QtSupport::setQt(env, obj, new BrowserExtensionJBridge((KParts::ReadOnlyPart*) QtSupport::getQt(env, parent)));
		QtSupport::setObjectForQtKey(env, obj, QtSupport::getQt(env, obj));
	}
	return;
}

JNIEXPORT void JNICALL
Java_org_kde_koala_BrowserExtension_newBrowserExtension__Lorg_kde_koala_ReadOnlyPart_2Ljava_lang_String_2(JNIEnv* env, jobject obj, jobject parent, jstring name)
{
static QCString* _qstring_name = 0;
	if (QtSupport::getQt(env, obj) == 0) {
		QtSupport::setQt(env, obj, new BrowserExtensionJBridge((KParts::ReadOnlyPart*) QtSupport::getQt(env, parent), (const char*) QtSupport::toCharString(env, name, &_qstring_name)));
		QtSupport::setObjectForQtKey(env, obj, QtSupport::getQt(env, obj));
	}
	return;
}

JNIEXPORT void JNICALL
Java_org_kde_koala_BrowserExtension_pasteRequest(JNIEnv* env, jobject obj)
{
	((KParts::BrowserExtension*) QtSupport::getQt(env, obj))->pasteRequest();
	return;
}

JNIEXPORT void JNICALL
Java_org_kde_koala_BrowserExtension_restoreState(JNIEnv* env, jobject obj, jobject stream)
{
	((KParts::BrowserExtension*) QtSupport::getQt(env, obj))->restoreState((QDataStream&)*(QDataStream*) QtSupport::getQt(env, stream));
	return;
}

JNIEXPORT void JNICALL
Java_org_kde_koala_BrowserExtension_saveState(JNIEnv* env, jobject obj, jobject stream)
{
	((KParts::BrowserExtension*) QtSupport::getQt(env, obj))->saveState((QDataStream&)*(QDataStream*) QtSupport::getQt(env, stream));
	return;
}

JNIEXPORT void JNICALL
Java_org_kde_koala_BrowserExtension_setBrowserInterface(JNIEnv* env, jobject obj, jobject impl)
{
	((KParts::BrowserExtension*) QtSupport::getQt(env, obj))->setBrowserInterface((KParts::BrowserInterface*) QtSupport::getQt(env, impl));
	return;
}

JNIEXPORT void JNICALL
Java_org_kde_koala_BrowserExtension_setURLArgs(JNIEnv* env, jobject obj, jobject args)
{
	((KParts::BrowserExtension*) QtSupport::getQt(env, obj))->setURLArgs((const KParts::URLArgs&)*(const KParts::URLArgs*) QtSupport::getQt(env, args));
	return;
}

JNIEXPORT void JNICALL
Java_org_kde_koala_BrowserExtension_setURLDropHandlingEnabled(JNIEnv* env, jobject obj, jboolean enable)
{
	((KParts::BrowserExtension*) QtSupport::getQt(env, obj))->setURLDropHandlingEnabled((bool) enable);
	return;
}

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

JNIEXPORT jint JNICALL
Java_org_kde_koala_BrowserExtension_xOffset(JNIEnv* env, jobject obj)
{
	jint xret = (jint) ((KParts::BrowserExtension*) QtSupport::getQt(env, obj))->xOffset();
	return xret;
}

JNIEXPORT jint JNICALL
Java_org_kde_koala_BrowserExtension_yOffset(JNIEnv* env, jobject obj)
{
	jint xret = (jint) ((KParts::BrowserExtension*) QtSupport::getQt(env, obj))->yOffset();
	return xret;
}

