miqt/qt6/gen_qsurface.cpp

42 lines
871 B
C++
Raw Permalink Normal View History

2024-10-20 05:21:03 +00:00
#include <QSize>
#include <QSurface>
#include <QSurfaceFormat>
#include <qsurface.h>
#include "gen_qsurface.h"
#ifndef _Bool
#define _Bool bool
#endif
2024-10-20 05:21:03 +00:00
#include "_cgo_export.h"
int QSurface_SurfaceClass(const QSurface* self) {
QSurface::SurfaceClass _ret = self->surfaceClass();
return static_cast<int>(_ret);
}
QSurfaceFormat* QSurface_Format(const QSurface* self) {
return new QSurfaceFormat(self->format());
}
int QSurface_SurfaceType(const QSurface* self) {
QSurface::SurfaceType _ret = self->surfaceType();
return static_cast<int>(_ret);
}
bool QSurface_SupportsOpenGL(const QSurface* self) {
return self->supportsOpenGL();
}
QSize* QSurface_Size(const QSurface* self) {
return new QSize(self->size());
}
2024-11-19 06:29:06 +00:00
void QSurface_Delete(QSurface* self, bool isSubclass) {
if (isSubclass) {
delete dynamic_cast<QSurface*>( self );
} else {
delete self;
}
2024-10-20 05:21:03 +00:00
}