2024-08-25 04:08:24 +00:00
|
|
|
#include <QBrush>
|
|
|
|
#include <QColor>
|
|
|
|
#include <QPalette>
|
2024-10-16 05:07:56 +00:00
|
|
|
#include <qpalette.h>
|
2024-08-29 07:01:51 +00:00
|
|
|
#include "gen_qpalette.h"
|
2024-12-11 06:55:47 +00:00
|
|
|
|
|
|
|
#ifndef _Bool
|
|
|
|
#define _Bool bool
|
|
|
|
#endif
|
2024-09-14 22:29:05 +00:00
|
|
|
#include "_cgo_export.h"
|
2024-08-25 04:08:24 +00:00
|
|
|
|
2024-12-07 04:15:57 +00:00
|
|
|
QPalette* QPalette_new() {
|
|
|
|
return new QPalette();
|
2024-08-25 04:08:24 +00:00
|
|
|
}
|
|
|
|
|
2024-12-07 04:15:57 +00:00
|
|
|
QPalette* QPalette_new2(QColor* button) {
|
|
|
|
return new QPalette(*button);
|
2024-08-25 04:08:24 +00:00
|
|
|
}
|
|
|
|
|
2024-12-07 04:15:57 +00:00
|
|
|
QPalette* QPalette_new3(int button) {
|
|
|
|
return new QPalette(static_cast<Qt::GlobalColor>(button));
|
2024-08-29 07:01:51 +00:00
|
|
|
}
|
|
|
|
|
2024-12-07 04:15:57 +00:00
|
|
|
QPalette* QPalette_new4(QColor* button, QColor* window) {
|
|
|
|
return new QPalette(*button, *window);
|
2024-08-25 04:08:24 +00:00
|
|
|
}
|
|
|
|
|
2024-12-07 04:15:57 +00:00
|
|
|
QPalette* QPalette_new5(QBrush* windowText, QBrush* button, QBrush* light, QBrush* dark, QBrush* mid, QBrush* text, QBrush* bright_text, QBrush* base, QBrush* window) {
|
|
|
|
return new QPalette(*windowText, *button, *light, *dark, *mid, *text, *bright_text, *base, *window);
|
2024-08-25 04:08:24 +00:00
|
|
|
}
|
|
|
|
|
2024-12-07 04:15:57 +00:00
|
|
|
QPalette* QPalette_new6(QColor* windowText, QColor* window, QColor* light, QColor* dark, QColor* mid, QColor* text, QColor* base) {
|
|
|
|
return new QPalette(*windowText, *window, *light, *dark, *mid, *text, *base);
|
2024-08-25 04:08:24 +00:00
|
|
|
}
|
|
|
|
|
2024-12-07 04:15:57 +00:00
|
|
|
QPalette* QPalette_new7(QPalette* palette) {
|
|
|
|
return new QPalette(*palette);
|
2024-08-25 04:08:24 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
void QPalette_OperatorAssign(QPalette* self, QPalette* palette) {
|
|
|
|
self->operator=(*palette);
|
|
|
|
}
|
|
|
|
|
|
|
|
void QPalette_Swap(QPalette* self, QPalette* other) {
|
|
|
|
self->swap(*other);
|
|
|
|
}
|
|
|
|
|
2024-09-18 00:12:02 +00:00
|
|
|
int QPalette_CurrentColorGroup(const QPalette* self) {
|
2024-09-14 22:29:05 +00:00
|
|
|
QPalette::ColorGroup _ret = self->currentColorGroup();
|
2024-09-18 00:12:02 +00:00
|
|
|
return static_cast<int>(_ret);
|
2024-08-29 07:01:51 +00:00
|
|
|
}
|
|
|
|
|
2024-09-18 00:12:02 +00:00
|
|
|
void QPalette_SetCurrentColorGroup(QPalette* self, int cg) {
|
2024-08-29 07:01:51 +00:00
|
|
|
self->setCurrentColorGroup(static_cast<QPalette::ColorGroup>(cg));
|
|
|
|
}
|
|
|
|
|
2024-09-18 00:12:02 +00:00
|
|
|
QColor* QPalette_Color(const QPalette* self, int cg, int cr) {
|
2024-09-14 22:29:05 +00:00
|
|
|
const QColor& _ret = self->color(static_cast<QPalette::ColorGroup>(cg), static_cast<QPalette::ColorRole>(cr));
|
2024-08-29 07:01:51 +00:00
|
|
|
// Cast returned reference into pointer
|
2024-09-14 22:29:05 +00:00
|
|
|
return const_cast<QColor*>(&_ret);
|
2024-08-29 07:01:51 +00:00
|
|
|
}
|
|
|
|
|
2024-09-18 00:12:02 +00:00
|
|
|
QBrush* QPalette_Brush(const QPalette* self, int cg, int cr) {
|
2024-09-14 22:29:05 +00:00
|
|
|
const QBrush& _ret = self->brush(static_cast<QPalette::ColorGroup>(cg), static_cast<QPalette::ColorRole>(cr));
|
2024-08-29 07:01:51 +00:00
|
|
|
// Cast returned reference into pointer
|
2024-09-14 22:29:05 +00:00
|
|
|
return const_cast<QBrush*>(&_ret);
|
2024-08-29 07:01:51 +00:00
|
|
|
}
|
|
|
|
|
2024-09-18 00:12:02 +00:00
|
|
|
void QPalette_SetColor(QPalette* self, int cg, int cr, QColor* color) {
|
2024-08-29 07:01:51 +00:00
|
|
|
self->setColor(static_cast<QPalette::ColorGroup>(cg), static_cast<QPalette::ColorRole>(cr), *color);
|
|
|
|
}
|
|
|
|
|
2024-09-18 00:12:02 +00:00
|
|
|
void QPalette_SetColor2(QPalette* self, int cr, QColor* color) {
|
2024-08-29 07:01:51 +00:00
|
|
|
self->setColor(static_cast<QPalette::ColorRole>(cr), *color);
|
|
|
|
}
|
|
|
|
|
2024-09-18 00:12:02 +00:00
|
|
|
void QPalette_SetBrush(QPalette* self, int cr, QBrush* brush) {
|
2024-08-29 07:01:51 +00:00
|
|
|
self->setBrush(static_cast<QPalette::ColorRole>(cr), *brush);
|
|
|
|
}
|
|
|
|
|
2024-09-18 00:12:02 +00:00
|
|
|
bool QPalette_IsBrushSet(const QPalette* self, int cg, int cr) {
|
2024-09-11 05:41:09 +00:00
|
|
|
return self->isBrushSet(static_cast<QPalette::ColorGroup>(cg), static_cast<QPalette::ColorRole>(cr));
|
2024-08-29 07:01:51 +00:00
|
|
|
}
|
|
|
|
|
2024-09-18 00:12:02 +00:00
|
|
|
void QPalette_SetBrush2(QPalette* self, int cg, int cr, QBrush* brush) {
|
2024-08-29 07:01:51 +00:00
|
|
|
self->setBrush(static_cast<QPalette::ColorGroup>(cg), static_cast<QPalette::ColorRole>(cr), *brush);
|
|
|
|
}
|
|
|
|
|
2024-09-18 00:12:02 +00:00
|
|
|
void QPalette_SetColorGroup(QPalette* self, int cr, QBrush* windowText, QBrush* button, QBrush* light, QBrush* dark, QBrush* mid, QBrush* text, QBrush* bright_text, QBrush* base, QBrush* window) {
|
2024-08-29 07:01:51 +00:00
|
|
|
self->setColorGroup(static_cast<QPalette::ColorGroup>(cr), *windowText, *button, *light, *dark, *mid, *text, *bright_text, *base, *window);
|
|
|
|
}
|
|
|
|
|
2024-09-18 00:12:02 +00:00
|
|
|
bool QPalette_IsEqual(const QPalette* self, int cr1, int cr2) {
|
2024-09-11 05:41:09 +00:00
|
|
|
return self->isEqual(static_cast<QPalette::ColorGroup>(cr1), static_cast<QPalette::ColorGroup>(cr2));
|
2024-08-29 07:01:51 +00:00
|
|
|
}
|
|
|
|
|
2024-09-18 00:12:02 +00:00
|
|
|
QColor* QPalette_ColorWithCr(const QPalette* self, int cr) {
|
2024-09-14 22:29:05 +00:00
|
|
|
const QColor& _ret = self->color(static_cast<QPalette::ColorRole>(cr));
|
2024-08-29 07:01:51 +00:00
|
|
|
// Cast returned reference into pointer
|
2024-09-14 22:29:05 +00:00
|
|
|
return const_cast<QColor*>(&_ret);
|
2024-08-29 07:01:51 +00:00
|
|
|
}
|
|
|
|
|
2024-09-18 00:12:02 +00:00
|
|
|
QBrush* QPalette_BrushWithCr(const QPalette* self, int cr) {
|
2024-09-14 22:29:05 +00:00
|
|
|
const QBrush& _ret = self->brush(static_cast<QPalette::ColorRole>(cr));
|
2024-08-29 07:01:51 +00:00
|
|
|
// Cast returned reference into pointer
|
2024-09-14 22:29:05 +00:00
|
|
|
return const_cast<QBrush*>(&_ret);
|
2024-08-29 07:01:51 +00:00
|
|
|
}
|
|
|
|
|
2024-09-11 05:41:09 +00:00
|
|
|
QBrush* QPalette_WindowText(const QPalette* self) {
|
2024-09-14 22:29:05 +00:00
|
|
|
const QBrush& _ret = self->windowText();
|
2024-08-25 04:08:24 +00:00
|
|
|
// Cast returned reference into pointer
|
2024-09-14 22:29:05 +00:00
|
|
|
return const_cast<QBrush*>(&_ret);
|
2024-08-25 04:08:24 +00:00
|
|
|
}
|
|
|
|
|
2024-09-11 05:41:09 +00:00
|
|
|
QBrush* QPalette_Button(const QPalette* self) {
|
2024-09-14 22:29:05 +00:00
|
|
|
const QBrush& _ret = self->button();
|
2024-08-25 04:08:24 +00:00
|
|
|
// Cast returned reference into pointer
|
2024-09-14 22:29:05 +00:00
|
|
|
return const_cast<QBrush*>(&_ret);
|
2024-08-25 04:08:24 +00:00
|
|
|
}
|
|
|
|
|
2024-09-11 05:41:09 +00:00
|
|
|
QBrush* QPalette_Light(const QPalette* self) {
|
2024-09-14 22:29:05 +00:00
|
|
|
const QBrush& _ret = self->light();
|
2024-08-25 04:08:24 +00:00
|
|
|
// Cast returned reference into pointer
|
2024-09-14 22:29:05 +00:00
|
|
|
return const_cast<QBrush*>(&_ret);
|
2024-08-25 04:08:24 +00:00
|
|
|
}
|
|
|
|
|
2024-09-11 05:41:09 +00:00
|
|
|
QBrush* QPalette_Dark(const QPalette* self) {
|
2024-09-14 22:29:05 +00:00
|
|
|
const QBrush& _ret = self->dark();
|
2024-08-25 04:08:24 +00:00
|
|
|
// Cast returned reference into pointer
|
2024-09-14 22:29:05 +00:00
|
|
|
return const_cast<QBrush*>(&_ret);
|
2024-08-25 04:08:24 +00:00
|
|
|
}
|
|
|
|
|
2024-09-11 05:41:09 +00:00
|
|
|
QBrush* QPalette_Mid(const QPalette* self) {
|
2024-09-14 22:29:05 +00:00
|
|
|
const QBrush& _ret = self->mid();
|
2024-08-25 04:08:24 +00:00
|
|
|
// Cast returned reference into pointer
|
2024-09-14 22:29:05 +00:00
|
|
|
return const_cast<QBrush*>(&_ret);
|
2024-08-25 04:08:24 +00:00
|
|
|
}
|
|
|
|
|
2024-09-11 05:41:09 +00:00
|
|
|
QBrush* QPalette_Text(const QPalette* self) {
|
2024-09-14 22:29:05 +00:00
|
|
|
const QBrush& _ret = self->text();
|
2024-08-25 04:08:24 +00:00
|
|
|
// Cast returned reference into pointer
|
2024-09-14 22:29:05 +00:00
|
|
|
return const_cast<QBrush*>(&_ret);
|
2024-08-25 04:08:24 +00:00
|
|
|
}
|
|
|
|
|
2024-09-11 05:41:09 +00:00
|
|
|
QBrush* QPalette_Base(const QPalette* self) {
|
2024-09-14 22:29:05 +00:00
|
|
|
const QBrush& _ret = self->base();
|
2024-08-25 04:08:24 +00:00
|
|
|
// Cast returned reference into pointer
|
2024-09-14 22:29:05 +00:00
|
|
|
return const_cast<QBrush*>(&_ret);
|
2024-08-25 04:08:24 +00:00
|
|
|
}
|
|
|
|
|
2024-09-11 05:41:09 +00:00
|
|
|
QBrush* QPalette_AlternateBase(const QPalette* self) {
|
2024-09-14 22:29:05 +00:00
|
|
|
const QBrush& _ret = self->alternateBase();
|
2024-08-25 04:08:24 +00:00
|
|
|
// Cast returned reference into pointer
|
2024-09-14 22:29:05 +00:00
|
|
|
return const_cast<QBrush*>(&_ret);
|
2024-08-25 04:08:24 +00:00
|
|
|
}
|
|
|
|
|
2024-09-11 05:41:09 +00:00
|
|
|
QBrush* QPalette_ToolTipBase(const QPalette* self) {
|
2024-09-14 22:29:05 +00:00
|
|
|
const QBrush& _ret = self->toolTipBase();
|
2024-08-25 04:08:24 +00:00
|
|
|
// Cast returned reference into pointer
|
2024-09-14 22:29:05 +00:00
|
|
|
return const_cast<QBrush*>(&_ret);
|
2024-08-25 04:08:24 +00:00
|
|
|
}
|
|
|
|
|
2024-09-11 05:41:09 +00:00
|
|
|
QBrush* QPalette_ToolTipText(const QPalette* self) {
|
2024-09-14 22:29:05 +00:00
|
|
|
const QBrush& _ret = self->toolTipText();
|
2024-08-25 04:08:24 +00:00
|
|
|
// Cast returned reference into pointer
|
2024-09-14 22:29:05 +00:00
|
|
|
return const_cast<QBrush*>(&_ret);
|
2024-08-25 04:08:24 +00:00
|
|
|
}
|
|
|
|
|
2024-09-11 05:41:09 +00:00
|
|
|
QBrush* QPalette_Window(const QPalette* self) {
|
2024-09-14 22:29:05 +00:00
|
|
|
const QBrush& _ret = self->window();
|
2024-08-25 04:08:24 +00:00
|
|
|
// Cast returned reference into pointer
|
2024-09-14 22:29:05 +00:00
|
|
|
return const_cast<QBrush*>(&_ret);
|
2024-08-25 04:08:24 +00:00
|
|
|
}
|
|
|
|
|
2024-09-11 05:41:09 +00:00
|
|
|
QBrush* QPalette_Midlight(const QPalette* self) {
|
2024-09-14 22:29:05 +00:00
|
|
|
const QBrush& _ret = self->midlight();
|
2024-08-25 04:08:24 +00:00
|
|
|
// Cast returned reference into pointer
|
2024-09-14 22:29:05 +00:00
|
|
|
return const_cast<QBrush*>(&_ret);
|
2024-08-25 04:08:24 +00:00
|
|
|
}
|
|
|
|
|
2024-09-11 05:41:09 +00:00
|
|
|
QBrush* QPalette_BrightText(const QPalette* self) {
|
2024-09-14 22:29:05 +00:00
|
|
|
const QBrush& _ret = self->brightText();
|
2024-08-25 04:08:24 +00:00
|
|
|
// Cast returned reference into pointer
|
2024-09-14 22:29:05 +00:00
|
|
|
return const_cast<QBrush*>(&_ret);
|
2024-08-25 04:08:24 +00:00
|
|
|
}
|
|
|
|
|
2024-09-11 05:41:09 +00:00
|
|
|
QBrush* QPalette_ButtonText(const QPalette* self) {
|
2024-09-14 22:29:05 +00:00
|
|
|
const QBrush& _ret = self->buttonText();
|
2024-08-25 04:08:24 +00:00
|
|
|
// Cast returned reference into pointer
|
2024-09-14 22:29:05 +00:00
|
|
|
return const_cast<QBrush*>(&_ret);
|
2024-08-25 04:08:24 +00:00
|
|
|
}
|
|
|
|
|
2024-09-11 05:41:09 +00:00
|
|
|
QBrush* QPalette_Shadow(const QPalette* self) {
|
2024-09-14 22:29:05 +00:00
|
|
|
const QBrush& _ret = self->shadow();
|
2024-08-25 04:08:24 +00:00
|
|
|
// Cast returned reference into pointer
|
2024-09-14 22:29:05 +00:00
|
|
|
return const_cast<QBrush*>(&_ret);
|
2024-08-25 04:08:24 +00:00
|
|
|
}
|
|
|
|
|
2024-09-11 05:41:09 +00:00
|
|
|
QBrush* QPalette_Highlight(const QPalette* self) {
|
2024-09-14 22:29:05 +00:00
|
|
|
const QBrush& _ret = self->highlight();
|
2024-08-25 04:08:24 +00:00
|
|
|
// Cast returned reference into pointer
|
2024-09-14 22:29:05 +00:00
|
|
|
return const_cast<QBrush*>(&_ret);
|
2024-08-25 04:08:24 +00:00
|
|
|
}
|
|
|
|
|
2024-09-11 05:41:09 +00:00
|
|
|
QBrush* QPalette_HighlightedText(const QPalette* self) {
|
2024-09-14 22:29:05 +00:00
|
|
|
const QBrush& _ret = self->highlightedText();
|
2024-08-25 04:08:24 +00:00
|
|
|
// Cast returned reference into pointer
|
2024-09-14 22:29:05 +00:00
|
|
|
return const_cast<QBrush*>(&_ret);
|
2024-08-25 04:08:24 +00:00
|
|
|
}
|
|
|
|
|
2024-09-11 05:41:09 +00:00
|
|
|
QBrush* QPalette_Link(const QPalette* self) {
|
2024-09-14 22:29:05 +00:00
|
|
|
const QBrush& _ret = self->link();
|
2024-08-25 04:08:24 +00:00
|
|
|
// Cast returned reference into pointer
|
2024-09-14 22:29:05 +00:00
|
|
|
return const_cast<QBrush*>(&_ret);
|
2024-08-25 04:08:24 +00:00
|
|
|
}
|
|
|
|
|
2024-09-11 05:41:09 +00:00
|
|
|
QBrush* QPalette_LinkVisited(const QPalette* self) {
|
2024-09-14 22:29:05 +00:00
|
|
|
const QBrush& _ret = self->linkVisited();
|
2024-08-25 04:08:24 +00:00
|
|
|
// Cast returned reference into pointer
|
2024-09-14 22:29:05 +00:00
|
|
|
return const_cast<QBrush*>(&_ret);
|
2024-08-25 04:08:24 +00:00
|
|
|
}
|
|
|
|
|
2024-09-11 05:41:09 +00:00
|
|
|
QBrush* QPalette_PlaceholderText(const QPalette* self) {
|
2024-09-14 22:29:05 +00:00
|
|
|
const QBrush& _ret = self->placeholderText();
|
2024-08-25 04:08:24 +00:00
|
|
|
// Cast returned reference into pointer
|
2024-09-14 22:29:05 +00:00
|
|
|
return const_cast<QBrush*>(&_ret);
|
2024-08-25 04:08:24 +00:00
|
|
|
}
|
|
|
|
|
2024-09-11 05:41:09 +00:00
|
|
|
QBrush* QPalette_Foreground(const QPalette* self) {
|
2024-09-14 22:29:05 +00:00
|
|
|
const QBrush& _ret = self->foreground();
|
2024-08-25 04:08:24 +00:00
|
|
|
// Cast returned reference into pointer
|
2024-09-14 22:29:05 +00:00
|
|
|
return const_cast<QBrush*>(&_ret);
|
2024-08-25 04:08:24 +00:00
|
|
|
}
|
|
|
|
|
2024-09-11 05:41:09 +00:00
|
|
|
QBrush* QPalette_Background(const QPalette* self) {
|
2024-09-14 22:29:05 +00:00
|
|
|
const QBrush& _ret = self->background();
|
2024-08-25 04:08:24 +00:00
|
|
|
// Cast returned reference into pointer
|
2024-09-14 22:29:05 +00:00
|
|
|
return const_cast<QBrush*>(&_ret);
|
2024-08-25 04:08:24 +00:00
|
|
|
}
|
|
|
|
|
2024-09-11 05:41:09 +00:00
|
|
|
bool QPalette_OperatorEqual(const QPalette* self, QPalette* p) {
|
2024-11-22 06:06:01 +00:00
|
|
|
return (*self == *p);
|
2024-08-25 04:08:24 +00:00
|
|
|
}
|
|
|
|
|
2024-09-11 05:41:09 +00:00
|
|
|
bool QPalette_OperatorNotEqual(const QPalette* self, QPalette* p) {
|
2024-11-22 06:06:01 +00:00
|
|
|
return (*self != *p);
|
2024-08-25 04:08:24 +00:00
|
|
|
}
|
|
|
|
|
2024-09-11 05:41:09 +00:00
|
|
|
bool QPalette_IsCopyOf(const QPalette* self, QPalette* p) {
|
|
|
|
return self->isCopyOf(*p);
|
2024-08-25 04:08:24 +00:00
|
|
|
}
|
|
|
|
|
2024-09-11 05:41:09 +00:00
|
|
|
long long QPalette_CacheKey(const QPalette* self) {
|
2024-09-18 00:12:02 +00:00
|
|
|
qint64 _ret = self->cacheKey();
|
|
|
|
return static_cast<long long>(_ret);
|
2024-08-25 04:08:24 +00:00
|
|
|
}
|
|
|
|
|
2024-09-11 05:41:09 +00:00
|
|
|
QPalette* QPalette_Resolve(const QPalette* self, QPalette* param1) {
|
2024-09-17 06:29:11 +00:00
|
|
|
return new QPalette(self->resolve(*param1));
|
2024-08-25 04:08:24 +00:00
|
|
|
}
|
|
|
|
|
2024-09-11 05:41:09 +00:00
|
|
|
unsigned int QPalette_Resolve2(const QPalette* self) {
|
2024-09-18 00:12:02 +00:00
|
|
|
uint _ret = self->resolve();
|
|
|
|
return static_cast<unsigned int>(_ret);
|
2024-08-25 04:08:24 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
void QPalette_ResolveWithMask(QPalette* self, unsigned int mask) {
|
|
|
|
self->resolve(static_cast<uint>(mask));
|
|
|
|
}
|
|
|
|
|
2024-11-19 06:29:06 +00:00
|
|
|
void QPalette_Delete(QPalette* self, bool isSubclass) {
|
|
|
|
if (isSubclass) {
|
|
|
|
delete dynamic_cast<QPalette*>( self );
|
|
|
|
} else {
|
|
|
|
delete self;
|
|
|
|
}
|
2024-08-25 04:08:24 +00:00
|
|
|
}
|
|
|
|
|