#include #include #include #include #include #include #include #include #include #include #include #include #include #include "gen_qlayout.h" #include "_cgo_export.h" QMetaObject* QLayout_MetaObject(const QLayout* self) { return (QMetaObject*) self->metaObject(); } void* QLayout_Metacast(QLayout* self, const char* param1) { return self->qt_metacast(param1); } struct miqt_string QLayout_Tr(const char* s) { QString _ret = QLayout::tr(s); // 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; } int QLayout_Spacing(const QLayout* self) { return self->spacing(); } void QLayout_SetSpacing(QLayout* self, int spacing) { self->setSpacing(static_cast(spacing)); } void QLayout_SetContentsMargins(QLayout* self, int left, int top, int right, int bottom) { self->setContentsMargins(static_cast(left), static_cast(top), static_cast(right), static_cast(bottom)); } void QLayout_SetContentsMarginsWithMargins(QLayout* self, QMargins* margins) { self->setContentsMargins(*margins); } void QLayout_UnsetContentsMargins(QLayout* self) { self->unsetContentsMargins(); } void QLayout_GetContentsMargins(const QLayout* self, int* left, int* top, int* right, int* bottom) { self->getContentsMargins(static_cast(left), static_cast(top), static_cast(right), static_cast(bottom)); } QMargins* QLayout_ContentsMargins(const QLayout* self) { return new QMargins(self->contentsMargins()); } QRect* QLayout_ContentsRect(const QLayout* self) { return new QRect(self->contentsRect()); } bool QLayout_SetAlignment(QLayout* self, QWidget* w, int alignment) { return self->setAlignment(w, static_cast(alignment)); } bool QLayout_SetAlignment2(QLayout* self, QLayout* l, int alignment) { return self->setAlignment(l, static_cast(alignment)); } void QLayout_SetSizeConstraint(QLayout* self, int sizeConstraint) { self->setSizeConstraint(static_cast(sizeConstraint)); } int QLayout_SizeConstraint(const QLayout* self) { QLayout::SizeConstraint _ret = self->sizeConstraint(); return static_cast(_ret); } void QLayout_SetMenuBar(QLayout* self, QWidget* w) { self->setMenuBar(w); } QWidget* QLayout_MenuBar(const QLayout* self) { return self->menuBar(); } QWidget* QLayout_ParentWidget(const QLayout* self) { return self->parentWidget(); } void QLayout_Invalidate(QLayout* self) { self->invalidate(); } QRect* QLayout_Geometry(const QLayout* self) { return new QRect(self->geometry()); } bool QLayout_Activate(QLayout* self) { return self->activate(); } void QLayout_Update(QLayout* self) { self->update(); } void QLayout_AddWidget(QLayout* self, QWidget* w) { self->addWidget(w); } void QLayout_AddItem(QLayout* self, QLayoutItem* param1) { self->addItem(param1); } void QLayout_RemoveWidget(QLayout* self, QWidget* w) { self->removeWidget(w); } void QLayout_RemoveItem(QLayout* self, QLayoutItem* param1) { self->removeItem(param1); } int QLayout_ExpandingDirections(const QLayout* self) { Qt::Orientations _ret = self->expandingDirections(); return static_cast(_ret); } QSize* QLayout_MinimumSize(const QLayout* self) { return new QSize(self->minimumSize()); } QSize* QLayout_MaximumSize(const QLayout* self) { return new QSize(self->maximumSize()); } void QLayout_SetGeometry(QLayout* self, QRect* geometry) { self->setGeometry(*geometry); } QLayoutItem* QLayout_ItemAt(const QLayout* self, int index) { return self->itemAt(static_cast(index)); } QLayoutItem* QLayout_TakeAt(QLayout* self, int index) { return self->takeAt(static_cast(index)); } int QLayout_IndexOf(const QLayout* self, QWidget* param1) { return self->indexOf(param1); } int QLayout_IndexOfWithQLayoutItem(const QLayout* self, QLayoutItem* param1) { return self->indexOf(param1); } int QLayout_Count(const QLayout* self) { return self->count(); } bool QLayout_IsEmpty(const QLayout* self) { return self->isEmpty(); } int QLayout_ControlTypes(const QLayout* self) { QSizePolicy::ControlTypes _ret = self->controlTypes(); return static_cast(_ret); } QLayoutItem* QLayout_ReplaceWidget(QLayout* self, QWidget* from, QWidget* to, int options) { return self->replaceWidget(from, to, static_cast(options)); } int QLayout_TotalMinimumHeightForWidth(const QLayout* self, int w) { return self->totalMinimumHeightForWidth(static_cast(w)); } int QLayout_TotalHeightForWidth(const QLayout* self, int w) { return self->totalHeightForWidth(static_cast(w)); } QSize* QLayout_TotalMinimumSize(const QLayout* self) { return new QSize(self->totalMinimumSize()); } QSize* QLayout_TotalMaximumSize(const QLayout* self) { return new QSize(self->totalMaximumSize()); } QSize* QLayout_TotalSizeHint(const QLayout* self) { return new QSize(self->totalSizeHint()); } QLayout* QLayout_Layout(QLayout* self) { return self->layout(); } void QLayout_SetEnabled(QLayout* self, bool enabled) { self->setEnabled(enabled); } bool QLayout_IsEnabled(const QLayout* self) { return self->isEnabled(); } QSize* QLayout_ClosestAcceptableSize(QWidget* w, QSize* s) { return new QSize(QLayout::closestAcceptableSize(w, *s)); } struct miqt_string QLayout_Tr2(const char* s, const char* c) { QString _ret = QLayout::tr(s, c); // 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; } struct miqt_string QLayout_Tr3(const char* s, const char* c, int n) { QString _ret = QLayout::tr(s, c, static_cast(n)); // 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 QLayout_Delete(QLayout* self, bool isSubclass) { if (isSubclass) { delete dynamic_cast( self ); } else { delete self; } }