2024-08-25 04:08:24 +00:00
|
|
|
#include <QSize>
|
|
|
|
#include <QSurface>
|
|
|
|
#include <QSurfaceFormat>
|
2024-08-29 07:01:51 +00:00
|
|
|
#include "qsurface.h"
|
2024-08-25 04:08:24 +00:00
|
|
|
|
2024-08-29 07:01:51 +00:00
|
|
|
#include "gen_qsurface.h"
|
2024-08-25 04:08:24 +00:00
|
|
|
|
|
|
|
extern "C" {
|
|
|
|
extern void miqt_exec_callback(void* cb, int argc, void* argv);
|
|
|
|
}
|
|
|
|
|
2024-09-11 05:41:09 +00:00
|
|
|
uintptr_t QSurface_SurfaceClass(const QSurface* self) {
|
|
|
|
QSurface::SurfaceClass ret = self->surfaceClass();
|
2024-08-29 07:01:51 +00:00
|
|
|
return static_cast<uintptr_t>(ret);
|
|
|
|
}
|
|
|
|
|
2024-09-11 05:41:09 +00:00
|
|
|
QSurfaceFormat* QSurface_Format(const QSurface* self) {
|
|
|
|
QSurfaceFormat ret = self->format();
|
2024-08-25 04:08:24 +00:00
|
|
|
// Copy-construct value returned type into heap-allocated copy
|
|
|
|
return static_cast<QSurfaceFormat*>(new QSurfaceFormat(ret));
|
|
|
|
}
|
|
|
|
|
2024-09-11 05:41:09 +00:00
|
|
|
uintptr_t QSurface_SurfaceType(const QSurface* self) {
|
|
|
|
QSurface::SurfaceType ret = self->surfaceType();
|
2024-08-29 07:01:51 +00:00
|
|
|
return static_cast<uintptr_t>(ret);
|
|
|
|
}
|
|
|
|
|
2024-09-11 05:41:09 +00:00
|
|
|
bool QSurface_SupportsOpenGL(const QSurface* self) {
|
|
|
|
return self->supportsOpenGL();
|
2024-08-25 04:08:24 +00:00
|
|
|
}
|
|
|
|
|
2024-09-11 05:41:09 +00:00
|
|
|
QSize* QSurface_Size(const QSurface* self) {
|
|
|
|
QSize ret = self->size();
|
2024-08-25 04:08:24 +00:00
|
|
|
// Copy-construct value returned type into heap-allocated copy
|
|
|
|
return static_cast<QSize*>(new QSize(ret));
|
|
|
|
}
|
|
|
|
|
|
|
|
void QSurface_Delete(QSurface* self) {
|
|
|
|
delete self;
|
|
|
|
}
|
|
|
|
|