/***************************************************************************
                            qt_QGLFormat.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_QGLFormat.h"
}

#include <qgl.h>

class QGLFormatBridge : public QGLFormat
{
public:
	QGLFormatBridge() : QGLFormat() {}
	QGLFormatBridge(int options, int plane) : QGLFormat(options, plane) {}
};

qt_QGLFormat * qt_new_QGLFormat(){
	return (qt_QGLFormat *) new QGLFormatBridge();
}
qt_QGLFormat * qt_new_QGLFormat1(int options, int plane){
	return (qt_QGLFormat *) new QGLFormatBridge((int)options, (int)plane);
}
int qt_QGLFormat_doubleBuffer( qt_QGLFormat* instPointer){
	return (int) ((QGLFormatBridge*)instPointer)->doubleBuffer();
}
void qt_QGLFormat_setDoubleBuffer( qt_QGLFormat* instPointer,int enable){
	((QGLFormatBridge*)instPointer)->setDoubleBuffer((bool)enable);
	return;
}
int qt_QGLFormat_depth( qt_QGLFormat* instPointer){
	return (int) ((QGLFormatBridge*)instPointer)->depth();
}
void qt_QGLFormat_setDepth( qt_QGLFormat* instPointer,int enable){
	((QGLFormatBridge*)instPointer)->setDepth((bool)enable);
	return;
}
int qt_QGLFormat_rgba( qt_QGLFormat* instPointer){
	return (int) ((QGLFormatBridge*)instPointer)->rgba();
}
void qt_QGLFormat_setRgba( qt_QGLFormat* instPointer,int enable){
	((QGLFormatBridge*)instPointer)->setRgba((bool)enable);
	return;
}
int qt_QGLFormat_alpha( qt_QGLFormat* instPointer){
	return (int) ((QGLFormatBridge*)instPointer)->alpha();
}
void qt_QGLFormat_setAlpha( qt_QGLFormat* instPointer,int enable){
	((QGLFormatBridge*)instPointer)->setAlpha((bool)enable);
	return;
}
int qt_QGLFormat_accum( qt_QGLFormat* instPointer){
	return (int) ((QGLFormatBridge*)instPointer)->accum();
}
void qt_QGLFormat_setAccum( qt_QGLFormat* instPointer,int enable){
	((QGLFormatBridge*)instPointer)->setAccum((bool)enable);
	return;
}
int qt_QGLFormat_stencil( qt_QGLFormat* instPointer){
	return (int) ((QGLFormatBridge*)instPointer)->stencil();
}
void qt_QGLFormat_setStencil( qt_QGLFormat* instPointer,int enable){
	((QGLFormatBridge*)instPointer)->setStencil((bool)enable);
	return;
}
int qt_QGLFormat_stereo( qt_QGLFormat* instPointer){
	return (int) ((QGLFormatBridge*)instPointer)->stereo();
}
void qt_QGLFormat_setStereo( qt_QGLFormat* instPointer,int enable){
	((QGLFormatBridge*)instPointer)->setStereo((bool)enable);
	return;
}
int qt_QGLFormat_directRendering( qt_QGLFormat* instPointer){
	return (int) ((QGLFormatBridge*)instPointer)->directRendering();
}
void qt_QGLFormat_setDirectRendering( qt_QGLFormat* instPointer,int enable){
	((QGLFormatBridge*)instPointer)->setDirectRendering((bool)enable);
	return;
}
int qt_QGLFormat_hasOverlay( qt_QGLFormat* instPointer){
	return (int) ((QGLFormatBridge*)instPointer)->hasOverlay();
}
void qt_QGLFormat_setOverlay( qt_QGLFormat* instPointer,int enable){
	((QGLFormatBridge*)instPointer)->setOverlay((bool)enable);
	return;
}
int qt_QGLFormat_plane( qt_QGLFormat* instPointer){
	return (int) ((QGLFormatBridge*)instPointer)->plane();
}
void qt_QGLFormat_setPlane( qt_QGLFormat* instPointer,int plane){
	((QGLFormatBridge*)instPointer)->setPlane((int)plane);
	return;
}
void qt_QGLFormat_setOption( qt_QGLFormat* instPointer,int opt){
	((QGLFormatBridge*)instPointer)->setOption((QGLFormat::FormatOption)opt);
	return;
}
int qt_QGLFormat_testOption( qt_QGLFormat* instPointer,int opt){
	return (int) ((QGLFormatBridge*)instPointer)->testOption((QGLFormat::FormatOption)opt);
}
qt_QGLFormat* qt_QGLFormat_defaultFormat( ){
	return (qt_QGLFormat*)new QGLFormat(QGLFormatBridge::defaultFormat());
}
void qt_QGLFormat_setDefaultFormat( qt_QGLFormat* f){
	QGLFormatBridge::setDefaultFormat((QGLFormat&)* (QGLFormat*)f);
	return;
}
qt_QGLFormat* qt_QGLFormat_defaultOverlayFormat( ){
	return (qt_QGLFormat*)new QGLFormat(QGLFormatBridge::defaultOverlayFormat());
}
void qt_QGLFormat_setDefaultOverlayFormat( qt_QGLFormat* f){
	QGLFormatBridge::setDefaultOverlayFormat((QGLFormat&)* (QGLFormat*)f);
	return;
}
int qt_QGLFormat_hasOpenGL( ){
	return (int) QGLFormatBridge::hasOpenGL();
}
int qt_QGLFormat_hasOpenGLOverlays( ){
	return (int) QGLFormatBridge::hasOpenGLOverlays();
}
