2024-08-25 04:08:24 +00:00
|
|
|
#include <QAbstractTextDocumentLayout>
|
2024-08-29 07:01:51 +00:00
|
|
|
#define WORKAROUND_INNER_CLASS_DEFINITION_QAbstractTextDocumentLayout__PaintContext
|
|
|
|
#define WORKAROUND_INNER_CLASS_DEFINITION_QAbstractTextDocumentLayout__Selection
|
2024-08-25 04:08:24 +00:00
|
|
|
#include <QMetaObject>
|
|
|
|
#include <QObject>
|
|
|
|
#include <QPaintDevice>
|
|
|
|
#include <QPainter>
|
|
|
|
#include <QPointF>
|
|
|
|
#include <QRectF>
|
|
|
|
#include <QSizeF>
|
|
|
|
#include <QString>
|
2024-08-29 07:01:51 +00:00
|
|
|
#include <QByteArray>
|
|
|
|
#include <cstring>
|
2024-08-25 04:08:24 +00:00
|
|
|
#include <QTextBlock>
|
|
|
|
#include <QTextDocument>
|
|
|
|
#include <QTextFormat>
|
|
|
|
#include <QTextFrame>
|
|
|
|
#include <QTextObjectInterface>
|
2024-08-29 07:01:51 +00:00
|
|
|
#include "qabstracttextdocumentlayout.h"
|
|
|
|
#include "gen_qabstracttextdocumentlayout.h"
|
2024-09-14 22:29:05 +00:00
|
|
|
#include "_cgo_export.h"
|
2024-08-25 04:08:24 +00:00
|
|
|
|
2024-09-11 05:41:09 +00:00
|
|
|
QMetaObject* QAbstractTextDocumentLayout_MetaObject(const QAbstractTextDocumentLayout* self) {
|
|
|
|
return (QMetaObject*) self->metaObject();
|
2024-08-25 04:08:24 +00:00
|
|
|
}
|
|
|
|
|
2024-09-14 22:29:05 +00:00
|
|
|
struct miqt_string* QAbstractTextDocumentLayout_Tr(const char* s) {
|
|
|
|
QString _ret = QAbstractTextDocumentLayout::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();
|
|
|
|
return miqt_strdup(_b.data(), _b.length());
|
2024-08-25 04:08:24 +00:00
|
|
|
}
|
|
|
|
|
2024-09-14 22:29:05 +00:00
|
|
|
struct miqt_string* QAbstractTextDocumentLayout_TrUtf8(const char* s) {
|
|
|
|
QString _ret = QAbstractTextDocumentLayout::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();
|
|
|
|
return miqt_strdup(_b.data(), _b.length());
|
2024-08-25 04:08:24 +00:00
|
|
|
}
|
|
|
|
|
2024-08-29 07:01:51 +00:00
|
|
|
void QAbstractTextDocumentLayout_Draw(QAbstractTextDocumentLayout* self, QPainter* painter, QAbstractTextDocumentLayout__PaintContext* context) {
|
|
|
|
self->draw(painter, *context);
|
|
|
|
}
|
|
|
|
|
2024-09-11 05:41:09 +00:00
|
|
|
int QAbstractTextDocumentLayout_HitTest(const QAbstractTextDocumentLayout* self, QPointF* point, uintptr_t accuracy) {
|
|
|
|
return self->hitTest(*point, static_cast<Qt::HitTestAccuracy>(accuracy));
|
2024-08-29 07:01:51 +00:00
|
|
|
}
|
|
|
|
|
2024-09-14 22:29:05 +00:00
|
|
|
struct miqt_string* QAbstractTextDocumentLayout_AnchorAt(const QAbstractTextDocumentLayout* self, QPointF* pos) {
|
|
|
|
QString _ret = self->anchorAt(*pos);
|
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();
|
|
|
|
return miqt_strdup(_b.data(), _b.length());
|
2024-08-25 04:08:24 +00:00
|
|
|
}
|
|
|
|
|
2024-09-14 22:29:05 +00:00
|
|
|
struct miqt_string* QAbstractTextDocumentLayout_ImageAt(const QAbstractTextDocumentLayout* self, QPointF* pos) {
|
|
|
|
QString _ret = self->imageAt(*pos);
|
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();
|
|
|
|
return miqt_strdup(_b.data(), _b.length());
|
2024-08-25 04:08:24 +00:00
|
|
|
}
|
|
|
|
|
2024-09-11 05:41:09 +00:00
|
|
|
QTextFormat* QAbstractTextDocumentLayout_FormatAt(const QAbstractTextDocumentLayout* self, QPointF* pos) {
|
2024-09-14 22:29:05 +00:00
|
|
|
QTextFormat _ret = self->formatAt(*pos);
|
2024-08-25 04:08:24 +00:00
|
|
|
// Copy-construct value returned type into heap-allocated copy
|
2024-09-14 22:29:05 +00:00
|
|
|
return static_cast<QTextFormat*>(new QTextFormat(_ret));
|
2024-08-25 04:08:24 +00:00
|
|
|
}
|
|
|
|
|
2024-09-11 05:41:09 +00:00
|
|
|
QTextBlock* QAbstractTextDocumentLayout_BlockWithMarkerAt(const QAbstractTextDocumentLayout* self, QPointF* pos) {
|
2024-09-14 22:29:05 +00:00
|
|
|
QTextBlock _ret = self->blockWithMarkerAt(*pos);
|
2024-08-25 04:08:24 +00:00
|
|
|
// Copy-construct value returned type into heap-allocated copy
|
2024-09-14 22:29:05 +00:00
|
|
|
return static_cast<QTextBlock*>(new QTextBlock(_ret));
|
2024-08-25 04:08:24 +00:00
|
|
|
}
|
|
|
|
|
2024-09-11 05:41:09 +00:00
|
|
|
int QAbstractTextDocumentLayout_PageCount(const QAbstractTextDocumentLayout* self) {
|
|
|
|
return self->pageCount();
|
2024-08-25 04:08:24 +00:00
|
|
|
}
|
|
|
|
|
2024-09-11 05:41:09 +00:00
|
|
|
QSizeF* QAbstractTextDocumentLayout_DocumentSize(const QAbstractTextDocumentLayout* self) {
|
2024-09-14 22:29:05 +00:00
|
|
|
QSizeF _ret = self->documentSize();
|
2024-08-25 04:08:24 +00:00
|
|
|
// Copy-construct value returned type into heap-allocated copy
|
2024-09-14 22:29:05 +00:00
|
|
|
return static_cast<QSizeF*>(new QSizeF(_ret));
|
2024-08-25 04:08:24 +00:00
|
|
|
}
|
|
|
|
|
2024-09-11 05:41:09 +00:00
|
|
|
QRectF* QAbstractTextDocumentLayout_FrameBoundingRect(const QAbstractTextDocumentLayout* self, QTextFrame* frame) {
|
2024-09-14 22:29:05 +00:00
|
|
|
QRectF _ret = self->frameBoundingRect(frame);
|
2024-08-25 04:08:24 +00:00
|
|
|
// Copy-construct value returned type into heap-allocated copy
|
2024-09-14 22:29:05 +00:00
|
|
|
return static_cast<QRectF*>(new QRectF(_ret));
|
2024-08-25 04:08:24 +00:00
|
|
|
}
|
|
|
|
|
2024-09-11 05:41:09 +00:00
|
|
|
QRectF* QAbstractTextDocumentLayout_BlockBoundingRect(const QAbstractTextDocumentLayout* self, QTextBlock* block) {
|
2024-09-14 22:29:05 +00:00
|
|
|
QRectF _ret = self->blockBoundingRect(*block);
|
2024-08-25 04:08:24 +00:00
|
|
|
// Copy-construct value returned type into heap-allocated copy
|
2024-09-14 22:29:05 +00:00
|
|
|
return static_cast<QRectF*>(new QRectF(_ret));
|
2024-08-25 04:08:24 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
void QAbstractTextDocumentLayout_SetPaintDevice(QAbstractTextDocumentLayout* self, QPaintDevice* device) {
|
|
|
|
self->setPaintDevice(device);
|
|
|
|
}
|
|
|
|
|
2024-09-11 05:41:09 +00:00
|
|
|
QPaintDevice* QAbstractTextDocumentLayout_PaintDevice(const QAbstractTextDocumentLayout* self) {
|
|
|
|
return self->paintDevice();
|
2024-08-25 04:08:24 +00:00
|
|
|
}
|
|
|
|
|
2024-09-11 05:41:09 +00:00
|
|
|
QTextDocument* QAbstractTextDocumentLayout_Document(const QAbstractTextDocumentLayout* self) {
|
|
|
|
return self->document();
|
2024-08-25 04:08:24 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
void QAbstractTextDocumentLayout_RegisterHandler(QAbstractTextDocumentLayout* self, int objectType, QObject* component) {
|
|
|
|
self->registerHandler(static_cast<int>(objectType), component);
|
|
|
|
}
|
|
|
|
|
|
|
|
void QAbstractTextDocumentLayout_UnregisterHandler(QAbstractTextDocumentLayout* self, int objectType) {
|
|
|
|
self->unregisterHandler(static_cast<int>(objectType));
|
|
|
|
}
|
|
|
|
|
|
|
|
void QAbstractTextDocumentLayout_Update(QAbstractTextDocumentLayout* self) {
|
|
|
|
self->update();
|
|
|
|
}
|
|
|
|
|
2024-09-07 03:31:00 +00:00
|
|
|
void QAbstractTextDocumentLayout_connect_Update(QAbstractTextDocumentLayout* self, void* slot) {
|
|
|
|
QAbstractTextDocumentLayout::connect(self, static_cast<void (QAbstractTextDocumentLayout::*)(const QRectF&)>(&QAbstractTextDocumentLayout::update), self, [=]() {
|
2024-09-14 22:29:05 +00:00
|
|
|
miqt_exec_callback_QAbstractTextDocumentLayout_Update(slot);
|
2024-09-07 03:31:00 +00:00
|
|
|
});
|
|
|
|
}
|
|
|
|
|
2024-08-25 04:08:24 +00:00
|
|
|
void QAbstractTextDocumentLayout_UpdateBlock(QAbstractTextDocumentLayout* self, QTextBlock* block) {
|
|
|
|
self->updateBlock(*block);
|
|
|
|
}
|
|
|
|
|
|
|
|
void QAbstractTextDocumentLayout_connect_UpdateBlock(QAbstractTextDocumentLayout* self, void* slot) {
|
|
|
|
QAbstractTextDocumentLayout::connect(self, static_cast<void (QAbstractTextDocumentLayout::*)(const QTextBlock&)>(&QAbstractTextDocumentLayout::updateBlock), self, [=](const QTextBlock& block) {
|
2024-09-14 22:29:05 +00:00
|
|
|
const QTextBlock& block_ret = block;
|
|
|
|
// Cast returned reference into pointer
|
|
|
|
QTextBlock* sigval1 = const_cast<QTextBlock*>(&block_ret);
|
|
|
|
miqt_exec_callback_QAbstractTextDocumentLayout_UpdateBlock(slot, sigval1);
|
2024-08-25 04:08:24 +00:00
|
|
|
});
|
|
|
|
}
|
|
|
|
|
|
|
|
void QAbstractTextDocumentLayout_DocumentSizeChanged(QAbstractTextDocumentLayout* self, QSizeF* newSize) {
|
|
|
|
self->documentSizeChanged(*newSize);
|
|
|
|
}
|
|
|
|
|
|
|
|
void QAbstractTextDocumentLayout_connect_DocumentSizeChanged(QAbstractTextDocumentLayout* self, void* slot) {
|
|
|
|
QAbstractTextDocumentLayout::connect(self, static_cast<void (QAbstractTextDocumentLayout::*)(const QSizeF&)>(&QAbstractTextDocumentLayout::documentSizeChanged), self, [=](const QSizeF& newSize) {
|
2024-09-14 22:29:05 +00:00
|
|
|
const QSizeF& newSize_ret = newSize;
|
|
|
|
// Cast returned reference into pointer
|
|
|
|
QSizeF* sigval1 = const_cast<QSizeF*>(&newSize_ret);
|
|
|
|
miqt_exec_callback_QAbstractTextDocumentLayout_DocumentSizeChanged(slot, sigval1);
|
2024-08-25 04:08:24 +00:00
|
|
|
});
|
|
|
|
}
|
|
|
|
|
|
|
|
void QAbstractTextDocumentLayout_PageCountChanged(QAbstractTextDocumentLayout* self, int newPages) {
|
|
|
|
self->pageCountChanged(static_cast<int>(newPages));
|
|
|
|
}
|
|
|
|
|
|
|
|
void QAbstractTextDocumentLayout_connect_PageCountChanged(QAbstractTextDocumentLayout* self, void* slot) {
|
|
|
|
QAbstractTextDocumentLayout::connect(self, static_cast<void (QAbstractTextDocumentLayout::*)(int)>(&QAbstractTextDocumentLayout::pageCountChanged), self, [=](int newPages) {
|
2024-09-14 22:29:05 +00:00
|
|
|
int sigval1 = newPages;
|
|
|
|
miqt_exec_callback_QAbstractTextDocumentLayout_PageCountChanged(slot, sigval1);
|
2024-08-25 04:08:24 +00:00
|
|
|
});
|
|
|
|
}
|
|
|
|
|
2024-09-14 22:29:05 +00:00
|
|
|
struct miqt_string* QAbstractTextDocumentLayout_Tr2(const char* s, const char* c) {
|
|
|
|
QString _ret = QAbstractTextDocumentLayout::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();
|
|
|
|
return miqt_strdup(_b.data(), _b.length());
|
2024-08-25 04:08:24 +00:00
|
|
|
}
|
|
|
|
|
2024-09-14 22:29:05 +00:00
|
|
|
struct miqt_string* QAbstractTextDocumentLayout_Tr3(const char* s, const char* c, int n) {
|
|
|
|
QString _ret = QAbstractTextDocumentLayout::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();
|
|
|
|
return miqt_strdup(_b.data(), _b.length());
|
2024-08-25 04:08:24 +00:00
|
|
|
}
|
|
|
|
|
2024-09-14 22:29:05 +00:00
|
|
|
struct miqt_string* QAbstractTextDocumentLayout_TrUtf82(const char* s, const char* c) {
|
|
|
|
QString _ret = QAbstractTextDocumentLayout::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();
|
|
|
|
return miqt_strdup(_b.data(), _b.length());
|
2024-08-25 04:08:24 +00:00
|
|
|
}
|
|
|
|
|
2024-09-14 22:29:05 +00:00
|
|
|
struct miqt_string* QAbstractTextDocumentLayout_TrUtf83(const char* s, const char* c, int n) {
|
|
|
|
QString _ret = QAbstractTextDocumentLayout::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();
|
|
|
|
return miqt_strdup(_b.data(), _b.length());
|
2024-08-25 04:08:24 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
void QAbstractTextDocumentLayout_UnregisterHandler2(QAbstractTextDocumentLayout* self, int objectType, QObject* component) {
|
|
|
|
self->unregisterHandler(static_cast<int>(objectType), component);
|
|
|
|
}
|
|
|
|
|
|
|
|
void QAbstractTextDocumentLayout_Update1(QAbstractTextDocumentLayout* self, QRectF* param1) {
|
|
|
|
self->update(*param1);
|
|
|
|
}
|
|
|
|
|
|
|
|
void QAbstractTextDocumentLayout_connect_Update1(QAbstractTextDocumentLayout* self, void* slot) {
|
|
|
|
QAbstractTextDocumentLayout::connect(self, static_cast<void (QAbstractTextDocumentLayout::*)(const QRectF&)>(&QAbstractTextDocumentLayout::update), self, [=](const QRectF& param1) {
|
2024-09-14 22:29:05 +00:00
|
|
|
const QRectF& param1_ret = param1;
|
|
|
|
// Cast returned reference into pointer
|
|
|
|
QRectF* sigval1 = const_cast<QRectF*>(¶m1_ret);
|
|
|
|
miqt_exec_callback_QAbstractTextDocumentLayout_Update1(slot, sigval1);
|
2024-08-25 04:08:24 +00:00
|
|
|
});
|
|
|
|
}
|
|
|
|
|
|
|
|
void QAbstractTextDocumentLayout_Delete(QAbstractTextDocumentLayout* self) {
|
|
|
|
delete self;
|
|
|
|
}
|
|
|
|
|
|
|
|
QSizeF* QTextObjectInterface_IntrinsicSize(QTextObjectInterface* self, QTextDocument* doc, int posInDocument, QTextFormat* format) {
|
2024-09-14 22:29:05 +00:00
|
|
|
QSizeF _ret = self->intrinsicSize(doc, static_cast<int>(posInDocument), *format);
|
2024-08-25 04:08:24 +00:00
|
|
|
// Copy-construct value returned type into heap-allocated copy
|
2024-09-14 22:29:05 +00:00
|
|
|
return static_cast<QSizeF*>(new QSizeF(_ret));
|
2024-08-25 04:08:24 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
void QTextObjectInterface_DrawObject(QTextObjectInterface* self, QPainter* painter, QRectF* rect, QTextDocument* doc, int posInDocument, QTextFormat* format) {
|
|
|
|
self->drawObject(painter, *rect, doc, static_cast<int>(posInDocument), *format);
|
|
|
|
}
|
|
|
|
|
|
|
|
void QTextObjectInterface_Delete(QTextObjectInterface* self) {
|
|
|
|
delete self;
|
|
|
|
}
|
|
|
|
|
2024-08-29 07:01:51 +00:00
|
|
|
QAbstractTextDocumentLayout__Selection* QAbstractTextDocumentLayout__Selection_new(QAbstractTextDocumentLayout__Selection* param1) {
|
|
|
|
return new QAbstractTextDocumentLayout::Selection(*param1);
|
|
|
|
}
|
|
|
|
|
|
|
|
void QAbstractTextDocumentLayout__Selection_Delete(QAbstractTextDocumentLayout__Selection* self) {
|
|
|
|
delete self;
|
|
|
|
}
|
|
|
|
|
|
|
|
QAbstractTextDocumentLayout__PaintContext* QAbstractTextDocumentLayout__PaintContext_new() {
|
|
|
|
return new QAbstractTextDocumentLayout::PaintContext();
|
|
|
|
}
|
|
|
|
|
|
|
|
QAbstractTextDocumentLayout__PaintContext* QAbstractTextDocumentLayout__PaintContext_new2(QAbstractTextDocumentLayout__PaintContext* param1) {
|
|
|
|
return new QAbstractTextDocumentLayout::PaintContext(*param1);
|
|
|
|
}
|
|
|
|
|
|
|
|
void QAbstractTextDocumentLayout__PaintContext_Delete(QAbstractTextDocumentLayout__PaintContext* self) {
|
|
|
|
delete self;
|
|
|
|
}
|
|
|
|
|