#include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include "gen_qstyle.h" #include "_cgo_export.h" QMetaObject* QStyle_MetaObject(const QStyle* self) { return (QMetaObject*) self->metaObject(); } void* QStyle_Metacast(QStyle* self, const char* param1) { return self->qt_metacast(param1); } struct miqt_string QStyle_Tr(const char* s) { QString _ret = QStyle::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; } struct miqt_string QStyle_Name(const QStyle* self) { QString _ret = self->name(); // 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 QStyle_Polish(QStyle* self, QWidget* widget) { self->polish(widget); } void QStyle_Unpolish(QStyle* self, QWidget* widget) { self->unpolish(widget); } void QStyle_PolishWithApplication(QStyle* self, QApplication* application) { self->polish(application); } void QStyle_UnpolishWithApplication(QStyle* self, QApplication* application) { self->unpolish(application); } void QStyle_PolishWithPalette(QStyle* self, QPalette* palette) { self->polish(*palette); } QRect* QStyle_ItemTextRect(const QStyle* self, QFontMetrics* fm, QRect* r, int flags, bool enabled, struct miqt_string text) { QString text_QString = QString::fromUtf8(text.data, text.len); return new QRect(self->itemTextRect(*fm, *r, static_cast(flags), enabled, text_QString)); } QRect* QStyle_ItemPixmapRect(const QStyle* self, QRect* r, int flags, QPixmap* pixmap) { return new QRect(self->itemPixmapRect(*r, static_cast(flags), *pixmap)); } void QStyle_DrawItemText(const QStyle* self, QPainter* painter, QRect* rect, int flags, QPalette* pal, bool enabled, struct miqt_string text) { QString text_QString = QString::fromUtf8(text.data, text.len); self->drawItemText(painter, *rect, static_cast(flags), *pal, enabled, text_QString); } void QStyle_DrawItemPixmap(const QStyle* self, QPainter* painter, QRect* rect, int alignment, QPixmap* pixmap) { self->drawItemPixmap(painter, *rect, static_cast(alignment), *pixmap); } QPalette* QStyle_StandardPalette(const QStyle* self) { return new QPalette(self->standardPalette()); } void QStyle_DrawPrimitive(const QStyle* self, int pe, QStyleOption* opt, QPainter* p) { self->drawPrimitive(static_cast(pe), opt, p); } void QStyle_DrawControl(const QStyle* self, int element, QStyleOption* opt, QPainter* p) { self->drawControl(static_cast(element), opt, p); } QRect* QStyle_SubElementRect(const QStyle* self, int subElement, QStyleOption* option) { return new QRect(self->subElementRect(static_cast(subElement), option)); } void QStyle_DrawComplexControl(const QStyle* self, int cc, QStyleOptionComplex* opt, QPainter* p) { self->drawComplexControl(static_cast(cc), opt, p); } int QStyle_HitTestComplexControl(const QStyle* self, int cc, QStyleOptionComplex* opt, QPoint* pt) { QStyle::SubControl _ret = self->hitTestComplexControl(static_cast(cc), opt, *pt); return static_cast(_ret); } QRect* QStyle_SubControlRect(const QStyle* self, int cc, QStyleOptionComplex* opt, int sc) { return new QRect(self->subControlRect(static_cast(cc), opt, static_cast(sc))); } int QStyle_PixelMetric(const QStyle* self, int metric) { return self->pixelMetric(static_cast(metric)); } QSize* QStyle_SizeFromContents(const QStyle* self, int ct, QStyleOption* opt, QSize* contentsSize) { return new QSize(self->sizeFromContents(static_cast(ct), opt, *contentsSize)); } int QStyle_StyleHint(const QStyle* self, int stylehint) { return self->styleHint(static_cast(stylehint)); } QPixmap* QStyle_StandardPixmap(const QStyle* self, int standardPixmap) { return new QPixmap(self->standardPixmap(static_cast(standardPixmap))); } QIcon* QStyle_StandardIcon(const QStyle* self, int standardIcon) { return new QIcon(self->standardIcon(static_cast(standardIcon))); } QPixmap* QStyle_GeneratedIconPixmap(const QStyle* self, int iconMode, QPixmap* pixmap, QStyleOption* opt) { return new QPixmap(self->generatedIconPixmap(static_cast(iconMode), *pixmap, opt)); } QRect* QStyle_VisualRect(int direction, QRect* boundingRect, QRect* logicalRect) { return new QRect(QStyle::visualRect(static_cast(direction), *boundingRect, *logicalRect)); } QPoint* QStyle_VisualPos(int direction, QRect* boundingRect, QPoint* logicalPos) { return new QPoint(QStyle::visualPos(static_cast(direction), *boundingRect, *logicalPos)); } int QStyle_SliderPositionFromValue(int min, int max, int val, int space) { return QStyle::sliderPositionFromValue(static_cast(min), static_cast(max), static_cast(val), static_cast(space)); } int QStyle_SliderValueFromPosition(int min, int max, int pos, int space) { return QStyle::sliderValueFromPosition(static_cast(min), static_cast(max), static_cast(pos), static_cast(space)); } int QStyle_VisualAlignment(int direction, int alignment) { Qt::Alignment _ret = QStyle::visualAlignment(static_cast(direction), static_cast(alignment)); return static_cast(_ret); } QRect* QStyle_AlignedRect(int direction, int alignment, QSize* size, QRect* rectangle) { return new QRect(QStyle::alignedRect(static_cast(direction), static_cast(alignment), *size, *rectangle)); } int QStyle_LayoutSpacing(const QStyle* self, int control1, int control2, int orientation) { return self->layoutSpacing(static_cast(control1), static_cast(control2), static_cast(orientation)); } int QStyle_CombinedLayoutSpacing(const QStyle* self, int controls1, int controls2, int orientation) { return self->combinedLayoutSpacing(static_cast(controls1), static_cast(controls2), static_cast(orientation)); } QStyle* QStyle_Proxy(const QStyle* self) { return (QStyle*) self->proxy(); } struct miqt_string QStyle_Tr2(const char* s, const char* c) { QString _ret = QStyle::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 QStyle_Tr3(const char* s, const char* c, int n) { QString _ret = QStyle::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 QStyle_DrawItemText7(const QStyle* self, QPainter* painter, QRect* rect, int flags, QPalette* pal, bool enabled, struct miqt_string text, int textRole) { QString text_QString = QString::fromUtf8(text.data, text.len); self->drawItemText(painter, *rect, static_cast(flags), *pal, enabled, text_QString, static_cast(textRole)); } void QStyle_DrawPrimitive4(const QStyle* self, int pe, QStyleOption* opt, QPainter* p, QWidget* w) { self->drawPrimitive(static_cast(pe), opt, p, w); } void QStyle_DrawControl4(const QStyle* self, int element, QStyleOption* opt, QPainter* p, QWidget* w) { self->drawControl(static_cast(element), opt, p, w); } QRect* QStyle_SubElementRect3(const QStyle* self, int subElement, QStyleOption* option, QWidget* widget) { return new QRect(self->subElementRect(static_cast(subElement), option, widget)); } void QStyle_DrawComplexControl4(const QStyle* self, int cc, QStyleOptionComplex* opt, QPainter* p, QWidget* widget) { self->drawComplexControl(static_cast(cc), opt, p, widget); } int QStyle_HitTestComplexControl4(const QStyle* self, int cc, QStyleOptionComplex* opt, QPoint* pt, QWidget* widget) { QStyle::SubControl _ret = self->hitTestComplexControl(static_cast(cc), opt, *pt, widget); return static_cast(_ret); } QRect* QStyle_SubControlRect4(const QStyle* self, int cc, QStyleOptionComplex* opt, int sc, QWidget* widget) { return new QRect(self->subControlRect(static_cast(cc), opt, static_cast(sc), widget)); } int QStyle_PixelMetric2(const QStyle* self, int metric, QStyleOption* option) { return self->pixelMetric(static_cast(metric), option); } int QStyle_PixelMetric3(const QStyle* self, int metric, QStyleOption* option, QWidget* widget) { return self->pixelMetric(static_cast(metric), option, widget); } QSize* QStyle_SizeFromContents4(const QStyle* self, int ct, QStyleOption* opt, QSize* contentsSize, QWidget* w) { return new QSize(self->sizeFromContents(static_cast(ct), opt, *contentsSize, w)); } int QStyle_StyleHint2(const QStyle* self, int stylehint, QStyleOption* opt) { return self->styleHint(static_cast(stylehint), opt); } int QStyle_StyleHint3(const QStyle* self, int stylehint, QStyleOption* opt, QWidget* widget) { return self->styleHint(static_cast(stylehint), opt, widget); } int QStyle_StyleHint4(const QStyle* self, int stylehint, QStyleOption* opt, QWidget* widget, QStyleHintReturn* returnData) { return self->styleHint(static_cast(stylehint), opt, widget, returnData); } QPixmap* QStyle_StandardPixmap2(const QStyle* self, int standardPixmap, QStyleOption* opt) { return new QPixmap(self->standardPixmap(static_cast(standardPixmap), opt)); } QPixmap* QStyle_StandardPixmap3(const QStyle* self, int standardPixmap, QStyleOption* opt, QWidget* widget) { return new QPixmap(self->standardPixmap(static_cast(standardPixmap), opt, widget)); } QIcon* QStyle_StandardIcon2(const QStyle* self, int standardIcon, QStyleOption* option) { return new QIcon(self->standardIcon(static_cast(standardIcon), option)); } QIcon* QStyle_StandardIcon3(const QStyle* self, int standardIcon, QStyleOption* option, QWidget* widget) { return new QIcon(self->standardIcon(static_cast(standardIcon), option, widget)); } int QStyle_SliderPositionFromValue5(int min, int max, int val, int space, bool upsideDown) { return QStyle::sliderPositionFromValue(static_cast(min), static_cast(max), static_cast(val), static_cast(space), upsideDown); } int QStyle_SliderValueFromPosition5(int min, int max, int pos, int space, bool upsideDown) { return QStyle::sliderValueFromPosition(static_cast(min), static_cast(max), static_cast(pos), static_cast(space), upsideDown); } int QStyle_LayoutSpacing4(const QStyle* self, int control1, int control2, int orientation, QStyleOption* option) { return self->layoutSpacing(static_cast(control1), static_cast(control2), static_cast(orientation), option); } int QStyle_LayoutSpacing5(const QStyle* self, int control1, int control2, int orientation, QStyleOption* option, QWidget* widget) { return self->layoutSpacing(static_cast(control1), static_cast(control2), static_cast(orientation), option, widget); } int QStyle_CombinedLayoutSpacing4(const QStyle* self, int controls1, int controls2, int orientation, QStyleOption* option) { return self->combinedLayoutSpacing(static_cast(controls1), static_cast(controls2), static_cast(orientation), option); } int QStyle_CombinedLayoutSpacing5(const QStyle* self, int controls1, int controls2, int orientation, QStyleOption* option, QWidget* widget) { return self->combinedLayoutSpacing(static_cast(controls1), static_cast(controls2), static_cast(orientation), option, widget); } void QStyle_Delete(QStyle* self) { delete self; }