//Auto-generated by kalyptus. DO NOT EDIT.
#include <kcolordialog.h>
#include <qcolor.h>

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

class KColorJBridge : public KColor
{
public:
	KColorJBridge() : KColor() {};
	KColorJBridge(const KColor& arg1) : KColor(arg1) {};
	KColorJBridge(const QColor& arg1) : KColor(arg1) {};
	~KColorJBridge() {QtSupport::qtKeyDeleted(this);}
};

JNIEXPORT void JNICALL
Java_org_kde_koala_KColor_dispose(JNIEnv* env, jobject obj)
{
	Java_org_kde_koala_KColor_finalize(env, obj);
	return;
}

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

JNIEXPORT void JNICALL
Java_org_kde_koala_KColor_hsv(JNIEnv* env, jobject obj, jintArray _h, jintArray _s, jintArray _v)
{
	int* _int__h = QtSupport::toIntPtr(env, _h);
	int* _int__s = QtSupport::toIntPtr(env, _s);
	int* _int__v = QtSupport::toIntPtr(env, _v);
	((KColor*) QtSupport::getQt(env, obj))->hsv( (int*) _int__h,  (int*) _int__s,  (int*) _int__v);
	env->SetIntArrayRegion(_h, 0, 1, (jint *) _int__h);
	env->SetIntArrayRegion(_s, 0, 1, (jint *) _int__s);
	env->SetIntArrayRegion(_v, 0, 1, (jint *) _int__v);
	return;
}

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

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

JNIEXPORT void JNICALL
Java_org_kde_koala_KColor_newKColor__Lorg_kde_koala_KColor_2(JNIEnv* env, jobject obj, jobject col)
{
	if (QtSupport::getQt(env, obj) == 0) {
		QtSupport::setQt(env, obj, new KColorJBridge((const KColor&)*(const KColor*) QtSupport::getQt(env, col)));
		QtSupport::setObjectForQtKey(env, obj, QtSupport::getQt(env, obj));
	}
	return;
}

JNIEXPORT void JNICALL
Java_org_kde_koala_KColor_newKColor__Lorg_kde_qt_QColor_2(JNIEnv* env, jobject obj, jobject col)
{
	if (QtSupport::getQt(env, obj) == 0) {
		QtSupport::setQt(env, obj, new KColorJBridge((const QColor&)*(const QColor*) QtSupport::getQt(env, col)));
		QtSupport::setObjectForQtKey(env, obj, QtSupport::getQt(env, obj));
	}
	return;
}

JNIEXPORT jboolean JNICALL
Java_org_kde_koala_KColor_op_1equals(JNIEnv* env, jobject obj, jobject col)
{
	jboolean xret = (jboolean) ((KColor*) QtSupport::getQt(env, obj))->operator==((const KColor&)*(const KColor*) QtSupport::getQt(env, col));
	return xret;
}

JNIEXPORT void JNICALL
Java_org_kde_koala_KColor_rgb(JNIEnv* env, jobject obj, jintArray _r, jintArray _g, jintArray _b)
{
	int* _int__r = QtSupport::toIntPtr(env, _r);
	int* _int__g = QtSupport::toIntPtr(env, _g);
	int* _int__b = QtSupport::toIntPtr(env, _b);
	((KColor*) QtSupport::getQt(env, obj))->rgb( (int*) _int__r,  (int*) _int__g,  (int*) _int__b);
	env->SetIntArrayRegion(_r, 0, 1, (jint *) _int__r);
	env->SetIntArrayRegion(_g, 0, 1, (jint *) _int__g);
	env->SetIntArrayRegion(_b, 0, 1, (jint *) _int__b);
	return;
}

JNIEXPORT void JNICALL
Java_org_kde_koala_KColor_setHsv(JNIEnv* env, jobject obj, jint _h, jint _s, jint _v)
{
	((KColor*) QtSupport::getQt(env, obj))->setHsv((int) _h, (int) _s, (int) _v);
	return;
}

JNIEXPORT void JNICALL
Java_org_kde_koala_KColor_setRgb(JNIEnv* env, jobject obj, jint _r, jint _g, jint _b)
{
	((KColor*) QtSupport::getQt(env, obj))->setRgb((int) _r, (int) _g, (int) _b);
	return;
}

