#include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include "qproxystyle.h" #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(); } 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(); return miqt_strdup(_b.data(), _b.length()); } struct miqt_string* QProxyStyle_TrUtf8(const char* s) { QString _ret = QProxyStyle::trUtf8(s); // Convert QString from UTF-16 in C++ RAII memory to UTF-8 in manually-managed C memory QByteArray _b = _ret.toUtf8(); return miqt_strdup(_b.data(), _b.length()); } 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, uintptr_t element, QStyleOption* option, QPainter* painter) { self->drawPrimitive(static_cast(element), option, painter); } void QProxyStyle_DrawControl(const QProxyStyle* self, uintptr_t element, QStyleOption* option, QPainter* painter) { self->drawControl(static_cast(element), option, painter); } void QProxyStyle_DrawComplexControl(const QProxyStyle* self, uintptr_t 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, uintptr_t typeVal, QStyleOption* option, QSize* size, QWidget* widget) { return new QSize(self->sizeFromContents(static_cast(typeVal), option, *size, widget)); } QRect* QProxyStyle_SubElementRect(const QProxyStyle* self, uintptr_t element, QStyleOption* option, QWidget* widget) { return new QRect(self->subElementRect(static_cast(element), option, widget)); } QRect* QProxyStyle_SubControlRect(const QProxyStyle* self, uintptr_t cc, QStyleOptionComplex* opt, uintptr_t 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)); } uintptr_t QProxyStyle_HitTestComplexControl(const QProxyStyle* self, uintptr_t 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, uintptr_t hint) { return self->styleHint(static_cast(hint)); } int QProxyStyle_PixelMetric(const QProxyStyle* self, uintptr_t metric) { return self->pixelMetric(static_cast(metric)); } int QProxyStyle_LayoutSpacing(const QProxyStyle* self, uintptr_t control1, uintptr_t control2, uintptr_t orientation) { return self->layoutSpacing(static_cast(control1), static_cast(control2), static_cast(orientation)); } QIcon* QProxyStyle_StandardIcon(const QProxyStyle* self, uintptr_t standardIcon) { return new QIcon(self->standardIcon(static_cast(standardIcon))); } QPixmap* QProxyStyle_StandardPixmap(const QProxyStyle* self, uintptr_t standardPixmap, QStyleOption* opt) { return new QPixmap(self->standardPixmap(static_cast(standardPixmap), opt)); } QPixmap* QProxyStyle_GeneratedIconPixmap(const QProxyStyle* self, uintptr_t 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(); return miqt_strdup(_b.data(), _b.length()); } 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(); return miqt_strdup(_b.data(), _b.length()); } struct miqt_string* QProxyStyle_TrUtf82(const char* s, const char* c) { QString _ret = QProxyStyle::trUtf8(s, c); // Convert QString from UTF-16 in C++ RAII memory to UTF-8 in manually-managed C memory QByteArray _b = _ret.toUtf8(); return miqt_strdup(_b.data(), _b.length()); } struct miqt_string* QProxyStyle_TrUtf83(const char* s, const char* c, int n) { QString _ret = QProxyStyle::trUtf8(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(); return miqt_strdup(_b.data(), _b.length()); } void QProxyStyle_DrawPrimitive4(const QProxyStyle* self, uintptr_t element, QStyleOption* option, QPainter* painter, QWidget* widget) { self->drawPrimitive(static_cast(element), option, painter, widget); } void QProxyStyle_DrawControl4(const QProxyStyle* self, uintptr_t element, QStyleOption* option, QPainter* painter, QWidget* widget) { self->drawControl(static_cast(element), option, painter, widget); } void QProxyStyle_DrawComplexControl4(const QProxyStyle* self, uintptr_t 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, uintptr_t textRole) { QString text_QString = QString::fromUtf8(&text->data, text->len); self->drawItemText(painter, *rect, static_cast(flags), *pal, enabled, text_QString, static_cast(textRole)); } uintptr_t QProxyStyle_HitTestComplexControl4(const QProxyStyle* self, uintptr_t 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, uintptr_t hint, QStyleOption* option) { return self->styleHint(static_cast(hint), option); } int QProxyStyle_StyleHint3(const QProxyStyle* self, uintptr_t hint, QStyleOption* option, QWidget* widget) { return self->styleHint(static_cast(hint), option, widget); } int QProxyStyle_StyleHint4(const QProxyStyle* self, uintptr_t hint, QStyleOption* option, QWidget* widget, QStyleHintReturn* returnData) { return self->styleHint(static_cast(hint), option, widget, returnData); } int QProxyStyle_PixelMetric2(const QProxyStyle* self, uintptr_t metric, QStyleOption* option) { return self->pixelMetric(static_cast(metric), option); } int QProxyStyle_PixelMetric3(const QProxyStyle* self, uintptr_t metric, QStyleOption* option, QWidget* widget) { return self->pixelMetric(static_cast(metric), option, widget); } int QProxyStyle_LayoutSpacing4(const QProxyStyle* self, uintptr_t control1, uintptr_t control2, uintptr_t orientation, QStyleOption* option) { return self->layoutSpacing(static_cast(control1), static_cast(control2), static_cast(orientation), option); } int QProxyStyle_LayoutSpacing5(const QProxyStyle* self, uintptr_t control1, uintptr_t control2, uintptr_t 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, uintptr_t standardIcon, QStyleOption* option) { return new QIcon(self->standardIcon(static_cast(standardIcon), option)); } QIcon* QProxyStyle_StandardIcon3(const QProxyStyle* self, uintptr_t standardIcon, QStyleOption* option, QWidget* widget) { return new QIcon(self->standardIcon(static_cast(standardIcon), option, widget)); } QPixmap* QProxyStyle_StandardPixmap3(const QProxyStyle* self, uintptr_t standardPixmap, QStyleOption* opt, QWidget* widget) { return new QPixmap(self->standardPixmap(static_cast(standardPixmap), opt, widget)); } void QProxyStyle_Delete(QProxyStyle* self) { delete self; }