/***************************************************************************
                            KGlobal.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 <kglobal.h>
#include <qstring.h>
#include <qcstring.h>

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

JNIEXPORT jobject JNICALL
Java_org_kde_koala_KGlobal_instance(JNIEnv *env, jclass obj)
{
	return (jobject) QtSupport::objectForQtKey(env, (void *)KGlobal::instance(), "org.kde.koala.KInstanceInterface");
}

JNIEXPORT jobject JNICALL
Java_org_kde_koala_KGlobal_dirs(JNIEnv *env, jclass obj)
{
	return (jobject) QtSupport::objectForQtKey(env, (void *)KGlobal::dirs(), "org.kde.koala.KStandardDirs");
}

JNIEXPORT jobject JNICALL
Java_org_kde_koala_KGlobal_config(JNIEnv *env, jclass obj)
{
	return (jobject) QtSupport::objectForQtKey(env, (void *)KGlobal::config(), "org.kde.koala.KConfig");
}

JNIEXPORT jobject JNICALL
Java_org_kde_koala_KGlobal_iconLoader(JNIEnv *env, jclass obj)
{
	return (jobject) QtSupport::objectForQtKey(env, (void *)KGlobal::iconLoader(), "org.kde.koala.KIconLoader");
}

JNIEXPORT jobject JNICALL
Java_org_kde_koala_KGlobal_locale(JNIEnv *env, jclass obj)
{
	return (jobject) QtSupport::objectForQtKey(env, (void *)KGlobal::locale(), "org.kde.koala.KLocale");
}

JNIEXPORT jobject JNICALL
Java_org_kde_koala_KGlobal_charsets(JNIEnv *env, jclass obj)
{
	return (jobject) QtSupport::objectForQtKey(env, (void *)KGlobal::charsets(), "org.kde.koala.KCharsets");
}

JNIEXPORT jstring JNICALL
Java_org_kde_koala_KGlobal_staticQString(JNIEnv *env, jclass obj, jstring arg1)
{
	QString  _qstring;
static QCString * _qstring_arg1 = 0;
	_qstring = KGlobal::staticQString((char*) QtSupport::toCharString(env, arg1, &_qstring_arg1));
	return QtSupport::fromQString(env, &_qstring);
}

JNIEXPORT jstring JNICALL
Java_org_kde_koala_KGlobal_staticQString__Ljava_lang_String_2(JNIEnv *env, jclass obj, jstring arg1)
{
	QString  _qstring;
static QString * _qstring_arg1 = 0;
	_qstring = KGlobal::staticQString((QString&) * (QString *) QtSupport::toQString(env, arg1, &_qstring_arg1));
	return QtSupport::fromQString(env, &_qstring);
}

JNIEXPORT void JNICALL
Java_org_kde_koala_KGlobal_registerStaticDeleter(JNIEnv *env, jclass obj, jobject arg1)
{
	KGlobal::registerStaticDeleter((KStaticDeleterBase*) QtSupport::getQt(env, arg1));
	return;
}

JNIEXPORT void JNICALL
Java_org_kde_koala_KGlobal_unregisterStaticDeleter(JNIEnv *env, jclass obj, jobject arg1)
{
	KGlobal::unregisterStaticDeleter((KStaticDeleterBase*) QtSupport::getQt(env, arg1));
	return;
}

JNIEXPORT void JNICALL
Java_org_kde_koala_KGlobal_deleteStaticDeleters(JNIEnv *env, jclass obj)
{
	KGlobal::deleteStaticDeleters();
	return;
}

JNIEXPORT void JNICALL
Java_org_kde_koala_KGlobal_setActiveInstance(JNIEnv *env, jclass obj, jobject d)
{
	KGlobal::setActiveInstance((KInstance*) QtSupport::getQt(env, d));
	return;
}

JNIEXPORT jobject JNICALL
Java_org_kde_koala_KGlobal_activeInstance(JNIEnv *env, jclass obj)
{
	return (jobject) QtSupport::objectForQtKey(env, (void *)KGlobal::activeInstance(), "org.kde.koala.KInstanceInterface");
}

