#include #include #include #include #include #include #include "gen_qtextboundaryfinder.h" #include "_cgo_export.h" void QTextBoundaryFinder_new(QTextBoundaryFinder** outptr_QTextBoundaryFinder) { QTextBoundaryFinder* ret = new QTextBoundaryFinder(); *outptr_QTextBoundaryFinder = ret; } void QTextBoundaryFinder_new2(QTextBoundaryFinder* other, QTextBoundaryFinder** outptr_QTextBoundaryFinder) { QTextBoundaryFinder* ret = new QTextBoundaryFinder(*other); *outptr_QTextBoundaryFinder = ret; } void QTextBoundaryFinder_new3(int typeVal, struct miqt_string stringVal, QTextBoundaryFinder** outptr_QTextBoundaryFinder) { QString stringVal_QString = QString::fromUtf8(stringVal.data, stringVal.len); QTextBoundaryFinder* ret = new QTextBoundaryFinder(static_cast(typeVal), stringVal_QString); *outptr_QTextBoundaryFinder = ret; } void QTextBoundaryFinder_new4(int typeVal, QChar* chars, int length, QTextBoundaryFinder** outptr_QTextBoundaryFinder) { QTextBoundaryFinder* ret = new QTextBoundaryFinder(static_cast(typeVal), chars, static_cast(length)); *outptr_QTextBoundaryFinder = ret; } void QTextBoundaryFinder_new5(int typeVal, QChar* chars, int length, unsigned char* buffer, QTextBoundaryFinder** outptr_QTextBoundaryFinder) { QTextBoundaryFinder* ret = new QTextBoundaryFinder(static_cast(typeVal), chars, static_cast(length), static_cast(buffer)); *outptr_QTextBoundaryFinder = ret; } void QTextBoundaryFinder_new6(int typeVal, QChar* chars, int length, unsigned char* buffer, int bufferSize, QTextBoundaryFinder** outptr_QTextBoundaryFinder) { QTextBoundaryFinder* ret = new QTextBoundaryFinder(static_cast(typeVal), chars, static_cast(length), static_cast(buffer), static_cast(bufferSize)); *outptr_QTextBoundaryFinder = ret; } void QTextBoundaryFinder_OperatorAssign(QTextBoundaryFinder* self, QTextBoundaryFinder* other) { self->operator=(*other); } bool QTextBoundaryFinder_IsValid(const QTextBoundaryFinder* self) { return self->isValid(); } int QTextBoundaryFinder_Type(const QTextBoundaryFinder* self) { QTextBoundaryFinder::BoundaryType _ret = self->type(); return static_cast(_ret); } struct miqt_string QTextBoundaryFinder_String(const QTextBoundaryFinder* self) { QString _ret = self->string(); // 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 QTextBoundaryFinder_ToStart(QTextBoundaryFinder* self) { self->toStart(); } void QTextBoundaryFinder_ToEnd(QTextBoundaryFinder* self) { self->toEnd(); } int QTextBoundaryFinder_Position(const QTextBoundaryFinder* self) { return self->position(); } void QTextBoundaryFinder_SetPosition(QTextBoundaryFinder* self, int position) { self->setPosition(static_cast(position)); } int QTextBoundaryFinder_ToNextBoundary(QTextBoundaryFinder* self) { return self->toNextBoundary(); } int QTextBoundaryFinder_ToPreviousBoundary(QTextBoundaryFinder* self) { return self->toPreviousBoundary(); } bool QTextBoundaryFinder_IsAtBoundary(const QTextBoundaryFinder* self) { return self->isAtBoundary(); } int QTextBoundaryFinder_BoundaryReasons(const QTextBoundaryFinder* self) { QTextBoundaryFinder::BoundaryReasons _ret = self->boundaryReasons(); return static_cast(_ret); } void QTextBoundaryFinder_Delete(QTextBoundaryFinder* self, bool isSubclass) { if (isSubclass) { delete dynamic_cast( self ); } else { delete self; } }