2024-08-25 04:08:24 +00:00
|
|
|
#include <QByteArray>
|
|
|
|
#include <QIODevice>
|
|
|
|
#include <QList>
|
2024-11-19 06:29:06 +00:00
|
|
|
#include <QPaintDevice>
|
2024-08-25 04:08:24 +00:00
|
|
|
#include <QPaintEngine>
|
|
|
|
#include <QPainter>
|
|
|
|
#include <QPicture>
|
|
|
|
#include <QPictureIO>
|
2024-11-19 06:29:06 +00:00
|
|
|
#include <QPoint>
|
2024-08-25 04:08:24 +00:00
|
|
|
#include <QRect>
|
|
|
|
#include <QString>
|
2024-08-29 07:01:51 +00:00
|
|
|
#include <QByteArray>
|
|
|
|
#include <cstring>
|
2024-10-16 05:07:56 +00:00
|
|
|
#include <qpicture.h>
|
2024-08-29 07:01:51 +00:00
|
|
|
#include "gen_qpicture.h"
|
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 MiqtVirtualQPicture : public virtual QPicture {
|
|
|
|
public:
|
|
|
|
|
|
|
|
MiqtVirtualQPicture(): QPicture() {};
|
|
|
|
MiqtVirtualQPicture(const QPicture& param1): QPicture(param1) {};
|
|
|
|
MiqtVirtualQPicture(int formatVersion): QPicture(formatVersion) {};
|
|
|
|
|
|
|
|
virtual ~MiqtVirtualQPicture() = 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 QPicture::devType();
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
int callback_return_value = miqt_exec_callback_QPicture_DevType(const_cast<MiqtVirtualQPicture*>(this), handle__DevType);
|
|
|
|
|
|
|
|
return static_cast<int>(callback_return_value);
|
|
|
|
}
|
|
|
|
|
|
|
|
// Wrapper to allow calling protected method
|
|
|
|
int virtualbase_DevType() const {
|
|
|
|
|
|
|
|
return QPicture::devType();
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
// cgo.Handle value for overwritten implementation
|
|
|
|
intptr_t handle__SetData = 0;
|
|
|
|
|
|
|
|
// Subclass to allow providing a Go implementation
|
|
|
|
virtual void setData(const char* data, uint size) override {
|
|
|
|
if (handle__SetData == 0) {
|
|
|
|
QPicture::setData(data, size);
|
|
|
|
return;
|
|
|
|
}
|
|
|
|
|
|
|
|
const char* sigval1 = (const char*) data;
|
|
|
|
uint size_ret = size;
|
|
|
|
unsigned int sigval2 = static_cast<unsigned int>(size_ret);
|
|
|
|
|
|
|
|
miqt_exec_callback_QPicture_SetData(this, handle__SetData, sigval1, sigval2);
|
|
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
// Wrapper to allow calling protected method
|
|
|
|
void virtualbase_SetData(const char* data, unsigned int size) {
|
|
|
|
|
|
|
|
QPicture::setData(data, static_cast<uint>(size));
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
// 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 QPicture::paintEngine();
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
QPaintEngine* callback_return_value = miqt_exec_callback_QPicture_PaintEngine(const_cast<MiqtVirtualQPicture*>(this), handle__PaintEngine);
|
|
|
|
|
|
|
|
return callback_return_value;
|
|
|
|
}
|
|
|
|
|
|
|
|
// Wrapper to allow calling protected method
|
|
|
|
QPaintEngine* virtualbase_PaintEngine() const {
|
|
|
|
|
|
|
|
return QPicture::paintEngine();
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
// cgo.Handle value for overwritten implementation
|
|
|
|
intptr_t handle__Metric = 0;
|
|
|
|
|
|
|
|
// Subclass to allow providing a Go implementation
|
|
|
|
virtual int metric(QPaintDevice::PaintDeviceMetric m) const override {
|
|
|
|
if (handle__Metric == 0) {
|
|
|
|
return QPicture::metric(m);
|
|
|
|
}
|
|
|
|
|
|
|
|
QPaintDevice::PaintDeviceMetric m_ret = m;
|
|
|
|
int sigval1 = static_cast<int>(m_ret);
|
|
|
|
|
|
|
|
int callback_return_value = miqt_exec_callback_QPicture_Metric(const_cast<MiqtVirtualQPicture*>(this), handle__Metric, sigval1);
|
|
|
|
|
|
|
|
return static_cast<int>(callback_return_value);
|
|
|
|
}
|
|
|
|
|
|
|
|
// Wrapper to allow calling protected method
|
|
|
|
int virtualbase_Metric(int m) const {
|
|
|
|
|
|
|
|
return QPicture::metric(static_cast<QPaintDevice::PaintDeviceMetric>(m));
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
// cgo.Handle value for overwritten implementation
|
|
|
|
intptr_t handle__InitPainter = 0;
|
|
|
|
|
|
|
|
// Subclass to allow providing a Go implementation
|
|
|
|
virtual void initPainter(QPainter* painter) const override {
|
|
|
|
if (handle__InitPainter == 0) {
|
|
|
|
QPicture::initPainter(painter);
|
|
|
|
return;
|
|
|
|
}
|
|
|
|
|
|
|
|
QPainter* sigval1 = painter;
|
|
|
|
|
|
|
|
miqt_exec_callback_QPicture_InitPainter(const_cast<MiqtVirtualQPicture*>(this), handle__InitPainter, sigval1);
|
|
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
// Wrapper to allow calling protected method
|
|
|
|
void virtualbase_InitPainter(QPainter* painter) const {
|
|
|
|
|
|
|
|
QPicture::initPainter(painter);
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
// cgo.Handle value for overwritten implementation
|
|
|
|
intptr_t handle__Redirected = 0;
|
|
|
|
|
|
|
|
// Subclass to allow providing a Go implementation
|
|
|
|
virtual QPaintDevice* redirected(QPoint* offset) const override {
|
|
|
|
if (handle__Redirected == 0) {
|
|
|
|
return QPicture::redirected(offset);
|
|
|
|
}
|
|
|
|
|
|
|
|
QPoint* sigval1 = offset;
|
|
|
|
|
|
|
|
QPaintDevice* callback_return_value = miqt_exec_callback_QPicture_Redirected(const_cast<MiqtVirtualQPicture*>(this), handle__Redirected, sigval1);
|
|
|
|
|
|
|
|
return callback_return_value;
|
|
|
|
}
|
|
|
|
|
|
|
|
// Wrapper to allow calling protected method
|
|
|
|
QPaintDevice* virtualbase_Redirected(QPoint* offset) const {
|
|
|
|
|
|
|
|
return QPicture::redirected(offset);
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
// cgo.Handle value for overwritten implementation
|
|
|
|
intptr_t handle__SharedPainter = 0;
|
|
|
|
|
|
|
|
// Subclass to allow providing a Go implementation
|
|
|
|
virtual QPainter* sharedPainter() const override {
|
|
|
|
if (handle__SharedPainter == 0) {
|
|
|
|
return QPicture::sharedPainter();
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
QPainter* callback_return_value = miqt_exec_callback_QPicture_SharedPainter(const_cast<MiqtVirtualQPicture*>(this), handle__SharedPainter);
|
|
|
|
|
|
|
|
return callback_return_value;
|
|
|
|
}
|
|
|
|
|
|
|
|
// Wrapper to allow calling protected method
|
|
|
|
QPainter* virtualbase_SharedPainter() const {
|
|
|
|
|
|
|
|
return QPicture::sharedPainter();
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
};
|
|
|
|
|
|
|
|
void QPicture_new(QPicture** outptr_QPicture, QPaintDevice** outptr_QPaintDevice) {
|
|
|
|
MiqtVirtualQPicture* ret = new MiqtVirtualQPicture();
|
|
|
|
*outptr_QPicture = ret;
|
|
|
|
*outptr_QPaintDevice = static_cast<QPaintDevice*>(ret);
|
2024-08-25 04:08:24 +00:00
|
|
|
}
|
|
|
|
|
2024-11-19 06:29:06 +00:00
|
|
|
void QPicture_new2(QPicture* param1, QPicture** outptr_QPicture, QPaintDevice** outptr_QPaintDevice) {
|
|
|
|
MiqtVirtualQPicture* ret = new MiqtVirtualQPicture(*param1);
|
|
|
|
*outptr_QPicture = ret;
|
|
|
|
*outptr_QPaintDevice = static_cast<QPaintDevice*>(ret);
|
2024-08-25 04:08:24 +00:00
|
|
|
}
|
|
|
|
|
2024-11-19 06:29:06 +00:00
|
|
|
void QPicture_new3(int formatVersion, QPicture** outptr_QPicture, QPaintDevice** outptr_QPaintDevice) {
|
|
|
|
MiqtVirtualQPicture* ret = new MiqtVirtualQPicture(static_cast<int>(formatVersion));
|
|
|
|
*outptr_QPicture = ret;
|
|
|
|
*outptr_QPaintDevice = static_cast<QPaintDevice*>(ret);
|
2024-08-25 04:08:24 +00:00
|
|
|
}
|
|
|
|
|
2024-09-11 05:41:09 +00:00
|
|
|
bool QPicture_IsNull(const QPicture* self) {
|
|
|
|
return self->isNull();
|
2024-08-25 04:08:24 +00:00
|
|
|
}
|
|
|
|
|
2024-09-11 05:41:09 +00:00
|
|
|
int QPicture_DevType(const QPicture* self) {
|
|
|
|
return self->devType();
|
2024-08-25 04:08:24 +00:00
|
|
|
}
|
|
|
|
|
2024-09-11 05:41:09 +00:00
|
|
|
unsigned int QPicture_Size(const QPicture* self) {
|
2024-09-18 00:12:02 +00:00
|
|
|
uint _ret = self->size();
|
|
|
|
return static_cast<unsigned int>(_ret);
|
2024-08-25 04:08:24 +00:00
|
|
|
}
|
|
|
|
|
2024-09-11 05:41:09 +00:00
|
|
|
const char* QPicture_Data(const QPicture* self) {
|
|
|
|
return (const char*) self->data();
|
2024-08-25 04:08:24 +00:00
|
|
|
}
|
|
|
|
|
2024-08-29 07:01:51 +00:00
|
|
|
void QPicture_SetData(QPicture* self, const char* data, unsigned int size) {
|
2024-08-25 04:08:24 +00:00
|
|
|
self->setData(data, static_cast<uint>(size));
|
|
|
|
}
|
|
|
|
|
|
|
|
bool QPicture_Play(QPicture* self, QPainter* p) {
|
|
|
|
return self->play(p);
|
|
|
|
}
|
|
|
|
|
|
|
|
bool QPicture_Load(QPicture* self, QIODevice* dev) {
|
|
|
|
return self->load(dev);
|
|
|
|
}
|
|
|
|
|
2024-10-18 23:53:33 +00:00
|
|
|
bool QPicture_LoadWithFileName(QPicture* self, struct miqt_string fileName) {
|
|
|
|
QString fileName_QString = QString::fromUtf8(fileName.data, fileName.len);
|
2024-08-25 04:08:24 +00:00
|
|
|
return self->load(fileName_QString);
|
|
|
|
}
|
|
|
|
|
|
|
|
bool QPicture_Save(QPicture* self, QIODevice* dev) {
|
|
|
|
return self->save(dev);
|
|
|
|
}
|
|
|
|
|
2024-10-18 23:53:33 +00:00
|
|
|
bool QPicture_SaveWithFileName(QPicture* self, struct miqt_string fileName) {
|
|
|
|
QString fileName_QString = QString::fromUtf8(fileName.data, fileName.len);
|
2024-08-25 04:08:24 +00:00
|
|
|
return self->save(fileName_QString);
|
|
|
|
}
|
|
|
|
|
2024-09-11 05:41:09 +00:00
|
|
|
QRect* QPicture_BoundingRect(const QPicture* self) {
|
2024-09-17 06:29:11 +00:00
|
|
|
return new QRect(self->boundingRect());
|
2024-08-25 04:08:24 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
void QPicture_SetBoundingRect(QPicture* self, QRect* r) {
|
|
|
|
self->setBoundingRect(*r);
|
|
|
|
}
|
|
|
|
|
|
|
|
void QPicture_OperatorAssign(QPicture* self, QPicture* p) {
|
|
|
|
self->operator=(*p);
|
|
|
|
}
|
|
|
|
|
|
|
|
void QPicture_Swap(QPicture* self, QPicture* other) {
|
|
|
|
self->swap(*other);
|
|
|
|
}
|
|
|
|
|
|
|
|
void QPicture_Detach(QPicture* self) {
|
|
|
|
self->detach();
|
|
|
|
}
|
|
|
|
|
2024-09-11 05:41:09 +00:00
|
|
|
bool QPicture_IsDetached(const QPicture* self) {
|
|
|
|
return self->isDetached();
|
2024-08-25 04:08:24 +00:00
|
|
|
}
|
|
|
|
|
2024-10-18 23:53:33 +00:00
|
|
|
const char* QPicture_PictureFormat(struct miqt_string fileName) {
|
|
|
|
QString fileName_QString = QString::fromUtf8(fileName.data, fileName.len);
|
2024-08-29 07:01:51 +00:00
|
|
|
return (const char*) QPicture::pictureFormat(fileName_QString);
|
2024-08-25 04:08:24 +00:00
|
|
|
}
|
|
|
|
|
2024-11-17 06:21:37 +00:00
|
|
|
struct miqt_array /* of struct miqt_string */ QPicture_InputFormats() {
|
2024-09-14 22:29:05 +00:00
|
|
|
QList<QByteArray> _ret = QPicture::inputFormats();
|
2024-09-17 06:29:11 +00:00
|
|
|
// Convert QList<> from C++ memory to manually-managed C memory
|
2024-10-18 23:53:33 +00:00
|
|
|
struct miqt_string* _arr = static_cast<struct miqt_string*>(malloc(sizeof(struct miqt_string) * _ret.length()));
|
2024-09-14 22:29:05 +00:00
|
|
|
for (size_t i = 0, e = _ret.length(); i < e; ++i) {
|
2024-10-18 23:53:33 +00:00
|
|
|
QByteArray _lv_qb = _ret[i];
|
|
|
|
struct miqt_string _lv_ms;
|
|
|
|
_lv_ms.len = _lv_qb.length();
|
|
|
|
_lv_ms.data = static_cast<char*>(malloc(_lv_ms.len));
|
|
|
|
memcpy(_lv_ms.data, _lv_qb.data(), _lv_ms.len);
|
|
|
|
_arr[i] = _lv_ms;
|
2024-08-25 04:08:24 +00:00
|
|
|
}
|
2024-11-04 07:18:27 +00:00
|
|
|
struct miqt_array _out;
|
|
|
|
_out.len = _ret.length();
|
|
|
|
_out.data = static_cast<void*>(_arr);
|
2024-09-14 22:29:05 +00:00
|
|
|
return _out;
|
2024-08-25 04:08:24 +00:00
|
|
|
}
|
|
|
|
|
2024-11-17 06:21:37 +00:00
|
|
|
struct miqt_array /* of struct miqt_string */ QPicture_OutputFormats() {
|
2024-09-14 22:29:05 +00:00
|
|
|
QList<QByteArray> _ret = QPicture::outputFormats();
|
2024-09-17 06:29:11 +00:00
|
|
|
// Convert QList<> from C++ memory to manually-managed C memory
|
2024-10-18 23:53:33 +00:00
|
|
|
struct miqt_string* _arr = static_cast<struct miqt_string*>(malloc(sizeof(struct miqt_string) * _ret.length()));
|
2024-09-14 22:29:05 +00:00
|
|
|
for (size_t i = 0, e = _ret.length(); i < e; ++i) {
|
2024-10-18 23:53:33 +00:00
|
|
|
QByteArray _lv_qb = _ret[i];
|
|
|
|
struct miqt_string _lv_ms;
|
|
|
|
_lv_ms.len = _lv_qb.length();
|
|
|
|
_lv_ms.data = static_cast<char*>(malloc(_lv_ms.len));
|
|
|
|
memcpy(_lv_ms.data, _lv_qb.data(), _lv_ms.len);
|
|
|
|
_arr[i] = _lv_ms;
|
2024-08-25 04:08:24 +00:00
|
|
|
}
|
2024-11-04 07:18:27 +00:00
|
|
|
struct miqt_array _out;
|
|
|
|
_out.len = _ret.length();
|
|
|
|
_out.data = static_cast<void*>(_arr);
|
2024-09-14 22:29:05 +00:00
|
|
|
return _out;
|
2024-08-25 04:08:24 +00:00
|
|
|
}
|
|
|
|
|
2024-11-17 06:21:37 +00:00
|
|
|
struct miqt_array /* of struct miqt_string */ QPicture_InputFormatList() {
|
2024-09-14 22:29:05 +00:00
|
|
|
QStringList _ret = QPicture::inputFormatList();
|
2024-09-17 06:29:11 +00:00
|
|
|
// Convert QList<> from C++ memory to manually-managed C memory
|
2024-10-18 23:53:33 +00:00
|
|
|
struct miqt_string* _arr = static_cast<struct miqt_string*>(malloc(sizeof(struct miqt_string) * _ret.length()));
|
2024-09-14 22:29:05 +00:00
|
|
|
for (size_t i = 0, e = _ret.length(); i < e; ++i) {
|
|
|
|
QString _lv_ret = _ret[i];
|
2024-08-25 04:08:24 +00:00
|
|
|
// Convert QString from UTF-16 in C++ RAII memory to UTF-8 in manually-managed C memory
|
2024-09-14 22:29:05 +00:00
|
|
|
QByteArray _lv_b = _lv_ret.toUtf8();
|
2024-10-18 23:53:33 +00:00
|
|
|
struct miqt_string _lv_ms;
|
|
|
|
_lv_ms.len = _lv_b.length();
|
|
|
|
_lv_ms.data = static_cast<char*>(malloc(_lv_ms.len));
|
|
|
|
memcpy(_lv_ms.data, _lv_b.data(), _lv_ms.len);
|
|
|
|
_arr[i] = _lv_ms;
|
2024-08-25 04:08:24 +00:00
|
|
|
}
|
2024-11-04 07:18:27 +00:00
|
|
|
struct miqt_array _out;
|
|
|
|
_out.len = _ret.length();
|
|
|
|
_out.data = static_cast<void*>(_arr);
|
2024-09-14 22:29:05 +00:00
|
|
|
return _out;
|
2024-08-25 04:08:24 +00:00
|
|
|
}
|
|
|
|
|
2024-11-17 06:21:37 +00:00
|
|
|
struct miqt_array /* of struct miqt_string */ QPicture_OutputFormatList() {
|
2024-09-14 22:29:05 +00:00
|
|
|
QStringList _ret = QPicture::outputFormatList();
|
2024-09-17 06:29:11 +00:00
|
|
|
// Convert QList<> from C++ memory to manually-managed C memory
|
2024-10-18 23:53:33 +00:00
|
|
|
struct miqt_string* _arr = static_cast<struct miqt_string*>(malloc(sizeof(struct miqt_string) * _ret.length()));
|
2024-09-14 22:29:05 +00:00
|
|
|
for (size_t i = 0, e = _ret.length(); i < e; ++i) {
|
|
|
|
QString _lv_ret = _ret[i];
|
2024-08-25 04:08:24 +00:00
|
|
|
// Convert QString from UTF-16 in C++ RAII memory to UTF-8 in manually-managed C memory
|
2024-09-14 22:29:05 +00:00
|
|
|
QByteArray _lv_b = _lv_ret.toUtf8();
|
2024-10-18 23:53:33 +00:00
|
|
|
struct miqt_string _lv_ms;
|
|
|
|
_lv_ms.len = _lv_b.length();
|
|
|
|
_lv_ms.data = static_cast<char*>(malloc(_lv_ms.len));
|
|
|
|
memcpy(_lv_ms.data, _lv_b.data(), _lv_ms.len);
|
|
|
|
_arr[i] = _lv_ms;
|
2024-08-25 04:08:24 +00:00
|
|
|
}
|
2024-11-04 07:18:27 +00:00
|
|
|
struct miqt_array _out;
|
|
|
|
_out.len = _ret.length();
|
|
|
|
_out.data = static_cast<void*>(_arr);
|
2024-09-14 22:29:05 +00:00
|
|
|
return _out;
|
2024-08-25 04:08:24 +00:00
|
|
|
}
|
|
|
|
|
2024-09-11 05:41:09 +00:00
|
|
|
QPaintEngine* QPicture_PaintEngine(const QPicture* self) {
|
|
|
|
return self->paintEngine();
|
2024-08-25 04:08:24 +00:00
|
|
|
}
|
|
|
|
|
2024-08-29 07:01:51 +00:00
|
|
|
bool QPicture_Load2(QPicture* self, QIODevice* dev, const char* format) {
|
2024-08-25 04:08:24 +00:00
|
|
|
return self->load(dev, format);
|
|
|
|
}
|
|
|
|
|
2024-10-18 23:53:33 +00:00
|
|
|
bool QPicture_Load22(QPicture* self, struct miqt_string fileName, const char* format) {
|
|
|
|
QString fileName_QString = QString::fromUtf8(fileName.data, fileName.len);
|
2024-08-25 04:08:24 +00:00
|
|
|
return self->load(fileName_QString, format);
|
|
|
|
}
|
|
|
|
|
2024-08-29 07:01:51 +00:00
|
|
|
bool QPicture_Save2(QPicture* self, QIODevice* dev, const char* format) {
|
2024-08-25 04:08:24 +00:00
|
|
|
return self->save(dev, format);
|
|
|
|
}
|
|
|
|
|
2024-10-18 23:53:33 +00:00
|
|
|
bool QPicture_Save22(QPicture* self, struct miqt_string fileName, const char* format) {
|
|
|
|
QString fileName_QString = QString::fromUtf8(fileName.data, fileName.len);
|
2024-08-25 04:08:24 +00:00
|
|
|
return self->save(fileName_QString, format);
|
|
|
|
}
|
|
|
|
|
2024-11-19 06:29:06 +00:00
|
|
|
void QPicture_override_virtual_DevType(void* self, intptr_t slot) {
|
|
|
|
dynamic_cast<MiqtVirtualQPicture*>( (QPicture*)(self) )->handle__DevType = slot;
|
|
|
|
}
|
|
|
|
|
|
|
|
int QPicture_virtualbase_DevType(const void* self) {
|
|
|
|
return ( (const MiqtVirtualQPicture*)(self) )->virtualbase_DevType();
|
|
|
|
}
|
|
|
|
|
|
|
|
void QPicture_override_virtual_SetData(void* self, intptr_t slot) {
|
|
|
|
dynamic_cast<MiqtVirtualQPicture*>( (QPicture*)(self) )->handle__SetData = slot;
|
|
|
|
}
|
|
|
|
|
|
|
|
void QPicture_virtualbase_SetData(void* self, const char* data, unsigned int size) {
|
|
|
|
( (MiqtVirtualQPicture*)(self) )->virtualbase_SetData(data, size);
|
2024-08-25 04:08:24 +00:00
|
|
|
}
|
|
|
|
|
2024-11-19 06:29:06 +00:00
|
|
|
void QPicture_override_virtual_PaintEngine(void* self, intptr_t slot) {
|
|
|
|
dynamic_cast<MiqtVirtualQPicture*>( (QPicture*)(self) )->handle__PaintEngine = slot;
|
2024-08-25 04:08:24 +00:00
|
|
|
}
|
|
|
|
|
2024-11-19 06:29:06 +00:00
|
|
|
QPaintEngine* QPicture_virtualbase_PaintEngine(const void* self) {
|
|
|
|
return ( (const MiqtVirtualQPicture*)(self) )->virtualbase_PaintEngine();
|
2024-08-25 04:08:24 +00:00
|
|
|
}
|
|
|
|
|
2024-11-19 06:29:06 +00:00
|
|
|
void QPicture_override_virtual_Metric(void* self, intptr_t slot) {
|
|
|
|
dynamic_cast<MiqtVirtualQPicture*>( (QPicture*)(self) )->handle__Metric = slot;
|
|
|
|
}
|
|
|
|
|
|
|
|
int QPicture_virtualbase_Metric(const void* self, int m) {
|
|
|
|
return ( (const MiqtVirtualQPicture*)(self) )->virtualbase_Metric(m);
|
|
|
|
}
|
|
|
|
|
|
|
|
void QPicture_override_virtual_InitPainter(void* self, intptr_t slot) {
|
|
|
|
dynamic_cast<MiqtVirtualQPicture*>( (QPicture*)(self) )->handle__InitPainter = slot;
|
|
|
|
}
|
|
|
|
|
|
|
|
void QPicture_virtualbase_InitPainter(const void* self, QPainter* painter) {
|
|
|
|
( (const MiqtVirtualQPicture*)(self) )->virtualbase_InitPainter(painter);
|
|
|
|
}
|
|
|
|
|
|
|
|
void QPicture_override_virtual_Redirected(void* self, intptr_t slot) {
|
|
|
|
dynamic_cast<MiqtVirtualQPicture*>( (QPicture*)(self) )->handle__Redirected = slot;
|
|
|
|
}
|
|
|
|
|
|
|
|
QPaintDevice* QPicture_virtualbase_Redirected(const void* self, QPoint* offset) {
|
|
|
|
return ( (const MiqtVirtualQPicture*)(self) )->virtualbase_Redirected(offset);
|
|
|
|
}
|
|
|
|
|
|
|
|
void QPicture_override_virtual_SharedPainter(void* self, intptr_t slot) {
|
|
|
|
dynamic_cast<MiqtVirtualQPicture*>( (QPicture*)(self) )->handle__SharedPainter = slot;
|
|
|
|
}
|
|
|
|
|
|
|
|
QPainter* QPicture_virtualbase_SharedPainter(const void* self) {
|
|
|
|
return ( (const MiqtVirtualQPicture*)(self) )->virtualbase_SharedPainter();
|
|
|
|
}
|
|
|
|
|
|
|
|
void QPicture_Delete(QPicture* self, bool isSubclass) {
|
|
|
|
if (isSubclass) {
|
|
|
|
delete dynamic_cast<MiqtVirtualQPicture*>( self );
|
|
|
|
} else {
|
|
|
|
delete self;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
void QPictureIO_new(QPictureIO** outptr_QPictureIO) {
|
|
|
|
QPictureIO* ret = new QPictureIO();
|
|
|
|
*outptr_QPictureIO = ret;
|
|
|
|
}
|
|
|
|
|
|
|
|
void QPictureIO_new2(QIODevice* ioDevice, const char* format, QPictureIO** outptr_QPictureIO) {
|
|
|
|
QPictureIO* ret = new QPictureIO(ioDevice, format);
|
|
|
|
*outptr_QPictureIO = ret;
|
|
|
|
}
|
|
|
|
|
|
|
|
void QPictureIO_new3(struct miqt_string fileName, const char* format, QPictureIO** outptr_QPictureIO) {
|
2024-10-18 23:53:33 +00:00
|
|
|
QString fileName_QString = QString::fromUtf8(fileName.data, fileName.len);
|
2024-11-19 06:29:06 +00:00
|
|
|
QPictureIO* ret = new QPictureIO(fileName_QString, format);
|
|
|
|
*outptr_QPictureIO = ret;
|
2024-08-25 04:08:24 +00:00
|
|
|
}
|
|
|
|
|
2024-09-11 05:41:09 +00:00
|
|
|
QPicture* QPictureIO_Picture(const QPictureIO* self) {
|
2024-09-14 22:29:05 +00:00
|
|
|
const QPicture& _ret = self->picture();
|
2024-08-25 04:08:24 +00:00
|
|
|
// Cast returned reference into pointer
|
2024-09-14 22:29:05 +00:00
|
|
|
return const_cast<QPicture*>(&_ret);
|
2024-08-25 04:08:24 +00:00
|
|
|
}
|
|
|
|
|
2024-09-11 05:41:09 +00:00
|
|
|
int QPictureIO_Status(const QPictureIO* self) {
|
|
|
|
return self->status();
|
2024-08-25 04:08:24 +00:00
|
|
|
}
|
|
|
|
|
2024-09-11 05:41:09 +00:00
|
|
|
const char* QPictureIO_Format(const QPictureIO* self) {
|
|
|
|
return (const char*) self->format();
|
2024-08-25 04:08:24 +00:00
|
|
|
}
|
|
|
|
|
2024-09-11 05:41:09 +00:00
|
|
|
QIODevice* QPictureIO_IoDevice(const QPictureIO* self) {
|
|
|
|
return self->ioDevice();
|
2024-08-25 04:08:24 +00:00
|
|
|
}
|
|
|
|
|
2024-10-18 23:53:33 +00:00
|
|
|
struct miqt_string QPictureIO_FileName(const QPictureIO* self) {
|
2024-09-14 22:29:05 +00:00
|
|
|
QString _ret = self->fileName();
|
2024-08-25 04:08:24 +00:00
|
|
|
// Convert QString from UTF-16 in C++ RAII memory to UTF-8 in manually-managed C memory
|
2024-09-14 22:29:05 +00:00
|
|
|
QByteArray _b = _ret.toUtf8();
|
2024-10-18 23:53:33 +00:00
|
|
|
struct miqt_string _ms;
|
|
|
|
_ms.len = _b.length();
|
|
|
|
_ms.data = static_cast<char*>(malloc(_ms.len));
|
|
|
|
memcpy(_ms.data, _b.data(), _ms.len);
|
|
|
|
return _ms;
|
2024-08-25 04:08:24 +00:00
|
|
|
}
|
|
|
|
|
2024-09-11 05:41:09 +00:00
|
|
|
int QPictureIO_Quality(const QPictureIO* self) {
|
|
|
|
return self->quality();
|
2024-08-25 04:08:24 +00:00
|
|
|
}
|
|
|
|
|
2024-10-18 23:53:33 +00:00
|
|
|
struct miqt_string QPictureIO_Description(const QPictureIO* self) {
|
2024-09-14 22:29:05 +00:00
|
|
|
QString _ret = self->description();
|
2024-08-25 04:08:24 +00:00
|
|
|
// Convert QString from UTF-16 in C++ RAII memory to UTF-8 in manually-managed C memory
|
2024-09-14 22:29:05 +00:00
|
|
|
QByteArray _b = _ret.toUtf8();
|
2024-10-18 23:53:33 +00:00
|
|
|
struct miqt_string _ms;
|
|
|
|
_ms.len = _b.length();
|
|
|
|
_ms.data = static_cast<char*>(malloc(_ms.len));
|
|
|
|
memcpy(_ms.data, _b.data(), _ms.len);
|
|
|
|
return _ms;
|
2024-08-25 04:08:24 +00:00
|
|
|
}
|
|
|
|
|
2024-09-11 05:41:09 +00:00
|
|
|
const char* QPictureIO_Parameters(const QPictureIO* self) {
|
|
|
|
return (const char*) self->parameters();
|
2024-08-25 04:08:24 +00:00
|
|
|
}
|
|
|
|
|
2024-09-11 05:41:09 +00:00
|
|
|
float QPictureIO_Gamma(const QPictureIO* self) {
|
|
|
|
return self->gamma();
|
2024-08-25 04:08:24 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
void QPictureIO_SetPicture(QPictureIO* self, QPicture* picture) {
|
|
|
|
self->setPicture(*picture);
|
|
|
|
}
|
|
|
|
|
|
|
|
void QPictureIO_SetStatus(QPictureIO* self, int status) {
|
|
|
|
self->setStatus(static_cast<int>(status));
|
|
|
|
}
|
|
|
|
|
2024-08-29 07:01:51 +00:00
|
|
|
void QPictureIO_SetFormat(QPictureIO* self, const char* format) {
|
2024-08-25 04:08:24 +00:00
|
|
|
self->setFormat(format);
|
|
|
|
}
|
|
|
|
|
|
|
|
void QPictureIO_SetIODevice(QPictureIO* self, QIODevice* iODevice) {
|
|
|
|
self->setIODevice(iODevice);
|
|
|
|
}
|
|
|
|
|
2024-10-18 23:53:33 +00:00
|
|
|
void QPictureIO_SetFileName(QPictureIO* self, struct miqt_string fileName) {
|
|
|
|
QString fileName_QString = QString::fromUtf8(fileName.data, fileName.len);
|
2024-08-25 04:08:24 +00:00
|
|
|
self->setFileName(fileName_QString);
|
|
|
|
}
|
|
|
|
|
|
|
|
void QPictureIO_SetQuality(QPictureIO* self, int quality) {
|
|
|
|
self->setQuality(static_cast<int>(quality));
|
|
|
|
}
|
|
|
|
|
2024-10-18 23:53:33 +00:00
|
|
|
void QPictureIO_SetDescription(QPictureIO* self, struct miqt_string description) {
|
|
|
|
QString description_QString = QString::fromUtf8(description.data, description.len);
|
2024-08-25 04:08:24 +00:00
|
|
|
self->setDescription(description_QString);
|
|
|
|
}
|
|
|
|
|
2024-08-29 07:01:51 +00:00
|
|
|
void QPictureIO_SetParameters(QPictureIO* self, const char* parameters) {
|
2024-08-25 04:08:24 +00:00
|
|
|
self->setParameters(parameters);
|
|
|
|
}
|
|
|
|
|
|
|
|
void QPictureIO_SetGamma(QPictureIO* self, float gamma) {
|
|
|
|
self->setGamma(static_cast<float>(gamma));
|
|
|
|
}
|
|
|
|
|
|
|
|
bool QPictureIO_Read(QPictureIO* self) {
|
|
|
|
return self->read();
|
|
|
|
}
|
|
|
|
|
|
|
|
bool QPictureIO_Write(QPictureIO* self) {
|
|
|
|
return self->write();
|
|
|
|
}
|
|
|
|
|
2024-10-18 23:53:33 +00:00
|
|
|
struct miqt_string QPictureIO_PictureFormat(struct miqt_string fileName) {
|
|
|
|
QString fileName_QString = QString::fromUtf8(fileName.data, fileName.len);
|
|
|
|
QByteArray _qb = QPictureIO::pictureFormat(fileName_QString);
|
|
|
|
struct miqt_string _ms;
|
|
|
|
_ms.len = _qb.length();
|
|
|
|
_ms.data = static_cast<char*>(malloc(_ms.len));
|
|
|
|
memcpy(_ms.data, _qb.data(), _ms.len);
|
|
|
|
return _ms;
|
2024-08-25 04:08:24 +00:00
|
|
|
}
|
|
|
|
|
2024-10-18 23:53:33 +00:00
|
|
|
struct miqt_string QPictureIO_PictureFormatWithQIODevice(QIODevice* param1) {
|
|
|
|
QByteArray _qb = QPictureIO::pictureFormat(param1);
|
|
|
|
struct miqt_string _ms;
|
|
|
|
_ms.len = _qb.length();
|
|
|
|
_ms.data = static_cast<char*>(malloc(_ms.len));
|
|
|
|
memcpy(_ms.data, _qb.data(), _ms.len);
|
|
|
|
return _ms;
|
2024-08-25 04:08:24 +00:00
|
|
|
}
|
|
|
|
|
2024-11-17 06:21:37 +00:00
|
|
|
struct miqt_array /* of struct miqt_string */ QPictureIO_InputFormats() {
|
2024-09-14 22:29:05 +00:00
|
|
|
QList<QByteArray> _ret = QPictureIO::inputFormats();
|
2024-09-17 06:29:11 +00:00
|
|
|
// Convert QList<> from C++ memory to manually-managed C memory
|
2024-10-18 23:53:33 +00:00
|
|
|
struct miqt_string* _arr = static_cast<struct miqt_string*>(malloc(sizeof(struct miqt_string) * _ret.length()));
|
2024-09-14 22:29:05 +00:00
|
|
|
for (size_t i = 0, e = _ret.length(); i < e; ++i) {
|
2024-10-18 23:53:33 +00:00
|
|
|
QByteArray _lv_qb = _ret[i];
|
|
|
|
struct miqt_string _lv_ms;
|
|
|
|
_lv_ms.len = _lv_qb.length();
|
|
|
|
_lv_ms.data = static_cast<char*>(malloc(_lv_ms.len));
|
|
|
|
memcpy(_lv_ms.data, _lv_qb.data(), _lv_ms.len);
|
|
|
|
_arr[i] = _lv_ms;
|
2024-08-25 04:08:24 +00:00
|
|
|
}
|
2024-11-04 07:18:27 +00:00
|
|
|
struct miqt_array _out;
|
|
|
|
_out.len = _ret.length();
|
|
|
|
_out.data = static_cast<void*>(_arr);
|
2024-09-14 22:29:05 +00:00
|
|
|
return _out;
|
2024-08-25 04:08:24 +00:00
|
|
|
}
|
|
|
|
|
2024-11-17 06:21:37 +00:00
|
|
|
struct miqt_array /* of struct miqt_string */ QPictureIO_OutputFormats() {
|
2024-09-14 22:29:05 +00:00
|
|
|
QList<QByteArray> _ret = QPictureIO::outputFormats();
|
2024-09-17 06:29:11 +00:00
|
|
|
// Convert QList<> from C++ memory to manually-managed C memory
|
2024-10-18 23:53:33 +00:00
|
|
|
struct miqt_string* _arr = static_cast<struct miqt_string*>(malloc(sizeof(struct miqt_string) * _ret.length()));
|
2024-09-14 22:29:05 +00:00
|
|
|
for (size_t i = 0, e = _ret.length(); i < e; ++i) {
|
2024-10-18 23:53:33 +00:00
|
|
|
QByteArray _lv_qb = _ret[i];
|
|
|
|
struct miqt_string _lv_ms;
|
|
|
|
_lv_ms.len = _lv_qb.length();
|
|
|
|
_lv_ms.data = static_cast<char*>(malloc(_lv_ms.len));
|
|
|
|
memcpy(_lv_ms.data, _lv_qb.data(), _lv_ms.len);
|
|
|
|
_arr[i] = _lv_ms;
|
2024-08-25 04:08:24 +00:00
|
|
|
}
|
2024-11-04 07:18:27 +00:00
|
|
|
struct miqt_array _out;
|
|
|
|
_out.len = _ret.length();
|
|
|
|
_out.data = static_cast<void*>(_arr);
|
2024-09-14 22:29:05 +00:00
|
|
|
return _out;
|
2024-08-25 04:08:24 +00:00
|
|
|
}
|
|
|
|
|
2024-11-19 06:29:06 +00:00
|
|
|
void QPictureIO_Delete(QPictureIO* self, bool isSubclass) {
|
|
|
|
if (isSubclass) {
|
|
|
|
delete dynamic_cast<QPictureIO*>( self );
|
|
|
|
} else {
|
|
|
|
delete self;
|
|
|
|
}
|
2024-08-25 04:08:24 +00:00
|
|
|
}
|
|
|
|
|