miqt/qt/gen_qplaintextedit.cpp

661 lines
23 KiB
C++

#define WORKAROUND_INNER_CLASS_DEFINITION_QAbstractTextDocumentLayout__PaintContext
#include <QList>
#include <QMenu>
#include <QMetaObject>
#include <QPagedPaintDevice>
#include <QPainter>
#include <QPlainTextDocumentLayout>
#include <QPlainTextEdit>
#include <QPoint>
#include <QPointF>
#include <QRect>
#include <QRectF>
#include <QRegExp>
#include <QRegularExpression>
#include <QSizeF>
#include <QString>
#include <QByteArray>
#include <cstring>
#include <QTextBlock>
#include <QTextCharFormat>
#include <QTextCursor>
#include <QTextDocument>
#define WORKAROUND_INNER_CLASS_DEFINITION_QTextEdit__ExtraSelection
#include <QTextFrame>
#include <QUrl>
#include <QVariant>
#include <QWidget>
#include "qplaintextedit.h"
#include "gen_qplaintextedit.h"
#include "_cgo_export.h"
QPlainTextEdit* QPlainTextEdit_new() {
return new QPlainTextEdit();
}
QPlainTextEdit* QPlainTextEdit_new2(struct miqt_string* text) {
QString text_QString = QString::fromUtf8(&text->data, text->len);
return new QPlainTextEdit(text_QString);
}
QPlainTextEdit* QPlainTextEdit_new3(QWidget* parent) {
return new QPlainTextEdit(parent);
}
QPlainTextEdit* QPlainTextEdit_new4(struct miqt_string* text, QWidget* parent) {
QString text_QString = QString::fromUtf8(&text->data, text->len);
return new QPlainTextEdit(text_QString, parent);
}
QMetaObject* QPlainTextEdit_MetaObject(const QPlainTextEdit* self) {
return (QMetaObject*) self->metaObject();
}
struct miqt_string* QPlainTextEdit_Tr(const char* s) {
QString _ret = QPlainTextEdit::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* QPlainTextEdit_TrUtf8(const char* s) {
QString _ret = QPlainTextEdit::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 QPlainTextEdit_SetDocument(QPlainTextEdit* self, QTextDocument* document) {
self->setDocument(document);
}
QTextDocument* QPlainTextEdit_Document(const QPlainTextEdit* self) {
return self->document();
}
void QPlainTextEdit_SetPlaceholderText(QPlainTextEdit* self, struct miqt_string* placeholderText) {
QString placeholderText_QString = QString::fromUtf8(&placeholderText->data, placeholderText->len);
self->setPlaceholderText(placeholderText_QString);
}
struct miqt_string* QPlainTextEdit_PlaceholderText(const QPlainTextEdit* self) {
QString _ret = self->placeholderText();
// 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 QPlainTextEdit_SetTextCursor(QPlainTextEdit* self, QTextCursor* cursor) {
self->setTextCursor(*cursor);
}
QTextCursor* QPlainTextEdit_TextCursor(const QPlainTextEdit* self) {
QTextCursor _ret = self->textCursor();
// Copy-construct value returned type into heap-allocated copy
return static_cast<QTextCursor*>(new QTextCursor(_ret));
}
bool QPlainTextEdit_IsReadOnly(const QPlainTextEdit* self) {
return self->isReadOnly();
}
void QPlainTextEdit_SetReadOnly(QPlainTextEdit* self, bool ro) {
self->setReadOnly(ro);
}
void QPlainTextEdit_SetTextInteractionFlags(QPlainTextEdit* self, int flags) {
self->setTextInteractionFlags(static_cast<Qt::TextInteractionFlags>(flags));
}
int QPlainTextEdit_TextInteractionFlags(const QPlainTextEdit* self) {
Qt::TextInteractionFlags _ret = self->textInteractionFlags();
return static_cast<int>(_ret);
}
void QPlainTextEdit_MergeCurrentCharFormat(QPlainTextEdit* self, QTextCharFormat* modifier) {
self->mergeCurrentCharFormat(*modifier);
}
void QPlainTextEdit_SetCurrentCharFormat(QPlainTextEdit* self, QTextCharFormat* format) {
self->setCurrentCharFormat(*format);
}
QTextCharFormat* QPlainTextEdit_CurrentCharFormat(const QPlainTextEdit* self) {
QTextCharFormat _ret = self->currentCharFormat();
// Copy-construct value returned type into heap-allocated copy
return static_cast<QTextCharFormat*>(new QTextCharFormat(_ret));
}
bool QPlainTextEdit_TabChangesFocus(const QPlainTextEdit* self) {
return self->tabChangesFocus();
}
void QPlainTextEdit_SetTabChangesFocus(QPlainTextEdit* self, bool b) {
self->setTabChangesFocus(b);
}
void QPlainTextEdit_SetDocumentTitle(QPlainTextEdit* self, struct miqt_string* title) {
QString title_QString = QString::fromUtf8(&title->data, title->len);
self->setDocumentTitle(title_QString);
}
struct miqt_string* QPlainTextEdit_DocumentTitle(const QPlainTextEdit* self) {
QString _ret = self->documentTitle();
// 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());
}
bool QPlainTextEdit_IsUndoRedoEnabled(const QPlainTextEdit* self) {
return self->isUndoRedoEnabled();
}
void QPlainTextEdit_SetUndoRedoEnabled(QPlainTextEdit* self, bool enable) {
self->setUndoRedoEnabled(enable);
}
void QPlainTextEdit_SetMaximumBlockCount(QPlainTextEdit* self, int maximum) {
self->setMaximumBlockCount(static_cast<int>(maximum));
}
int QPlainTextEdit_MaximumBlockCount(const QPlainTextEdit* self) {
return self->maximumBlockCount();
}
uintptr_t QPlainTextEdit_LineWrapMode(const QPlainTextEdit* self) {
QPlainTextEdit::LineWrapMode _ret = self->lineWrapMode();
return static_cast<uintptr_t>(_ret);
}
void QPlainTextEdit_SetLineWrapMode(QPlainTextEdit* self, uintptr_t mode) {
self->setLineWrapMode(static_cast<QPlainTextEdit::LineWrapMode>(mode));
}
uintptr_t QPlainTextEdit_WordWrapMode(const QPlainTextEdit* self) {
QTextOption::WrapMode _ret = self->wordWrapMode();
return static_cast<uintptr_t>(_ret);
}
void QPlainTextEdit_SetWordWrapMode(QPlainTextEdit* self, uintptr_t policy) {
self->setWordWrapMode(static_cast<QTextOption::WrapMode>(policy));
}
void QPlainTextEdit_SetBackgroundVisible(QPlainTextEdit* self, bool visible) {
self->setBackgroundVisible(visible);
}
bool QPlainTextEdit_BackgroundVisible(const QPlainTextEdit* self) {
return self->backgroundVisible();
}
void QPlainTextEdit_SetCenterOnScroll(QPlainTextEdit* self, bool enabled) {
self->setCenterOnScroll(enabled);
}
bool QPlainTextEdit_CenterOnScroll(const QPlainTextEdit* self) {
return self->centerOnScroll();
}
bool QPlainTextEdit_Find(QPlainTextEdit* self, struct miqt_string* exp) {
QString exp_QString = QString::fromUtf8(&exp->data, exp->len);
return self->find(exp_QString);
}
bool QPlainTextEdit_FindWithExp(QPlainTextEdit* self, QRegExp* exp) {
return self->find(*exp);
}
bool QPlainTextEdit_Find2(QPlainTextEdit* self, QRegularExpression* exp) {
return self->find(*exp);
}
struct miqt_string* QPlainTextEdit_ToPlainText(const QPlainTextEdit* self) {
QString _ret = self->toPlainText();
// 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 QPlainTextEdit_EnsureCursorVisible(QPlainTextEdit* self) {
self->ensureCursorVisible();
}
QVariant* QPlainTextEdit_LoadResource(QPlainTextEdit* self, int typeVal, QUrl* name) {
QVariant _ret = self->loadResource(static_cast<int>(typeVal), *name);
// Copy-construct value returned type into heap-allocated copy
return static_cast<QVariant*>(new QVariant(_ret));
}
QMenu* QPlainTextEdit_CreateStandardContextMenu(QPlainTextEdit* self) {
return self->createStandardContextMenu();
}
QMenu* QPlainTextEdit_CreateStandardContextMenuWithPosition(QPlainTextEdit* self, QPoint* position) {
return self->createStandardContextMenu(*position);
}
QTextCursor* QPlainTextEdit_CursorForPosition(const QPlainTextEdit* self, QPoint* pos) {
QTextCursor _ret = self->cursorForPosition(*pos);
// Copy-construct value returned type into heap-allocated copy
return static_cast<QTextCursor*>(new QTextCursor(_ret));
}
QRect* QPlainTextEdit_CursorRect(const QPlainTextEdit* self, QTextCursor* cursor) {
QRect _ret = self->cursorRect(*cursor);
// Copy-construct value returned type into heap-allocated copy
return static_cast<QRect*>(new QRect(_ret));
}
QRect* QPlainTextEdit_CursorRect2(const QPlainTextEdit* self) {
QRect _ret = self->cursorRect();
// Copy-construct value returned type into heap-allocated copy
return static_cast<QRect*>(new QRect(_ret));
}
struct miqt_string* QPlainTextEdit_AnchorAt(const QPlainTextEdit* self, QPoint* pos) {
QString _ret = self->anchorAt(*pos);
// 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());
}
bool QPlainTextEdit_OverwriteMode(const QPlainTextEdit* self) {
return self->overwriteMode();
}
void QPlainTextEdit_SetOverwriteMode(QPlainTextEdit* self, bool overwrite) {
self->setOverwriteMode(overwrite);
}
int QPlainTextEdit_TabStopWidth(const QPlainTextEdit* self) {
return self->tabStopWidth();
}
void QPlainTextEdit_SetTabStopWidth(QPlainTextEdit* self, int width) {
self->setTabStopWidth(static_cast<int>(width));
}
double QPlainTextEdit_TabStopDistance(const QPlainTextEdit* self) {
return self->tabStopDistance();
}
void QPlainTextEdit_SetTabStopDistance(QPlainTextEdit* self, double distance) {
self->setTabStopDistance(static_cast<qreal>(distance));
}
int QPlainTextEdit_CursorWidth(const QPlainTextEdit* self) {
return self->cursorWidth();
}
void QPlainTextEdit_SetCursorWidth(QPlainTextEdit* self, int width) {
self->setCursorWidth(static_cast<int>(width));
}
void QPlainTextEdit_SetExtraSelections(QPlainTextEdit* self, struct miqt_array* /* of QTextEdit__ExtraSelection */ selections) {
QList<QTextEdit::ExtraSelection> selections_QList;
selections_QList.reserve(selections->len);
QTextEdit__ExtraSelection** selections_arr = static_cast<QTextEdit__ExtraSelection**>(selections->data);
for(size_t i = 0; i < selections->len; ++i) {
selections_QList.push_back(*(selections_arr[i]));
}
self->setExtraSelections(selections_QList);
}
struct miqt_array* QPlainTextEdit_ExtraSelections(const QPlainTextEdit* self) {
QList<QTextEdit::ExtraSelection> _ret = self->extraSelections();
// Convert QList<> from C++ memory to manually-managed C memory of copy-constructed pointers
QTextEdit__ExtraSelection** _arr = static_cast<QTextEdit__ExtraSelection**>(malloc(sizeof(QTextEdit__ExtraSelection**) * _ret.length()));
for (size_t i = 0, e = _ret.length(); i < e; ++i) {
_arr[i] = new QTextEdit::ExtraSelection(_ret[i]);
}
struct miqt_array* _out = static_cast<struct miqt_array*>(malloc(sizeof(struct miqt_array)));
_out->len = _ret.length();
_out->data = static_cast<void*>(_arr);
return _out;
}
void QPlainTextEdit_MoveCursor(QPlainTextEdit* self, uintptr_t operation) {
self->moveCursor(static_cast<QTextCursor::MoveOperation>(operation));
}
bool QPlainTextEdit_CanPaste(const QPlainTextEdit* self) {
return self->canPaste();
}
void QPlainTextEdit_Print(const QPlainTextEdit* self, QPagedPaintDevice* printer) {
self->print(printer);
}
int QPlainTextEdit_BlockCount(const QPlainTextEdit* self) {
return self->blockCount();
}
QVariant* QPlainTextEdit_InputMethodQuery(const QPlainTextEdit* self, uintptr_t property) {
QVariant _ret = self->inputMethodQuery(static_cast<Qt::InputMethodQuery>(property));
// Copy-construct value returned type into heap-allocated copy
return static_cast<QVariant*>(new QVariant(_ret));
}
QVariant* QPlainTextEdit_InputMethodQuery2(const QPlainTextEdit* self, uintptr_t query, QVariant* argument) {
QVariant _ret = self->inputMethodQuery(static_cast<Qt::InputMethodQuery>(query), *argument);
// Copy-construct value returned type into heap-allocated copy
return static_cast<QVariant*>(new QVariant(_ret));
}
void QPlainTextEdit_SetPlainText(QPlainTextEdit* self, struct miqt_string* text) {
QString text_QString = QString::fromUtf8(&text->data, text->len);
self->setPlainText(text_QString);
}
void QPlainTextEdit_Cut(QPlainTextEdit* self) {
self->cut();
}
void QPlainTextEdit_Copy(QPlainTextEdit* self) {
self->copy();
}
void QPlainTextEdit_Paste(QPlainTextEdit* self) {
self->paste();
}
void QPlainTextEdit_Undo(QPlainTextEdit* self) {
self->undo();
}
void QPlainTextEdit_Redo(QPlainTextEdit* self) {
self->redo();
}
void QPlainTextEdit_Clear(QPlainTextEdit* self) {
self->clear();
}
void QPlainTextEdit_SelectAll(QPlainTextEdit* self) {
self->selectAll();
}
void QPlainTextEdit_InsertPlainText(QPlainTextEdit* self, struct miqt_string* text) {
QString text_QString = QString::fromUtf8(&text->data, text->len);
self->insertPlainText(text_QString);
}
void QPlainTextEdit_AppendPlainText(QPlainTextEdit* self, struct miqt_string* text) {
QString text_QString = QString::fromUtf8(&text->data, text->len);
self->appendPlainText(text_QString);
}
void QPlainTextEdit_AppendHtml(QPlainTextEdit* self, struct miqt_string* html) {
QString html_QString = QString::fromUtf8(&html->data, html->len);
self->appendHtml(html_QString);
}
void QPlainTextEdit_CenterCursor(QPlainTextEdit* self) {
self->centerCursor();
}
void QPlainTextEdit_ZoomIn(QPlainTextEdit* self) {
self->zoomIn();
}
void QPlainTextEdit_ZoomOut(QPlainTextEdit* self) {
self->zoomOut();
}
void QPlainTextEdit_TextChanged(QPlainTextEdit* self) {
self->textChanged();
}
void QPlainTextEdit_connect_TextChanged(QPlainTextEdit* self, void* slot) {
QPlainTextEdit::connect(self, static_cast<void (QPlainTextEdit::*)()>(&QPlainTextEdit::textChanged), self, [=]() {
miqt_exec_callback_QPlainTextEdit_TextChanged(slot);
});
}
void QPlainTextEdit_UndoAvailable(QPlainTextEdit* self, bool b) {
self->undoAvailable(b);
}
void QPlainTextEdit_connect_UndoAvailable(QPlainTextEdit* self, void* slot) {
QPlainTextEdit::connect(self, static_cast<void (QPlainTextEdit::*)(bool)>(&QPlainTextEdit::undoAvailable), self, [=](bool b) {
bool sigval1 = b;
miqt_exec_callback_QPlainTextEdit_UndoAvailable(slot, sigval1);
});
}
void QPlainTextEdit_RedoAvailable(QPlainTextEdit* self, bool b) {
self->redoAvailable(b);
}
void QPlainTextEdit_connect_RedoAvailable(QPlainTextEdit* self, void* slot) {
QPlainTextEdit::connect(self, static_cast<void (QPlainTextEdit::*)(bool)>(&QPlainTextEdit::redoAvailable), self, [=](bool b) {
bool sigval1 = b;
miqt_exec_callback_QPlainTextEdit_RedoAvailable(slot, sigval1);
});
}
void QPlainTextEdit_CopyAvailable(QPlainTextEdit* self, bool b) {
self->copyAvailable(b);
}
void QPlainTextEdit_connect_CopyAvailable(QPlainTextEdit* self, void* slot) {
QPlainTextEdit::connect(self, static_cast<void (QPlainTextEdit::*)(bool)>(&QPlainTextEdit::copyAvailable), self, [=](bool b) {
bool sigval1 = b;
miqt_exec_callback_QPlainTextEdit_CopyAvailable(slot, sigval1);
});
}
void QPlainTextEdit_SelectionChanged(QPlainTextEdit* self) {
self->selectionChanged();
}
void QPlainTextEdit_connect_SelectionChanged(QPlainTextEdit* self, void* slot) {
QPlainTextEdit::connect(self, static_cast<void (QPlainTextEdit::*)()>(&QPlainTextEdit::selectionChanged), self, [=]() {
miqt_exec_callback_QPlainTextEdit_SelectionChanged(slot);
});
}
void QPlainTextEdit_CursorPositionChanged(QPlainTextEdit* self) {
self->cursorPositionChanged();
}
void QPlainTextEdit_connect_CursorPositionChanged(QPlainTextEdit* self, void* slot) {
QPlainTextEdit::connect(self, static_cast<void (QPlainTextEdit::*)()>(&QPlainTextEdit::cursorPositionChanged), self, [=]() {
miqt_exec_callback_QPlainTextEdit_CursorPositionChanged(slot);
});
}
void QPlainTextEdit_UpdateRequest(QPlainTextEdit* self, QRect* rect, int dy) {
self->updateRequest(*rect, static_cast<int>(dy));
}
void QPlainTextEdit_connect_UpdateRequest(QPlainTextEdit* self, void* slot) {
QPlainTextEdit::connect(self, static_cast<void (QPlainTextEdit::*)(const QRect&, int)>(&QPlainTextEdit::updateRequest), self, [=](const QRect& rect, int dy) {
const QRect& rect_ret = rect;
// Cast returned reference into pointer
QRect* sigval1 = const_cast<QRect*>(&rect_ret);
int sigval2 = dy;
miqt_exec_callback_QPlainTextEdit_UpdateRequest(slot, sigval1, sigval2);
});
}
void QPlainTextEdit_BlockCountChanged(QPlainTextEdit* self, int newBlockCount) {
self->blockCountChanged(static_cast<int>(newBlockCount));
}
void QPlainTextEdit_connect_BlockCountChanged(QPlainTextEdit* self, void* slot) {
QPlainTextEdit::connect(self, static_cast<void (QPlainTextEdit::*)(int)>(&QPlainTextEdit::blockCountChanged), self, [=](int newBlockCount) {
int sigval1 = newBlockCount;
miqt_exec_callback_QPlainTextEdit_BlockCountChanged(slot, sigval1);
});
}
void QPlainTextEdit_ModificationChanged(QPlainTextEdit* self, bool param1) {
self->modificationChanged(param1);
}
void QPlainTextEdit_connect_ModificationChanged(QPlainTextEdit* self, void* slot) {
QPlainTextEdit::connect(self, static_cast<void (QPlainTextEdit::*)(bool)>(&QPlainTextEdit::modificationChanged), self, [=](bool param1) {
bool sigval1 = param1;
miqt_exec_callback_QPlainTextEdit_ModificationChanged(slot, sigval1);
});
}
struct miqt_string* QPlainTextEdit_Tr2(const char* s, const char* c) {
QString _ret = QPlainTextEdit::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* QPlainTextEdit_Tr3(const char* s, const char* c, int n) {
QString _ret = QPlainTextEdit::tr(s, c, static_cast<int>(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* QPlainTextEdit_TrUtf82(const char* s, const char* c) {
QString _ret = QPlainTextEdit::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* QPlainTextEdit_TrUtf83(const char* s, const char* c, int n) {
QString _ret = QPlainTextEdit::trUtf8(s, c, static_cast<int>(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());
}
bool QPlainTextEdit_Find22(QPlainTextEdit* self, struct miqt_string* exp, int options) {
QString exp_QString = QString::fromUtf8(&exp->data, exp->len);
return self->find(exp_QString, static_cast<QTextDocument::FindFlags>(options));
}
bool QPlainTextEdit_Find23(QPlainTextEdit* self, QRegExp* exp, int options) {
return self->find(*exp, static_cast<QTextDocument::FindFlags>(options));
}
bool QPlainTextEdit_Find24(QPlainTextEdit* self, QRegularExpression* exp, int options) {
return self->find(*exp, static_cast<QTextDocument::FindFlags>(options));
}
void QPlainTextEdit_MoveCursor2(QPlainTextEdit* self, uintptr_t operation, uintptr_t mode) {
self->moveCursor(static_cast<QTextCursor::MoveOperation>(operation), static_cast<QTextCursor::MoveMode>(mode));
}
void QPlainTextEdit_ZoomIn1(QPlainTextEdit* self, int rangeVal) {
self->zoomIn(static_cast<int>(rangeVal));
}
void QPlainTextEdit_ZoomOut1(QPlainTextEdit* self, int rangeVal) {
self->zoomOut(static_cast<int>(rangeVal));
}
void QPlainTextEdit_Delete(QPlainTextEdit* self) {
delete self;
}
QPlainTextDocumentLayout* QPlainTextDocumentLayout_new(QTextDocument* document) {
return new QPlainTextDocumentLayout(document);
}
QMetaObject* QPlainTextDocumentLayout_MetaObject(const QPlainTextDocumentLayout* self) {
return (QMetaObject*) self->metaObject();
}
struct miqt_string* QPlainTextDocumentLayout_Tr(const char* s) {
QString _ret = QPlainTextDocumentLayout::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* QPlainTextDocumentLayout_TrUtf8(const char* s) {
QString _ret = QPlainTextDocumentLayout::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 QPlainTextDocumentLayout_Draw(QPlainTextDocumentLayout* self, QPainter* param1, QAbstractTextDocumentLayout__PaintContext* param2) {
self->draw(param1, *param2);
}
int QPlainTextDocumentLayout_HitTest(const QPlainTextDocumentLayout* self, QPointF* param1, uintptr_t param2) {
return self->hitTest(*param1, static_cast<Qt::HitTestAccuracy>(param2));
}
int QPlainTextDocumentLayout_PageCount(const QPlainTextDocumentLayout* self) {
return self->pageCount();
}
QSizeF* QPlainTextDocumentLayout_DocumentSize(const QPlainTextDocumentLayout* self) {
QSizeF _ret = self->documentSize();
// Copy-construct value returned type into heap-allocated copy
return static_cast<QSizeF*>(new QSizeF(_ret));
}
QRectF* QPlainTextDocumentLayout_FrameBoundingRect(const QPlainTextDocumentLayout* self, QTextFrame* param1) {
QRectF _ret = self->frameBoundingRect(param1);
// Copy-construct value returned type into heap-allocated copy
return static_cast<QRectF*>(new QRectF(_ret));
}
QRectF* QPlainTextDocumentLayout_BlockBoundingRect(const QPlainTextDocumentLayout* self, QTextBlock* block) {
QRectF _ret = self->blockBoundingRect(*block);
// Copy-construct value returned type into heap-allocated copy
return static_cast<QRectF*>(new QRectF(_ret));
}
void QPlainTextDocumentLayout_EnsureBlockLayout(const QPlainTextDocumentLayout* self, QTextBlock* block) {
self->ensureBlockLayout(*block);
}
void QPlainTextDocumentLayout_SetCursorWidth(QPlainTextDocumentLayout* self, int width) {
self->setCursorWidth(static_cast<int>(width));
}
int QPlainTextDocumentLayout_CursorWidth(const QPlainTextDocumentLayout* self) {
return self->cursorWidth();
}
void QPlainTextDocumentLayout_RequestUpdate(QPlainTextDocumentLayout* self) {
self->requestUpdate();
}
struct miqt_string* QPlainTextDocumentLayout_Tr2(const char* s, const char* c) {
QString _ret = QPlainTextDocumentLayout::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* QPlainTextDocumentLayout_Tr3(const char* s, const char* c, int n) {
QString _ret = QPlainTextDocumentLayout::tr(s, c, static_cast<int>(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* QPlainTextDocumentLayout_TrUtf82(const char* s, const char* c) {
QString _ret = QPlainTextDocumentLayout::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* QPlainTextDocumentLayout_TrUtf83(const char* s, const char* c, int n) {
QString _ret = QPlainTextDocumentLayout::trUtf8(s, c, static_cast<int>(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());
}
void QPlainTextDocumentLayout_Delete(QPlainTextDocumentLayout* self) {
delete self;
}