/***************************************************************************
                            QPixmap.m -  description
                             -------------------
    begin                : Wed Nov 21 12:08:37 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 12:08:37 2001, using kalyptus 0.9.
 ***************************************************************************/

/***************************************************************************
 *                                                                         *
 *   This library is free software; you can redistribute it and/or modify  *
 *   it under the terms of the GNU Library General Public License as       *
 *   published by the Free Software Foundation; either version 2 of the    *
 *   License, or (at your option) any later version.                       *
 *                                                                         *
 ***************************************************************************/

#include <qtc/qt_QString.h>
#include <qtc/qt_QCString.h>
#include <qtc/qt_QPixmap.h>
#include <qtc/qt_QPaintDevice.h>
#include <qtobjc/QPixmap.h>
#include <qtobjc/QFont.h>

#include <qtobjc/QWidget.h>
#include <qtobjc/QImage.h>
#include <qtobjc/QWMatrix.h>
#include <qtobjc/Qt.h>
#include <qtobjc/QBitmap.h>
#include <qtobjc/QByteArray.h>

@implementation  QPixmap

- (void *) paintDevice
{
	return qt_QPixmap_QPaintDevice([self qt]);
}

- init
{
	if ([self qt] == 0L) {
		[self setQt: qt_new_QPixmap()];
		[self setAllocatedInObjcWorld: YES];
		[QtSupport setObject: self forQtKey: [self qt]];
	}
	[super init];
	return self;
}

- initWithImage: (QImage *)image
{
	if ([self qt] == 0L) {
		[self setQt: qt_new_QPixmap1((qt_QImage *) [image qt])];
		[self setAllocatedInObjcWorld: YES];
		[QtSupport setObject: self forQtKey: [self qt]];
	}
	[super init];
	return self;
}

- initWithInt: (int)w h: (int)h depth: (int)depth int: (int)arg1
{
	if ([self qt] == 0L) {
		[self setQt: qt_new_QPixmap2((int)w, (int)h, (int)depth, (int)arg1)];
		[self setAllocatedInObjcWorld: YES];
		[QtSupport setObject: self forQtKey: [self qt]];
	}
	[super init];
	return self;
}

- initWithInt: (int)w h: (int)h 
{
	if ([self qt] == 0L) {
		[self setQt: qt_new_QPixmap2((int)w, (int)h, -1, [QPixmap DefaultOptim])];
		[self setAllocatedInObjcWorld: YES];
		[QtSupport setObject: self forQtKey: [self qt]];
	}
	[super init];
	return self;
}

- initWithSize: (QSize *)arg1 depth: (int)depth int: (int)arg2
{
	if ([self qt] == 0L) {
		[self setQt: qt_new_QPixmap3((qt_QSize *) [arg1 qt], (int)depth, (int)arg2)];
		[self setAllocatedInObjcWorld: YES];
		[QtSupport setObject: self forQtKey: [self qt]];
	}
	[super init];
	return self;
}

- initWithSize: (QSize *)arg1 
{
	if ([self qt] == 0L) {
		[self setQt: qt_new_QPixmap3((qt_QSize *) [arg1 qt], -1, [QPixmap DefaultOptim])];
		[self setAllocatedInObjcWorld: YES];
		[QtSupport setObject: self forQtKey: [self qt]];
	}
	[super init];
	return self;
}

- initWithText: (NSString *)fileName format: (NSString *)format mode: (int)mode
{
static qt_QString * _qstring_fileName = 0L;
	if ([self qt] == 0L) {
		[self setQt: qt_new_QPixmap4((qt_QString *) [fileName toQString: &_qstring_fileName], (char*) [format cString], (int)mode)];
		[self setAllocatedInObjcWorld: YES];
		[QtSupport setObject: self forQtKey: [self qt]];
	}
	[super init];
	return self;
}

- initWithText: (NSString *)fileName 
{
static qt_QString * _qstring_fileName = 0L;
	if ([self qt] == 0L) {
		[self setQt: qt_new_QPixmap4((qt_QString *) [fileName toQString: &_qstring_fileName], 0, [QPixmap Auto])];
		[self setAllocatedInObjcWorld: YES];
		[QtSupport setObject: self forQtKey: [self qt]];
	}
	[super init];
	return self;
}

