#include #include #include #include #include #include #include #include #include "gen_qcolordialog.h" #include "_cgo_export.h" QColorDialog* QColorDialog_new() { return new QColorDialog(); } QColorDialog* QColorDialog_new2(QColor* initial) { return new QColorDialog(*initial); } QColorDialog* QColorDialog_new3(QWidget* parent) { return new QColorDialog(parent); } QColorDialog* QColorDialog_new4(QColor* initial, QWidget* parent) { return new QColorDialog(*initial, parent); } QMetaObject* QColorDialog_MetaObject(const QColorDialog* self) { return (QMetaObject*) self->metaObject(); } void* QColorDialog_Metacast(QColorDialog* self, const char* param1) { return self->qt_metacast(param1); } struct miqt_string QColorDialog_Tr(const char* s) { QString _ret = QColorDialog::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; } void QColorDialog_SetCurrentColor(QColorDialog* self, QColor* color) { self->setCurrentColor(*color); } QColor* QColorDialog_CurrentColor(const QColorDialog* self) { return new QColor(self->currentColor()); } QColor* QColorDialog_SelectedColor(const QColorDialog* self) { return new QColor(self->selectedColor()); } void QColorDialog_SetOption(QColorDialog* self, int option) { self->setOption(static_cast(option)); } bool QColorDialog_TestOption(const QColorDialog* self, int option) { return self->testOption(static_cast(option)); } void QColorDialog_SetOptions(QColorDialog* self, int options) { self->setOptions(static_cast(options)); } int QColorDialog_Options(const QColorDialog* self) { QColorDialog::ColorDialogOptions _ret = self->options(); return static_cast(_ret); } void QColorDialog_SetVisible(QColorDialog* self, bool visible) { self->setVisible(visible); } QColor* QColorDialog_GetColor() { return new QColor(QColorDialog::getColor()); } int QColorDialog_CustomCount() { return QColorDialog::customCount(); } QColor* QColorDialog_CustomColor(int index) { return new QColor(QColorDialog::customColor(static_cast(index))); } void QColorDialog_SetCustomColor(int index, QColor* color) { QColorDialog::setCustomColor(static_cast(index), *color); } QColor* QColorDialog_StandardColor(int index) { return new QColor(QColorDialog::standardColor(static_cast(index))); } void QColorDialog_SetStandardColor(int index, QColor* color) { QColorDialog::setStandardColor(static_cast(index), *color); } void QColorDialog_CurrentColorChanged(QColorDialog* self, QColor* color) { self->currentColorChanged(*color); } void QColorDialog_connect_CurrentColorChanged(QColorDialog* self, intptr_t slot) { QColorDialog::connect(self, static_cast(&QColorDialog::currentColorChanged), self, [=](const QColor& color) { const QColor& color_ret = color; // Cast returned reference into pointer QColor* sigval1 = const_cast(&color_ret); miqt_exec_callback_QColorDialog_CurrentColorChanged(slot, sigval1); }); } void QColorDialog_ColorSelected(QColorDialog* self, QColor* color) { self->colorSelected(*color); } void QColorDialog_connect_ColorSelected(QColorDialog* self, intptr_t slot) { QColorDialog::connect(self, static_cast(&QColorDialog::colorSelected), self, [=](const QColor& color) { const QColor& color_ret = color; // Cast returned reference into pointer QColor* sigval1 = const_cast(&color_ret); miqt_exec_callback_QColorDialog_ColorSelected(slot, sigval1); }); } struct miqt_string QColorDialog_Tr2(const char* s, const char* c) { QString _ret = QColorDialog::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 QColorDialog_Tr3(const char* s, const char* c, int n) { QString _ret = QColorDialog::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 QColorDialog_SetOption2(QColorDialog* self, int option, bool on) { self->setOption(static_cast(option), on); } QColor* QColorDialog_GetColor1(QColor* initial) { return new QColor(QColorDialog::getColor(*initial)); } QColor* QColorDialog_GetColor2(QColor* initial, QWidget* parent) { return new QColor(QColorDialog::getColor(*initial, parent)); } QColor* QColorDialog_GetColor3(QColor* initial, QWidget* parent, struct miqt_string title) { QString title_QString = QString::fromUtf8(title.data, title.len); return new QColor(QColorDialog::getColor(*initial, parent, title_QString)); } QColor* QColorDialog_GetColor4(QColor* initial, QWidget* parent, struct miqt_string title, int options) { QString title_QString = QString::fromUtf8(title.data, title.len); return new QColor(QColorDialog::getColor(*initial, parent, title_QString, static_cast(options))); } void QColorDialog_Delete(QColorDialog* self) { delete self; }