//Auto-generated by kalyptus. DO NOT EDIT.
#include <kglobalsettings.h>
#include <kcompletion.h>
#include <qstring.h>
#include <qstringlist.h>

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

class KCompletionJBridge : public KCompletion
{
public:
	KCompletionJBridge() : KCompletion() {};
	void public_clear() {
		KCompletion::clear();
		return;
	}
	void protected_postProcessMatch(QString* arg1) {
		KCompletion::postProcessMatch(arg1);
		return;
	}
	void protected_postProcessMatches(QStringList* arg1) {
		KCompletion::postProcessMatches(arg1);
		return;
	}
	~KCompletionJBridge() {QtSupport::qtKeyDeleted(this);}
	void removeChild(QObject* arg1) {
		if (!QtSupport::eventDelegate(this,"removeChild",(void*)arg1,"org.kde.qt.QObject")) {
			QObject::removeChild(arg1);
		}
		return;
	}
	void clear() {
		if (!QtSupport::voidDelegate(this,"org.kde.koala.KCompletion","clear")) {
			KCompletion::clear();
		}
		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.KCompletion",object,event)) {
			return QObject::eventFilter(object,event);
		} else {
			return TRUE;
		}
	}
};

JNIEXPORT void JNICALL
Java_org_kde_koala_KCompletion_addItem__Ljava_lang_String_2(JNIEnv* env, jobject obj, jstring item)
{
static QString* _qstring_item = 0;
	((KCompletion*) QtSupport::getQt(env, obj))->addItem((const QString&)*(QString*) QtSupport::toQString(env, item, &_qstring_item));
	return;
}

JNIEXPORT void JNICALL
Java_org_kde_koala_KCompletion_addItem__Ljava_lang_String_2I(JNIEnv* env, jobject obj, jstring item, jint weight)
{
static QString* _qstring_item = 0;
	((KCompletion*) QtSupport::getQt(env, obj))->addItem((const QString&)*(QString*) QtSupport::toQString(env, item, &_qstring_item), (uint) weight);
	return;
}

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

JNIEXPORT jobject JNICALL
Java_org_kde_koala_KCompletion_allMatches__Ljava_lang_String_2(JNIEnv* env, jobject obj, jstring string)
{
	QStringList  _qlist;
static QString* _qstring_string = 0;
	_qlist = ((KCompletion*) QtSupport::getQt(env, obj))->allMatches((const QString&)*(QString*) QtSupport::toQString(env, string, &_qstring_string));
	return (jobject) QtSupport::arrayWithQStringList(env, (QStringList*) &_qlist);
}

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

JNIEXPORT void JNICALL
Java_org_kde_koala_KCompletion_clear(JNIEnv* env, jobject obj)
{
	((KCompletionJBridge*) QtSupport::getQt(env, obj))->public_clear();
	return;
}

JNIEXPORT jint JNICALL
Java_org_kde_koala_KCompletion_completionMode(JNIEnv* env, jobject obj)
{
	jint xret = (jint) ((KCompletion*) QtSupport::getQt(env, obj))->completionMode();
	return xret;
}

JNIEXPORT void JNICALL
Java_org_kde_koala_KCompletion_dispose(JNIEnv* env, jobject obj)
{
	Java_org_kde_koala_KCompletion_finalize(env, obj);
	return;
}

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

JNIEXPORT jboolean JNICALL
Java_org_kde_koala_KCompletion_hasMultipleMatches(JNIEnv* env, jobject obj)
{
	jboolean xret = (jboolean) ((KCompletion*) QtSupport::getQt(env, obj))->hasMultipleMatches();
	return xret;
}

JNIEXPORT jboolean JNICALL
Java_org_kde_koala_KCompletion_ignoreCase(JNIEnv* env, jobject obj)
{
	jboolean xret = (jboolean) ((KCompletion*) QtSupport::getQt(env, obj))->ignoreCase();
	return xret;
}

JNIEXPORT void JNICALL
Java_org_kde_koala_KCompletion_insertItems(JNIEnv* env, jobject obj, jobjectArray items)
{
static QStringList* _qlist_items = 0;
	((KCompletion*) QtSupport::getQt(env, obj))->insertItems((const QStringList&)*(QStringList*) QtSupport::toQStringList(env, items, &_qlist_items));
	return;
}

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

JNIEXPORT jboolean JNICALL
Java_org_kde_koala_KCompletion_isEmpty(JNIEnv* env, jobject obj)
{
	jboolean xret = (jboolean) ((KCompletion*) QtSupport::getQt(env, obj))->isEmpty();
	return xret;
}

JNIEXPORT jboolean JNICALL
Java_org_kde_koala_KCompletion_isSoundsEnabled(JNIEnv* env, jobject obj)
{
	jboolean xret = (jboolean) ((KCompletion*) QtSupport::getQt(env, obj))->isSoundsEnabled();
	return xret;
}

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

JNIEXPORT jstring JNICALL
Java_org_kde_koala_KCompletion_lastMatch(JNIEnv* env, jobject obj)
{
	QString  _qstring;
	_qstring = ((KCompletion*) QtSupport::getQt(env, obj))->lastMatch();
	return QtSupport::fromQString(env, &_qstring);
}