- initWithText: (NSString *)fileName format: (NSString *)format conversion_flags: (int)conversion_flags
{
static qt_QString * _qstring_fileName = 0L;
	if ([self qt] == 0L) {
		[self setQt: qt_new_QPixmap5((qt_QString *) [fileName toQString: &_qstring_fileName], (char*) [format cString], (int)conversion_flags)];
		[self setAllocatedInObjcWorld: YES];
		[QtSupport setObject: self forQtKey: [self qt]];
	}
	[super init];
	return self;
}

- initWithXpm: (char **)xpm
{
	if ([self qt] == 0L) {
		[self setQt: qt_new_QPixmap6((char**) xpm)];
		[self setAllocatedInObjcWorld: YES];
		[QtSupport setObject: self forQtKey: [self qt]];
	}
	[super init];
	return self;
}

- initWithByteArray: (QByteArray*)data
{
	if ([self qt] == 0L) {
		[self setQt: qt_new_QPixmap7((qt_QByteArray*) [data qt])];
		[self setAllocatedInObjcWorld: YES];
		[QtSupport setObject: self forQtKey: [self qt]];
	}
	[super init];
	return self;
}

- copyWithZone: (NSZone *) zone
{
	QPixmap * aCopy;
	aCopy = [[(QPixmap *)[[self class] allocWithZone: zone] setQt: qt_new_QPixmap8([self qt])] init];
	[aCopy setAllocatedInObjcWorld: YES];
	[QtSupport setObject: aCopy forQtKey: [aCopy qt]];
	return aCopy;
}

- (void) dealloc
{
	if ([self qt] != 0L) {
		if ([self allocatedInObjcWorld]) {
			qt_del_QPixmap((qt_QPixmap *)[self qt]);
		}
		[QtSupport removeQtKey: [self qt]];
		[self setQt: 0L];
	}
	[super dealloc];
}

- (BOOL) isNull
{
	return (BOOL) qt_QPixmap_isNull((qt_QPixmap *)[self qt]);
}

- (int) width
{
	return (int) qt_QPixmap_width((qt_QPixmap *)[self qt]);
}

- (int) height
{
	return (int) qt_QPixmap_height((qt_QPixmap *)[self qt]);
}

- (QSize*) size
{
	return (QSize*) [QtSupport objectForQtKey: qt_QPixmap_size((qt_QPixmap *)[self qt]) withClass: [QSize class] allocatedInObjcWorld: YES];
}

- (QRect*) rect
{
	return (QRect*) [QtSupport objectForQtKey: qt_QPixmap_rect((qt_QPixmap *)[self qt]) withClass: [QRect class] allocatedInObjcWorld: YES];
}

- (int) depth
{
	return (int) qt_QPixmap_depth((qt_QPixmap *)[self qt]);
}

- fill: (QColor *)fillColor
{
	qt_QPixmap_fill((qt_QPixmap *)[self qt], (qt_QColor *) [fillColor qt]);
	return self;
}

- fill
{
	qt_QPixmap_fill((qt_QPixmap *)[self qt], (qt_QColor *) [Qt white]);
	return self;
}

- fill: (QWidget *)arg1 xofs: (int)xofs yofs: (int)yofs
{
	qt_QPixmap_fill1((qt_QPixmap *)[self qt], (qt_QWidget *) [arg1 qt], (int)xofs, (int)yofs);
	return self;
}

- fill: (QWidget *)arg1 ofs: (QPoint*)ofs
{
	qt_QPixmap_fill2((qt_QPixmap *)[self qt], (qt_QWidget *) [arg1 qt], (qt_QPoint*) [ofs qt]);
	return self;
}

- resize: (int)width height: (int)height
{
	qt_QPixmap_resize((qt_QPixmap *)[self qt], (int)width, (int)height);
	return self;
}

- resize: (QSize *)arg1
{
	qt_QPixmap_resize1((qt_QPixmap *)[self qt], (qt_QSize *) [arg1 qt]);
	return self;
}

- (QBitmap*) mask
{
	return (QBitmap*) [QtSupport objectForQtKey: qt_QPixmap_mask((qt_QPixmap *)[self qt]) withClass: [QBitmap class] allocatedInObjcWorld: YES];
}

- setMask: (QBitmap *)arg1
{
	qt_QPixmap_setMask((qt_QPixmap *)[self qt], (qt_QBitmap *) [arg1 qt]);
	return self;
}

