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

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

class QGLColormapJBridge : public QGLColormap
{
public:
	QGLColormapJBridge() : QGLColormap() {};
	QGLColormapJBridge(const QGLColormap& arg1) : QGLColormap(arg1) {};
	~QGLColormapJBridge() {QtSupport::qtKeyDeleted(this);}
};

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

JNIEXPORT void JNICALL
Java_org_kde_qt_QGLColormap_dispose(JNIEnv* env, jobject obj)
{
	Java_org_kde_qt_QGLColormap_finalize(env, obj);
	return;
}

JNIEXPORT jobject JNICALL
Java_org_kde_qt_QGLColormap_entryColor(JNIEnv* env, jobject obj, jint idx)
{
	jobject xret = QtSupport::objectForQtKey(env, (void*)new QColor(((QGLColormap*) QtSupport::getQt(env, obj))->entryColor((int) idx)), "org.kde.qt.QColor", TRUE);
	return xret;
}

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

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

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

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

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

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

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

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

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

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

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

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

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

