//Auto-generated by kalyptus. DO NOT EDIT.
#include <qrect.h>
#include <qpixmap.h>
#include <qimage.h>
#include <kpixmapio.h>
#include <qpoint.h>

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

class KPixmapIOJBridge : public KPixmapIO
{
public:
	KPixmapIOJBridge() : KPixmapIO() {};
	~KPixmapIOJBridge() {QtSupport::qtKeyDeleted(this);}
};

JNIEXPORT jobject JNICALL
Java_org_kde_koala_KPixmapIO_convertToImage(JNIEnv* env, jobject obj, jobject pixmap)
{
	jobject xret = QtSupport::objectForQtKey(env, (void*)new QImage(((KPixmapIO*) QtSupport::getQt(env, obj))->convertToImage((const QPixmap&)*(const QPixmap*) QtSupport::getQt(env, pixmap))), "org.kde.qt.QImage", TRUE);
	return xret;
}

JNIEXPORT jobject JNICALL
Java_org_kde_koala_KPixmapIO_convertToPixmap(JNIEnv* env, jobject obj, jobject image)
{
	jobject xret = QtSupport::objectForQtKey(env, (void*)new QPixmap(((KPixmapIO*) QtSupport::getQt(env, obj))->convertToPixmap((const QImage&)*(const QImage*) QtSupport::getQt(env, image))), "org.kde.qt.QPixmap", TRUE);
	return xret;
}

JNIEXPORT void JNICALL
Java_org_kde_koala_KPixmapIO_dispose(JNIEnv* env, jobject obj)
{
	Java_org_kde_koala_KPixmapIO_finalize(env, obj);
	return;
}

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

JNIEXPORT jobject JNICALL
Java_org_kde_koala_KPixmapIO_getImage__Lorg_kde_qt_QPixmap_2IIII(JNIEnv* env, jobject obj, jobject src, jint sx, jint sy, jint sw, jint sh)
{
	jobject xret = QtSupport::objectForQtKey(env, (void*)new QImage(((KPixmapIO*) QtSupport::getQt(env, obj))->getImage((const QPixmap*) QtSupport::getQt(env, src), (int) sx, (int) sy, (int) sw, (int) sh)), "org.kde.qt.QImage", TRUE);
	return xret;
}

JNIEXPORT jobject JNICALL
Java_org_kde_koala_KPixmapIO_getImage__Lorg_kde_qt_QPixmap_2Lorg_kde_qt_QRect_2(JNIEnv* env, jobject obj, jobject src, jobject rect)
{
	jobject xret = QtSupport::objectForQtKey(env, (void*)new QImage(((KPixmapIO*) QtSupport::getQt(env, obj))->getImage((const QPixmap*) QtSupport::getQt(env, src), (const QRect&)*(const QRect*) QtSupport::getQt(env, rect))), "org.kde.qt.QImage", TRUE);
	return xret;
}

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

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

JNIEXPORT void JNICALL
Java_org_kde_koala_KPixmapIO_preAllocShm(JNIEnv* env, jobject obj, jint size)
{
	((KPixmapIO*) QtSupport::getQt(env, obj))->preAllocShm((int) size);
	return;
}

JNIEXPORT void JNICALL
Java_org_kde_koala_KPixmapIO_putImage__Lorg_kde_qt_QPixmap_2IILorg_kde_qt_QImage_2(JNIEnv* env, jobject obj, jobject dst, jint dx, jint dy, jobject src)
{
	((KPixmapIO*) QtSupport::getQt(env, obj))->putImage((QPixmap*) QtSupport::getQt(env, dst), (int) dx, (int) dy, (const QImage*) QtSupport::getQt(env, src));
	return;
}

JNIEXPORT void JNICALL
Java_org_kde_koala_KPixmapIO_putImage__Lorg_kde_qt_QPixmap_2Lorg_kde_qt_QPoint_2Lorg_kde_qt_QImage_2(JNIEnv* env, jobject obj, jobject dst, jobject offset, jobject src)
{
	((KPixmapIO*) QtSupport::getQt(env, obj))->putImage((QPixmap*) QtSupport::getQt(env, dst), (const QPoint&)*(const QPoint*) QtSupport::getQt(env, offset), (const QImage*) QtSupport::getQt(env, src));
	return;
}

JNIEXPORT void JNICALL
Java_org_kde_koala_KPixmapIO_setShmPolicy(JNIEnv* env, jobject obj, jint policy)
{
	((KPixmapIO*) QtSupport::getQt(env, obj))->setShmPolicy((int) policy);
	return;
}