- (BOOL) selfMask
{
	return (BOOL) qt_QPixmap_selfMask((qt_QPixmap *)[self qt]);
}

- (QBitmap*) createHeuristicMask: (BOOL)clipTight
{
	return (QBitmap*) [QtSupport objectForQtKey: qt_QPixmap_createHeuristicMask((qt_QPixmap *)[self qt], (int)clipTight) withClass: [QBitmap class] allocatedInObjcWorld: YES];
}

- (QBitmap*) createHeuristicMask
{
	return (QBitmap*) [QtSupport objectForQtKey: qt_QPixmap_createHeuristicMask((qt_QPixmap *)[self qt], 1) withClass: [QBitmap class] allocatedInObjcWorld: YES];
}

- (QPixmap*) xForm: (QWMatrix *)arg1
{
	return (QPixmap*) [QtSupport objectForQtKey: qt_QPixmap_xForm((qt_QPixmap *)[self qt], (qt_QWMatrix *) [arg1 qt]) withClass: [QPixmap class] allocatedInObjcWorld: YES];
}

- (QImage*) convertToImage
{
	return (QImage*) [QtSupport objectForQtKey: qt_QPixmap_convertToImage((qt_QPixmap *)[self qt]) withClass: [QImage class] allocatedInObjcWorld: YES];
}

- (BOOL) convertFromImage: (QImage *)arg1 mode: (int)mode
{
	return (BOOL) qt_QPixmap_convertFromImage((qt_QPixmap *)[self qt], (qt_QImage *) [arg1 qt], (int)mode);
}

- (BOOL) convertFromImage: (QImage *)arg1 
{
	return (BOOL) qt_QPixmap_convertFromImage((qt_QPixmap *)[self qt], (qt_QImage *) [arg1 qt], [QPixmap Auto]);
}

- (BOOL) convertFromImage: (QImage *)arg1 conversion_flags: (int)conversion_flags
{
	return (BOOL) qt_QPixmap_convertFromImage1((qt_QPixmap *)[self qt], (qt_QImage *) [arg1 qt], (int)conversion_flags);
}

- (BOOL) load: (NSString *)fileName format: (NSString *)format mode: (int)mode
{
static qt_QString * _qstring_fileName = 0L;
	return (BOOL) qt_QPixmap_load((qt_QPixmap *)[self qt], (qt_QString *) [fileName toQString: &_qstring_fileName], (char*) [format cString], (int)mode);
}

- (BOOL) load: (NSString *)fileName 
{
static qt_QString * _qstring_fileName = 0L;
	return (BOOL) qt_QPixmap_load((qt_QPixmap *)[self qt], (qt_QString *) [fileName toQString: &_qstring_fileName], 0, [QPixmap Auto]);
}

- (BOOL) load: (NSString *)fileName format: (NSString *)format conversion_flags: (int)conversion_flags
{
static qt_QString * _qstring_fileName = 0L;
	return (BOOL) qt_QPixmap_load1((qt_QPixmap *)[self qt], (qt_QString *) [fileName toQString: &_qstring_fileName], (char*) [format cString], (int)conversion_flags);
}

- (BOOL) loadFromData: (unsigned char*)buf len: (unsigned int)len format: (NSString *)format mode: (int)mode
{
	return (BOOL) qt_QPixmap_loadFromData((qt_QPixmap *)[self qt], (unsigned char*)buf, (unsigned int)len, (char*) [format cString], (int)mode);
}

- (BOOL) loadFromData: (unsigned char*)buf len: (unsigned int)len 
{
	return (BOOL) qt_QPixmap_loadFromData((qt_QPixmap *)[self qt], (unsigned char*)buf, (unsigned int)len, 0, [QPixmap Auto]);
}

- (BOOL) loadFromData: (unsigned char*)buf len: (unsigned int)len format: (NSString *)format conversion_flags: (int)conversion_flags
{
	return (BOOL) qt_QPixmap_loadFromData1((qt_QPixmap *)[self qt], (unsigned char*)buf, (unsigned int)len, (char*) [format cString], (int)conversion_flags);
}

- (BOOL) loadFromData: (QByteArray*)data format: (NSString *)format conversion_flags: (int)conversion_flags
{
	return (BOOL) qt_QPixmap_loadFromData2((qt_QPixmap *)[self qt], (qt_QByteArray*) [data qt], (char*) [format cString], (int)conversion_flags);
}

