//Auto-generated by kalyptus. DO NOT EDIT.
#include <tqwindowdefs.h>
#include <tqglcolormap.h>
#include <tqcolor.h>

#include <qtjava/QtSupport.h>
#include <qtjava/TQGLColormap.h>

class TQGLColormapJBridge : public TQGLColormap
{
public:
	TQGLColormapJBridge() : TQGLColormap() {};
	TQGLColormapJBridge(const TQGLColormap& arg1) : TQGLColormap(arg1) {};
	~TQGLColormapJBridge() {QtSupport::qtKeyDeleted(this);}
};

JNIEXPORT void JNICALL
Java_org_trinitydesktop_qt_QGLColormap_detach(JNIEnv* env, jobject obj)
{
	((TQGLColormap*) QtSupport::getQt(env, obj))->detach();
	return;
}

JNIEXPORT void JNICALL
Java_org_trinitydesktop_qt_QGLColormap_dispose(JNIEnv* env, jobject obj)
{
	Java_org_trinitydesktop_qt_QGLColormap_finalize(env, obj);
	return;
}

JNIEXPORT jobject JNICALL
Java_org_trinitydesktop_qt_QGLColormap_entryColor(JNIEnv* env, jobject obj, jint idx)
{
	jobject xret = QtSupport::objectForQtKey(env, (void*)new TQColor(((TQGLColormap*) QtSupport::getQt(env, obj))->entryColor((int) idx)), "org.trinitydesktop.qt.TQColor", true);
	return xret;
}

JNIEXPORT jint JNICALL
Java_org_trinitydesktop_qt_QGLColormap_entryRgb(JNIEnv* env, jobject obj, jint idx)
{
	jint xret = (jint) ((TQGLColormap*) QtSupport::getQt(env, obj))->entryRgb((int) idx);
	return xret;
}

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

JNIEXPORT jint JNICALL
Java_org_trinitydesktop_qt_QGLColormap_findNearest(JNIEnv* env, jobject obj, jint color)
{
	jint xret = (jint) ((TQGLColormap*) QtSupport::getQt(env, obj))->findNearest((TQRgb) color);
	return xret;
}

JNIEXPORT jint JNICALL
Java_org_trinitydesktop_qt_QGLColormap_find(JNIEnv* env, jobject obj, jint color)
{
	jint xret = (jint) ((TQGLColormap*) QtSupport::getQt(env, obj))->find((TQRgb) color);
	return xret;
}

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

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

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

JNIEXPORT void JNICALL
Java_org_trinitydesktop_qt_QGLColormap_newTQGLColormap__Lorg_trinitydesktop_qt_QGLColormap_2(JNIEnv* env, jobject obj, jobject arg1)
{
	if (QtSupport::getQt(env, obj) == 0) {
		QtSupport::setQt(env, obj, new TQGLColormapJBridge((const TQGLColormap&)*(const TQGLColormap*) QtSupport::getQt(env, arg1)));
		QtSupport::setObjectForQtKey(env, obj, QtSupport::getQt(env, obj));
	}
	return;
}

JNIEXPORT void JNICALL
Java_org_trinitydesktop_qt_QGLColormap_setEntries__I_3I(JNIEnv* env, jobject obj, jint count, jintArray colors)
{
	int* _int_colors = QtSupport::toIntPtr(env, colors);
	((TQGLColormap*) QtSupport::getQt(env, obj))->setEntries((int) count,  (const TQRgb*) _int_colors);
	env->SetIntArrayRegion(colors, 0, 1, (jint *) _int_colors);
	return;
}

JNIEXPORT void JNICALL
Java_org_trinitydesktop_qt_QGLColormap_setEntries__I_3II(JNIEnv* env, jobject obj, jint count, jintArray colors, jint base)
{
	int* _int_colors = QtSupport::toIntPtr(env, colors);
	((TQGLColormap*) QtSupport::getQt(env, obj))->setEntries((int) count,  (const TQRgb*) _int_colors, (int) base);
	env->SetIntArrayRegion(colors, 0, 1, (jint *) _int_colors);
	return;
}

JNIEXPORT void JNICALL
Java_org_trinitydesktop_qt_QGLColormap_setEntry__II(JNIEnv* env, jobject obj, jint idx, jint color)
{
	((TQGLColormap*) QtSupport::getQt(env, obj))->setEntry((int) idx, (TQRgb) color);
	return;
}

JNIEXPORT void JNICALL
Java_org_trinitydesktop_qt_QGLColormap_setEntry__ILorg_trinitydesktop_qt_QColor_2(JNIEnv* env, jobject obj, jint idx, jobject color)
{
	((TQGLColormap*) QtSupport::getQt(env, obj))->setEntry((int) idx, (const TQColor&)*(const TQColor*) QtSupport::getQt(env, color));
	return;
}

JNIEXPORT jint JNICALL
Java_org_trinitydesktop_qt_QGLColormap_size(JNIEnv* env, jobject obj)
{
	jint xret = (jint) ((TQGLColormap*) QtSupport::getQt(env, obj))->size();
	return xret;
}

