mirror of
https://github.com/mappu/miqt.git
synced 2025-01-03 14:18:37 +00:00
220 lines
8.7 KiB
C++
220 lines
8.7 KiB
C++
|
#include "gen_qabstracttextdocumentlayout.h"
|
||
|
#include "qabstracttextdocumentlayout.h"
|
||
|
|
||
|
#include <QAbstractTextDocumentLayout>
|
||
|
#include <QMetaObject>
|
||
|
#include <QObject>
|
||
|
#include <QPaintDevice>
|
||
|
#include <QPainter>
|
||
|
#include <QPointF>
|
||
|
#include <QRectF>
|
||
|
#include <QSizeF>
|
||
|
#include <QString>
|
||
|
#include <QTextBlock>
|
||
|
#include <QTextDocument>
|
||
|
#include <QTextFormat>
|
||
|
#include <QTextFrame>
|
||
|
#include <QTextObjectInterface>
|
||
|
|
||
|
|
||
|
extern "C" {
|
||
|
extern void miqt_exec_callback(void* cb, int argc, void* argv);
|
||
|
}
|
||
|
|
||
|
QMetaObject* QAbstractTextDocumentLayout_MetaObject(QAbstractTextDocumentLayout* self) {
|
||
|
return (QMetaObject*) self->metaObject();
|
||
|
}
|
||
|
|
||
|
void QAbstractTextDocumentLayout_Tr(char* s, char** _out, int* _out_Strlen) {
|
||
|
QString ret = QAbstractTextDocumentLayout::tr(s);
|
||
|
// Convert QString from UTF-16 in C++ RAII memory to UTF-8 in manually-managed C memory
|
||
|
QByteArray b = ret.toUtf8();
|
||
|
*_out = static_cast<char*>(malloc(b.length()));
|
||
|
memcpy(*_out, b.data(), b.length());
|
||
|
*_out_Strlen = b.length();
|
||
|
}
|
||
|
|
||
|
void QAbstractTextDocumentLayout_TrUtf8(char* s, char** _out, int* _out_Strlen) {
|
||
|
QString ret = QAbstractTextDocumentLayout::trUtf8(s);
|
||
|
// Convert QString from UTF-16 in C++ RAII memory to UTF-8 in manually-managed C memory
|
||
|
QByteArray b = ret.toUtf8();
|
||
|
*_out = static_cast<char*>(malloc(b.length()));
|
||
|
memcpy(*_out, b.data(), b.length());
|
||
|
*_out_Strlen = b.length();
|
||
|
}
|
||
|
|
||
|
void QAbstractTextDocumentLayout_AnchorAt(QAbstractTextDocumentLayout* self, QPointF* pos, char** _out, int* _out_Strlen) {
|
||
|
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();
|
||
|
*_out = static_cast<char*>(malloc(b.length()));
|
||
|
memcpy(*_out, b.data(), b.length());
|
||
|
*_out_Strlen = b.length();
|
||
|
}
|
||
|
|
||
|
void QAbstractTextDocumentLayout_ImageAt(QAbstractTextDocumentLayout* self, QPointF* pos, char** _out, int* _out_Strlen) {
|
||
|
QString ret = self->imageAt(*pos);
|
||
|
// Convert QString from UTF-16 in C++ RAII memory to UTF-8 in manually-managed C memory
|
||
|
QByteArray b = ret.toUtf8();
|
||
|
*_out = static_cast<char*>(malloc(b.length()));
|
||
|
memcpy(*_out, b.data(), b.length());
|
||
|
*_out_Strlen = b.length();
|
||
|
}
|
||
|
|
||
|
QTextFormat* QAbstractTextDocumentLayout_FormatAt(QAbstractTextDocumentLayout* self, QPointF* pos) {
|
||
|
QTextFormat ret = self->formatAt(*pos);
|
||
|
// Copy-construct value returned type into heap-allocated copy
|
||
|
return static_cast<QTextFormat*>(new QTextFormat(ret));
|
||
|
}
|
||
|
|
||
|
QTextBlock* QAbstractTextDocumentLayout_BlockWithMarkerAt(QAbstractTextDocumentLayout* self, QPointF* pos) {
|
||
|
QTextBlock ret = self->blockWithMarkerAt(*pos);
|
||
|
// Copy-construct value returned type into heap-allocated copy
|
||
|
return static_cast<QTextBlock*>(new QTextBlock(ret));
|
||
|
}
|
||
|
|
||
|
int QAbstractTextDocumentLayout_PageCount(QAbstractTextDocumentLayout* self) {
|
||
|
return self->pageCount();
|
||
|
}
|
||
|
|
||
|
QSizeF* QAbstractTextDocumentLayout_DocumentSize(QAbstractTextDocumentLayout* self) {
|
||
|
QSizeF ret = self->documentSize();
|
||
|
// Copy-construct value returned type into heap-allocated copy
|
||
|
return static_cast<QSizeF*>(new QSizeF(ret));
|
||
|
}
|
||
|
|
||
|
QRectF* QAbstractTextDocumentLayout_FrameBoundingRect(QAbstractTextDocumentLayout* self, QTextFrame* frame) {
|
||
|
QRectF ret = self->frameBoundingRect(frame);
|
||
|
// Copy-construct value returned type into heap-allocated copy
|
||
|
return static_cast<QRectF*>(new QRectF(ret));
|
||
|
}
|
||
|
|
||
|
QRectF* QAbstractTextDocumentLayout_BlockBoundingRect(QAbstractTextDocumentLayout* 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 QAbstractTextDocumentLayout_SetPaintDevice(QAbstractTextDocumentLayout* self, QPaintDevice* device) {
|
||
|
self->setPaintDevice(device);
|
||
|
}
|
||
|
|
||
|
QPaintDevice* QAbstractTextDocumentLayout_PaintDevice(QAbstractTextDocumentLayout* self) {
|
||
|
return self->paintDevice();
|
||
|
}
|
||
|
|
||
|
QTextDocument* QAbstractTextDocumentLayout_Document(QAbstractTextDocumentLayout* self) {
|
||
|
return self->document();
|
||
|
}
|
||
|
|
||
|
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();
|
||
|
}
|
||
|
|
||
|
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) {
|
||
|
miqt_exec_callback(slot, 0, nullptr);
|
||
|
});
|
||
|
}
|
||
|
|
||
|
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) {
|
||
|
miqt_exec_callback(slot, 0, nullptr);
|
||
|
});
|
||
|
}
|
||
|
|
||
|
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) {
|
||
|
miqt_exec_callback(slot, 0, nullptr);
|
||
|
});
|
||
|
}
|
||
|
|
||
|
void QAbstractTextDocumentLayout_Tr2(char* s, char* c, char** _out, int* _out_Strlen) {
|
||
|
QString ret = QAbstractTextDocumentLayout::tr(s, c);
|
||
|
// Convert QString from UTF-16 in C++ RAII memory to UTF-8 in manually-managed C memory
|
||
|
QByteArray b = ret.toUtf8();
|
||
|
*_out = static_cast<char*>(malloc(b.length()));
|
||
|
memcpy(*_out, b.data(), b.length());
|
||
|
*_out_Strlen = b.length();
|
||
|
}
|
||
|
|
||
|
void QAbstractTextDocumentLayout_Tr3(char* s, char* c, int n, char** _out, int* _out_Strlen) {
|
||
|
QString ret = QAbstractTextDocumentLayout::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();
|
||
|
*_out = static_cast<char*>(malloc(b.length()));
|
||
|
memcpy(*_out, b.data(), b.length());
|
||
|
*_out_Strlen = b.length();
|
||
|
}
|
||
|
|
||
|
void QAbstractTextDocumentLayout_TrUtf82(char* s, char* c, char** _out, int* _out_Strlen) {
|
||
|
QString ret = QAbstractTextDocumentLayout::trUtf8(s, c);
|
||
|
// Convert QString from UTF-16 in C++ RAII memory to UTF-8 in manually-managed C memory
|
||
|
QByteArray b = ret.toUtf8();
|
||
|
*_out = static_cast<char*>(malloc(b.length()));
|
||
|
memcpy(*_out, b.data(), b.length());
|
||
|
*_out_Strlen = b.length();
|
||
|
}
|
||
|
|
||
|
void QAbstractTextDocumentLayout_TrUtf83(char* s, char* c, int n, char** _out, int* _out_Strlen) {
|
||
|
QString ret = QAbstractTextDocumentLayout::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();
|
||
|
*_out = static_cast<char*>(malloc(b.length()));
|
||
|
memcpy(*_out, b.data(), b.length());
|
||
|
*_out_Strlen = b.length();
|
||
|
}
|
||
|
|
||
|
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) {
|
||
|
miqt_exec_callback(slot, 0, nullptr);
|
||
|
});
|
||
|
}
|
||
|
|
||
|
void QAbstractTextDocumentLayout_Delete(QAbstractTextDocumentLayout* self) {
|
||
|
delete self;
|
||
|
}
|
||
|
|
||
|
QSizeF* QTextObjectInterface_IntrinsicSize(QTextObjectInterface* self, QTextDocument* doc, int posInDocument, QTextFormat* format) {
|
||
|
QSizeF ret = self->intrinsicSize(doc, static_cast<int>(posInDocument), *format);
|
||
|
// Copy-construct value returned type into heap-allocated copy
|
||
|
return static_cast<QSizeF*>(new QSizeF(ret));
|
||
|
}
|
||
|
|
||
|
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;
|
||
|
}
|
||
|
|