/***************************************************************************
                            qt_QGLWidget.cpp -  description
                             -------------------
    begin                : Tue Nov 20 20:51:20 2001
    copyright            : (C) 2000-2001 Lost Highway Ltd. All rights reserved.
    email                : Lost_Highway@tipitina.demon.co.uk
    generated by         : duke@tipitina on Tue Nov 20 20:51:20 2001, using kalyptus 0.9.
 ***************************************************************************/

/***************************************************************************
 *                                                                         *
 *   This library is free software; you can redistribute it and/or modify  *
 *   it under the terms of the GNU Library General Public License as       *
 *   published by the Free Software Foundation; either version 2 of the    *
 *   License, or (at your option) any later version.                       *
 *                                                                         *
 ***************************************************************************/

extern "C" {
#include "qt_QGLWidget.h"
}

#include <qgl.h>
#include <qpixmap.h>
#include <qimage.h>

class QGLWidgetBridge : public QGLWidget
{
public:
	QGLWidgetBridge(QWidget* parent, const char* name, const QGLWidget* shareWidget, WFlags f) : QGLWidget(parent, name, shareWidget, f) {}
	QGLWidgetBridge(const QGLFormat& format, QWidget* parent, const char* name, const QGLWidget* shareWidget, WFlags f) : QGLWidget(format, parent, name, shareWidget, f) {}
	~QGLWidgetBridge() {}
	void protected_initializeGL() {
		QGLWidget::initializeGL();
		return;
	}
	void protected_resizeGL(int w, int h) {
		QGLWidget::resizeGL(w, h);
		return;
	}
	void protected_paintGL() {
		QGLWidget::paintGL();
		return;
	}
	void protected_initializeOverlayGL() {
		QGLWidget::initializeOverlayGL();
		return;
	}
	void protected_resizeOverlayGL(int w, int h) {
		QGLWidget::resizeOverlayGL(w, h);
		return;
	}
	void protected_paintOverlayGL() {
		QGLWidget::paintOverlayGL();
		return;
	}
	void protected_setAutoBufferSwap(bool on) {
		QGLWidget::setAutoBufferSwap(on);
		return;
	}
	bool  protected_autoBufferSwap() {
		return (bool ) QGLWidget::autoBufferSwap();
	}
	void protected_glInit() {
		QGLWidget::glInit();
		return;
	}
	void protected_glDraw() {
		QGLWidget::glDraw();
		return;
	}
	void keyPressEvent(QKeyEvent* arg1) {
		if (Qt_EventDelegate == 0L || !(*Qt_EventDelegate)(this, "keyPressEvent", arg1, "QKeyEvent")) {
			QWidget::keyPressEvent(arg1);
		}
		return;
	}
	void keyReleaseEvent(QKeyEvent* arg1) {
		if (Qt_EventDelegate == 0L || !(*Qt_EventDelegate)(this, "keyReleaseEvent", arg1, "QKeyEvent")) {
			QWidget::keyReleaseEvent(arg1);
		}
		return;
	}
	void focusOutEvent(QFocusEvent* arg1) {
		if (Qt_EventDelegate == 0L || !(*Qt_EventDelegate)(this, "focusOutEvent", arg1, "QFocusEvent")) {
			QWidget::focusOutEvent(arg1);
		}
		return;
	}
	void childEvent(QChildEvent* arg1) {
		if (Qt_EventDelegate == 0L || !(*Qt_EventDelegate)(this, "childEvent", arg1, "QChildEvent")) {
			QObject::childEvent(arg1);
		}
		return;
	}
	void dragMoveEvent(QDragMoveEvent* arg1) {
		if (Qt_EventDelegate == 0L || !(*Qt_EventDelegate)(this, "dragMoveEvent", arg1, "QDragMoveEvent")) {
			QWidget::dragMoveEvent(arg1);
		}
		return;
	}
	void leaveEvent(QEvent* arg1) {
		if (Qt_EventDelegate == 0L || !(*Qt_EventDelegate)(this, "leaveEvent", arg1, "QEvent")) {
			QWidget::leaveEvent(arg1);
		}
		return;
	}
	void tabletEvent(QTabletEvent* arg1) {
		if (Qt_EventDelegate == 0L || !(*Qt_EventDelegate)(this, "tabletEvent", arg1, "QTabletEvent")) {
			QWidget::tabletEvent(arg1);
		}
		return;
	}
	void showEvent(QShowEvent* arg1) {
		if (Qt_EventDelegate == 0L || !(*Qt_EventDelegate)(this, "showEvent", arg1, "QShowEvent")) {
			QWidget::showEvent(arg1);
		}
		return;
	}
	void contextMenuEvent(QContextMenuEvent* arg1) {
		if (Qt_EventDelegate == 0L || !(*Qt_EventDelegate)(this, "contextMenuEvent", arg1, "QContextMenuEvent")) {
			QWidget::contextMenuEvent(arg1);
		}
		return;
	}
	void mousePressEvent(QMouseEvent* arg1) {
		if (Qt_EventDelegate == 0L || !(*Qt_EventDelegate)(this, "mousePressEvent", arg1, "QMouseEvent")) {
			QWidget::mousePressEvent(arg1);
		}
		return;
	}
	void imComposeEvent(QIMEvent* arg1) {
		if (Qt_EventDelegate == 0L || !(*Qt_EventDelegate)(this, "imComposeEvent", arg1, "QIMEvent")) {
			QWidget::imComposeEvent(arg1);
		}
		return;
	}
	void customEvent(QCustomEvent* arg1) {
		if (Qt_EventDelegate == 0L || !(*Qt_EventDelegate)(this, "customEvent", arg1, "QCustomEvent")) {
			QObject::customEvent(arg1);
		}
		return;
	}
	void mouseReleaseEvent(QMouseEvent* arg1) {
		if (Qt_EventDelegate == 0L || !(*Qt_EventDelegate)(this, "mouseReleaseEvent", arg1, "QMouseEvent")) {
			QWidget::mouseReleaseEvent(arg1);
		}
		return;
	}
	void mouseDoubleClickEvent(QMouseEvent* arg1) {
		if (Qt_EventDelegate == 0L || !(*Qt_EventDelegate)(this, "mouseDoubleClickEvent", arg1, "QMouseEvent")) {
			QWidget::mouseDoubleClickEvent(arg1);
		}
		return;
	}
	void dragLeaveEvent(QDragLeaveEvent* arg1) {
		if (Qt_EventDelegate == 0L || !(*Qt_EventDelegate)(this, "dragLeaveEvent", arg1, "QDragLeaveEvent")) {
			QWidget::dragLeaveEvent(arg1);
		}
		return;
	}
	void enterEvent(QEvent* arg1) {
		if (Qt_EventDelegate == 0L || !(*Qt_EventDelegate)(this, "enterEvent", arg1, "QEvent")) {
			QWidget::enterEvent(arg1);
		}
		return;
	}
	void focusInEvent(QFocusEvent* arg1) {
		if (Qt_EventDelegate == 0L || !(*Qt_EventDelegate)(this, "focusInEvent", arg1, "QFocusEvent")) {
			QWidget::focusInEvent(arg1);
		}
		return;
	}
	void imEndEvent(QIMEvent* arg1) {
		if (Qt_EventDelegate == 0L || !(*Qt_EventDelegate)(this, "imEndEvent", arg1, "QIMEvent")) {
			QWidget::imEndEvent(arg1);
		}
		return;
	}
	void dropEvent(QDropEvent* arg1) {
		if (Qt_EventDelegate == 0L || !(*Qt_EventDelegate)(this, "dropEvent", arg1, "QDropEvent")) {
			QWidget::dropEvent(arg1);
		}
		return;
	}
	void dragEnterEvent(QDragEnterEvent* arg1) {
		if (Qt_EventDelegate == 0L || !(*Qt_EventDelegate)(this, "dragEnterEvent", arg1, "QDragEnterEvent")) {
			QWidget::dragEnterEvent(arg1);
		}
		return;
	}
	void mouseMoveEvent(QMouseEvent* arg1) {
		if (Qt_EventDelegate == 0L || !(*Qt_EventDelegate)(this, "mouseMoveEvent", arg1, "QMouseEvent")) {
			QWidget::mouseMoveEvent(arg1);
		}
		return;
	}
	void moveEvent(QMoveEvent* arg1) {
		if (Qt_EventDelegate == 0L || !(*Qt_EventDelegate)(this, "moveEvent", arg1, "QMoveEvent")) {
			QWidget::moveEvent(arg1);
		}
		return;
	}
	void wheelEvent(QWheelEvent* arg1) {
		if (Qt_EventDelegate == 0L || !(*Qt_EventDelegate)(this, "wheelEvent", arg1, "QWheelEvent")) {
			QWidget::wheelEvent(arg1);
		}
		return;
	}
	void hideEvent(QHideEvent* arg1) {
		if (Qt_EventDelegate == 0L || !(*Qt_EventDelegate)(this, "hideEvent", arg1, "QHideEvent")) {
			QWidget::hideEvent(arg1);
		}
		return;
	}
	void imStartEvent(QIMEvent* arg1) {
		if (Qt_EventDelegate == 0L || !(*Qt_EventDelegate)(this, "imStartEvent", arg1, "QIMEvent")) {
			QWidget::imStartEvent(arg1);
		}
		return;
	}
	void closeEvent(QCloseEvent* arg1) {
		if (Qt_EventDelegate == 0L || !(*Qt_EventDelegate)(this, "closeEvent", arg1, "QCloseEvent")) {
			QWidget::closeEvent(arg1);
		}
		return;
	}
	void paintEvent(QPaintEvent* arg1) {
		if (Qt_EventDelegate == 0L || !(*Qt_EventDelegate)(this, "paintEvent", arg1, "QPaintEvent")) {
			QGLWidget::paintEvent(arg1);
		}
		return;
	}
	void timerEvent(QTimerEvent* arg1) {
		if (Qt_EventDelegate == 0L || !(*Qt_EventDelegate)(this, "timerEvent", arg1, "QTimerEvent")) {
			QObject::timerEvent(arg1);
		}
		return;
	}
	void resizeEvent(QResizeEvent* arg1) {
		if (Qt_EventDelegate == 0L || !(*Qt_EventDelegate)(this, "resizeEvent", arg1, "QResizeEvent")) {
			QGLWidget::resizeEvent(arg1);
		}
		return;
	}
};

