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

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

class QPaintDeviceMetricsJBridge : public QPaintDeviceMetrics
{
public:
	QPaintDeviceMetricsJBridge(const QPaintDevice* arg1) : QPaintDeviceMetrics(arg1) {}
};


JNIEXPORT void JNICALL
Java_org_kde_qt_QPaintDeviceMetrics_newQPaintDeviceMetrics(JNIEnv *env, jobject obj, jobject arg1)
{
	if (QtSupport::getQt(env, obj) == 0) {
		QtSupport::setQt(env, obj, new QPaintDeviceMetricsJBridge((QPaintDevice*) QtSupport::paintDevice(env, arg1)));
		QtSupport::setObjectForQtKey(env, obj, QtSupport::getQt(env, obj));
	}
	return;
}

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

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

JNIEXPORT jint JNICALL
Java_org_kde_qt_QPaintDeviceMetrics_widthMM(JNIEnv *env, jobject obj)
{
	return (jint) ((QPaintDeviceMetricsJBridge*) QtSupport::getQt(env, obj))->widthMM();
}

JNIEXPORT jint JNICALL
Java_org_kde_qt_QPaintDeviceMetrics_heightMM(JNIEnv *env, jobject obj)
{
	return (jint) ((QPaintDeviceMetricsJBridge*) QtSupport::getQt(env, obj))->heightMM();
}

JNIEXPORT jint JNICALL
Java_org_kde_qt_QPaintDeviceMetrics_logicalDpiX(JNIEnv *env, jobject obj)
{
	return (jint) ((QPaintDeviceMetricsJBridge*) QtSupport::getQt(env, obj))->logicalDpiX();
}

JNIEXPORT jint JNICALL
Java_org_kde_qt_QPaintDeviceMetrics_logicalDpiY(JNIEnv *env, jobject obj)
{
	return (jint) ((QPaintDeviceMetricsJBridge*) QtSupport::getQt(env, obj))->logicalDpiY();
}

JNIEXPORT jint JNICALL
Java_org_kde_qt_QPaintDeviceMetrics_physicalDpiX(JNIEnv *env, jobject obj)
{
	return (jint) ((QPaintDeviceMetricsJBridge*) QtSupport::getQt(env, obj))->physicalDpiX();
}

JNIEXPORT jint JNICALL
Java_org_kde_qt_QPaintDeviceMetrics_physicalDpiY(JNIEnv *env, jobject obj)
{
	return (jint) ((QPaintDeviceMetricsJBridge*) QtSupport::getQt(env, obj))->physicalDpiY();
}

JNIEXPORT jint JNICALL
Java_org_kde_qt_QPaintDeviceMetrics_numColors(JNIEnv *env, jobject obj)
{
	return (jint) ((QPaintDeviceMetricsJBridge*) QtSupport::getQt(env, obj))->numColors();
}

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

