#include #include #include #include #include #include #include #include #include #include "qdrag.h" #include "gen_qdrag.h" #include "_cgo_export.h" QDrag* QDrag_new(QObject* dragSource) { return new QDrag(dragSource); } QMetaObject* QDrag_MetaObject(const QDrag* self) { return (QMetaObject*) self->metaObject(); } struct miqt_string* QDrag_Tr(const char* s) { QString _ret = QDrag::tr(s); // Convert QString from UTF-16 in C++ RAII memory to UTF-8 in manually-managed C memory QByteArray _b = _ret.toUtf8(); return miqt_strdup(_b.data(), _b.length()); } struct miqt_string* QDrag_TrUtf8(const char* s) { QString _ret = QDrag::trUtf8(s); // Convert QString from UTF-16 in C++ RAII memory to UTF-8 in manually-managed C memory QByteArray _b = _ret.toUtf8(); return miqt_strdup(_b.data(), _b.length()); } void QDrag_SetMimeData(QDrag* self, QMimeData* data) { self->setMimeData(data); } QMimeData* QDrag_MimeData(const QDrag* self) { return self->mimeData(); } void QDrag_SetPixmap(QDrag* self, QPixmap* pixmap) { self->setPixmap(*pixmap); } QPixmap* QDrag_Pixmap(const QDrag* self) { return new QPixmap(self->pixmap()); } void QDrag_SetHotSpot(QDrag* self, QPoint* hotspot) { self->setHotSpot(*hotspot); } QPoint* QDrag_HotSpot(const QDrag* self) { return new QPoint(self->hotSpot()); } QObject* QDrag_Source(const QDrag* self) { return self->source(); } QObject* QDrag_Target(const QDrag* self) { return self->target(); } uintptr_t QDrag_Start(QDrag* self) { Qt::DropAction _ret = self->start(); return static_cast(_ret); } uintptr_t QDrag_Exec(QDrag* self) { Qt::DropAction _ret = self->exec(); return static_cast(_ret); } uintptr_t QDrag_Exec2(QDrag* self, int supportedActions, uintptr_t defaultAction) { Qt::DropAction _ret = self->exec(static_cast(supportedActions), static_cast(defaultAction)); return static_cast(_ret); } void QDrag_SetDragCursor(QDrag* self, QPixmap* cursor, uintptr_t action) { self->setDragCursor(*cursor, static_cast(action)); } QPixmap* QDrag_DragCursor(const QDrag* self, uintptr_t action) { return new QPixmap(self->dragCursor(static_cast(action))); } int QDrag_SupportedActions(const QDrag* self) { Qt::DropActions _ret = self->supportedActions(); return static_cast(_ret); } uintptr_t QDrag_DefaultAction(const QDrag* self) { Qt::DropAction _ret = self->defaultAction(); return static_cast(_ret); } void QDrag_Cancel() { QDrag::cancel(); } void QDrag_ActionChanged(QDrag* self, uintptr_t action) { self->actionChanged(static_cast(action)); } void QDrag_connect_ActionChanged(QDrag* self, void* slot) { QDrag::connect(self, static_cast(&QDrag::actionChanged), self, [=](Qt::DropAction action) { Qt::DropAction action_ret = action; uintptr_t sigval1 = static_cast(action_ret); miqt_exec_callback_QDrag_ActionChanged(slot, sigval1); }); } void QDrag_TargetChanged(QDrag* self, QObject* newTarget) { self->targetChanged(newTarget); } void QDrag_connect_TargetChanged(QDrag* self, void* slot) { QDrag::connect(self, static_cast(&QDrag::targetChanged), self, [=](QObject* newTarget) { QObject* sigval1 = newTarget; miqt_exec_callback_QDrag_TargetChanged(slot, sigval1); }); } struct miqt_string* QDrag_Tr2(const char* s, const char* c) { QString _ret = QDrag::tr(s, c); // Convert QString from UTF-16 in C++ RAII memory to UTF-8 in manually-managed C memory QByteArray _b = _ret.toUtf8(); return miqt_strdup(_b.data(), _b.length()); } struct miqt_string* QDrag_Tr3(const char* s, const char* c, int n) { QString _ret = QDrag::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(); return miqt_strdup(_b.data(), _b.length()); } struct miqt_string* QDrag_TrUtf82(const char* s, const char* c) { QString _ret = QDrag::trUtf8(s, c); // Convert QString from UTF-16 in C++ RAII memory to UTF-8 in manually-managed C memory QByteArray _b = _ret.toUtf8(); return miqt_strdup(_b.data(), _b.length()); } struct miqt_string* QDrag_TrUtf83(const char* s, const char* c, int n) { QString _ret = QDrag::trUtf8(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(); return miqt_strdup(_b.data(), _b.length()); } uintptr_t QDrag_Start1(QDrag* self, int supportedActions) { Qt::DropAction _ret = self->start(static_cast(supportedActions)); return static_cast(_ret); } uintptr_t QDrag_Exec1(QDrag* self, int supportedActions) { Qt::DropAction _ret = self->exec(static_cast(supportedActions)); return static_cast(_ret); } void QDrag_Delete(QDrag* self) { delete self; }