- (BOOL) loadFromData: (QByteArray*)data 
{
	return (BOOL) qt_QPixmap_loadFromData2((qt_QPixmap *)[self qt], (qt_QByteArray*) [data qt], 0, 0);
}

- (BOOL) save: (NSString *)fileName format: (NSString *)format quality: (int)quality
{
static qt_QString * _qstring_fileName = 0L;
	return (BOOL) qt_QPixmap_save((qt_QPixmap *)[self qt], (qt_QString *) [fileName toQString: &_qstring_fileName], (char*) [format cString], (int)quality);
}

- (BOOL) save: (NSString *)fileName format: (NSString *)format 
{
static qt_QString * _qstring_fileName = 0L;
	return (BOOL) qt_QPixmap_save((qt_QPixmap *)[self qt], (qt_QString *) [fileName toQString: &_qstring_fileName], (char*) [format cString], -1);
}

//- (void*) hbm
//{
//	return (void*) qt_QPixmap_hbm((qt_QPixmap *)[self qt]);
//}

- (int) serialNumber
{
	return (int) qt_QPixmap_serialNumber((qt_QPixmap *)[self qt]);
}

- (int) optimization
{
	return (int) qt_QPixmap_optimization((qt_QPixmap *)[self qt]);
}

- setOptimization: (int)arg1
{
	qt_QPixmap_setOptimization((qt_QPixmap *)[self qt], (int)arg1);
	return self;
}

- detach
{
	qt_QPixmap_detach((qt_QPixmap *)[self qt]);
	return self;
}

- (BOOL) isQBitmap
{
	return (BOOL) qt_QPixmap_isQBitmap((qt_QPixmap *)[self qt]);
}

//- (BOOL) isMultiCellPixmap
//{
//	return (BOOL) qt_QPixmap_isMultiCellPixmap((qt_QPixmap *)[self qt]);
//}

//- (void*) multiCellHandle
//{
//	return (void*) qt_QPixmap_multiCellHandle((qt_QPixmap *)[self qt]);
//}

//- (void*) multiCellBitmap
//{
//	return (void*) qt_QPixmap_multiCellBitmap((qt_QPixmap *)[self qt]);
//}

//- (int) multiCellOffset
//{
//	return (int) qt_QPixmap_multiCellOffset((qt_QPixmap *)[self qt]);
//}

//- (int) allocCell
//{
//	return (int) qt_QPixmap_allocCell((qt_QPixmap *)[self qt]);
//}

//- freeCell: (BOOL)arg1
//{
//	qt_QPixmap_freeCell((qt_QPixmap *)[self qt], (int)arg1);
//	return self;
//}

//- freeCell
//{
//	qt_QPixmap_freeCell((qt_QPixmap *)[self qt], 0);
//	return self;
//}

//- (QGfx*) graphicsContext: (BOOL)clip_children
//{
//	return (QGfx*) [QtSupport objectForQtKey: qt_QPixmap_graphicsContext((qt_QPixmap *)[self qt], (int)clip_children) withClass: [QGfx class] allocatedInObjcWorld: YES];
//}

//- (QGfx*) graphicsContext
//{
//	return (QGfx*) [QtSupport objectForQtKey: qt_QPixmap_graphicsContext((qt_QPixmap *)[self qt], 1) withClass: [QGfx class] allocatedInObjcWorld: YES];
//}

//- (unsigned char*) scanLine: (int)arg1
//{
//	return (unsigned char*) qt_QPixmap_scanLine((qt_QPixmap *)[self qt], (int)arg1);
//}

//- (int) bytesPerLine
//{
//	return (int) qt_QPixmap_bytesPerLine((qt_QPixmap *)[self qt]);
//}

//- (int*) clut
//{
//	return (int*) qt_QPixmap_clut((qt_QPixmap *)[self qt]);
//}

//- (int) numCols
//{
//	return (int) qt_QPixmap_numCols((qt_QPixmap *)[self qt]);
//}

//- x11SetScreen: (int)screen
//{
//	qt_QPixmap_x11SetScreen((qt_QPixmap *)[self qt], (int)screen);
//	return self;
//}

+ (int) defaultDepth
{
	return (int) qt_QPixmap_defaultDepth();
}

