/***************************************************************************
                            QGLContext.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 QGLContext extends QGL  {
	protected QGLContext(Class dummy){super((Class) null);}

	private native void newQGLContext( QGLFormat format, QPaintDeviceInterface device);
	public QGLContext( QGLFormat format, QPaintDeviceInterface device) {
		super((Class) null);
		newQGLContext( format, device);
	}

	protected native void finalize() throws InternalError;
	public native boolean create( QGLContext shareContext);
	public native boolean create();
	public native boolean isValid();
	public native boolean isSharing();
	public native void reset();
	public native QGLFormat format();
	public native QGLFormat requestedFormat();
	public native void setFormat( QGLFormat format);
	public native void makeCurrent();
	public native void swapBuffers();
	public native QPaintDeviceInterface device();
	public native QColor overlayTransparentColor();
	public static native QGLContext currentContext();
	protected native boolean chooseContext( QGLContext shareContext);
	protected native boolean chooseContext();
	protected native void doneCurrent();
//	protected native int choosePixelFormat( int pfd, int pdc);
//	protected native int tryVisual( QGLFormat f, int bufDepth);
//	protected native int tryVisual( QGLFormat f);
//	protected native int chooseVisual();
//	protected native int chooseMacVisual( GDHandle arg1);
	protected native boolean deviceIsPixmap();
	protected native boolean windowCreated();
	protected native void setWindowCreated( boolean on);
	protected native boolean initialized();
	protected native void setInitialized( boolean on);
	protected native int colorIndex( QColor c);
}
