/***************************************************************************
                            QGLWidget.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;

/**
 See {@link QGLWidgetSignals} for signals emitted by QGLWidget.

 See {@link QGLWidgetEventHandling} for event handlers to override in subclasses of QGLWidget.

*/
public class QGLWidget extends QGL {
	protected QGLWidget(Class dummy){super((Class) null);}

	private native void newQGLWidget( QWidget parent, String name, QGLWidget shareWidget, int f);
	public QGLWidget( QWidget parent, String name, QGLWidget shareWidget, int f) {
		super((Class) null);
		newQGLWidget( parent, name, shareWidget, f);
	}
	private native void newQGLWidget();
	public QGLWidget() {
		super((Class) null);
		newQGLWidget();
	}
	private native void newQGLWidget( QGLFormat format, QWidget parent, String name, QGLWidget shareWidget, int f);
	public QGLWidget( QGLFormat format, QWidget parent, String name, QGLWidget shareWidget, int f) {
		super((Class) null);
		newQGLWidget( format, parent, name, shareWidget, f);
	}
	private native void newQGLWidget( QGLFormat format);
	public QGLWidget( QGLFormat format) {
		super((Class) null);
		newQGLWidget( format);
	}
	protected native void finalize() throws InternalError;
	public native void qglColor( QColor c);
	public native void qglClearColor( QColor c);
	public native boolean isValid();
	public native boolean isSharing();
	public native void makeCurrent();
	public native boolean doubleBuffer();
	public native void swapBuffers();
	public native QGLFormat format();
	public native void setFormat( QGLFormat format);
	public native QGLContext context();
	public native void setContext( QGLContext context, QGLContext shareContext, boolean deleteOldContext);
	public native void setContext( QGLContext context);
	public native QPixmap renderPixmap( int w, int h, boolean useContext);
	public native QPixmap renderPixmap();
	public native QImage grabFrameBuffer( boolean withAlpha);
	public native QImage grabFrameBuffer();
	public native void makeOverlayCurrent();
	public native QGLContext overlayContext();
	public native void setMouseTracking( boolean enable);
	public native void reparent( QWidget parent, int f, QPoint p, boolean showIt);
	public native void reparent( QWidget parent, int f, QPoint p);
	public native QGLColormap colormap();
	public native void setColormap( QGLColormap map);
	public native void updateGL();
	public native void updateOverlayGL();
	public static native QImage convertToGLFormat( QImage img);
	protected native void initializeGL();
	protected native void resizeGL( int w, int h);
	protected native void paintGL();
	protected native void initializeOverlayGL();
	protected native void resizeOverlayGL( int w, int h);
	protected native void paintOverlayGL();
	protected native void setAutoBufferSwap( boolean on);
	protected native boolean autoBufferSwap();
	protected native void glInit();
	protected native void glDraw();
}