+ (QPixmap*) grabWindow: (unsigned int)arg1 x: (int)x y: (int)y w: (int)w h: (int)h
{
	return (QPixmap*) [QtSupport objectForQtKey: qt_QPixmap_grabWindow((unsigned int)arg1, (int)x, (int)y, (int)w, (int)h) withClass: [QPixmap class] allocatedInObjcWorld: YES];
}

+ (QPixmap*) grabWindow: (unsigned int)arg1 
{
	return (QPixmap*) [QtSupport objectForQtKey: qt_QPixmap_grabWindow((unsigned int)arg1, 0, 0, -1, -1) withClass: [QPixmap class] allocatedInObjcWorld: YES];
}

+ (QPixmap*) grabWidget: (QWidget *)widget x: (int)x y: (int)y w: (int)w h: (int)h
{
	return (QPixmap*) [QtSupport objectForQtKey: qt_QPixmap_grabWidget((qt_QWidget *) [widget qt], (int)x, (int)y, (int)w, (int)h) withClass: [QPixmap class] allocatedInObjcWorld: YES];
}

+ (QPixmap*) grabWidget: (QWidget *)widget 
{
	return (QPixmap*) [QtSupport objectForQtKey: qt_QPixmap_grabWidget((qt_QWidget *) [widget qt], 0, 0, -1, -1) withClass: [QPixmap class] allocatedInObjcWorld: YES];
}

+ (QWMatrix*) trueMatrix: (QWMatrix *)arg1 w: (int)w h: (int)h
{
	return (QWMatrix*) [QtSupport objectForQtKey: qt_QPixmap_trueMatrix((qt_QWMatrix *) [arg1 qt], (int)w, (int)h) withClass: [QWMatrix class] allocatedInObjcWorld: YES];
}

+ (NSString *) imageFormat: (NSString *)fileName
{
static qt_QString * _qstring_fileName = 0L;
	return (NSString *) [NSString stringWithCString: qt_QPixmap_imageFormat((qt_QString *) [fileName toQString: &_qstring_fileName])];
}

+ (int) defaultOptimization
{
	return (int) qt_QPixmap_defaultOptimization();
}

+ setDefaultOptimization: (int)arg1
{
	qt_QPixmap_setDefaultOptimization((int)arg1);
	return self;
}

+ (int) x11SetDefaultScreen: (int)screen
{
	return (int) qt_QPixmap_x11SetDefaultScreen((int)screen);
}

- initWithInt: (int)w h: (int)h data: (unsigned char*)data isXbitmap: (BOOL)isXbitmap
{
	if ([self qt] == 0L) {
		[self setQt: qt_new_QPixmap9((int)w, (int)h, (unsigned char*)data, (int)isXbitmap)];
		[self setAllocatedInObjcWorld: YES];
		[QtSupport setObject: self forQtKey: [self qt]];
	}
	[super init];
	return self;
}

- (int) metric: (int)arg1
{
	return (int) qt_QPixmap_metric((qt_QPixmap *)[self qt], (int)arg1);
}

+ (int) Auto
{
	return (int) QPIXMAP_Auto;
}

+ (int) Color
{
	return (int) QPIXMAP_Color;
}

+ (int) Mono
{
	return (int) QPIXMAP_Mono;
}

+ (int) DefaultOptim
{
	return (int) QPIXMAP_DefaultOptim;
}

+ (int) NoOptim
{
	return (int) QPIXMAP_NoOptim;
}

+ (int) MemoryOptim
{
	return (int) QPIXMAP_MemoryOptim;
}

+ (int) NormalOptim
{
	return (int) QPIXMAP_NormalOptim;
}

+ (int) BestOptim
{
	return (int) QPIXMAP_BestOptim;
}

@end

@implementation QPixmap (QPaintDeviceImplementation)
- (int) devType
{
	return (int) qt_QPaintDevice_devType(qt_QPixmap_QPaintDevice([self qt]));
}

- (BOOL) isExtDev
{
	return (BOOL) qt_QPaintDevice_isExtDev(qt_QPixmap_QPaintDevice([self qt]));
}

- (BOOL) paintingActive
{
	return (BOOL) qt_QPaintDevice_paintingActive(qt_QPixmap_QPaintDevice([self qt]));
}

- (void*) handle
{
	return (void*) qt_QPaintDevice_handle(qt_QPixmap_QPaintDevice([self qt]));
}

//- (unsigned int) handle
//{
//	return (unsigned int) qt_QPaintDevice_handle1(qt_QPixmap_QPaintDevice([self qt]));
//}