qt_QGLWidget * qt_new_QGLWidget(qt_QWidget * parent, char* name, qt_QGLWidget* shareWidget, int f){
	return (qt_QGLWidget *) new QGLWidgetBridge((QWidget*)parent, (char*)name, (QGLWidget*)shareWidget, (QWidget::WFlags)f);
}
qt_QGLWidget * qt_new_QGLWidget1(qt_QGLFormat* format, qt_QWidget * parent, char* name, qt_QGLWidget* shareWidget, int f){
	return (qt_QGLWidget *) new QGLWidgetBridge((QGLFormat&)* (QGLFormat*)format, (QWidget*)parent, (char*)name, (QGLWidget*)shareWidget, (QWidget::WFlags)f);
}
void qt_del_QGLWidget( qt_QGLWidget* p ){
	delete (QGLWidgetBridge*) p;
}
void qt_QGLWidget_qglColor( qt_QGLWidget* instPointer,qt_QColor * c){
	((QGLWidgetBridge*)instPointer)->qglColor((QColor&)* (QColor*)c);
	return;
}
void qt_QGLWidget_qglClearColor( qt_QGLWidget* instPointer,qt_QColor * c){
	((QGLWidgetBridge*)instPointer)->qglClearColor((QColor&)* (QColor*)c);
	return;
}
int qt_QGLWidget_isValid( qt_QGLWidget* instPointer){
	return (int) ((QGLWidgetBridge*)instPointer)->isValid();
}
int qt_QGLWidget_isSharing( qt_QGLWidget* instPointer){
	return (int) ((QGLWidgetBridge*)instPointer)->isSharing();
}
void qt_QGLWidget_makeCurrent( qt_QGLWidget* instPointer){
	((QGLWidgetBridge*)instPointer)->makeCurrent();
	return;
}
int qt_QGLWidget_doubleBuffer( qt_QGLWidget* instPointer){
	return (int) ((QGLWidgetBridge*)instPointer)->doubleBuffer();
}
void qt_QGLWidget_swapBuffers( qt_QGLWidget* instPointer){
	((QGLWidgetBridge*)instPointer)->swapBuffers();
	return;
}
qt_QGLFormat* qt_QGLWidget_format( qt_QGLWidget* instPointer){
	return (qt_QGLFormat*)new QGLFormat(((QGLWidgetBridge*)instPointer)->format());
}
void qt_QGLWidget_setFormat( qt_QGLWidget* instPointer,qt_QGLFormat* format){
	((QGLWidgetBridge*)instPointer)->setFormat((QGLFormat&)* (QGLFormat*)format);
	return;
}
qt_QGLContext* qt_QGLWidget_context( qt_QGLWidget* instPointer){
	return (qt_QGLContext*) ((QGLWidgetBridge*)instPointer)->context();
}
void qt_QGLWidget_setContext( qt_QGLWidget* instPointer,qt_QGLContext* context, qt_QGLContext* shareContext, int deleteOldContext){
	((QGLWidgetBridge*)instPointer)->setContext((QGLContext*)context, (QGLContext*)shareContext, (bool)deleteOldContext);
	return;
}
qt_QPixmap * qt_QGLWidget_renderPixmap( qt_QGLWidget* instPointer,int w, int h, int useContext){
	return (qt_QPixmap *)new QPixmap(((QGLWidgetBridge*)instPointer)->renderPixmap((int)w, (int)h, (bool)useContext));
}
qt_QImage * qt_QGLWidget_grabFrameBuffer( qt_QGLWidget* instPointer,int withAlpha){
	return (qt_QImage *)new QImage(((QGLWidgetBridge*)instPointer)->grabFrameBuffer((bool)withAlpha));
}
void qt_QGLWidget_makeOverlayCurrent( qt_QGLWidget* instPointer){
	((QGLWidgetBridge*)instPointer)->makeOverlayCurrent();
	return;
}
qt_QGLContext* qt_QGLWidget_overlayContext( qt_QGLWidget* instPointer){
	return (qt_QGLContext*) ((QGLWidgetBridge*)instPointer)->overlayContext();
}
void qt_QGLWidget_setMouseTracking( qt_QGLWidget* instPointer,int enable){
	((QGLWidgetBridge*)instPointer)->setMouseTracking((bool)enable);
	return;
}
void qt_QGLWidget_reparent( qt_QGLWidget* instPointer,qt_QWidget * parent, int f, qt_QPoint* p, int showIt){
	((QGLWidgetBridge*)instPointer)->reparent((QWidget*)parent, (QWidget::WFlags)f, (QPoint&)* (QPoint*)p, (bool)showIt);
	return;
}
qt_QGLColormap* qt_QGLWidget_colormap( qt_QGLWidget* instPointer){
	return (qt_QGLColormap*) (const QGLColormap *)&((QGLWidgetBridge*)instPointer)->colormap();
}
void qt_QGLWidget_setColormap( qt_QGLWidget* instPointer,qt_QGLColormap* map){
	((QGLWidgetBridge*)instPointer)->setColormap((QGLColormap&)* (QGLColormap*)map);
	return;
}
void qt_QGLWidget_updateGL( qt_QGLWidget* instPointer){
	((QGLWidgetBridge*)instPointer)->updateGL();
	return;
}
void qt_QGLWidget_updateOverlayGL( qt_QGLWidget* instPointer){
	((QGLWidgetBridge*)instPointer)->updateOverlayGL();
	return;
}
qt_QImage * qt_QGLWidget_convertToGLFormat( qt_QImage * img){
	return (qt_QImage *)new QImage(QGLWidgetBridge::convertToGLFormat((QImage&)* (QImage*)img));
}
void qt_QGLWidget_initializeGL( qt_QGLWidget* instPointer){
	((QGLWidgetBridge*)instPointer)->protected_initializeGL();
	return;
}
void qt_QGLWidget_resizeGL( qt_QGLWidget* instPointer,int w, int h){
	((QGLWidgetBridge*)instPointer)->protected_resizeGL((int)w, (int)h);
	return;
}
void qt_QGLWidget_paintGL( qt_QGLWidget* instPointer){
	((QGLWidgetBridge*)instPointer)->protected_paintGL();
	return;
}
void qt_QGLWidget_initializeOverlayGL( qt_QGLWidget* instPointer){
	((QGLWidgetBridge*)instPointer)->protected_initializeOverlayGL();
	return;
}
void qt_QGLWidget_resizeOverlayGL( qt_QGLWidget* instPointer,int w, int h){
	((QGLWidgetBridge*)instPointer)->protected_resizeOverlayGL((int)w, (int)h);
	return;
}
void qt_QGLWidget_paintOverlayGL( qt_QGLWidget* instPointer){
	((QGLWidgetBridge*)instPointer)->protected_paintOverlayGL();
	return;
}
void qt_QGLWidget_setAutoBufferSwap( qt_QGLWidget* instPointer,int on){
	((QGLWidgetBridge*)instPointer)->protected_setAutoBufferSwap((bool)on);
	return;
}
int qt_QGLWidget_autoBufferSwap( qt_QGLWidget* instPointer){
	return (int) ((QGLWidgetBridge*)instPointer)->protected_autoBufferSwap();
}
void qt_QGLWidget_glInit( qt_QGLWidget* instPointer){
	((QGLWidgetBridge*)instPointer)->protected_glInit();
	return;
}
void qt_QGLWidget_glDraw( qt_QGLWidget* instPointer){
	((QGLWidgetBridge*)instPointer)->protected_glDraw();
	return;
}
qt_QGL* qt_QGLWidget_QGL(qt_QGLWidget* instPointer){
	return (qt_QGL*) (QGL *) (QGLWidget *) instPointer;
}
qt_QWidget * qt_QGLWidget_QWidget(qt_QGLWidget* instPointer){
	return (qt_QWidget *) (QWidget *) (QGLWidget *) instPointer;
}
