2024-08-25 04:08:24 +00:00
|
|
|
#include <QBitmap>
|
2024-08-29 07:01:51 +00:00
|
|
|
#include <QImage>
|
2024-08-25 04:08:24 +00:00
|
|
|
#include <QMatrix>
|
2024-11-19 06:29:06 +00:00
|
|
|
#include <QPaintDevice>
|
|
|
|
#include <QPaintEngine>
|
2024-08-25 04:08:24 +00:00
|
|
|
#include <QPixmap>
|
|
|
|
#include <QSize>
|
|
|
|
#include <QString>
|
2024-08-29 07:01:51 +00:00
|
|
|
#include <QByteArray>
|
|
|
|
#include <cstring>
|
2024-08-25 04:08:24 +00:00
|
|
|
#include <QTransform>
|
2024-10-16 05:07:56 +00:00
|
|
|
#include <qbitmap.h>
|
2024-08-29 07:01:51 +00:00
|
|
|
#include "gen_qbitmap.h"
|
2024-12-11 06:55:47 +00:00
|
|
|
|
|
|
|
#ifndef _Bool
|
|
|
|
#define _Bool bool
|
|
|
|
#endif
|
2024-09-14 22:29:05 +00:00
|
|
|
#include "_cgo_export.h"
|
2024-08-25 04:08:24 +00:00
|
|
|
|
2024-11-19 06:29:06 +00:00
|
|
|
class MiqtVirtualQBitmap : public virtual QBitmap {
|
|
|
|
public:
|
|
|
|
|
|
|
|
MiqtVirtualQBitmap(): QBitmap() {};
|
|
|
|
MiqtVirtualQBitmap(const QPixmap& param1): QBitmap(param1) {};
|
|
|
|
MiqtVirtualQBitmap(int w, int h): QBitmap(w, h) {};
|
|
|
|
MiqtVirtualQBitmap(const QSize& param1): QBitmap(param1) {};
|
|
|
|
MiqtVirtualQBitmap(const QString& fileName): QBitmap(fileName) {};
|
|
|
|
MiqtVirtualQBitmap(const QBitmap& other): QBitmap(other) {};
|
|
|
|
MiqtVirtualQBitmap(const QString& fileName, const char* format): QBitmap(fileName, format) {};
|
|
|
|
|
|
|
|
virtual ~MiqtVirtualQBitmap() = default;
|
|
|
|
|
|
|
|
// cgo.Handle value for overwritten implementation
|
|
|
|
intptr_t handle__DevType = 0;
|
|
|
|
|
|
|
|
// Subclass to allow providing a Go implementation
|
|
|
|
virtual int devType() const override {
|
|
|
|
if (handle__DevType == 0) {
|
|
|
|
return QBitmap::devType();
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
int callback_return_value = miqt_exec_callback_QBitmap_DevType(const_cast<MiqtVirtualQBitmap*>(this), handle__DevType);
|
|
|
|
|
|
|
|
return static_cast<int>(callback_return_value);
|
|
|
|
}
|
|
|
|
|
|
|
|
// Wrapper to allow calling protected method
|
|
|
|
int virtualbase_DevType() const {
|
|
|
|
|
|
|
|
return QBitmap::devType();
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
// cgo.Handle value for overwritten implementation
|
|
|
|
intptr_t handle__PaintEngine = 0;
|
|
|
|
|
|
|
|
// Subclass to allow providing a Go implementation
|
|
|
|
virtual QPaintEngine* paintEngine() const override {
|
|
|
|
if (handle__PaintEngine == 0) {
|
|
|
|
return QBitmap::paintEngine();
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
QPaintEngine* callback_return_value = miqt_exec_callback_QBitmap_PaintEngine(const_cast<MiqtVirtualQBitmap*>(this), handle__PaintEngine);
|
|
|
|
|
|
|
|
return callback_return_value;
|
|
|
|
}
|
|
|
|
|
|
|
|
// Wrapper to allow calling protected method
|
|
|
|
QPaintEngine* virtualbase_PaintEngine() const {
|
|
|
|
|
|
|
|
return QBitmap::paintEngine();
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
// cgo.Handle value for overwritten implementation
|
|
|
|
intptr_t handle__Metric = 0;
|
|
|
|
|
|
|
|
// Subclass to allow providing a Go implementation
|
|
|
|
virtual int metric(QPaintDevice::PaintDeviceMetric param1) const override {
|
|
|
|
if (handle__Metric == 0) {
|
|
|
|
return QBitmap::metric(param1);
|
|
|
|
}
|
|
|
|
|
|
|
|
QPaintDevice::PaintDeviceMetric param1_ret = param1;
|
|
|
|
int sigval1 = static_cast<int>(param1_ret);
|
|
|
|
|
|
|
|
int callback_return_value = miqt_exec_callback_QBitmap_Metric(const_cast<MiqtVirtualQBitmap*>(this), handle__Metric, sigval1);
|
|
|
|
|
|
|
|
return static_cast<int>(callback_return_value);
|
|
|
|
}
|
|
|
|
|
|
|
|
// Wrapper to allow calling protected method
|
|
|
|
int virtualbase_Metric(int param1) const {
|
|
|
|
|
|
|
|
return QBitmap::metric(static_cast<QPaintDevice::PaintDeviceMetric>(param1));
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
};
|
|
|
|
|
2024-12-07 04:15:57 +00:00
|
|
|
QBitmap* QBitmap_new() {
|
|
|
|
return new MiqtVirtualQBitmap();
|
2024-08-25 04:08:24 +00:00
|
|
|
}
|
|
|
|
|
2024-12-07 04:15:57 +00:00
|
|
|
QBitmap* QBitmap_new2(QPixmap* param1) {
|
|
|
|
return new MiqtVirtualQBitmap(*param1);
|
2024-08-25 04:08:24 +00:00
|
|
|
}
|
|
|
|
|
2024-12-07 04:15:57 +00:00
|
|
|
QBitmap* QBitmap_new3(int w, int h) {
|
|
|
|
return new MiqtVirtualQBitmap(static_cast<int>(w), static_cast<int>(h));
|
2024-08-25 04:08:24 +00:00
|
|
|
}
|
|
|
|
|
2024-12-07 04:15:57 +00:00
|
|
|
QBitmap* QBitmap_new4(QSize* param1) {
|
|
|
|
return new MiqtVirtualQBitmap(*param1);
|
2024-08-25 04:08:24 +00:00
|
|
|
}
|
|
|
|
|
2024-12-07 04:15:57 +00:00
|
|
|
QBitmap* QBitmap_new5(struct miqt_string fileName) {
|
2024-10-18 23:53:33 +00:00
|
|
|
QString fileName_QString = QString::fromUtf8(fileName.data, fileName.len);
|
2024-12-07 04:15:57 +00:00
|
|
|
return new MiqtVirtualQBitmap(fileName_QString);
|
2024-08-25 04:08:24 +00:00
|
|
|
}
|
|
|
|
|
2024-12-07 04:15:57 +00:00
|
|
|
QBitmap* QBitmap_new6(QBitmap* other) {
|
|
|
|
return new MiqtVirtualQBitmap(*other);
|
2024-08-25 04:08:24 +00:00
|
|
|
}
|
|
|
|
|
2024-12-07 04:15:57 +00:00
|
|
|
QBitmap* QBitmap_new7(struct miqt_string fileName, const char* format) {
|
2024-10-18 23:53:33 +00:00
|
|
|
QString fileName_QString = QString::fromUtf8(fileName.data, fileName.len);
|
2024-12-07 04:15:57 +00:00
|
|
|
return new MiqtVirtualQBitmap(fileName_QString, format);
|
|
|
|
}
|
|
|
|
|
|
|
|
void QBitmap_virtbase(QBitmap* src, QPixmap** outptr_QPixmap) {
|
|
|
|
*outptr_QPixmap = static_cast<QPixmap*>(src);
|
2024-08-25 04:08:24 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
void QBitmap_OperatorAssign(QBitmap* self, QBitmap* other) {
|
|
|
|
self->operator=(*other);
|
|
|
|
}
|
|
|
|
|
|
|
|
void QBitmap_OperatorAssignWithQPixmap(QBitmap* self, QPixmap* param1) {
|
|
|
|
self->operator=(*param1);
|
|
|
|
}
|
|
|
|
|
|
|
|
void QBitmap_Swap(QBitmap* self, QBitmap* other) {
|
|
|
|
self->swap(*other);
|
|
|
|
}
|
|
|
|
|
|
|
|
void QBitmap_Clear(QBitmap* self) {
|
|
|
|
self->clear();
|
|
|
|
}
|
|
|
|
|
2024-08-29 07:01:51 +00:00
|
|
|
QBitmap* QBitmap_FromImage(QImage* image) {
|
2024-09-17 06:29:11 +00:00
|
|
|
return new QBitmap(QBitmap::fromImage(*image));
|
2024-08-29 07:01:51 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
QBitmap* QBitmap_FromData(QSize* size, const unsigned char* bits) {
|
2024-09-17 06:29:11 +00:00
|
|
|
return new QBitmap(QBitmap::fromData(*size, static_cast<const uchar*>(bits)));
|
2024-08-29 07:01:51 +00:00
|
|
|
}
|
|
|
|
|
2024-09-11 05:41:09 +00:00
|
|
|
QBitmap* QBitmap_Transformed(const QBitmap* self, QMatrix* param1) {
|
2024-09-17 06:29:11 +00:00
|
|
|
return new QBitmap(self->transformed(*param1));
|
2024-08-25 04:08:24 +00:00
|
|
|
}
|
|
|
|
|
2024-09-11 05:41:09 +00:00
|
|
|
QBitmap* QBitmap_TransformedWithMatrix(const QBitmap* self, QTransform* matrix) {
|
2024-09-17 06:29:11 +00:00
|
|
|
return new QBitmap(self->transformed(*matrix));
|
2024-08-29 07:01:51 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
QBitmap* QBitmap_FromImage2(QImage* image, int flags) {
|
2024-09-17 06:29:11 +00:00
|
|
|
return new QBitmap(QBitmap::fromImage(*image, static_cast<Qt::ImageConversionFlags>(flags)));
|
2024-08-29 07:01:51 +00:00
|
|
|
}
|
|
|
|
|
2024-09-18 00:12:02 +00:00
|
|
|
QBitmap* QBitmap_FromData3(QSize* size, const unsigned char* bits, int monoFormat) {
|
2024-09-17 06:29:11 +00:00
|
|
|
return new QBitmap(QBitmap::fromData(*size, static_cast<const uchar*>(bits), static_cast<QImage::Format>(monoFormat)));
|
2024-08-25 04:08:24 +00:00
|
|
|
}
|
|
|
|
|
2024-11-19 06:29:06 +00:00
|
|
|
void QBitmap_override_virtual_DevType(void* self, intptr_t slot) {
|
|
|
|
dynamic_cast<MiqtVirtualQBitmap*>( (QBitmap*)(self) )->handle__DevType = slot;
|
|
|
|
}
|
|
|
|
|
|
|
|
int QBitmap_virtualbase_DevType(const void* self) {
|
|
|
|
return ( (const MiqtVirtualQBitmap*)(self) )->virtualbase_DevType();
|
|
|
|
}
|
|
|
|
|
|
|
|
void QBitmap_override_virtual_PaintEngine(void* self, intptr_t slot) {
|
|
|
|
dynamic_cast<MiqtVirtualQBitmap*>( (QBitmap*)(self) )->handle__PaintEngine = slot;
|
|
|
|
}
|
|
|
|
|
|
|
|
QPaintEngine* QBitmap_virtualbase_PaintEngine(const void* self) {
|
|
|
|
return ( (const MiqtVirtualQBitmap*)(self) )->virtualbase_PaintEngine();
|
|
|
|
}
|
|
|
|
|
|
|
|
void QBitmap_override_virtual_Metric(void* self, intptr_t slot) {
|
|
|
|
dynamic_cast<MiqtVirtualQBitmap*>( (QBitmap*)(self) )->handle__Metric = slot;
|
|
|
|
}
|
|
|
|
|
|
|
|
int QBitmap_virtualbase_Metric(const void* self, int param1) {
|
|
|
|
return ( (const MiqtVirtualQBitmap*)(self) )->virtualbase_Metric(param1);
|
|
|
|
}
|
|
|
|
|
|
|
|
void QBitmap_Delete(QBitmap* self, bool isSubclass) {
|
|
|
|
if (isSubclass) {
|
|
|
|
delete dynamic_cast<MiqtVirtualQBitmap*>( self );
|
|
|
|
} else {
|
|
|
|
delete self;
|
|
|
|
}
|
2024-08-25 04:08:24 +00:00
|
|
|
}
|
|
|
|
|