#include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include "gen_qproxystyle.h" #include "_cgo_export.h" QProxyStyle* QProxyStyle_new() { return new QProxyStyle(); } QProxyStyle* QProxyStyle_new2(struct miqt_string key) { QString key_QString = QString::fromUtf8(key.data, key.len); return new QProxyStyle(key_QString); } QProxyStyle* QProxyStyle_new3(QStyle* style) { return new QProxyStyle(style); } QMetaObject* QProxyStyle_MetaObject(const QProxyStyle* self) { return (QMetaObject*) self->metaObject(); } void* QProxyStyle_Metacast(QProxyStyle* self, const char* param1) { return self->qt_metacast(param1); } struct miqt_string QProxyStyle_Tr(const char* s) { QString _ret = QProxyStyle::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; } QStyle* QProxyStyle_BaseStyle(const QProxyStyle* self) { return self->baseStyle(); } void QProxyStyle_SetBaseStyle(QProxyStyle* self, QStyle* style) { self->setBaseStyle(style); } void QProxyStyle_DrawPrimitive(const QProxyStyle* self, int element, QStyleOption* option, QPainter* painter) { self->drawPrimitive(static_cast(element), option, painter); } void QProxyStyle_DrawControl(const QProxyStyle* self, int element, QStyleOption* option, QPainter* painter) { self->drawControl(static_cast(element), option, painter); } void QProxyStyle_DrawComplexControl(const QProxyStyle* self, int control, QStyleOptionComplex* option, QPainter* painter) { self->drawComplexControl(static_cast(control), option, painter); } void QProxyStyle_DrawItemText(const QProxyStyle* 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 QProxyStyle_DrawItemPixmap(const QProxyStyle* self, QPainter* painter, QRect* rect, int alignment, QPixmap* pixmap) { self->drawItemPixmap(painter, *rect, static_cast(alignment), *pixmap); } QSize* QProxyStyle_SizeFromContents(const QProxyStyle* self, int typeVal, QStyleOption* option, QSize* size, QWidget* widget) { return new QSize(self->sizeFromContents(static_cast(typeVal), option, *size, widget)); } QRect* QProxyStyle_SubElementRect(const QProxyStyle* self, int element, QStyleOption* option, QWidget* widget) { return new QRect(self->subElementRect(static_cast(element), option, widget)); } QRect* QProxyStyle_SubControlRect(const QProxyStyle* self, int cc, QStyleOptionComplex* opt, int sc, QWidget* widget) { return new QRect(self->subControlRect(static_cast(cc), opt, static_cast(sc), widget)); } QRect* QProxyStyle_ItemTextRect(const QProxyStyle* 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* QProxyStyle_ItemPixmapRect(const QProxyStyle* self, QRect* r, int flags, QPixmap* pixmap) { return new QRect(self->itemPixmapRect(*r, static_cast(flags), *pixmap)); } int QProxyStyle_HitTestComplexControl(const QProxyStyle* self, int control, QStyleOptionComplex* option, QPoint* pos) { QStyle::SubControl _ret = self->hitTestComplexControl(static_cast(control), option, *pos); return static_cast(_ret); } int QProxyStyle_StyleHint(const QProxyStyle* self, int hint) { return self->styleHint(static_cast(hint)); } int QProxyStyle_PixelMetric(const QProxyStyle* self, int metric) { return self->pixelMetric(static_cast(metric)); } int QProxyStyle_LayoutSpacing(const QProxyStyle* self, int control1, int control2, int orientation) { return self->layoutSpacing(static_cast(control1), static_cast(control2), static_cast(orientation)); } QIcon* QProxyStyle_StandardIcon(const QProxyStyle* self, int standardIcon) { return new QIcon(self->standardIcon(static_cast(standardIcon))); } QPixmap* QProxyStyle_StandardPixmap(const QProxyStyle* self, int standardPixmap, QStyleOption* opt) { return new QPixmap(self->standardPixmap(static_cast(standardPixmap), opt)); } QPixmap* QProxyStyle_GeneratedIconPixmap(const QProxyStyle* self, int iconMode, QPixmap* pixmap, QStyleOption* opt) { return new QPixmap(self->generatedIconPixmap(static_cast(iconMode), *pixmap, opt)); } QPalette* QProxyStyle_StandardPalette(const QProxyStyle* self) { return new QPalette(self->standardPalette()); } void QProxyStyle_Polish(QProxyStyle* self, QWidget* widget) { self->polish(widget); } void QProxyStyle_PolishWithPal(QProxyStyle* self, QPalette* pal) { self->polish(*pal); } void QProxyStyle_PolishWithApp(QProxyStyle* self, QApplication* app) { self->polish(app); } void QProxyStyle_Unpolish(QProxyStyle* self, QWidget* widget) { self->unpolish(widget); } void QProxyStyle_UnpolishWithApp(QProxyStyle* self, QApplication* app) { self->unpolish(app); } struct miqt_string QProxyStyle_Tr2(const char* s, const char* c) { QString _ret = QProxyStyle::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 QProxyStyle_Tr3(const char* s, const char* c, int n) { QString _ret = QProxyStyle::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 QProxyStyle_DrawPrimitive4(const QProxyStyle* self, int element, QStyleOption* option, QPainter* painter, QWidget* widget) { self->drawPrimitive(static_cast(element), option, painter, widget); } void QProxyStyle_DrawControl4(const QProxyStyle* self, int element, QStyleOption* option, QPainter* painter, QWidget* widget) { self->drawControl(static_cast(element), option, painter, widget); } void QProxyStyle_DrawComplexControl4(const QProxyStyle* self, int control, QStyleOptionComplex* option, QPainter* painter, QWidget* widget) { self->drawComplexControl(static_cast(control), option, painter, widget); } void QProxyStyle_DrawItemText7(const QProxyStyle* 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)); } int QProxyStyle_HitTestComplexControl4(const QProxyStyle* self, int control, QStyleOptionComplex* option, QPoint* pos, QWidget* widget) { QStyle::SubControl _ret = self->hitTestComplexControl(static_cast(control), option, *pos, widget); return static_cast(_ret); } int QProxyStyle_StyleHint2(const QProxyStyle* self, int hint, QStyleOption* option) { return self->styleHint(static_cast(hint), option); } int QProxyStyle_StyleHint3(const QProxyStyle* self, int hint, QStyleOption* option, QWidget* widget) { return self->styleHint(static_cast(hint), option, widget); } int QProxyStyle_StyleHint4(const QProxyStyle* self, int hint, QStyleOption* option, QWidget* widget, QStyleHintReturn* returnData) { return self->styleHint(static_cast(hint), option, widget, returnData); } int QProxyStyle_PixelMetric2(const QProxyStyle* self, int metric, QStyleOption* option) { return self->pixelMetric(static_cast(metric), option); } int QProxyStyle_PixelMetric3(const QProxyStyle* self, int metric, QStyleOption* option, QWidget* widget) { return self->pixelMetric(static_cast(metric), option, widget); } int QProxyStyle_LayoutSpacing4(const QProxyStyle* self, int control1, int control2, int orientation, QStyleOption* option) { return self->layoutSpacing(static_cast(control1), static_cast(control2), static_cast(orientation), option); } int QProxyStyle_LayoutSpacing5(const QProxyStyle* 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); } QIcon* QProxyStyle_StandardIcon2(const QProxyStyle* self, int standardIcon, QStyleOption* option) { return new QIcon(self->standardIcon(static_cast(standardIcon), option)); } QIcon* QProxyStyle_StandardIcon3(const QProxyStyle* self, int standardIcon, QStyleOption* option, QWidget* widget) { return new QIcon(self->standardIcon(static_cast(standardIcon), option, widget)); } QPixmap* QProxyStyle_StandardPixmap3(const QProxyStyle* self, int standardPixmap, QStyleOption* opt, QWidget* widget) { return new QPixmap(self->standardPixmap(static_cast(standardPixmap), opt, widget)); } void QProxyStyle_Delete(QProxyStyle* self) { delete self; }