//- (unsigned int) handle
//{
//	return (unsigned int) qt_QPaintDevice_handle2(qt_QPixmap_QPaintDevice([self qt]));
//}

//- (unsigned int) handle
//{
//	return (unsigned int) qt_QPaintDevice_handle3(qt_QPixmap_QPaintDevice([self qt]));
//}

//- (Display*) x11Display
//{
//	return (Display*) qt_QPaintDevice_x11Display(qt_QPixmap_QPaintDevice([self qt]));
//}

- (int) x11Screen
{
	return (int) qt_QPaintDevice_x11Screen(qt_QPixmap_QPaintDevice([self qt]));
}

- (int) x11Depth
{
	return (int) qt_QPaintDevice_x11Depth(qt_QPixmap_QPaintDevice([self qt]));
}

- (int) x11Cells
{
	return (int) qt_QPaintDevice_x11Cells(qt_QPixmap_QPaintDevice([self qt]));
}

//- (unsigned int) x11Colormap
//{
//	return (unsigned int) qt_QPaintDevice_x11Colormap(qt_QPixmap_QPaintDevice([self qt]));
//}

- (BOOL) x11DefaultColormap
{
	return (BOOL) qt_QPaintDevice_x11DefaultColormap(qt_QPixmap_QPaintDevice([self qt]));
}

- (void*) x11Visual
{
	return (void*) qt_QPaintDevice_x11Visual(qt_QPixmap_QPaintDevice([self qt]));
}

- (BOOL) x11DefaultVisual
{
	return (BOOL) qt_QPaintDevice_x11DefaultVisual(qt_QPixmap_QPaintDevice([self qt]));
}

//- (unsigned char*) scanLine: (int)arg1
//{
//	return (unsigned char*) qt_QPaintDevice_scanLine(qt_QPixmap_QPaintDevice([self qt]), (int)arg1);
//}

//- (int) bytesPerLine
//{
//	return (int) qt_QPaintDevice_bytesPerLine(qt_QPixmap_QPaintDevice([self qt]));
//}

//- (QGfx*) graphicsContext: (BOOL)clip_children
//{
//	return (QGfx*) [QtSupport objectForQtKey: qt_QPaintDevice_graphicsContext(qt_QPixmap_QPaintDevice([self qt]), (int)clip_children) withClass: [QGfx class] allocatedInObjcWorld: YES];
//}

//- (QGfx*) graphicsContext
//{
//	return (QGfx*) [QtSupport objectForQtKey: qt_QPaintDevice_graphicsContext(qt_QPixmap_QPaintDevice([self qt]), 1) withClass: [QGfx class] allocatedInObjcWorld: YES];
//}

//+ (Display*) x11AppDisplay
//{
//	return (Display*) qt_QPaintDevice_x11AppDisplay();
//}

+ (int) x11AppScreen
{
	return (int) qt_QPaintDevice_x11AppScreen();
}

+ (int) x11AppDepth
{
	return (int) qt_QPaintDevice_x11AppDepth();
}

+ (int) x11AppCells
{
	return (int) qt_QPaintDevice_x11AppCells();
}

+ (int) x11AppDpiX
{
	return (int) qt_QPaintDevice_x11AppDpiX();
}

+ (int) x11AppDpiY
{
	return (int) qt_QPaintDevice_x11AppDpiY();
}

//+ (unsigned int) x11AppColormap
//{
//	return (unsigned int) qt_QPaintDevice_x11AppColormap();
//}

+ (BOOL) x11AppDefaultColormap
{
	return (BOOL) qt_QPaintDevice_x11AppDefaultColormap();
}

+ (void*) x11AppVisual
{
	return (void*) qt_QPaintDevice_x11AppVisual();
}

+ (BOOL) x11AppDefaultVisual
{
	return (BOOL) qt_QPaintDevice_x11AppDefaultVisual();
}

+ x11SetAppDpiX: (int)arg1
{
	qt_QPaintDevice_x11SetAppDpiX((int)arg1);
	return self;
}

+ x11SetAppDpiY: (int)arg1
{
	qt_QPaintDevice_x11SetAppDpiY((int)arg1);
	return self;
}

//+ (QWSDisplay*) qwsDisplay
//{
//	return (QWSDisplay*) [QtSupport objectForQtKey: qt_QPaintDevice_qwsDisplay() withClass: [QWSDisplay class] allocatedInObjcWorld: YES];
//}