JNIEXPORT jstring JNICALL
Java_org_kde_koala_KCompletion_makeCompletion(JNIEnv* env, jobject obj, jstring string)
{
	QString  _qstring;
static QString* _qstring_string = 0;
	_qstring = ((KCompletion*) QtSupport::getQt(env, obj))->makeCompletion((const QString&)*(QString*) QtSupport::toQString(env, string, &_qstring_string));
	return QtSupport::fromQString(env, &_qstring);
}

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

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

JNIEXPORT jstring JNICALL
Java_org_kde_koala_KCompletion_nextMatch(JNIEnv* env, jobject obj)
{
	QString  _qstring;
	_qstring = ((KCompletion*) QtSupport::getQt(env, obj))->nextMatch();
	return QtSupport::fromQString(env, &_qstring);
}

JNIEXPORT jint JNICALL
Java_org_kde_koala_KCompletion_order(JNIEnv* env, jobject obj)
{
	jint xret = (jint) ((KCompletion*) QtSupport::getQt(env, obj))->order();
	return xret;
}

JNIEXPORT void JNICALL
Java_org_kde_koala_KCompletion_postProcessMatch(JNIEnv* env, jobject obj, jobject match)
{
static QString* _qstring_match = 0;
	((KCompletionJBridge*) QtSupport::getQt(env, obj))->protected_postProcessMatch((QString*) QtSupport::toQStringFromStringBuffer(env, match, &_qstring_match));
	QtSupport::fromQStringToStringBuffer(env, _qstring_match, match);
	return;
}

JNIEXPORT void JNICALL
Java_org_kde_koala_KCompletion_postProcessMatches(JNIEnv* env, jobject obj, jobjectArray matches)
{
static QStringList* _qlist_matches = 0;
	((KCompletionJBridge*) QtSupport::getQt(env, obj))->protected_postProcessMatches((QStringList*) QtSupport::toQStringList(env, matches, &_qlist_matches));
	return;
}

JNIEXPORT jstring JNICALL
Java_org_kde_koala_KCompletion_previousMatch(JNIEnv* env, jobject obj)
{
	QString  _qstring;
	_qstring = ((KCompletion*) QtSupport::getQt(env, obj))->previousMatch();
	return QtSupport::fromQString(env, &_qstring);
}

JNIEXPORT void JNICALL
Java_org_kde_koala_KCompletion_removeItem(JNIEnv* env, jobject obj, jstring item)
{
static QString* _qstring_item = 0;
	((KCompletion*) QtSupport::getQt(env, obj))->removeItem((const QString&)*(QString*) QtSupport::toQString(env, item, &_qstring_item));
	return;
}

JNIEXPORT void JNICALL
Java_org_kde_koala_KCompletion_setCompletionMode(JNIEnv* env, jobject obj, jint mode)
{
	((KCompletion*) QtSupport::getQt(env, obj))->setCompletionMode((KGlobalSettings::Completion) mode);
	return;
}

JNIEXPORT void JNICALL
Java_org_kde_koala_KCompletion_setEnableSounds(JNIEnv* env, jobject obj, jboolean enable)
{
	((KCompletion*) QtSupport::getQt(env, obj))->setEnableSounds((bool) enable);
	return;
}

JNIEXPORT void JNICALL
Java_org_kde_koala_KCompletion_setIgnoreCase(JNIEnv* env, jobject obj, jboolean ignoreCase)
{
	((KCompletion*) QtSupport::getQt(env, obj))->setIgnoreCase((bool) ignoreCase);
	return;
}

JNIEXPORT void JNICALL
Java_org_kde_koala_KCompletion_setItems(JNIEnv* env, jobject obj, jobjectArray list)
{
static QStringList* _qlist_list = 0;
	((KCompletion*) QtSupport::getQt(env, obj))->setItems((const QStringList&)*(QStringList*) QtSupport::toQStringList(env, list, &_qlist_list));
	return;
}

JNIEXPORT void JNICALL
Java_org_kde_koala_KCompletion_setOrder(JNIEnv* env, jobject obj, jint order)
{
	((KCompletion*) QtSupport::getQt(env, obj))->setOrder((KCompletion::CompOrder) order);
	return;
}

JNIEXPORT void JNICALL
Java_org_kde_koala_KCompletion_slotMakeCompletion(JNIEnv* env, jobject obj, jstring string)
{
static QString* _qstring_string = 0;
	((KCompletion*) QtSupport::getQt(env, obj))->slotMakeCompletion((const QString&)*(QString*) QtSupport::toQString(env, string, &_qstring_string));
	return;
}

JNIEXPORT void JNICALL
Java_org_kde_koala_KCompletion_slotNextMatch(JNIEnv* env, jobject obj)
{
	((KCompletion*) QtSupport::getQt(env, obj))->slotNextMatch();
	return;
}

JNIEXPORT void JNICALL
Java_org_kde_koala_KCompletion_slotPreviousMatch(JNIEnv* env, jobject obj)
{
	((KCompletion*) QtSupport::getQt(env, obj))->slotPreviousMatch();
	return;
}

JNIEXPORT jobject JNICALL
Java_org_kde_koala_KCompletion_substringCompletion(JNIEnv* env, jobject obj, jstring string)
{
	QStringList  _qlist;
static QString* _qstring_string = 0;
	_qlist = ((KCompletion*) QtSupport::getQt(env, obj))->substringCompletion((const QString&)*(QString*) QtSupport::toQString(env, string, &_qstring_string));
	return (jobject) QtSupport::arrayWithQStringList(env, (QStringList*) &_qlist);
}

