#include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include "gen_qrasterwindow.h" #ifndef _Bool #define _Bool bool #endif #include "_cgo_export.h" 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(metric_ret); int callback_return_value = miqt_exec_callback_QRasterWindow_Metric(const_cast(this), handle__Metric, sigval1); return static_cast(callback_return_value); } // Wrapper to allow calling protected method int virtualbase_Metric(int metric) const { return QRasterWindow::metric(static_cast(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(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__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__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__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); } }; QRasterWindow* QRasterWindow_new() { return new MiqtVirtualQRasterWindow(); } QRasterWindow* QRasterWindow_new2(QWindow* parent) { return new MiqtVirtualQRasterWindow(parent); } void QRasterWindow_virtbase(QRasterWindow* src, QPaintDeviceWindow** outptr_QPaintDeviceWindow) { *outptr_QPaintDeviceWindow = static_cast(src); } QMetaObject* QRasterWindow_MetaObject(const QRasterWindow* self) { return (QMetaObject*) self->metaObject(); } void* QRasterWindow_Metacast(QRasterWindow* self, const char* param1) { return self->qt_metacast(param1); } struct miqt_string QRasterWindow_Tr(const char* s) { QString _ret = QRasterWindow::tr(s); // Convert QString from UTF-16 in C++ RAII memory to UTF-8 in manually-managed C memory QByteArray _b = _ret.toUtf8(); struct miqt_string _ms; _ms.len = _b.length(); _ms.data = static_cast(malloc(_ms.len)); memcpy(_ms.data, _b.data(), _ms.len); return _ms; } struct miqt_string QRasterWindow_Tr2(const char* s, const char* c) { QString _ret = QRasterWindow::tr(s, c); // Convert QString from UTF-16 in C++ RAII memory to UTF-8 in manually-managed C memory QByteArray _b = _ret.toUtf8(); struct miqt_string _ms; _ms.len = _b.length(); _ms.data = static_cast(malloc(_ms.len)); memcpy(_ms.data, _b.data(), _ms.len); return _ms; } struct miqt_string QRasterWindow_Tr3(const char* s, const char* c, int n) { QString _ret = QRasterWindow::tr(s, c, static_cast(n)); // Convert QString from UTF-16 in C++ RAII memory to UTF-8 in manually-managed C memory QByteArray _b = _ret.toUtf8(); struct miqt_string _ms; _ms.len = _b.length(); _ms.data = static_cast(malloc(_ms.len)); memcpy(_ms.data, _b.data(), _ms.len); return _ms; } void QRasterWindow_override_virtual_Metric(void* self, intptr_t slot) { dynamic_cast( (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( (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_ExposeEvent(void* self, intptr_t slot) { dynamic_cast( (QRasterWindow*)(self) )->handle__ExposeEvent = slot; } void QRasterWindow_virtualbase_ExposeEvent(void* self, QExposeEvent* param1) { ( (MiqtVirtualQRasterWindow*)(self) )->virtualbase_ExposeEvent(param1); } void QRasterWindow_override_virtual_PaintEvent(void* self, intptr_t slot) { dynamic_cast( (QRasterWindow*)(self) )->handle__PaintEvent = slot; } void QRasterWindow_virtualbase_PaintEvent(void* self, QPaintEvent* event) { ( (MiqtVirtualQRasterWindow*)(self) )->virtualbase_PaintEvent(event); } void QRasterWindow_override_virtual_Event(void* self, intptr_t slot) { dynamic_cast( (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( self ); } else { delete self; } }