2024-11-19 06:29:06 +00:00
|
|
|
#include <QEvent>
|
|
|
|
#include <QExposeEvent>
|
2024-08-25 04:08:24 +00:00
|
|
|
#include <QMetaObject>
|
2024-11-19 06:29:06 +00:00
|
|
|
#include <QObject>
|
|
|
|
#include <QPaintDevice>
|
|
|
|
#include <QPaintDeviceWindow>
|
|
|
|
#include <QPaintEvent>
|
|
|
|
#include <QPoint>
|
2024-08-25 04:08:24 +00:00
|
|
|
#include <QRasterWindow>
|
|
|
|
#include <QString>
|
2024-08-29 07:01:51 +00:00
|
|
|
#include <QByteArray>
|
|
|
|
#include <cstring>
|
2024-11-19 06:29:06 +00:00
|
|
|
#include <QSurface>
|
2024-08-25 04:08:24 +00:00
|
|
|
#include <QWindow>
|
2024-10-16 05:07:56 +00:00
|
|
|
#include <qrasterwindow.h>
|
2024-08-29 07:01:51 +00:00
|
|
|
#include "gen_qrasterwindow.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 MiqtVirtualQRasterWindow : public virtual QRasterWindow {
|
|
|
|
public:
|
|
|
|
|
|
|
|
MiqtVirtualQRasterWindow(): QRasterWindow() {};
|
|
|
|
MiqtVirtualQRasterWindow(QWindow* parent): QRasterWindow(parent) {};
|
|
|
|
|
|
|
|
virtual ~MiqtVirtualQRasterWindow() = default;
|
|
|
|
|
|
|
|
// cgo.Handle value for overwritten implementation
|
|
|
|
intptr_t handle__Metric = 0;
|
|
|
|
|
|
|
|
// Subclass to allow providing a Go implementation
|
|
|
|
virtual int metric(QPaintDevice::PaintDeviceMetric metric) const override {
|
|
|
|
if (handle__Metric == 0) {
|
|
|
|
return QRasterWindow::metric(metric);
|
|
|
|
}
|
|
|
|
|
|
|
|
QPaintDevice::PaintDeviceMetric metric_ret = metric;
|
|
|
|
int sigval1 = static_cast<int>(metric_ret);
|
|
|
|
|
|
|
|
int callback_return_value = miqt_exec_callback_QRasterWindow_Metric(const_cast<MiqtVirtualQRasterWindow*>(this), handle__Metric, sigval1);
|
|
|
|
|
|
|
|
return static_cast<int>(callback_return_value);
|
|
|
|
}
|
|
|
|
|
|
|
|
// Wrapper to allow calling protected method
|
|
|
|
int virtualbase_Metric(int metric) const {
|
|
|
|
|
|
|
|
return QRasterWindow::metric(static_cast<QPaintDevice::PaintDeviceMetric>(metric));
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
// cgo.Handle value for overwritten implementation
|
|
|
|
intptr_t handle__Redirected = 0;
|
|
|
|
|
|
|
|
// Subclass to allow providing a Go implementation
|
|
|
|
virtual QPaintDevice* redirected(QPoint* param1) const override {
|
|
|
|
if (handle__Redirected == 0) {
|
|
|
|
return QRasterWindow::redirected(param1);
|
|
|
|
}
|
|
|
|
|
|
|
|
QPoint* sigval1 = param1;
|
|
|
|
|
|
|
|
QPaintDevice* callback_return_value = miqt_exec_callback_QRasterWindow_Redirected(const_cast<MiqtVirtualQRasterWindow*>(this), handle__Redirected, sigval1);
|
|
|
|
|
|
|
|
return callback_return_value;
|
|
|
|
}
|
|
|
|
|
|
|
|
// Wrapper to allow calling protected method
|
|
|
|
QPaintDevice* virtualbase_Redirected(QPoint* param1) const {
|
|
|
|
|
|
|
|
return QRasterWindow::redirected(param1);
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
// cgo.Handle value for overwritten implementation
|
|
|
|
intptr_t handle__PaintEvent = 0;
|
|
|
|
|
|
|
|
// Subclass to allow providing a Go implementation
|
|
|
|
virtual void paintEvent(QPaintEvent* event) override {
|
|
|
|
if (handle__PaintEvent == 0) {
|
|
|
|
QRasterWindow::paintEvent(event);
|
|
|
|
return;
|
|
|
|
}
|
|
|
|
|
|
|
|
QPaintEvent* sigval1 = event;
|
|
|
|
|
|
|
|
miqt_exec_callback_QRasterWindow_PaintEvent(this, handle__PaintEvent, sigval1);
|
|
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
// Wrapper to allow calling protected method
|
|
|
|
void virtualbase_PaintEvent(QPaintEvent* event) {
|
|
|
|
|
|
|
|
QRasterWindow::paintEvent(event);
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
// cgo.Handle value for overwritten implementation
|
|
|
|
intptr_t handle__ExposeEvent = 0;
|
|
|
|
|
|
|
|
// Subclass to allow providing a Go implementation
|
|
|
|
virtual void exposeEvent(QExposeEvent* param1) override {
|
|
|
|
if (handle__ExposeEvent == 0) {
|
|
|
|
QRasterWindow::exposeEvent(param1);
|
|
|
|
return;
|
|
|
|
}
|
|
|
|
|
|
|
|
QExposeEvent* sigval1 = param1;
|
|
|
|
|
|
|
|
miqt_exec_callback_QRasterWindow_ExposeEvent(this, handle__ExposeEvent, sigval1);
|
|
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
// Wrapper to allow calling protected method
|
|
|
|
void virtualbase_ExposeEvent(QExposeEvent* param1) {
|
|
|
|
|
|
|
|
QRasterWindow::exposeEvent(param1);
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
// cgo.Handle value for overwritten implementation
|
|
|
|
intptr_t handle__Event = 0;
|
|
|
|
|
|
|
|
// Subclass to allow providing a Go implementation
|
|
|
|
virtual bool event(QEvent* event) override {
|
|
|
|
if (handle__Event == 0) {
|
|
|
|
return QRasterWindow::event(event);
|
|
|
|
}
|
|
|
|
|
|
|
|
QEvent* sigval1 = event;
|
|
|
|
|
|
|
|
bool callback_return_value = miqt_exec_callback_QRasterWindow_Event(this, handle__Event, sigval1);
|
|
|
|
|
|
|
|
return callback_return_value;
|
|
|
|
}
|
|
|
|
|
|
|
|
// Wrapper to allow calling protected method
|
|
|
|
bool virtualbase_Event(QEvent* event) {
|
|
|
|
|
|
|
|
return QRasterWindow::event(event);
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
};
|
|
|
|
|
2024-12-07 04:15:57 +00:00
|
|
|
QRasterWindow* QRasterWindow_new() {
|
|
|
|
return new MiqtVirtualQRasterWindow();
|
2024-08-25 04:08:24 +00:00
|
|
|
}
|
|
|
|
|
2024-12-07 04:15:57 +00:00
|
|
|
QRasterWindow* QRasterWindow_new2(QWindow* parent) {
|
|
|
|
return new MiqtVirtualQRasterWindow(parent);
|
|
|
|
}
|
|
|
|
|
|
|
|
void QRasterWindow_virtbase(QRasterWindow* src, QPaintDeviceWindow** outptr_QPaintDeviceWindow) {
|
|
|
|
*outptr_QPaintDeviceWindow = static_cast<QPaintDeviceWindow*>(src);
|
2024-08-25 04:08:24 +00:00
|
|
|
}
|
|
|
|
|
2024-09-11 05:41:09 +00:00
|
|
|
QMetaObject* QRasterWindow_MetaObject(const QRasterWindow* self) {
|
|
|
|
return (QMetaObject*) self->metaObject();
|
2024-08-25 04:08:24 +00:00
|
|
|
}
|
|
|
|
|
2024-09-20 22:32:57 +00:00
|
|
|
void* QRasterWindow_Metacast(QRasterWindow* self, const char* param1) {
|
|
|
|
return self->qt_metacast(param1);
|
|
|
|
}
|
|
|
|
|
2024-10-18 23:53:33 +00:00
|
|
|
struct miqt_string QRasterWindow_Tr(const char* s) {
|
2024-09-14 22:29:05 +00:00
|
|
|
QString _ret = QRasterWindow::tr(s);
|
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-10-18 23:53:33 +00:00
|
|
|
struct miqt_string QRasterWindow_TrUtf8(const char* s) {
|
2024-09-14 22:29:05 +00:00
|
|
|
QString _ret = QRasterWindow::trUtf8(s);
|
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-10-18 23:53:33 +00:00
|
|
|
struct miqt_string QRasterWindow_Tr2(const char* s, const char* c) {
|
2024-09-14 22:29:05 +00:00
|
|
|
QString _ret = QRasterWindow::tr(s, c);
|
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-10-18 23:53:33 +00:00
|
|
|
struct miqt_string QRasterWindow_Tr3(const char* s, const char* c, int n) {
|
2024-09-14 22:29:05 +00:00
|
|
|
QString _ret = QRasterWindow::tr(s, c, static_cast<int>(n));
|
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-10-18 23:53:33 +00:00
|
|
|
struct miqt_string QRasterWindow_TrUtf82(const char* s, const char* c) {
|
2024-09-14 22:29:05 +00:00
|
|
|
QString _ret = QRasterWindow::trUtf8(s, c);
|
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-10-18 23:53:33 +00:00
|
|
|
struct miqt_string QRasterWindow_TrUtf83(const char* s, const char* c, int n) {
|
2024-09-14 22:29:05 +00:00
|
|
|
QString _ret = QRasterWindow::trUtf8(s, c, static_cast<int>(n));
|
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-11-19 06:29:06 +00:00
|
|
|
void QRasterWindow_override_virtual_Metric(void* self, intptr_t slot) {
|
|
|
|
dynamic_cast<MiqtVirtualQRasterWindow*>( (QRasterWindow*)(self) )->handle__Metric = slot;
|
|
|
|
}
|
|
|
|
|
|
|
|
int QRasterWindow_virtualbase_Metric(const void* self, int metric) {
|
|
|
|
return ( (const MiqtVirtualQRasterWindow*)(self) )->virtualbase_Metric(metric);
|
|
|
|
}
|
|
|
|
|
|
|
|
void QRasterWindow_override_virtual_Redirected(void* self, intptr_t slot) {
|
|
|
|
dynamic_cast<MiqtVirtualQRasterWindow*>( (QRasterWindow*)(self) )->handle__Redirected = slot;
|
|
|
|
}
|
|
|
|
|
|
|
|
QPaintDevice* QRasterWindow_virtualbase_Redirected(const void* self, QPoint* param1) {
|
|
|
|
return ( (const MiqtVirtualQRasterWindow*)(self) )->virtualbase_Redirected(param1);
|
|
|
|
}
|
|
|
|
|
|
|
|
void QRasterWindow_override_virtual_PaintEvent(void* self, intptr_t slot) {
|
|
|
|
dynamic_cast<MiqtVirtualQRasterWindow*>( (QRasterWindow*)(self) )->handle__PaintEvent = slot;
|
|
|
|
}
|
|
|
|
|
|
|
|
void QRasterWindow_virtualbase_PaintEvent(void* self, QPaintEvent* event) {
|
|
|
|
( (MiqtVirtualQRasterWindow*)(self) )->virtualbase_PaintEvent(event);
|
|
|
|
}
|
|
|
|
|
|
|
|
void QRasterWindow_override_virtual_ExposeEvent(void* self, intptr_t slot) {
|
|
|
|
dynamic_cast<MiqtVirtualQRasterWindow*>( (QRasterWindow*)(self) )->handle__ExposeEvent = slot;
|
|
|
|
}
|
|
|
|
|
|
|
|
void QRasterWindow_virtualbase_ExposeEvent(void* self, QExposeEvent* param1) {
|
|
|
|
( (MiqtVirtualQRasterWindow*)(self) )->virtualbase_ExposeEvent(param1);
|
|
|
|
}
|
|
|
|
|
|
|
|
void QRasterWindow_override_virtual_Event(void* self, intptr_t slot) {
|
|
|
|
dynamic_cast<MiqtVirtualQRasterWindow*>( (QRasterWindow*)(self) )->handle__Event = slot;
|
|
|
|
}
|
|
|
|
|
|
|
|
bool QRasterWindow_virtualbase_Event(void* self, QEvent* event) {
|
|
|
|
return ( (MiqtVirtualQRasterWindow*)(self) )->virtualbase_Event(event);
|
|
|
|
}
|
|
|
|
|
|
|
|
void QRasterWindow_Delete(QRasterWindow* self, bool isSubclass) {
|
|
|
|
if (isSubclass) {
|
|
|
|
delete dynamic_cast<MiqtVirtualQRasterWindow*>( self );
|
|
|
|
} else {
|
|
|
|
delete self;
|
|
|
|
}
|
2024-08-25 04:08:24 +00:00
|
|
|
}
|
|
|
|
|