/***************************************************************************
                            QPixmap.cpp -  description
                             -------------------
    begin                : Wed Nov 21 17:05:56 2001
    copyright            : (C) 2000-2001 Lost Highway Ltd. All rights reserved.
    email                : Lost_Highway@tipitina.demon.co.uk
    generated by         : duke@tipitina on Wed Nov 21 17:05:56 2001, 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 <qpixmap.h>
#include <qbitmap.h>
#include <qimage.h>
#include <qwmatrix.h>
#include <qstring.h>
#include <qcstring.h>

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

class QPixmapJBridge : public QPixmap
{
public:
	QPixmapJBridge() : QPixmap() {}
	QPixmapJBridge(const QImage& image) : QPixmap(image) {}
	QPixmapJBridge(int w, int h, int depth, Optimization arg1) : QPixmap(w, h, depth, arg1) {}
	QPixmapJBridge(const QSize& arg1, int depth, Optimization arg2) : QPixmap(arg1, depth, arg2) {}
	QPixmapJBridge(const QString& fileName, const char* format, ColorMode mode) : QPixmap(fileName, format, mode) {}
	QPixmapJBridge(const QString& fileName, const char* format, int conversion_flags) : QPixmap(fileName, format, conversion_flags) {}
	QPixmapJBridge(const char* xpm[]) : QPixmap(xpm) {}
	QPixmapJBridge(const QByteArray& data) : QPixmap(data) {}
	QPixmapJBridge(const QPixmap& arg1) : QPixmap(arg1) {}
	~QPixmapJBridge() {QtSupport::qtKeyDeleted(this);}
	QPixmapJBridge(int w, int h, const uchar* data, bool isXbitmap) : QPixmap(w, h, data, isXbitmap) {}
	int  protected_metric(int arg1) {
		return (int ) QPixmap::metric(arg1);
	}
};


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

JNIEXPORT void JNICALL
Java_org_kde_qt_QPixmap_newQPixmap__Lorg_kde_qt_QImage_2(JNIEnv *env, jobject obj, jobject image)
{
	if (QtSupport::getQt(env, obj) == 0) {
		QtSupport::setQt(env, obj, new QPixmapJBridge((QImage&) *(QImage *) QtSupport::getQt(env, image)));
		QtSupport::setObjectForQtKey(env, obj, QtSupport::getQt(env, obj));
	}
	return;
}

JNIEXPORT void JNICALL
Java_org_kde_qt_QPixmap_newQPixmap__IIII(JNIEnv *env, jobject obj, jint w, jint h, jint depth, jint arg1)
{
	if (QtSupport::getQt(env, obj) == 0) {
		QtSupport::setQt(env, obj, new QPixmapJBridge((int) w, (int) h, (int) depth, (QPixmap::Optimization) arg1));
		QtSupport::setObjectForQtKey(env, obj, QtSupport::getQt(env, obj));
	}
	return;
}

JNIEXPORT void JNICALL
Java_org_kde_qt_QPixmap_newQPixmap__II(JNIEnv *env, jobject obj, jint w, jint h)
{
	if (QtSupport::getQt(env, obj) == 0) {
		QtSupport::setQt(env, obj, new QPixmapJBridge((int) w, (int) h, -1, QPixmap::DefaultOptim));
		QtSupport::setObjectForQtKey(env, obj, QtSupport::getQt(env, obj));
	}
	return;
}

JNIEXPORT void JNICALL
Java_org_kde_qt_QPixmap_newQPixmap__Lorg_kde_qt_QSize_2II(JNIEnv *env, jobject obj, jobject arg1, jint depth, jint arg2)
{
	if (QtSupport::getQt(env, obj) == 0) {
		QtSupport::setQt(env, obj, new QPixmapJBridge((QSize&) *(QSize *) QtSupport::getQt(env, arg1), (int) depth, (QPixmap::Optimization) arg2));
		QtSupport::setObjectForQtKey(env, obj, QtSupport::getQt(env, obj));
	}
	return;
}

JNIEXPORT void JNICALL
Java_org_kde_qt_QPixmap_newQPixmap__Lorg_kde_qt_QSize_2(JNIEnv *env, jobject obj, jobject arg1)
{
	if (QtSupport::getQt(env, obj) == 0) {
		QtSupport::setQt(env, obj, new QPixmapJBridge((QSize&) *(QSize *) QtSupport::getQt(env, arg1), -1, QPixmap::DefaultOptim));
		QtSupport::setObjectForQtKey(env, obj, QtSupport::getQt(env, obj));
	}
	return;
}

JNIEXPORT void JNICALL
Java_org_kde_qt_QPixmap_newQPixmap__Ljava_lang_String_2Ljava_lang_String_2I(JNIEnv *env, jobject obj, jstring fileName, jstring format, jint mode)
{
static QCString * _qstring_format = 0;
static QString * _qstring_fileName = 0;
	if (QtSupport::getQt(env, obj) == 0) {
		QtSupport::setQt(env, obj, new QPixmapJBridge((QString&) * (QString *) QtSupport::toQString(env, fileName, &_qstring_fileName), (char*) QtSupport::toCharString(env, format, &_qstring_format), (QPixmap::ColorMode) mode));
		QtSupport::setObjectForQtKey(env, obj, QtSupport::getQt(env, obj));
	}
	return;
}

JNIEXPORT void JNICALL
Java_org_kde_qt_QPixmap_newQPixmap__Ljava_lang_String_2(JNIEnv *env, jobject obj, jstring fileName)
{
static QString * _qstring_fileName = 0;
	if (QtSupport::getQt(env, obj) == 0) {
		QtSupport::setQt(env, obj, new QPixmapJBridge((QString&) * (QString *) QtSupport::toQString(env, fileName, &_qstring_fileName), 0, QPixmap::Auto));
		QtSupport::setObjectForQtKey(env, obj, QtSupport::getQt(env, obj));
	}
	return;
}

//JNIEXPORT void JNICALL
//Java_org_kde_qt_QPixmap_newQPixmap__Ljava_lang_String_2Ljava_lang_String_2I(JNIEnv *env, jobject obj, jstring fileName, jstring format, jint conversion_flags)
//{
//static QCString * _qstring_format = 0;
//static QString * _qstring_fileName = 0;
//	if (QtSupport::getQt(env, obj) == 0) {
//		QtSupport::setQt(env, obj, new QPixmapJBridge((QString&) * (QString *) QtSupport::toQString(env, fileName, &_qstring_fileName), (char*) QtSupport::toCharString(env, format, &_qstring_format), (int) conversion_flags));
//		QtSupport::setObjectForQtKey(env, obj, QtSupport::getQt(env, obj));
//	}
//	return;
//}

JNIEXPORT void JNICALL
Java_org_kde_qt_QPixmap_newQPixmap___3Ljava_lang_String_2(JNIEnv *env, jobject obj, jobjectArray xpm)
{
static QCString * _qstring_xpm = 0;
	if (QtSupport::getQt(env, obj) == 0) {
		QtSupport::setQt(env, obj, new QPixmap((const char **) QtSupport::toStringArray(env, xpm)));
		QtSupport::setObjectForQtKey(env, obj, QtSupport::getQt(env, obj));
	}
	return;
}

JNIEXPORT void JNICALL
Java_org_kde_qt_QPixmap_newQPixmap___3B(JNIEnv *env, jobject obj, jbyteArray data)
{
static QByteArray * _qbyteArray_data = 0;
	if (QtSupport::getQt(env, obj) == 0) {
		QtSupport::setQt(env, obj, new QPixmapJBridge((QByteArray&) * (QByteArray *) QtSupport::toQByteArray(env, data, &_qbyteArray_data)));
		QtSupport::setObjectForQtKey(env, obj, QtSupport::getQt(env, obj));
	}
	return;
}

JNIEXPORT void JNICALL
Java_org_kde_qt_QPixmap_newQPixmap__Lorg_kde_qt_QPixmap_2(JNIEnv *env, jobject obj, jobject arg1)
{
	if (QtSupport::getQt(env, obj) == 0) {
		QtSupport::setQt(env, obj, new QPixmapJBridge((QPixmap&) *(QPixmap *) QtSupport::getQt(env, arg1)));
		QtSupport::setObjectForQtKey(env, obj, QtSupport::getQt(env, obj));
	}
	return;
}

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

JNIEXPORT jboolean JNICALL
Java_org_kde_qt_QPixmap_isNull(JNIEnv *env, jobject obj)
{
	return (jboolean) ((QPixmapJBridge*) QtSupport::getQt(env, obj))->isNull();
}

JNIEXPORT jint JNICALL
Java_org_kde_qt_QPixmap_width(JNIEnv *env, jobject obj)
{
	return (jint) ((QPixmapJBridge*) QtSupport::getQt(env, obj))->width();
}

JNIEXPORT jint JNICALL
Java_org_kde_qt_QPixmap_height(JNIEnv *env, jobject obj)
{
	return (jint) ((QPixmapJBridge*) QtSupport::getQt(env, obj))->height();
}

JNIEXPORT jobject JNICALL
Java_org_kde_qt_QPixmap_size(JNIEnv *env, jobject obj)
{
	QSize _s= ((QPixmapJBridge*) QtSupport::getQt(env, obj))->size();
	return (jobject) QtSupport::objectForQtKey(env, (void *)new QSize(_s.width(),_s.height()), "org.kde.qt.QSize", TRUE);
}

JNIEXPORT jobject JNICALL
Java_org_kde_qt_QPixmap_rect(JNIEnv *env, jobject obj)
{
	QRect _r= ((QPixmapJBridge*) QtSupport::getQt(env, obj))->rect();
	return (jobject) QtSupport::objectForQtKey(env, (void *)new QRect(_r.left(),_r.top(),_r.width(),_r.height()), "org.kde.qt.QRect", TRUE);
}

JNIEXPORT jint JNICALL
Java_org_kde_qt_QPixmap_depth(JNIEnv *env, jobject obj)
{
	return (jint) ((QPixmapJBridge*) QtSupport::getQt(env, obj))->depth();
}

JNIEXPORT void JNICALL
Java_org_kde_qt_QPixmap_fill__Lorg_kde_qt_QColor_2(JNIEnv *env, jobject obj, jobject fillColor)
{
	((QPixmapJBridge*) QtSupport::getQt(env, obj))->fill((const QColor&) * (QColor *) QtSupport::getQt(env, fillColor));
	return;
}

JNIEXPORT void JNICALL
Java_org_kde_qt_QPixmap_fill__(JNIEnv *env, jobject obj)
{
	((QPixmapJBridge*) QtSupport::getQt(env, obj))->fill(Qt::white);
	return;
}

JNIEXPORT void JNICALL
Java_org_kde_qt_QPixmap_fill__Lorg_kde_qt_QWidget_2II(JNIEnv *env, jobject obj, jobject arg1, jint xofs, jint yofs)
{
	((QPixmapJBridge*) QtSupport::getQt(env, obj))->fill((QWidget*) QtSupport::getQt(env, arg1), (int) xofs, (int) yofs);
	return;
}

JNIEXPORT void JNICALL
Java_org_kde_qt_QPixmap_fill__Lorg_kde_qt_QWidget_2Lorg_kde_qt_QPoint_2(JNIEnv *env, jobject obj, jobject arg1, jobject ofs)
{
	((QPixmapJBridge*) QtSupport::getQt(env, obj))->fill((QWidget*) QtSupport::getQt(env, arg1), (QPoint&) *(QPoint *) QtSupport::getQt(env, ofs));
	return;
}

JNIEXPORT void JNICALL
Java_org_kde_qt_QPixmap_resize__II(JNIEnv *env, jobject obj, jint width, jint height)
{
	((QPixmapJBridge*) QtSupport::getQt(env, obj))->resize((int) width, (int) height);
	return;
}

JNIEXPORT void JNICALL
Java_org_kde_qt_QPixmap_resize__Lorg_kde_qt_QSize_2(JNIEnv *env, jobject obj, jobject arg1)
{
	((QPixmapJBridge*) QtSupport::getQt(env, obj))->resize((QSize&) *(QSize *) QtSupport::getQt(env, arg1));
	return;
}

JNIEXPORT jobject JNICALL
Java_org_kde_qt_QPixmap_mask(JNIEnv *env, jobject obj)
{
	return (jobject) QtSupport::objectForQtKey(env, (void *)((QPixmapJBridge*) QtSupport::getQt(env, obj))->mask(), "org.kde.qt.QBitmap");
}

JNIEXPORT void JNICALL
Java_org_kde_qt_QPixmap_setMask(JNIEnv *env, jobject obj, jobject arg1)
{
	((QPixmapJBridge*) QtSupport::getQt(env, obj))->setMask((QBitmap&) *(QBitmap *) QtSupport::getQt(env, arg1));
	return;
}

JNIEXPORT jboolean JNICALL
Java_org_kde_qt_QPixmap_selfMask(JNIEnv *env, jobject obj)
{
	return (jboolean) ((QPixmapJBridge*) QtSupport::getQt(env, obj))->selfMask();
}

JNIEXPORT jobject JNICALL
Java_org_kde_qt_QPixmap_createHeuristicMask__Z(JNIEnv *env, jobject obj, jboolean clipTight)
{
	return (jobject) QtSupport::objectForQtKey(env, (void *)new QBitmap (((QPixmapJBridge*) QtSupport::getQt(env, obj))->createHeuristicMask((bool) clipTight)), "org.kde.qt.QBitmap", TRUE);
}

JNIEXPORT jobject JNICALL
Java_org_kde_qt_QPixmap_createHeuristicMask__(JNIEnv *env, jobject obj)
{
	return (jobject) QtSupport::objectForQtKey(env, (void *)new QBitmap(((QPixmapJBridge*) QtSupport::getQt(env, obj))->createHeuristicMask(TRUE)), "org.kde.qt.QBitmap", TRUE);
}

JNIEXPORT jobject JNICALL
Java_org_kde_qt_QPixmap_xForm(JNIEnv *env, jobject obj, jobject arg1)
{
	return (jobject) QtSupport::objectForQtKey(env, (void *)new QPixmap (((QPixmapJBridge*) QtSupport::getQt(env, obj))->xForm((QWMatrix&) *(QWMatrix *) QtSupport::getQt(env, arg1))), "org.kde.qt.QPixmap", TRUE);
}

JNIEXPORT jobject JNICALL
Java_org_kde_qt_QPixmap_convertToImage(JNIEnv *env, jobject obj)
{
	return (jobject) QtSupport::objectForQtKey(env, (void *)new QImage (((QPixmapJBridge*) QtSupport::getQt(env, obj))->convertToImage()), "org.kde.qt.QImage", TRUE);
}

JNIEXPORT jboolean JNICALL
Java_org_kde_qt_QPixmap_convertFromImageWithMode(JNIEnv *env, jobject obj, jobject arg1, jint mode)
{
	return (jboolean) ((QPixmapJBridge*) QtSupport::getQt(env, obj))->convertFromImage((QImage&) *(QImage *) QtSupport::getQt(env, arg1), (QPixmap::ColorMode) mode);
}

JNIEXPORT jboolean JNICALL
Java_org_kde_qt_QPixmap_convertFromImage__Lorg_kde_qt_QImage_2(JNIEnv *env, jobject obj, jobject arg1)
{
	return (jboolean) ((QPixmapJBridge*) QtSupport::getQt(env, obj))->convertFromImage((QImage&) *(QImage *) QtSupport::getQt(env, arg1), QPixmap::Auto);
}

JNIEXPORT jboolean JNICALL
Java_org_kde_qt_QPixmap_convertFromImage__Lorg_kde_qt_QImage_2I(JNIEnv *env, jobject obj, jobject arg1, jint conversion_flags)
{
	return (jboolean) ((QPixmapJBridge*) QtSupport::getQt(env, obj))->convertFromImage((QImage&) *(QImage *) QtSupport::getQt(env, arg1), (int) conversion_flags);
}

JNIEXPORT jboolean JNICALL
Java_org_kde_qt_QPixmap_loadWithMode(JNIEnv *env, jobject obj, jstring fileName, jstring format, jint mode)
{
static QCString * _qstring_format = 0;
static QString * _qstring_fileName = 0;
	return (jboolean) ((QPixmapJBridge*) QtSupport::getQt(env, obj))->load((QString&) * (QString *) QtSupport::toQString(env, fileName, &_qstring_fileName), (char*) QtSupport::toCharString(env, format, &_qstring_format), (QPixmap::ColorMode) mode);
}

JNIEXPORT jboolean JNICALL
Java_org_kde_qt_QPixmap_load__Ljava_lang_String_2(JNIEnv *env, jobject obj, jstring fileName)
{
static QString * _qstring_fileName = 0;
	return (jboolean) ((QPixmapJBridge*) QtSupport::getQt(env, obj))->load((QString&) * (QString *) QtSupport::toQString(env, fileName, &_qstring_fileName), 0, QPixmap::Auto);
}

JNIEXPORT jboolean JNICALL
Java_org_kde_qt_QPixmap_load__Ljava_lang_String_2Ljava_lang_String_2I(JNIEnv *env, jobject obj, jstring fileName, jstring format, jint conversion_flags)
{
static QCString * _qstring_format = 0;
static QString * _qstring_fileName = 0;
	return (jboolean) ((QPixmapJBridge*) QtSupport::getQt(env, obj))->load((QString&) * (QString *) QtSupport::toQString(env, fileName, &_qstring_fileName), (char*) QtSupport::toCharString(env, format, &_qstring_format), (int) conversion_flags);
}

JNIEXPORT jboolean JNICALL
Java_org_kde_qt_QPixmap_loadFromDataWithMode(JNIEnv *env, jobject obj, jstring buf, jint len, jstring format, jint mode)
{
static QCString * _qstring_format = 0;
static QCString * _qstring_buf = 0;
	return (jboolean) ((QPixmapJBridge*) QtSupport::getQt(env, obj))->loadFromData((uchar*) QtSupport::toCharString(env, buf, &_qstring_buf), (uint) len, (char*) QtSupport::toCharString(env, format, &_qstring_format), (QPixmap::ColorMode) mode);
}

JNIEXPORT jboolean JNICALL
Java_org_kde_qt_QPixmap_loadFromData__Ljava_lang_String_2I(JNIEnv *env, jobject obj, jstring buf, jint len)
{
static QCString * _qstring_buf = 0;
	return (jboolean) ((QPixmapJBridge*) QtSupport::getQt(env, obj))->loadFromData((uchar*) QtSupport::toCharString(env, buf, &_qstring_buf), (uint) len, 0, QPixmap::Auto);
}

JNIEXPORT jboolean JNICALL
Java_org_kde_qt_QPixmap_loadFromData__Ljava_lang_String_2ILjava_lang_String_2I(JNIEnv *env, jobject obj, jstring buf, jint len, jstring format, jint conversion_flags)
{
static QCString * _qstring_format = 0;
static QCString * _qstring_buf = 0;
	return (jboolean) ((QPixmapJBridge*) QtSupport::getQt(env, obj))->loadFromData((uchar*) QtSupport::toCharString(env, buf, &_qstring_buf), (uint) len, (char*) QtSupport::toCharString(env, format, &_qstring_format), (int) conversion_flags);
}

JNIEXPORT jboolean JNICALL
Java_org_kde_qt_QPixmap_loadFromData___3CLjava_lang_String_2I(JNIEnv *env, jobject obj, jcharArray data, jstring format, jint conversion_flags)
{
static QCString * _qstring_format = 0;
static QByteArray * _qbyteArray_data = 0;
	return (jboolean) ((QPixmapJBridge*) QtSupport::getQt(env, obj))->loadFromData((const uchar *) QtSupport::toUcharArray(env, data, &_qbyteArray_data), env->GetArrayLength(data), (char*) QtSupport::toCharString(env, format, &_qstring_format), (int) conversion_flags);
}

JNIEXPORT jboolean JNICALL
Java_org_kde_qt_QPixmap_loadFromData___3C(JNIEnv *env, jobject obj, jcharArray data)
{
static QByteArray * _qbyteArray_data = 0;
	return (jboolean) ((QPixmapJBridge*) QtSupport::getQt(env, obj))->loadFromData((uchar *) QtSupport::toUcharArray(env, data, &_qbyteArray_data), env->GetArrayLength(data), 0, 0);
}

JNIEXPORT jboolean JNICALL
Java_org_kde_qt_QPixmap_save__Ljava_lang_String_2Ljava_lang_String_2I(JNIEnv *env, jobject obj, jstring fileName, jstring format, jint quality)
{
static QCString * _qstring_format = 0;
static QString * _qstring_fileName = 0;
	return (jboolean) ((QPixmapJBridge*) QtSupport::getQt(env, obj))->save((QString&) * (QString *) QtSupport::toQString(env, fileName, &_qstring_fileName), (char*) QtSupport::toCharString(env, format, &_qstring_format), (int) quality);
}

JNIEXPORT jboolean JNICALL
Java_org_kde_qt_QPixmap_save__Ljava_lang_String_2Ljava_lang_String_2(JNIEnv *env, jobject obj, jstring fileName, jstring format)
{
static QCString * _qstring_format = 0;
static QString * _qstring_fileName = 0;
	return (jboolean) ((QPixmapJBridge*) QtSupport::getQt(env, obj))->save((QString&) * (QString *) QtSupport::toQString(env, fileName, &_qstring_fileName), (char*) QtSupport::toCharString(env, format, &_qstring_format), -1);
}

//JNIEXPORT jint JNICALL
//Java_org_kde_qt_QPixmap_hbm(JNIEnv *env, jobject obj)
//{
//	return (jint) ((QPixmapJBridge*) QtSupport::getQt(env, obj))->hbm();
//}

JNIEXPORT jint JNICALL
Java_org_kde_qt_QPixmap_serialNumber(JNIEnv *env, jobject obj)
{
	return (jint) ((QPixmapJBridge*) QtSupport::getQt(env, obj))->serialNumber();
}

JNIEXPORT jint JNICALL
Java_org_kde_qt_QPixmap_optimization(JNIEnv *env, jobject obj)
{
	return (jint) ((QPixmapJBridge*) QtSupport::getQt(env, obj))->optimization();
}

JNIEXPORT void JNICALL
Java_org_kde_qt_QPixmap_setOptimization(JNIEnv *env, jobject obj, jint arg1)
{
	((QPixmapJBridge*) QtSupport::getQt(env, obj))->setOptimization((QPixmap::Optimization) arg1);
	return;
}

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

JNIEXPORT jboolean JNICALL
Java_org_kde_qt_QPixmap_isQBitmap(JNIEnv *env, jobject obj)
{
	return (jboolean) ((QPixmapJBridge*) QtSupport::getQt(env, obj))->isQBitmap();
}

//JNIEXPORT jboolean JNICALL
//Java_org_kde_qt_QPixmap_isMultiCellPixmap(JNIEnv *env, jobject obj)
//{
//	return (jboolean) ((QPixmapJBridge*) QtSupport::getQt(env, obj))->isMultiCellPixmap();
//}

//JNIEXPORT jint JNICALL
//Java_org_kde_qt_QPixmap_multiCellHandle(JNIEnv *env, jobject obj)
//{
//	return (jint) ((QPixmapJBridge*) QtSupport::getQt(env, obj))->multiCellHandle();
//}

//JNIEXPORT jint JNICALL
//Java_org_kde_qt_QPixmap_multiCellBitmap(JNIEnv *env, jobject obj)
//{
//	return (jint) ((QPixmapJBridge*) QtSupport::getQt(env, obj))->multiCellBitmap();
//}

//JNIEXPORT jint JNICALL
//Java_org_kde_qt_QPixmap_multiCellOffset(JNIEnv *env, jobject obj)
//{
//	return (jint) ((QPixmapJBridge*) QtSupport::getQt(env, obj))->multiCellOffset();
//}

//JNIEXPORT jint JNICALL
//Java_org_kde_qt_QPixmap_allocCell(JNIEnv *env, jobject obj)
//{
//	return (jint) ((QPixmapJBridge*) QtSupport::getQt(env, obj))->allocCell();
//}

//JNIEXPORT void JNICALL
//Java_org_kde_qt_QPixmap_freeCell__Z(JNIEnv *env, jobject obj, jboolean arg1)
//{
//	((QPixmapJBridge*) QtSupport::getQt(env, obj))->freeCell((bool) arg1);
//	return;
//}

//JNIEXPORT void JNICALL
//Java_org_kde_qt_QPixmap_freeCell__(JNIEnv *env, jobject obj)
//{
//	((QPixmapJBridge*) QtSupport::getQt(env, obj))->freeCell(FALSE);
//	return;
//}

//JNIEXPORT jobject JNICALL
//Java_org_kde_qt_QPixmap_graphicsContext__Z(JNIEnv *env, jobject obj, jboolean clip_children)
//{
//	return (jobject) QtSupport::objectForQtKey(env, (void *)((QPixmapJBridge*) QtSupport::getQt(env, obj))->graphicsContext((bool) clip_children), "org.kde.qt.QGfx");
//}

//JNIEXPORT jobject JNICALL
//Java_org_kde_qt_QPixmap_graphicsContext__(JNIEnv *env, jobject obj)
//{
//	return (jobject) QtSupport::objectForQtKey(env, (void *)((QPixmapJBridge*) QtSupport::getQt(env, obj))->graphicsContext(TRUE), "org.kde.qt.QGfx");
//}

//JNIEXPORT jstring JNICALL
//Java_org_kde_qt_QPixmap_scanLine(JNIEnv *env, jobject obj, jint arg1)
//{
//	 unsigned char *  _qcstring;
//	_qcstring = (const char *)((QPixmapJBridge*) QtSupport::getQt(env, obj))->scanLine((int) arg1);
//	return QtSupport::fromCharString(env, (char *) _qcstring);
//}

//JNIEXPORT jint JNICALL
//Java_org_kde_qt_QPixmap_bytesPerLine(JNIEnv *env, jobject obj)
//{
//	return (jint) ((QPixmapJBridge*) QtSupport::getQt(env, obj))->bytesPerLine();
//}

//JNIEXPORT jintArray JNICALL
//Java_org_kde_qt_QPixmap_clut(JNIEnv *env, jobject obj)
//{
//	return (jintArray) ((QPixmapJBridge*) QtSupport::getQt(env, obj))->clut();
//}

//JNIEXPORT jint JNICALL
//Java_org_kde_qt_QPixmap_numCols(JNIEnv *env, jobject obj)
//{
//	return (jint) ((QPixmapJBridge*) QtSupport::getQt(env, obj))->numCols();
//}

//JNIEXPORT void JNICALL
//Java_org_kde_qt_QPixmap_x11SetScreen(JNIEnv *env, jobject obj, jint screen)
//{
//	((QPixmapJBridge*) QtSupport::getQt(env, obj))->x11SetScreen((int) screen);
//	return;
//}

JNIEXPORT jint JNICALL
Java_org_kde_qt_QPixmap_defaultDepth(JNIEnv *env, jclass obj)
{
	return (jint) QPixmapJBridge::defaultDepth();
}

JNIEXPORT jobject JNICALL
Java_org_kde_qt_QPixmap_grabWindow__IIIII(JNIEnv *env, jclass obj, jint arg1, jint x, jint y, jint w, jint h)
{
	return (jobject) QtSupport::objectForQtKey(env, (void *)new  QPixmap (QPixmapJBridge::grabWindow((WId) arg1, (int) x, (int) y, (int) w, (int) h)), "org.kde.qt.QPixmap", TRUE);
}

JNIEXPORT jobject JNICALL
Java_org_kde_qt_QPixmap_grabWindow__I(JNIEnv *env, jclass obj, jint arg1)
{
	return (jobject) QtSupport::objectForQtKey(env, (void *)new QPixmap(QPixmapJBridge::grabWindow((WId) arg1, 0, 0, -1, -1)), "org.kde.qt.QPixmap", TRUE);
}

JNIEXPORT jobject JNICALL
Java_org_kde_qt_QPixmap_grabWidget__Lorg_kde_qt_QWidget_2IIII(JNIEnv *env, jclass obj, jobject widget, jint x, jint y, jint w, jint h)
{
	return (jobject) QtSupport::objectForQtKey(env, (void *)new  QPixmap (QPixmapJBridge::grabWidget((QWidget*) QtSupport::getQt(env, widget), (int) x, (int) y, (int) w, (int) h)), "org.kde.qt.QPixmap", TRUE);
}

JNIEXPORT jobject JNICALL
Java_org_kde_qt_QPixmap_grabWidget__Lorg_kde_qt_QWidget_2(JNIEnv *env, jclass obj, jobject widget)
{
	return (jobject) QtSupport::objectForQtKey(env, (void *)new QPixmap(QPixmapJBridge::grabWidget((QWidget*) QtSupport::getQt(env, widget), 0, 0, -1, -1)), "org.kde.qt.QPixmap", TRUE);
}

JNIEXPORT jobject JNICALL
Java_org_kde_qt_QPixmap_trueMatrix(JNIEnv *env, jclass obj, jobject arg1, jint w, jint h)
{
	QWMatrix _m= QPixmapJBridge::trueMatrix((QWMatrix&) *(QWMatrix *) QtSupport::getQt(env, arg1), (int) w, (int) h);
	return (jobject) QtSupport::objectForQtKey(env, (void *)new QWMatrix(_m.m11(),_m.m12(),_m.m21(),_m.m22(),_m.dx(),_m.dy()), "org.kde.qt.QWMatrix", TRUE);
}

JNIEXPORT jstring JNICALL
Java_org_kde_qt_QPixmap_imageFormat(JNIEnv *env, jclass obj, jstring fileName)
{
	 const char*  _qcstring;
static QString * _qstring_fileName = 0;
	_qcstring = (const char *)QPixmapJBridge::imageFormat((QString&) * (QString *) QtSupport::toQString(env, fileName, &_qstring_fileName));
	return QtSupport::fromCharString(env, (char *) _qcstring);
}

JNIEXPORT jint JNICALL
Java_org_kde_qt_QPixmap_defaultOptimization(JNIEnv *env, jclass obj)
{
	return (jint) QPixmapJBridge::defaultOptimization();
}

JNIEXPORT void JNICALL
Java_org_kde_qt_QPixmap_setDefaultOptimization(JNIEnv *env, jclass obj, jint arg1)
{
	QPixmapJBridge::setDefaultOptimization((QPixmap::Optimization) arg1);
	return;
}

//JNIEXPORT jint JNICALL
//Java_org_kde_qt_QPixmap_x11SetDefaultScreen(JNIEnv *env, jclass obj, jint screen)
//{
//	return (jint) QPixmapJBridge::x11SetDefaultScreen((int) screen);
//}

JNIEXPORT void JNICALL
Java_org_kde_qt_QPixmap_newQPixmap__IILjava_lang_String_2Z(JNIEnv *env, jobject obj, jint w, jint h, jstring data, jboolean isXbitmap)
{
static QCString * _qstring_data = 0;
	if (QtSupport::getQt(env, obj) == 0) {
		QtSupport::setQt(env, obj, new QPixmapJBridge((int) w, (int) h, (uchar*) QtSupport::toCharString(env, data, &_qstring_data), (bool) isXbitmap));
		QtSupport::setObjectForQtKey(env, obj, QtSupport::getQt(env, obj));
	}
	return;
}

JNIEXPORT jint JNICALL
Java_org_kde_qt_QPixmap_metric(JNIEnv *env, jobject obj, jint arg1)
{
	return (jint) ((QPixmapJBridge*) QtSupport::getQt(env, obj))->protected_metric((int) arg1);
}


JNIEXPORT jlong JNICALL
Java_org_kde_qt_QPixmap_paintDevice(JNIEnv * env, jobject obj)
{
	return (jlong) (QPaintDevice *) (QPixmap *) QtSupport::getQt(env, obj);
}

JNIEXPORT jint JNICALL
Java_org_kde_qt_QPixmap_devType(JNIEnv *env, jobject obj)
{
	return (jint) ((QPixmapJBridge*) QtSupport::getQt(env, obj))->devType();
}

JNIEXPORT jboolean JNICALL
Java_org_kde_qt_QPixmap_isExtDev(JNIEnv *env, jobject obj)
{
	return (jboolean) ((QPixmapJBridge*) QtSupport::getQt(env, obj))->isExtDev();
}

JNIEXPORT jboolean JNICALL
Java_org_kde_qt_QPixmap_paintingActive(JNIEnv *env, jobject obj)
{
	return (jboolean) ((QPixmapJBridge*) QtSupport::getQt(env, obj))->paintingActive();
}

JNIEXPORT jint JNICALL
Java_org_kde_qt_QPixmap_handle(JNIEnv *env, jobject obj)
{
	return (jint) ((QPixmapJBridge*) QtSupport::getQt(env, obj))->handle();
}

//JNIEXPORT jint JNICALL
//Java_org_kde_qt_QPixmap_x11Screen(JNIEnv *env, jobject obj)
//{
//	return (jint) ((QPixmapJBridge*) QtSupport::getQt(env, obj))->x11Screen();
//}

//JNIEXPORT jint JNICALL
//Java_org_kde_qt_QPixmap_x11Depth(JNIEnv *env, jobject obj)
//{
//	return (jint) ((QPixmapJBridge*) QtSupport::getQt(env, obj))->x11Depth();
//}

//JNIEXPORT jint JNICALL
//Java_org_kde_qt_QPixmap_x11Cells(JNIEnv *env, jobject obj)
//{
//	return (jint) ((QPixmapJBridge*) QtSupport::getQt(env, obj))->x11Cells();
//}

//JNIEXPORT jint JNICALL
//Java_org_kde_qt_QPixmap_x11Colormap(JNIEnv *env, jobject obj)
//{
//	return (jint) ((QPixmapJBridge*) QtSupport::getQt(env, obj))->x11Colormap();
//}

//JNIEXPORT jboolean JNICALL
//Java_org_kde_qt_QPixmap_x11DefaultColormap(JNIEnv *env, jobject obj)
//{
//	return (jboolean) ((QPixmapJBridge*) QtSupport::getQt(env, obj))->x11DefaultColormap();
//}

//JNIEXPORT jint JNICALL
//Java_org_kde_qt_QPixmap_x11Visual(JNIEnv *env, jobject obj)
//{
//	return (jint) ((QPixmapJBridge*) QtSupport::getQt(env, obj))->x11Visual();
//}

//JNIEXPORT jboolean JNICALL
//Java_org_kde_qt_QPixmap_x11DefaultVisual(JNIEnv *env, jobject obj)
//{
//	return (jboolean) ((QPixmapJBridge*) QtSupport::getQt(env, obj))->x11DefaultVisual();
//}