//- initWithUnsigned: (unsigned int)devflags
//{
//	if ([self qt] == 0L) {
//		[self setQt: qt_new_QPaintDevice((unsigned int)devflags)];
//		[self setAllocatedInObjcWorld: YES];
//		[QtSupport setObject: self forQtKey: [self qt]];
//	}
//	[super init];
//	return self;
//}

- copyX11Data: (QPaintDevice *)arg1
{
	qt_QPaintDevice_copyX11Data(qt_QPixmap_QPaintDevice([self qt]), (qt_QPaintDevice *) [arg1 qt]);
	return self;
}

//- setX11Data: (QPaintDeviceX11Data*)arg1
//{
//	qt_QPaintDevice_setX11Data(qt_QPixmap_QPaintDevice([self qt]), (qt_QPaintDeviceX11Data*) [arg1 qt]);
//	return self;
//}

//- (QPaintDeviceX11Data*) getX11Data: (BOOL)def
//{
//	return (QPaintDeviceX11Data*) [QtSupport objectForQtKey: qt_QPaintDevice_getX11Data(qt_QPixmap_QPaintDevice([self qt]), (int)def) withClass: [QPaintDeviceX11Data class] allocatedInObjcWorld: YES];
//}

//- (QPaintDeviceX11Data*) getX11Data
//{
//	return (QPaintDeviceX11Data*) [QtSupport objectForQtKey: qt_QPaintDevice_getX11Data(qt_QPixmap_QPaintDevice([self qt]), 0) withClass: [QPaintDeviceX11Data class] allocatedInObjcWorld: YES];
//}

//- fixport
//{
//	qt_QPaintDevice_fixport(qt_QPixmap_QPaintDevice([self qt]));
//	return self;
//}

//- (BOOL) cmd: (int)arg1 painter: (QPainter *)arg2 pdevcmdparam: (QPDevCmdParam*)arg3
//{
//	return (BOOL) qt_QPaintDevice_cmd(qt_QPixmap_QPaintDevice([self qt]), (int)arg1, (qt_QPainter *) [arg2 qt], (qt_QPDevCmdParam*) [arg3 qt]);
//}

- (int) metric: (int)arg1
{
	return (int) qt_QPaintDevice_metric(qt_QPixmap_QPaintDevice([self qt]), (int)arg1);
}

- (int) fontMet: (QFont *)arg1 int: (int)arg2 string: (NSString *)arg3 int: (int)arg4
{
	return (int) qt_QPaintDevice_fontMet(qt_QPixmap_QPaintDevice([self qt]), (qt_QFont *) [arg1 qt], (int)arg2, (char*) [arg3 cString], (int)arg4);
}

- (int) fontMet: (QFont *)arg1 int: (int)arg2
{
	return (int) qt_QPaintDevice_fontMet(qt_QPixmap_QPaintDevice([self qt]), (qt_QFont *) [arg1 qt], (int)arg2, 0, 0);
}

- (int) fontInf: (QFont *)arg1 int: (int)arg2
{
	return (int) qt_QPaintDevice_fontInf(qt_QPixmap_QPaintDevice([self qt]), (qt_QFont *) [arg1 qt], (int)arg2);
}

+ bitBlt: (QPaintDevice *) arg1 dx: (int)arg2 dy: (int)arg3 source: (QPaintDevice *)arg4 int: (int)arg5 int: (int)arg6 int: (int)arg7 int: (int)arg8 int: (int)arg9 bool: (BOOL)arg10
{
	qt_QPaintDevice_bitBlt((qt_QPaintDevice *)[arg1 paintDevice], (int)arg2, (int)arg3, (qt_QPaintDevice *) [arg4 qt], (int)arg5, (int)arg6, (int)arg7, (int)arg8, (int)arg9, (int)arg10);
  	return self;
}

+ bitBlt: (QPaintDevice *) arg1 dx: (int)arg2 dy: (int)arg3 source: (QPaintDevice *)arg4
{
	qt_QPaintDevice_bitBlt((qt_QPaintDevice *)[arg1 paintDevice], (int)arg2, (int)arg3, (qt_QPaintDevice *) [arg4 qt], 0, 0, -1, -1, 0, 0);
 	return self;
}

- (void *) paintDevice
{
	return [self qt];
}

@end
