/*
 * Java-Gnome Bindings Library
 *
 * Copyright 1998-2004 the Java-Gnome Team, all rights reserved.
 *
 * The Java-Gnome bindings library is free software distributed under
 * the terms of the GNU Library General Public License version 2.
 */

package org.gnu.gdk;

import org.gnu.glib.Type;

/**
 *
 */
public class Pixmap extends Drawable 
{
	public Pixmap(Drawable drawable, int width, int height, int depth) {
		super(gdk_pixmap_new(drawable.getHandle(), width, height, depth));
	}
	
	public Pixmap(Drawable drawable, byte[] data, int width, int height, int depth, Color fg, Color bg) {
		super(gdk_pixmap_create_from_data(drawable.getHandle(), data, width, height, depth, fg.getHandle(), bg.getHandle()));
	}
	
	public Pixmap(Drawable drawable, Bitmap mask, Color transparent, String filename) {
		super(gdk_pixmap_create_from_xpm(drawable.getHandle(), mask.getHandle(), transparent.getHandle(), filename));
	}
	
	/**
	 * Construct a new Pixmap from a handle to a native resource.
	 * @param handle The handle to the native resource.
	 */
	public Pixmap(int handle){
		super(handle);
	}
	
	public static Type getType() {
		return new Type(gdk_pixmap_get_type());
	}
	
    /****************************************
     * BEGINNING OF GENERATED CODE
     ****************************************/
    native static final protected int gdk_pixmap_get_type ();
    native static final protected int gdk_pixmap_new (int window, int width, int height, int depth);
    native static final protected int gdk_pixmap_create_from_data (int window, byte[] data, int  width, int height, int depth, int fg, int bg);
    native static final protected int gdk_pixmap_create_from_xpm (int window, int mask, int transparentColor, String filename);
//    native static final protected int gdk_pixmap_colormap_create_from_xpm (int window, int colormap, int mask, int transparentColor, String filename);
//    native static final protected int gdk_pixmap_create_from_xpm_d (int window, int mask, int transparentColor, byte[] data);
//    native static final protected int gdk_pixmap_colormap_create_from_xpm_d (int window, int colormap, int mask, int transparentColor, byte[] data);
//    native static final protected int gdk_pixmap_foreign_new (int anid);
    /****************************************
     * END OF GENERATED CODE
     ****************************************/
}

