/***************************************************************************
                            KCompletionBase.cpp -  description
                             -------------------
    begin                : Sun Jan 27 16:22:17 2002
    copyright            : (C) 2000-2001 Lost Highway Ltd.
    email                : Richard_Dale@tipitina.demon.co.uk
    generated by         : duke@tipitina on Sun Jan 27 16:22:17 2002, using kalyptus 0.9.
 ***************************************************************************/

/***************************************************************************
 *                                                                         *
 *   This program is free software; you can redistribute it and/or modify  *
 *   it under the terms of the GNU General Public License as published by  *
 *   the Free Software Foundation; either version 2 of the License, or     *
 *   (at your option) any later version.                                   *
 *                                                                         *
***************************************************************************/

#define _BOOL_H_
#include <kcompletion.h>
#include <qstring.h>
#include <qcstring.h>

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

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

JNIEXPORT void JNICALL
Java_org_kde_koala_KCompletionBase_dispose(JNIEnv *env, jobject obj)
{
	Java_org_kde_koala_KCompletionBase_finalize(env, obj);
	return;
}

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

JNIEXPORT jobject JNICALL
Java_org_kde_koala_KCompletionBase_completionObject__Z(JNIEnv *env, jobject obj, jboolean hsig)
{
	return (jobject) QtSupport::objectForQtKey(env, (void *)((KCompletionBase*) QtSupport::getQt(env, obj))->completionObject((bool) hsig), "org.kde.koala.KCompletion");
}

JNIEXPORT jobject JNICALL
Java_org_kde_koala_KCompletionBase_completionObject__(JNIEnv *env, jobject obj)
{
	return (jobject) QtSupport::objectForQtKey(env, (void *)((KCompletionBase*) QtSupport::getQt(env, obj))->completionObject(true), "org.kde.koala.KCompletion");
}

JNIEXPORT void JNICALL
Java_org_kde_koala_KCompletionBase_setCompletionObject__Lorg_kde_koala_KCompletion_2Z(JNIEnv *env, jobject obj, jobject arg1, jboolean hsig)
{
	((KCompletionBase*) QtSupport::getQt(env, obj))->setCompletionObject((KCompletion*) QtSupport::getQt(env, arg1), (bool) hsig);
	return;
}

JNIEXPORT void JNICALL
Java_org_kde_koala_KCompletionBase_setCompletionObject__Lorg_kde_koala_KCompletion_2(JNIEnv *env, jobject obj, jobject arg1)
{
	((KCompletionBase*) QtSupport::getQt(env, obj))->setCompletionObject((KCompletion*) QtSupport::getQt(env, arg1), true);
	return;
}

JNIEXPORT void JNICALL
Java_org_kde_koala_KCompletionBase_setHandleSignals(JNIEnv *env, jobject obj, jboolean arg1)
{
	((KCompletionBase*) QtSupport::getQt(env, obj))->setHandleSignals((bool) arg1);
	return;
}

JNIEXPORT jboolean JNICALL
Java_org_kde_koala_KCompletionBase_isCompletionObjectAutoDeleted(JNIEnv *env, jobject obj)
{
	return (jboolean) ((KCompletionBase*) QtSupport::getQt(env, obj))->isCompletionObjectAutoDeleted();
}

JNIEXPORT void JNICALL
Java_org_kde_koala_KCompletionBase_setAutoDeleteCompletionObject(JNIEnv *env, jobject obj, jboolean autoDelete)
{
	((KCompletionBase*) QtSupport::getQt(env, obj))->setAutoDeleteCompletionObject((bool) autoDelete);
	return;
}

JNIEXPORT void JNICALL
Java_org_kde_koala_KCompletionBase_setEnableSignals(JNIEnv *env, jobject obj, jboolean enable)
{
	((KCompletionBase*) QtSupport::getQt(env, obj))->setEnableSignals((bool) enable);
	return;
}

JNIEXPORT jboolean JNICALL
Java_org_kde_koala_KCompletionBase_handleSignals(JNIEnv *env, jobject obj)
{
	return (jboolean) ((KCompletionBase*) QtSupport::getQt(env, obj))->handleSignals();
}

JNIEXPORT jboolean JNICALL
Java_org_kde_koala_KCompletionBase_emitSignals(JNIEnv *env, jobject obj)
{
	return (jboolean) ((KCompletionBase*) QtSupport::getQt(env, obj))->emitSignals();
}

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

JNIEXPORT jint JNICALL
Java_org_kde_koala_KCompletionBase_completionMode(JNIEnv *env, jobject obj)
{
	return (jint) ((KCompletionBase*) QtSupport::getQt(env, obj))->completionMode();
}

JNIEXPORT jboolean JNICALL
Java_org_kde_koala_KCompletionBase_setKeyBinding(JNIEnv *env, jobject obj, jint arg1, jobject cut)
{
	return (jboolean) ((KCompletionBase*) QtSupport::getQt(env, obj))->setKeyBinding((KCompletionBase::KeyBindingType) arg1, (KShortcut&) *(KShortcut *) QtSupport::getQt(env, cut));
}

JNIEXPORT jobject JNICALL
Java_org_kde_koala_KCompletionBase_getKeyBinding(JNIEnv *env, jobject obj, jint item)
{
	return (jobject) QtSupport::objectForQtKey(env, (void *)(KShortcut *) &((KCompletionBase*) QtSupport::getQt(env, obj))->getKeyBinding((KCompletionBase::KeyBindingType) item), "org.kde.koala.KShortcut");
}

JNIEXPORT void JNICALL
Java_org_kde_koala_KCompletionBase_useGlobalKeyBindings(JNIEnv *env, jobject obj)
{
	((KCompletionBase*) QtSupport::getQt(env, obj))->useGlobalKeyBindings();
	return;
}

JNIEXPORT void JNICALL
Java_org_kde_koala_KCompletionBase_setCompletedText(JNIEnv *env, jobject obj, jstring text)
{
static QString * _qstring_text = 0;
	((KCompletionBase*) QtSupport::getQt(env, obj))->setCompletedText((QString&) * (QString *) QtSupport::toQString(env, text, &_qstring_text));
	return;
}

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

JNIEXPORT jobject JNICALL
Java_org_kde_koala_KCompletionBase_compObj(JNIEnv *env, jobject obj)
{
	return (jobject) QtSupport::objectForQtKey(env, (void *)((KCompletionBase*) QtSupport::getQt(env, obj))->compObj(), "org.kde.koala.KCompletion");
}

