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

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

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

JNIEXPORT void JNICALL
Java_org_kde_koala_KScriptInterface_setScript__Ljava_lang_String_2(JNIEnv *env, jobject obj, jstring scriptFile)
{
static QString * _qstring_scriptFile = 0;
	((KScriptInterface*) QtSupport::getQt(env, obj))->setScript((QString&) * (QString *) QtSupport::toQString(env, scriptFile, &_qstring_scriptFile));
	return;
}

JNIEXPORT void JNICALL
Java_org_kde_koala_KScriptInterface_setScript__Ljava_lang_String_2Ljava_lang_String_2(JNIEnv *env, jobject obj, jstring scriptLibFile, jstring method)
{
static QString * _qstring_method = 0;
static QString * _qstring_scriptLibFile = 0;
	((KScriptInterface*) QtSupport::getQt(env, obj))->setScript((QString&) * (QString *) QtSupport::toQString(env, scriptLibFile, &_qstring_scriptLibFile), (QString&) * (QString *) QtSupport::toQString(env, method, &_qstring_method));
	return;
}

JNIEXPORT void JNICALL
Java_org_kde_koala_KScriptInterface_run__Lorg_kde_qt_QObject_2Lorg_kde_qt_QVariant_2(JNIEnv *env, jobject obj, jobject context, jobject arg)
{
	((KScriptInterface*) QtSupport::getQt(env, obj))->run((QObject*) QtSupport::getQt(env, context), (QVariant&) *(QVariant *) QtSupport::getQt(env, arg));
	return;
}

JNIEXPORT void JNICALL
Java_org_kde_koala_KScriptInterface_run__(JNIEnv *env, jobject obj)
{
	((KScriptInterface*) QtSupport::getQt(env, obj))->run(0, 0);
	return;
}

JNIEXPORT void JNICALL
Java_org_kde_koala_KScriptInterface_kill(JNIEnv *env, jobject obj)
{
	((KScriptInterface*) QtSupport::getQt(env, obj))->kill();
	return;
}

