/***************************************************************************
                            KSharedPixmap.java -  description
                             -------------------
    begin                : Sun Jan 27 16:22:17 2002
    copyright            : (C) 2000-2001 Lost Highway Ltd.
    email                : Richard_Dale@tipitina.demon.co.uk
    generated by         : duke@tipitina on Sun Jan 27 16:22:17 2002, 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.koala;

import org.kde.qt.*;
import java.util.*;
import java.lang.Error;

/**

 Shared pixmap client.

 A shared pixmap is a pixmap that resides on the X server, is referenced
 by a global id string, and can be accessed by all X clients.

 This class is a client class to shared pixmaps in KDE. You can use it
 to copy (a part of) a shared pixmap into. KSharedPixmap inherits KPixmap
 for that purpose.

 The server part of shared pixmaps is not implemented here. 
 That part is provided by KPixmapServer, in the source file:
 kdebase/kdesktop/pixmapserver.cc.

 An example: copy from a shared pixmap:
 <pre>
   KSharedPixmap pm = new KSharedPixmap;
   connect(pm, SIGNAL("done(bool)"), SLOT("slotDone(bool)"));
   pm.loadFromShared("My Pixmap");
 </pre>

 
 See {@link KSharedPixmapSignals} for signals emitted by KSharedPixmap.

 See {@link KSharedPixmapEventHandling} for event handlers to override in subclasses of KSharedPixmap.

 @author Geert Jansen <jansen@kde.org>

 @version $Id: KSharedPixmap.java,v 1.5 2002/01/31 04:49:01 rdale Exp $

 @short 
 Shared pixmap client.
*/
public class KSharedPixmap extends KPixmap {
	protected KSharedPixmap(Class dummy){super((Class) null);}

	private native void newKSharedPixmap();

/** 
 Construct an empty pixmap.
     
*/
	public KSharedPixmap() {
		super((Class) null);
		newKSharedPixmap();
	}

/** 
 Destroys the pixmap.
     
*/
	protected native void finalize() throws InternalError;
	public native void dispose();
	public native boolean isDisposed();

/** 
 Load from a shared pixmap reference. The signal done() is emitted
 when the operation has finished.

*/
	public native boolean loadFromShared( String name, QRect rect);
	public native boolean loadFromShared( String name);

/** 
 Check whether a shared pixmap is available.

*/
	public native boolean isAvailable( String name);
//	protected native boolean x11Event( XEvent* arg1);
}
