/***************************************************************************
                            QPixmap.java -  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.                                   *
 *                                                                         *
***************************************************************************/

package org.kde.qt;

import java.util.*;
import java.lang.Error;

public class QPixmap extends Qt implements  QPaintDeviceInterface {
	protected QPixmap(Class dummy){super((Class) null);}

	private native void newQPixmap();
	public QPixmap() {
		super((Class) null);
		newQPixmap();
	}
	private native void newQPixmap( QImage image);
	public QPixmap( QImage image) {
		super((Class) null);
		newQPixmap( image);
	}
	private native void newQPixmap( int w, int h, int depth, int arg1);
	public QPixmap( int w, int h, int depth, int arg1) {
		super((Class) null);
		newQPixmap( w, h, depth, arg1);
	}
	private native void newQPixmap( int w, int h);
	public QPixmap( int w, int h) {
		super((Class) null);
		newQPixmap( w, h);
	}
	private native void newQPixmap( QSize arg1, int depth, int arg2);
	public QPixmap( QSize arg1, int depth, int arg2) {
		super((Class) null);
		newQPixmap( arg1, depth, arg2);
	}
	private native void newQPixmap( QSize arg1);
	public QPixmap( QSize arg1) {
		super((Class) null);
		newQPixmap( arg1);
	}
	private native void newQPixmap( String fileName, String format, int mode);
	public QPixmap( String fileName, String format, int mode) {
		super((Class) null);
		newQPixmap( fileName, format, mode);
	}
	private native void newQPixmap( String fileName);
	public QPixmap( String fileName) {
		super((Class) null);
		newQPixmap( fileName);
	}
//	private native void newQPixmap( String fileName, String format, int conversion_flags);
//	public QPixmap( String fileName, String format, int conversion_flags) {
//		super((Class) null);
//		newQPixmap( fileName, format, conversion_flags);
//	}
	private native void newQPixmap( String[] xpm);
	public QPixmap( String[] xpm) {
		super((Class) null);
		newQPixmap( xpm);
	}
	private native void newQPixmap( byte[] data);
	public QPixmap( byte[] data) {
		super((Class) null);
		newQPixmap( data);
	}
	private native void newQPixmap( QPixmap arg1);
	public QPixmap( QPixmap arg1) {
		super((Class) null);
		newQPixmap( arg1);
	}
	protected native void finalize() throws InternalError;
	public native boolean isNull();
	public native int width();
	public native int height();
	public native QSize size();
	public native QRect rect();
	public native int depth();
	public native void fill( QColor fillColor);
	public native void fill();
	public native void fill( QWidget arg1, int xofs, int yofs);
	public native void fill( QWidget arg1, QPoint ofs);
	public native void resize( int width, int height);
	public native void resize( QSize arg1);
	public native QBitmap mask();
	public native void setMask( QBitmap arg1);
	public native boolean selfMask();
	public native QBitmap createHeuristicMask( boolean clipTight);
	public native QBitmap createHeuristicMask();
	public native QPixmap xForm( QWMatrix arg1);
	public native QImage convertToImage();
	public native boolean convertFromImageWithMode( QImage arg1, int mode);
	public native boolean convertFromImage( QImage arg1);
	public native boolean convertFromImage( QImage arg1, int conversion_flags);
	public native boolean loadWithMode( String fileName, String format, int mode);
	public native boolean load( String fileName);
	public native boolean load( String fileName, String format, int conversion_flags);
	public native boolean loadFromDataWithMode( String buf, int len, String format, int mode);
	public native boolean loadFromData( String buf, int len);
	public native boolean loadFromData( String buf, int len, String format, int conversion_flags);
	public native boolean loadFromData( char[] data, String format, int conversion_flags);
	public native boolean loadFromData( char[] data);
	public native boolean save( String fileName, String format, int quality);
	public native boolean save( String fileName, String format);
	public native int hbm();
	public native int serialNumber();
	public native int optimization();
	public native void setOptimization( int arg1);
	public native void detach();
	public native boolean isQBitmap();
//	public native boolean isMultiCellPixmap();
//	public native int multiCellHandle();
//	public native int multiCellBitmap();
//	public native int multiCellOffset();
//	public native int allocCell();
//	public native void freeCell( boolean arg1);
//	public native void freeCell();
//	public native QGfx graphicsContext( boolean clip_children);
//	public native QGfx graphicsContext();
	public native String scanLine( int arg1);
//	public native int bytesPerLine();
//	public native int[] clut();
//	public native int numCols();
//	public native void x11SetScreen( int screen);
	public static native int defaultDepth();
	public static native QPixmap grabWindow( int arg1, int x, int y, int w, int h);
	public static native QPixmap grabWindow( int arg1);
	public static native QPixmap grabWidget( QWidget widget, int x, int y, int w, int h);
	public static native QPixmap grabWidget( QWidget widget);
	public static native QWMatrix trueMatrix( QWMatrix arg1, int w, int h);
	public static native String imageFormat( String fileName);
	public static native int defaultOptimization();
	public static native void setDefaultOptimization( int arg1);
//	public static native int x11SetDefaultScreen( int screen);
	private native void newQPixmap( int w, int h, String data, boolean isXbitmap);
	public QPixmap( int w, int h, String data, boolean isXbitmap) {
		super((Class) null);
		newQPixmap( w, h, data, isXbitmap);
	}

	protected native int metric( int arg1);

	/** Internal method */
	protected native long paintDevice();

	public static final int Auto = 0;
	public static final int Color = 1;
	public static final int Mono = 2;
	public static final int DefaultOptim = 0;
	public static final int NoOptim = 1;
	public static final int MemoryOptim = NoOptim;
	public static final int NormalOptim = 2;
	public static final int BestOptim = 3;

	//
	// From QPaintDeviceInterface
	//

	public native int devType();
	public native boolean isExtDev();
	public native boolean paintingActive();
//	public native void setResolution( int arg1);
//	public native int resolution();
//	public native int x11Screen();
//	public native int x11Depth();
//	public native int x11Cells();
//	public native int x11Colormap();
//	public native boolean x11DefaultColormap();
//	public native int x11Visual();
//	public native boolean x11DefaultVisual();

}
