/***************************************************************************
                            QPaintDevice.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 <qpaintdevice.h>
#include <qstring.h>
#include <qcstring.h>

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

class QPaintDeviceJBridge : public QPaintDevice
{
public:
	~QPaintDeviceJBridge() {QtSupport::qtKeyDeleted(this);}
	QPaintDeviceJBridge(uint devflags) : QPaintDevice(devflags) {}
//	void protected_copyX11Data(const QPaintDevice* arg1) {
//		QPaintDevice::copyX11Data(arg1);
//		return;
//	}
//	void protected_cloneX11Data(const QPaintDevice* arg1) {
//		QPaintDevice::cloneX11Data(arg1);
//		return;
//	}
//	void protected_setX11Data(const QPaintDeviceX11Data* arg1) {
//		QPaintDevice::setX11Data(arg1);
//		return;
//	}
//	QPaintDeviceX11Data*  protected_getX11Data(bool def) {
//		return (QPaintDeviceX11Data* ) QPaintDevice::getX11Data(def);
//	}
//	 bool  protected_cmd(int arg1, QPainter* arg2, QPDevCmdParam* arg3) {
//		return ( bool ) QPaintDevice::cmd(arg1, arg2, arg3);
//	}
	 int  protected_metric(int arg1) {
		return ( int ) QPaintDevice::metric(arg1);
	}
	 int  protected_fontMet(QFont* arg1, int arg2, const char* arg3, int arg4) {
		return ( int ) QPaintDevice::fontMet(arg1, arg2, arg3, arg4);
	}
	 int  protected_fontInf(QFont* arg1, int arg2) {
		return ( int ) QPaintDevice::fontInf(arg1, arg2);
	}
//	 CGContextRef  protected_macCGContext() {
//		return ( CGContextRef ) QPaintDevice::macCGContext();
//	}
//	void protected_unclippedScaledBitBlt(QPaintDevice* arg1, int arg2, int arg3, int arg4, int arg5, const QPaintDevice* arg6, int arg7, int arg8, int arg9, int arg10, Qt::RasterOp arg11, bool arg12) {
//		QPaintDevice::unclippedScaledBitBlt(arg1, arg2, arg3, arg4, arg5, arg6, arg7, arg8, arg9, arg10, arg11, arg12);
//		return;
//	}
//	void protected_bitBlt(QPaintDevice* arg1, int arg2, int arg3, const QPaintDevice* arg4, int arg5, int arg6, int arg7, int arg8, Qt::RasterOp arg9, bool arg10) {
//		QPaintDevice::bitBlt(arg1, arg2, arg3, arg4, arg5, arg6, arg7, arg8, arg9, arg10);
//		return;
//	}
//	void protected_qt_init_internal(int* arg1, char* * arg2, Display* arg3, Qt::HANDLE arg4, Qt::HANDLE arg5) {
//		QPaintDevice::qt_init_internal(arg1, arg2, arg3, arg4, arg5);
//		return;
//	}
};


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

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

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

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

JNIEXPORT void JNICALL
Java_org_kde_qt_QPaintDevice_setResolution(JNIEnv *env, jobject obj, jint arg1)
{
	((QPaintDeviceJBridge*) QtSupport::getQt(env, obj))->setResolution((int) arg1);
	return;
}

JNIEXPORT jint JNICALL
Java_org_kde_qt_QPaintDevice_resolution(JNIEnv *env, jobject obj)
{
	return (jint) ((QPaintDeviceJBridge*) QtSupport::getQt(env, obj))->resolution();
}

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

//JNIEXPORT  JNICALL
//Java_org_kde_qt_QPaintDevice_handle__(JNIEnv *env, jobject obj)
//{
//	return () ((QPaintDeviceJBridge*) QtSupport::getQt(env, obj))->handle();
//}

//JNIEXPORT  JNICALL
//Java_org_kde_qt_QPaintDevice_x11RenderHandle(JNIEnv *env, jobject obj)
//{
//	return () ((QPaintDeviceJBridge*) QtSupport::getQt(env, obj))->x11RenderHandle();
//}

//JNIEXPORT  JNICALL
//Java_org_kde_qt_QPaintDevice_handle__(JNIEnv *env, jobject obj)
//{
//	return () ((QPaintDeviceJBridge*) QtSupport::getQt(env, obj))->handle();
//}

//JNIEXPORT  JNICALL
//Java_org_kde_qt_QPaintDevice_handle__(JNIEnv *env, jobject obj)
//{
//	return () ((QPaintDeviceJBridge*) QtSupport::getQt(env, obj))->handle();
//}

//JNIEXPORT jDisplay* JNICALL
//Java_org_kde_qt_QPaintDevice_x11Display(JNIEnv *env, jobject obj)
//{
//	return (jDisplay*) ((QPaintDeviceJBridge*) QtSupport::getQt(env, obj))->x11Display();
//}

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

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

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

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

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

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

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

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

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

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

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

//JNIEXPORT jDisplay* JNICALL
//Java_org_kde_qt_QPaintDevice_x11AppDisplay(JNIEnv *env, jclass obj)
//{
//	return (jDisplay*) QPaintDeviceJBridge::x11AppDisplay();
//}

//JNIEXPORT jint JNICALL
//Java_org_kde_qt_QPaintDevice_x11AppScreen(JNIEnv *env, jclass obj)
//{
//	return (jint) QPaintDeviceJBridge::x11AppScreen();
//}

//JNIEXPORT jint JNICALL
//Java_org_kde_qt_QPaintDevice_x11AppDepth(JNIEnv *env, jclass obj)
//{
//	return (jint) QPaintDeviceJBridge::x11AppDepth();
//}

//JNIEXPORT jint JNICALL
//Java_org_kde_qt_QPaintDevice_x11AppCells(JNIEnv *env, jclass obj)
//{
//	return (jint) QPaintDeviceJBridge::x11AppCells();
//}

//JNIEXPORT jint JNICALL
//Java_org_kde_qt_QPaintDevice_x11AppDpiX(JNIEnv *env, jclass obj)
//{
//	return (jint) QPaintDeviceJBridge::x11AppDpiX();
//}

//JNIEXPORT jint JNICALL
//Java_org_kde_qt_QPaintDevice_x11AppDpiY(JNIEnv *env, jclass obj)
//{
//	return (jint) QPaintDeviceJBridge::x11AppDpiY();
//}

//JNIEXPORT  JNICALL
//Java_org_kde_qt_QPaintDevice_x11AppColormap(JNIEnv *env, jclass obj)
//{
//	return () QPaintDeviceJBridge::x11AppColormap();
//}

//JNIEXPORT jboolean JNICALL
//Java_org_kde_qt_QPaintDevice_x11AppDefaultColormap(JNIEnv *env, jclass obj)
//{
//	return (jboolean) QPaintDeviceJBridge::x11AppDefaultColormap();
//}

//JNIEXPORT jint JNICALL
//Java_org_kde_qt_QPaintDevice_x11AppVisual(JNIEnv *env, jclass obj)
//{
//	return (jint) QPaintDeviceJBridge::x11AppVisual();
//}

//JNIEXPORT jboolean JNICALL
//Java_org_kde_qt_QPaintDevice_x11AppDefaultVisual(JNIEnv *env, jclass obj)
//{
//	return (jboolean) QPaintDeviceJBridge::x11AppDefaultVisual();
//}

//JNIEXPORT void JNICALL
//Java_org_kde_qt_QPaintDevice_x11SetAppDpiX(JNIEnv *env, jclass obj, jint arg1)
//{
//	QPaintDeviceJBridge::x11SetAppDpiX((int) arg1);
//	return;
//}

//JNIEXPORT void JNICALL
//Java_org_kde_qt_QPaintDevice_x11SetAppDpiY(JNIEnv *env, jclass obj, jint arg1)
//{
//	QPaintDeviceJBridge::x11SetAppDpiY((int) arg1);
//	return;
//}

//JNIEXPORT jobject JNICALL
//Java_org_kde_qt_QPaintDevice_qwsDisplay(JNIEnv *env, jclass obj)
//{
//	return (jobject) QtSupport::objectForQtKey(env, (void *)QPaintDeviceJBridge::qwsDisplay(), "org.kde.qt.QWSDisplay");
//}

JNIEXPORT void JNICALL
Java_org_kde_qt_QPaintDevice_newQPaintDevice__I(JNIEnv *env, jobject obj, jint devflags)
{
	if (QtSupport::getQt(env, obj) == 0) {
		QtSupport::setQt(env, obj, new QPaintDeviceJBridge((uint) devflags));
		QtSupport::setObjectForQtKey(env, obj, QtSupport::getQt(env, obj));
	}
	return;
}

//JNIEXPORT void JNICALL
//Java_org_kde_qt_QPaintDevice_copyX11Data(JNIEnv *env, jobject obj, jobject arg1)
//{
//	((QPaintDeviceJBridge*) QtSupport::getQt(env, obj))->protected_copyX11Data((QPaintDevice*) QtSupport::paintDevice(env, arg1));
//	return;
//}

//JNIEXPORT void JNICALL
//Java_org_kde_qt_QPaintDevice_cloneX11Data(JNIEnv *env, jobject obj, jobject arg1)
//{
//	((QPaintDeviceJBridge*) QtSupport::getQt(env, obj))->protected_cloneX11Data((QPaintDevice*) QtSupport::paintDevice(env, arg1));
//	return;
//}

//JNIEXPORT void JNICALL
//Java_org_kde_qt_QPaintDevice_setX11Data(JNIEnv *env, jobject obj, jobject arg1)
//{
//	((QPaintDeviceJBridge*) QtSupport::getQt(env, obj))->protected_setX11Data((QPaintDeviceX11Data*) QtSupport::paintDevice(env, arg1));
//	return;
//}

//JNIEXPORT jobject JNICALL
//Java_org_kde_qt_QPaintDevice_getX11Data__Z(JNIEnv *env, jobject obj, jboolean def)
//{
//	return (jobject) QtSupport::objectForQtKey(env, (void *)((QPaintDeviceJBridge*) QtSupport::getQt(env, obj))->protected_getX11Data((bool) def), "org.kde.qt.QPaintDeviceInterface");
//}

//JNIEXPORT jobject JNICALL
//Java_org_kde_qt_QPaintDevice_getX11Data__(JNIEnv *env, jobject obj)
//{
//	return (jobject) QtSupport::objectForQtKey(env, (void *)((QPaintDeviceJBridge*) QtSupport::getQt(env, obj))->protected_getX11Data(FALSE), "org.kde.qt.QPaintDeviceInterface");
//}

//JNIEXPORT jboolean JNICALL
//Java_org_kde_qt_QPaintDevice_cmd(JNIEnv *env, jobject obj, jint arg1, jobject arg2, jobject arg3)
//{
//	return (jboolean) ((QPaintDeviceJBridge*) QtSupport::getQt(env, obj))->protected_cmd((int) arg1, (QPainter*) QtSupport::getQt(env, arg2), (QPDevCmdParam*) QtSupport::getQt(env, arg3));
//}

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

JNIEXPORT jint JNICALL
Java_org_kde_qt_QPaintDevice_fontMet__Lorg_kde_qt_QFont_2ILjava_lang_String_2I(JNIEnv *env, jobject obj, jobject arg1, jint arg2, jstring arg3, jint arg4)
{
static QCString * _qstring_arg3 = 0;
	return (jint) ((QPaintDeviceJBridge*) QtSupport::getQt(env, obj))->protected_fontMet((QFont*) QtSupport::getQt(env, arg1), (int) arg2, (char*) QtSupport::toCharString(env, arg3, &_qstring_arg3), (int) arg4);
}

JNIEXPORT jint JNICALL
Java_org_kde_qt_QPaintDevice_fontMet__Lorg_kde_qt_QFont_2I(JNIEnv *env, jobject obj, jobject arg1, jint arg2)
{
	return (jint) ((QPaintDeviceJBridge*) QtSupport::getQt(env, obj))->protected_fontMet((QFont*) QtSupport::getQt(env, arg1), (int) arg2, 0, 0);
}

JNIEXPORT jint JNICALL
Java_org_kde_qt_QPaintDevice_fontInf(JNIEnv *env, jobject obj, jobject arg1, jint arg2)
{
	return (jint) ((QPaintDeviceJBridge*) QtSupport::getQt(env, obj))->protected_fontInf((QFont*) QtSupport::getQt(env, arg1), (int) arg2);
}

//JNIEXPORT  JNICALL
//Java_org_kde_qt_QPaintDevice_macCGContext(JNIEnv *env, jobject obj)
//{
//	return () ((QPaintDeviceJBridge*) QtSupport::getQt(env, obj))->protected_macCGContext();
//}

//JNIEXPORT void JNICALL
//Java_org_kde_qt_QPaintDevice_unclippedScaledBitBlt(JNIEnv *env, jobject obj, jobject arg1, jint arg2, jint arg3, jint arg4, jint arg5, jobject arg6, jint arg7, jint arg8, jint arg9, jint arg10, jint arg11, jboolean arg12)
//{
//	((QPaintDeviceJBridge*) QtSupport::getQt(env, obj))->protected_unclippedScaledBitBlt((QPaintDevice*) QtSupport::paintDevice(env, arg1), (int) arg2, (int) arg3, (int) arg4, (int) arg5, (QPaintDevice*) QtSupport::paintDevice(env, arg6), (int) arg7, (int) arg8, (int) arg9, (int) arg10, (Qt::RasterOp) arg11, (bool) arg12);
//	return;
//}

//JNIEXPORT void JNICALL
//Java_org_kde_qt_QPaintDevice_bitBlt(JNIEnv *env, jobject obj, jobject arg1, jint arg2, jint arg3, jobject arg4, jint arg5, jint arg6, jint arg7, jint arg8, jint arg9, jboolean arg10)
//{
//	((QPaintDeviceJBridge*) QtSupport::getQt(env, obj))->protected_bitBlt((QPaintDevice*) QtSupport::paintDevice(env, arg1), (int) arg2, (int) arg3, (QPaintDevice*) QtSupport::paintDevice(env, arg4), (int) arg5, (int) arg6, (int) arg7, (int) arg8, (Qt::RasterOp) arg9, (bool) arg10);
//	return;
//}

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

JNIEXPORT void JNICALL
Java_org_kde_qt_QPaintDevice_bitBlt(JNIEnv *env, jclass obj, jobject arg1, jint arg2, jint arg3, jobject arg4, jint arg5, jint arg6, jint arg7, jint arg8, jint arg9, jboolean arg10)
{
 	bitBlt((QPaintDevice*)QtSupport::paintDevice(env, arg1), (int)arg2, (int)arg3, (QPaintDevice*)QtSupport::getQt(env, arg4), (int)arg5, (int)arg6, (int)arg7, (int)arg8, (Qt::RasterOp)arg9, (bool)arg10);
  	return;
}

//JNIEXPORT void JNICALL
//Java_org_kde_qt_QPaintDevice_qt_init_internal(JNIEnv *env, jobject obj, jintArray arg1, jstring arg2, jDisplay* arg3, j arg4, j arg5)
//{
//static QCString * _qstring_arg2 = 0;
//	((QPaintDeviceJBridge*) QtSupport::getQt(env, obj))->protected_qt_init_internal( (int*) QtSupport::toIntPtr(env, arg1), (char**) QtSupport::toCharString(env, arg2, &_qstring_arg2), (Display*) arg3, (Qt::HANDLE) arg4, (Qt::HANDLE) arg5);
//	return;
//}

