/***************************************************************************
                            qt_QImageIO.cpp -  description
                             -------------------
    begin                : Tue Nov 20 20:51:20 2001
    copyright            : (C) 2000-2001 Lost Highway Ltd. All rights reserved.
    email                : Lost_Highway@tipitina.demon.co.uk
    generated by         : duke@tipitina on Tue Nov 20 20:51:20 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.                       *
 *                                                                         *
 ***************************************************************************/

extern "C" {
#include "qt_QImageIO.h"
}

#include <qimage.h>

class QImageIOBridge : public QImageIO
{
public:
	QImageIOBridge() : QImageIO() {}
	QImageIOBridge(QIODevice* ioDevice, const char* format) : QImageIO(ioDevice, format) {}
	QImageIOBridge(const QString& fileName, const char* format) : QImageIO(fileName, format) {}
	~QImageIOBridge() {}
};

qt_QImageIO * qt_new_QImageIO(){
	return (qt_QImageIO *) new QImageIOBridge();
}
qt_QImageIO * qt_new_QImageIO1(qt_QIODevice * ioDevice, char* format){
	return (qt_QImageIO *) new QImageIOBridge((QIODevice*)ioDevice, (char*)format);
}
qt_QImageIO * qt_new_QImageIO2(qt_QString * fileName, char* format){
	return (qt_QImageIO *) new QImageIOBridge((QString&)* (QString*)fileName, (char*)format);
}
void qt_del_QImageIO( qt_QImageIO* p ){
	delete (QImageIOBridge*) p;
}
qt_QImage * qt_QImageIO_image( qt_QImageIO* instPointer){
	return (qt_QImage *) (const QImage *)&((QImageIOBridge*)instPointer)->image();
}
int qt_QImageIO_status( qt_QImageIO* instPointer){
	return (int) ((QImageIOBridge*)instPointer)->status();
}
char* qt_QImageIO_format( qt_QImageIO* instPointer){
	return (char*) ((QImageIOBridge*)instPointer)->format();
}
qt_QIODevice * qt_QImageIO_ioDevice( qt_QImageIO* instPointer){
	return (qt_QIODevice *) ((QImageIOBridge*)instPointer)->ioDevice();
}
qt_QString * qt_QImageIO_fileName( qt_QImageIO* instPointer){
	return (qt_QString *)new QString(((QImageIOBridge*)instPointer)->fileName());
}
int qt_QImageIO_quality( qt_QImageIO* instPointer){
	return (int) ((QImageIOBridge*)instPointer)->quality();
}
qt_QString * qt_QImageIO_description( qt_QImageIO* instPointer){
	return (qt_QString *)new QString(((QImageIOBridge*)instPointer)->description());
}
char* qt_QImageIO_parameters( qt_QImageIO* instPointer){
	return (char*) ((QImageIOBridge*)instPointer)->parameters();
}
float qt_QImageIO_gamma( qt_QImageIO* instPointer){
	return (float) ((QImageIOBridge*)instPointer)->gamma();
}
void qt_QImageIO_setImage( qt_QImageIO* instPointer,qt_QImage * arg1){
	((QImageIOBridge*)instPointer)->setImage((QImage&)* (QImage*)arg1);
	return;
}
void qt_QImageIO_setStatus( qt_QImageIO* instPointer,int arg1){
	((QImageIOBridge*)instPointer)->setStatus((int)arg1);
	return;
}
void qt_QImageIO_setFormat( qt_QImageIO* instPointer,char* arg1){
	((QImageIOBridge*)instPointer)->setFormat((char*)arg1);
	return;
}
void qt_QImageIO_setIODevice( qt_QImageIO* instPointer,qt_QIODevice * arg1){
	((QImageIOBridge*)instPointer)->setIODevice((QIODevice*)arg1);
	return;
}
void qt_QImageIO_setFileName( qt_QImageIO* instPointer,qt_QString * arg1){
	((QImageIOBridge*)instPointer)->setFileName((QString&)* (QString*)arg1);
	return;
}
void qt_QImageIO_setQuality( qt_QImageIO* instPointer,int arg1){
	((QImageIOBridge*)instPointer)->setQuality((int)arg1);
	return;
}
void qt_QImageIO_setDescription( qt_QImageIO* instPointer,qt_QString * arg1){
	((QImageIOBridge*)instPointer)->setDescription((QString&)* (QString*)arg1);
	return;
}
void qt_QImageIO_setParameters( qt_QImageIO* instPointer,char* arg1){
	((QImageIOBridge*)instPointer)->setParameters((char*)arg1);
	return;
}
void qt_QImageIO_setGamma( qt_QImageIO* instPointer,float arg1){
	((QImageIOBridge*)instPointer)->setGamma((float)arg1);
	return;
}
int qt_QImageIO_read( qt_QImageIO* instPointer){
	return (int) ((QImageIOBridge*)instPointer)->read();
}
int qt_QImageIO_write( qt_QImageIO* instPointer){
	return (int) ((QImageIOBridge*)instPointer)->write();
}
char* qt_QImageIO_imageFormat( qt_QString * fileName){
	return (char*) QImageIOBridge::imageFormat((QString&)* (QString*)fileName);
}
char* qt_QImageIO_imageFormat1( qt_QIODevice * arg1){
	return (char*) QImageIOBridge::imageFormat((QIODevice*)arg1);
}
qt_QStrList * qt_QImageIO_inputFormats( ){
	return (qt_QStrList *)new QStrList(QImageIOBridge::inputFormats());
}
qt_QStrList * qt_QImageIO_outputFormats( ){
	return (qt_QStrList *)new QStrList(QImageIOBridge::outputFormats());
}
void qt_QImageIO_defineIOHandler( char* format, char* header, char* flags, int read_image, int write_image){
	QImageIOBridge::defineIOHandler((char*)format, (char*)header, (char*)flags, (image_io_handler)read_image, (image_io_handler)write_image);
	return;
}
