2024-08-25 04:08:24 +00:00
|
|
|
#include <QAbstractScrollArea>
|
2024-08-29 07:01:51 +00:00
|
|
|
#include <QList>
|
2024-08-25 04:08:24 +00:00
|
|
|
#include <QMetaObject>
|
|
|
|
#include <QScrollBar>
|
|
|
|
#include <QSize>
|
|
|
|
#include <QString>
|
2024-08-29 07:01:51 +00:00
|
|
|
#include <QByteArray>
|
|
|
|
#include <cstring>
|
2024-08-25 04:08:24 +00:00
|
|
|
#include <QWidget>
|
2024-08-29 07:01:51 +00:00
|
|
|
#include "qabstractscrollarea.h"
|
2024-08-25 04:08:24 +00:00
|
|
|
|
2024-08-29 07:01:51 +00:00
|
|
|
#include "gen_qabstractscrollarea.h"
|
2024-08-25 04:08:24 +00:00
|
|
|
|
|
|
|
extern "C" {
|
|
|
|
extern void miqt_exec_callback(void* cb, int argc, void* argv);
|
|
|
|
}
|
|
|
|
|
|
|
|
QAbstractScrollArea* QAbstractScrollArea_new() {
|
|
|
|
return new QAbstractScrollArea();
|
|
|
|
}
|
|
|
|
|
|
|
|
QAbstractScrollArea* QAbstractScrollArea_new2(QWidget* parent) {
|
|
|
|
return new QAbstractScrollArea(parent);
|
|
|
|
}
|
|
|
|
|
|
|
|
QMetaObject* QAbstractScrollArea_MetaObject(QAbstractScrollArea* self) {
|
2024-08-29 07:01:51 +00:00
|
|
|
return (QMetaObject*) const_cast<const QAbstractScrollArea*>(self)->metaObject();
|
2024-08-25 04:08:24 +00:00
|
|
|
}
|
|
|
|
|
2024-08-29 07:01:51 +00:00
|
|
|
void QAbstractScrollArea_Tr(const char* s, char** _out, int* _out_Strlen) {
|
2024-08-25 04:08:24 +00:00
|
|
|
QString ret = QAbstractScrollArea::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();
|
|
|
|
}
|
|
|
|
|
2024-08-29 07:01:51 +00:00
|
|
|
void QAbstractScrollArea_TrUtf8(const char* s, char** _out, int* _out_Strlen) {
|
2024-08-25 04:08:24 +00:00
|
|
|
QString ret = QAbstractScrollArea::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();
|
|
|
|
}
|
|
|
|
|
2024-08-29 07:01:51 +00:00
|
|
|
uintptr_t QAbstractScrollArea_VerticalScrollBarPolicy(QAbstractScrollArea* self) {
|
|
|
|
Qt::ScrollBarPolicy ret = const_cast<const QAbstractScrollArea*>(self)->verticalScrollBarPolicy();
|
|
|
|
return static_cast<uintptr_t>(ret);
|
|
|
|
}
|
|
|
|
|
|
|
|
void QAbstractScrollArea_SetVerticalScrollBarPolicy(QAbstractScrollArea* self, uintptr_t verticalScrollBarPolicy) {
|
|
|
|
self->setVerticalScrollBarPolicy(static_cast<Qt::ScrollBarPolicy>(verticalScrollBarPolicy));
|
|
|
|
}
|
|
|
|
|
2024-08-25 04:08:24 +00:00
|
|
|
QScrollBar* QAbstractScrollArea_VerticalScrollBar(QAbstractScrollArea* self) {
|
2024-08-29 07:01:51 +00:00
|
|
|
return const_cast<const QAbstractScrollArea*>(self)->verticalScrollBar();
|
2024-08-25 04:08:24 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
void QAbstractScrollArea_SetVerticalScrollBar(QAbstractScrollArea* self, QScrollBar* scrollbar) {
|
|
|
|
self->setVerticalScrollBar(scrollbar);
|
|
|
|
}
|
|
|
|
|
2024-08-29 07:01:51 +00:00
|
|
|
uintptr_t QAbstractScrollArea_HorizontalScrollBarPolicy(QAbstractScrollArea* self) {
|
|
|
|
Qt::ScrollBarPolicy ret = const_cast<const QAbstractScrollArea*>(self)->horizontalScrollBarPolicy();
|
|
|
|
return static_cast<uintptr_t>(ret);
|
|
|
|
}
|
|
|
|
|
|
|
|
void QAbstractScrollArea_SetHorizontalScrollBarPolicy(QAbstractScrollArea* self, uintptr_t horizontalScrollBarPolicy) {
|
|
|
|
self->setHorizontalScrollBarPolicy(static_cast<Qt::ScrollBarPolicy>(horizontalScrollBarPolicy));
|
|
|
|
}
|
|
|
|
|
2024-08-25 04:08:24 +00:00
|
|
|
QScrollBar* QAbstractScrollArea_HorizontalScrollBar(QAbstractScrollArea* self) {
|
2024-08-29 07:01:51 +00:00
|
|
|
return const_cast<const QAbstractScrollArea*>(self)->horizontalScrollBar();
|
2024-08-25 04:08:24 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
void QAbstractScrollArea_SetHorizontalScrollBar(QAbstractScrollArea* self, QScrollBar* scrollbar) {
|
|
|
|
self->setHorizontalScrollBar(scrollbar);
|
|
|
|
}
|
|
|
|
|
|
|
|
QWidget* QAbstractScrollArea_CornerWidget(QAbstractScrollArea* self) {
|
2024-08-29 07:01:51 +00:00
|
|
|
return const_cast<const QAbstractScrollArea*>(self)->cornerWidget();
|
2024-08-25 04:08:24 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
void QAbstractScrollArea_SetCornerWidget(QAbstractScrollArea* self, QWidget* widget) {
|
|
|
|
self->setCornerWidget(widget);
|
|
|
|
}
|
|
|
|
|
2024-08-29 07:01:51 +00:00
|
|
|
void QAbstractScrollArea_AddScrollBarWidget(QAbstractScrollArea* self, QWidget* widget, int alignment) {
|
|
|
|
self->addScrollBarWidget(widget, static_cast<Qt::Alignment>(alignment));
|
|
|
|
}
|
|
|
|
|
|
|
|
void QAbstractScrollArea_ScrollBarWidgets(QAbstractScrollArea* self, int alignment, QWidget*** _out, size_t* _out_len) {
|
|
|
|
QWidgetList ret = self->scrollBarWidgets(static_cast<Qt::Alignment>(alignment));
|
|
|
|
// Convert QList<> from C++ memory to manually-managed C memory
|
|
|
|
QWidget** __out = static_cast<QWidget**>(malloc(sizeof(QWidget*) * ret.length()));
|
|
|
|
for (size_t i = 0, e = ret.length(); i < e; ++i) {
|
|
|
|
__out[i] = ret[i];
|
|
|
|
}
|
|
|
|
*_out = __out;
|
|
|
|
*_out_len = ret.length();
|
|
|
|
}
|
|
|
|
|
2024-08-25 04:08:24 +00:00
|
|
|
QWidget* QAbstractScrollArea_Viewport(QAbstractScrollArea* self) {
|
2024-08-29 07:01:51 +00:00
|
|
|
return const_cast<const QAbstractScrollArea*>(self)->viewport();
|
2024-08-25 04:08:24 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
void QAbstractScrollArea_SetViewport(QAbstractScrollArea* self, QWidget* widget) {
|
|
|
|
self->setViewport(widget);
|
|
|
|
}
|
|
|
|
|
|
|
|
QSize* QAbstractScrollArea_MaximumViewportSize(QAbstractScrollArea* self) {
|
2024-08-29 07:01:51 +00:00
|
|
|
QSize ret = const_cast<const QAbstractScrollArea*>(self)->maximumViewportSize();
|
2024-08-25 04:08:24 +00:00
|
|
|
// Copy-construct value returned type into heap-allocated copy
|
|
|
|
return static_cast<QSize*>(new QSize(ret));
|
|
|
|
}
|
|
|
|
|
|
|
|
QSize* QAbstractScrollArea_MinimumSizeHint(QAbstractScrollArea* self) {
|
2024-08-29 07:01:51 +00:00
|
|
|
QSize ret = const_cast<const QAbstractScrollArea*>(self)->minimumSizeHint();
|
2024-08-25 04:08:24 +00:00
|
|
|
// Copy-construct value returned type into heap-allocated copy
|
|
|
|
return static_cast<QSize*>(new QSize(ret));
|
|
|
|
}
|
|
|
|
|
|
|
|
QSize* QAbstractScrollArea_SizeHint(QAbstractScrollArea* self) {
|
2024-08-29 07:01:51 +00:00
|
|
|
QSize ret = const_cast<const QAbstractScrollArea*>(self)->sizeHint();
|
2024-08-25 04:08:24 +00:00
|
|
|
// Copy-construct value returned type into heap-allocated copy
|
|
|
|
return static_cast<QSize*>(new QSize(ret));
|
|
|
|
}
|
|
|
|
|
|
|
|
void QAbstractScrollArea_SetupViewport(QAbstractScrollArea* self, QWidget* viewport) {
|
|
|
|
self->setupViewport(viewport);
|
|
|
|
}
|
|
|
|
|
2024-08-29 07:01:51 +00:00
|
|
|
uintptr_t QAbstractScrollArea_SizeAdjustPolicy(QAbstractScrollArea* self) {
|
|
|
|
QAbstractScrollArea::SizeAdjustPolicy ret = const_cast<const QAbstractScrollArea*>(self)->sizeAdjustPolicy();
|
|
|
|
return static_cast<uintptr_t>(ret);
|
|
|
|
}
|
|
|
|
|
|
|
|
void QAbstractScrollArea_SetSizeAdjustPolicy(QAbstractScrollArea* self, uintptr_t policy) {
|
|
|
|
self->setSizeAdjustPolicy(static_cast<QAbstractScrollArea::SizeAdjustPolicy>(policy));
|
|
|
|
}
|
|
|
|
|
|
|
|
void QAbstractScrollArea_Tr2(const char* s, const char* c, char** _out, int* _out_Strlen) {
|
2024-08-25 04:08:24 +00:00
|
|
|
QString ret = QAbstractScrollArea::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();
|
|
|
|
}
|
|
|
|
|
2024-08-29 07:01:51 +00:00
|
|
|
void QAbstractScrollArea_Tr3(const char* s, const char* c, int n, char** _out, int* _out_Strlen) {
|
2024-08-25 04:08:24 +00:00
|
|
|
QString ret = QAbstractScrollArea::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();
|
|
|
|
}
|
|
|
|
|
2024-08-29 07:01:51 +00:00
|
|
|
void QAbstractScrollArea_TrUtf82(const char* s, const char* c, char** _out, int* _out_Strlen) {
|
2024-08-25 04:08:24 +00:00
|
|
|
QString ret = QAbstractScrollArea::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();
|
|
|
|
}
|
|
|
|
|
2024-08-29 07:01:51 +00:00
|
|
|
void QAbstractScrollArea_TrUtf83(const char* s, const char* c, int n, char** _out, int* _out_Strlen) {
|
2024-08-25 04:08:24 +00:00
|
|
|
QString ret = QAbstractScrollArea::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 QAbstractScrollArea_Delete(QAbstractScrollArea* self) {
|
|
|
|
delete self;
|
|
|
|
}
|
|
|
|
|