PythonQtWrapper_QGLContext.h
73 lines
| 3.3 KiB
| text/x-c
|
CLexer
florianlink
|
r13 | #ifndef PYTHONQTWRAPPER_QGLCONTEXT_H | ||
#define PYTHONQTWRAPPER_QGLCONTEXT_H | ||||
#include <qgl.h> | ||||
#include <QObject> | ||||
florianlink
|
r24 | #include <PythonQt.h> | ||
florianlink
|
r13 | #include <QVariant> | ||
#include <qcolor.h> | ||||
#include <qgl.h> | ||||
#include <qimage.h> | ||||
#include <qpaintdevice.h> | ||||
#include <qpixmap.h> | ||||
#include <qpoint.h> | ||||
#include <qrect.h> | ||||
florianlink
|
r24 | class PythonQtShell_QGLContext : public QGLContext | ||
{ | ||||
public: | ||||
PythonQtShell_QGLContext(const QGLFormat& format):QGLContext(format),_wrapper(NULL) {}; | ||||
PythonQtShell_QGLContext(const QGLFormat& format, QPaintDevice* device):QGLContext(format, device),_wrapper(NULL) {}; | ||||
virtual bool chooseContext(const QGLContext* shareContext = 0); | ||||
virtual bool create(const QGLContext* shareContext = 0); | ||||
virtual void doneCurrent(); | ||||
virtual void makeCurrent(); | ||||
virtual void swapBuffers() const; | ||||
PythonQtInstanceWrapper* _wrapper; | ||||
}; | ||||
class PythonQtPublicPromoter_QGLContext : public QGLContext | ||||
{ public: | ||||
florianlink
|
r28 | inline void promoted_doneCurrent() { QGLContext::doneCurrent(); } | ||
inline void promoted_makeCurrent() { QGLContext::makeCurrent(); } | ||||
inline bool promoted_chooseContext(const QGLContext* shareContext = 0) { return QGLContext::chooseContext(shareContext); } | ||||
inline void promoted_swapBuffers() const { QGLContext::swapBuffers(); } | ||||
inline bool promoted_create(const QGLContext* shareContext = 0) { return QGLContext::create(shareContext); } | ||||
florianlink
|
r24 | }; | ||
florianlink
|
r13 | class PythonQtWrapper_QGLContext : public QObject | ||
{ Q_OBJECT | ||||
public: | ||||
public slots: | ||||
QGLContext* new_QGLContext(const QGLFormat& format); | ||||
QGLContext* new_QGLContext(const QGLFormat& format, QPaintDevice* device); | ||||
void delete_QGLContext(QGLContext* obj) { delete obj; } | ||||
florianlink
|
r28 | void setFormat(QGLContext* theWrappedObject, const QGLFormat& format); | ||
florianlink
|
r13 | bool isValid(QGLContext* theWrappedObject) const; | ||
florianlink
|
r28 | int static_QGLContext_textureCacheLimit(); | ||
florianlink
|
r24 | void drawTexture(QGLContext* theWrappedObject, const QPointF& point, unsigned int textureId, unsigned int textureTarget = 0x0DE1); | ||
florianlink
|
r28 | unsigned int bindTexture(QGLContext* theWrappedObject, const QString& fileName); | ||
florianlink
|
r24 | QColor overlayTransparentColor(QGLContext* theWrappedObject) const; | ||
florianlink
|
r28 | QGLFormat format(QGLContext* theWrappedObject) const; | ||
unsigned int bindTexture(QGLContext* theWrappedObject, const QImage& image, unsigned int target = 0x0DE1, int format = 0x1908); | ||||
florianlink
|
r24 | const QGLContext* static_QGLContext_currentContext(); | ||
void doneCurrent(QGLContext* theWrappedObject); | ||||
florianlink
|
r28 | unsigned int bindTexture(QGLContext* theWrappedObject, const QPixmap& pixmap, unsigned int target = 0x0DE1, int format = 0x1908); | ||
florianlink
|
r24 | void makeCurrent(QGLContext* theWrappedObject); | ||
florianlink
|
r28 | void reset(QGLContext* theWrappedObject); | ||
florianlink
|
r24 | bool chooseContext(QGLContext* theWrappedObject, const QGLContext* shareContext = 0); | ||
florianlink
|
r28 | void swapBuffers(QGLContext* theWrappedObject) const; | ||
bool isSharing(QGLContext* theWrappedObject) const; | ||||
florianlink
|
r24 | void deleteTexture(QGLContext* theWrappedObject, unsigned int tx_id); | ||
florianlink
|
r28 | bool create(QGLContext* theWrappedObject, const QGLContext* shareContext = 0); | ||
florianlink
|
r24 | QPaintDevice* device(QGLContext* theWrappedObject) const; | ||
florianlink
|
r28 | void drawTexture(QGLContext* theWrappedObject, const QRectF& target, unsigned int textureId, unsigned int textureTarget = 0x0DE1); | ||
void static_QGLContext_setTextureCacheLimit(int size); | ||||
QGLFormat requestedFormat(QGLContext* theWrappedObject) const; | ||||
florianlink
|
r13 | }; | ||
#endif // PYTHONQTWRAPPER_QGLCONTEXT_H | ||||