2024-08-25 04:08:24 +00:00
|
|
|
package qt
|
|
|
|
|
|
|
|
/*
|
|
|
|
|
|
|
|
#include "gen_qpalette.h"
|
|
|
|
#include <stdlib.h>
|
|
|
|
|
|
|
|
*/
|
|
|
|
import "C"
|
|
|
|
|
|
|
|
import (
|
|
|
|
"runtime"
|
|
|
|
"unsafe"
|
|
|
|
)
|
|
|
|
|
2024-09-04 06:54:22 +00:00
|
|
|
type QPalette__ColorGroup int
|
|
|
|
|
|
|
|
const (
|
2024-09-20 07:13:26 +00:00
|
|
|
QPalette__Active QPalette__ColorGroup = 0
|
|
|
|
QPalette__Disabled QPalette__ColorGroup = 1
|
|
|
|
QPalette__Inactive QPalette__ColorGroup = 2
|
|
|
|
QPalette__NColorGroups QPalette__ColorGroup = 3
|
|
|
|
QPalette__Current QPalette__ColorGroup = 4
|
|
|
|
QPalette__All QPalette__ColorGroup = 5
|
|
|
|
QPalette__Normal QPalette__ColorGroup = 0
|
2024-09-04 06:54:22 +00:00
|
|
|
)
|
|
|
|
|
|
|
|
type QPalette__ColorRole int
|
|
|
|
|
|
|
|
const (
|
2024-09-20 07:13:26 +00:00
|
|
|
QPalette__WindowText QPalette__ColorRole = 0
|
|
|
|
QPalette__Button QPalette__ColorRole = 1
|
|
|
|
QPalette__Light QPalette__ColorRole = 2
|
|
|
|
QPalette__Midlight QPalette__ColorRole = 3
|
|
|
|
QPalette__Dark QPalette__ColorRole = 4
|
|
|
|
QPalette__Mid QPalette__ColorRole = 5
|
|
|
|
QPalette__Text QPalette__ColorRole = 6
|
|
|
|
QPalette__BrightText QPalette__ColorRole = 7
|
|
|
|
QPalette__ButtonText QPalette__ColorRole = 8
|
|
|
|
QPalette__Base QPalette__ColorRole = 9
|
|
|
|
QPalette__Window QPalette__ColorRole = 10
|
|
|
|
QPalette__Shadow QPalette__ColorRole = 11
|
|
|
|
QPalette__Highlight QPalette__ColorRole = 12
|
|
|
|
QPalette__HighlightedText QPalette__ColorRole = 13
|
|
|
|
QPalette__Link QPalette__ColorRole = 14
|
|
|
|
QPalette__LinkVisited QPalette__ColorRole = 15
|
|
|
|
QPalette__AlternateBase QPalette__ColorRole = 16
|
|
|
|
QPalette__NoRole QPalette__ColorRole = 17
|
|
|
|
QPalette__ToolTipBase QPalette__ColorRole = 18
|
|
|
|
QPalette__ToolTipText QPalette__ColorRole = 19
|
|
|
|
QPalette__PlaceholderText QPalette__ColorRole = 20
|
|
|
|
QPalette__NColorRoles QPalette__ColorRole = 21
|
|
|
|
QPalette__Foreground QPalette__ColorRole = 0
|
|
|
|
QPalette__Background QPalette__ColorRole = 10
|
2024-09-04 06:54:22 +00:00
|
|
|
)
|
|
|
|
|
2024-08-25 04:08:24 +00:00
|
|
|
type QPalette struct {
|
2024-11-19 06:29:06 +00:00
|
|
|
h *C.QPalette
|
|
|
|
isSubclass bool
|
2024-08-25 04:08:24 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
func (this *QPalette) cPointer() *C.QPalette {
|
|
|
|
if this == nil {
|
|
|
|
return nil
|
|
|
|
}
|
|
|
|
return this.h
|
|
|
|
}
|
|
|
|
|
2024-10-16 05:07:56 +00:00
|
|
|
func (this *QPalette) UnsafePointer() unsafe.Pointer {
|
|
|
|
if this == nil {
|
|
|
|
return nil
|
|
|
|
}
|
|
|
|
return unsafe.Pointer(this.h)
|
|
|
|
}
|
|
|
|
|
2024-11-19 06:29:06 +00:00
|
|
|
// newQPalette constructs the type using only CGO pointers.
|
2024-08-25 04:08:24 +00:00
|
|
|
func newQPalette(h *C.QPalette) *QPalette {
|
2024-09-01 02:23:55 +00:00
|
|
|
if h == nil {
|
|
|
|
return nil
|
|
|
|
}
|
2024-08-25 04:08:24 +00:00
|
|
|
return &QPalette{h: h}
|
|
|
|
}
|
|
|
|
|
2024-11-19 06:29:06 +00:00
|
|
|
// UnsafeNewQPalette constructs the type using only unsafe pointers.
|
2024-10-16 05:07:56 +00:00
|
|
|
func UnsafeNewQPalette(h unsafe.Pointer) *QPalette {
|
2024-11-19 06:29:06 +00:00
|
|
|
if h == nil {
|
|
|
|
return nil
|
|
|
|
}
|
|
|
|
|
|
|
|
return &QPalette{h: (*C.QPalette)(h)}
|
2024-08-25 04:08:24 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
// NewQPalette constructs a new QPalette object.
|
|
|
|
func NewQPalette() *QPalette {
|
2024-11-19 06:29:06 +00:00
|
|
|
var outptr_QPalette *C.QPalette = nil
|
|
|
|
|
|
|
|
C.QPalette_new(&outptr_QPalette)
|
|
|
|
ret := newQPalette(outptr_QPalette)
|
|
|
|
ret.isSubclass = true
|
|
|
|
return ret
|
2024-08-25 04:08:24 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
// NewQPalette2 constructs a new QPalette object.
|
|
|
|
func NewQPalette2(button *QColor) *QPalette {
|
2024-11-19 06:29:06 +00:00
|
|
|
var outptr_QPalette *C.QPalette = nil
|
|
|
|
|
|
|
|
C.QPalette_new2(button.cPointer(), &outptr_QPalette)
|
|
|
|
ret := newQPalette(outptr_QPalette)
|
|
|
|
ret.isSubclass = true
|
|
|
|
return ret
|
2024-08-25 04:08:24 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
// NewQPalette3 constructs a new QPalette object.
|
2024-09-04 06:54:22 +00:00
|
|
|
func NewQPalette3(button GlobalColor) *QPalette {
|
2024-11-19 06:29:06 +00:00
|
|
|
var outptr_QPalette *C.QPalette = nil
|
|
|
|
|
|
|
|
C.QPalette_new3((C.int)(button), &outptr_QPalette)
|
|
|
|
ret := newQPalette(outptr_QPalette)
|
|
|
|
ret.isSubclass = true
|
|
|
|
return ret
|
2024-08-25 04:08:24 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
// NewQPalette4 constructs a new QPalette object.
|
2024-08-29 07:01:51 +00:00
|
|
|
func NewQPalette4(button *QColor, window *QColor) *QPalette {
|
2024-11-19 06:29:06 +00:00
|
|
|
var outptr_QPalette *C.QPalette = nil
|
|
|
|
|
|
|
|
C.QPalette_new4(button.cPointer(), window.cPointer(), &outptr_QPalette)
|
|
|
|
ret := newQPalette(outptr_QPalette)
|
|
|
|
ret.isSubclass = true
|
|
|
|
return ret
|
2024-08-25 04:08:24 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
// NewQPalette5 constructs a new QPalette object.
|
2024-08-29 07:01:51 +00:00
|
|
|
func NewQPalette5(windowText *QBrush, button *QBrush, light *QBrush, dark *QBrush, mid *QBrush, text *QBrush, bright_text *QBrush, base *QBrush, window *QBrush) *QPalette {
|
2024-11-19 06:29:06 +00:00
|
|
|
var outptr_QPalette *C.QPalette = nil
|
|
|
|
|
|
|
|
C.QPalette_new5(windowText.cPointer(), button.cPointer(), light.cPointer(), dark.cPointer(), mid.cPointer(), text.cPointer(), bright_text.cPointer(), base.cPointer(), window.cPointer(), &outptr_QPalette)
|
|
|
|
ret := newQPalette(outptr_QPalette)
|
|
|
|
ret.isSubclass = true
|
|
|
|
return ret
|
2024-08-25 04:08:24 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
// NewQPalette6 constructs a new QPalette object.
|
2024-08-29 07:01:51 +00:00
|
|
|
func NewQPalette6(windowText *QColor, window *QColor, light *QColor, dark *QColor, mid *QColor, text *QColor, base *QColor) *QPalette {
|
2024-11-19 06:29:06 +00:00
|
|
|
var outptr_QPalette *C.QPalette = nil
|
|
|
|
|
|
|
|
C.QPalette_new6(windowText.cPointer(), window.cPointer(), light.cPointer(), dark.cPointer(), mid.cPointer(), text.cPointer(), base.cPointer(), &outptr_QPalette)
|
|
|
|
ret := newQPalette(outptr_QPalette)
|
|
|
|
ret.isSubclass = true
|
|
|
|
return ret
|
2024-08-29 07:01:51 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
// NewQPalette7 constructs a new QPalette object.
|
|
|
|
func NewQPalette7(palette *QPalette) *QPalette {
|
2024-11-19 06:29:06 +00:00
|
|
|
var outptr_QPalette *C.QPalette = nil
|
|
|
|
|
|
|
|
C.QPalette_new7(palette.cPointer(), &outptr_QPalette)
|
|
|
|
ret := newQPalette(outptr_QPalette)
|
|
|
|
ret.isSubclass = true
|
|
|
|
return ret
|
2024-08-25 04:08:24 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
func (this *QPalette) OperatorAssign(palette *QPalette) {
|
|
|
|
C.QPalette_OperatorAssign(this.h, palette.cPointer())
|
|
|
|
}
|
|
|
|
|
|
|
|
func (this *QPalette) Swap(other *QPalette) {
|
|
|
|
C.QPalette_Swap(this.h, other.cPointer())
|
|
|
|
}
|
|
|
|
|
2024-09-04 06:54:22 +00:00
|
|
|
func (this *QPalette) CurrentColorGroup() QPalette__ColorGroup {
|
2024-09-17 07:30:27 +00:00
|
|
|
return (QPalette__ColorGroup)(C.QPalette_CurrentColorGroup(this.h))
|
2024-08-29 07:01:51 +00:00
|
|
|
}
|
|
|
|
|
2024-09-04 06:54:22 +00:00
|
|
|
func (this *QPalette) SetCurrentColorGroup(cg QPalette__ColorGroup) {
|
2024-09-18 00:12:02 +00:00
|
|
|
C.QPalette_SetCurrentColorGroup(this.h, (C.int)(cg))
|
2024-08-29 07:01:51 +00:00
|
|
|
}
|
|
|
|
|
2024-09-04 06:54:22 +00:00
|
|
|
func (this *QPalette) Color(cg QPalette__ColorGroup, cr QPalette__ColorRole) *QColor {
|
2024-10-16 05:07:56 +00:00
|
|
|
return UnsafeNewQColor(unsafe.Pointer(C.QPalette_Color(this.h, (C.int)(cg), (C.int)(cr))))
|
2024-08-29 07:01:51 +00:00
|
|
|
}
|
|
|
|
|
2024-09-04 06:54:22 +00:00
|
|
|
func (this *QPalette) Brush(cg QPalette__ColorGroup, cr QPalette__ColorRole) *QBrush {
|
2024-10-16 05:07:56 +00:00
|
|
|
return UnsafeNewQBrush(unsafe.Pointer(C.QPalette_Brush(this.h, (C.int)(cg), (C.int)(cr))))
|
2024-08-29 07:01:51 +00:00
|
|
|
}
|
|
|
|
|
2024-09-04 06:54:22 +00:00
|
|
|
func (this *QPalette) SetColor(cg QPalette__ColorGroup, cr QPalette__ColorRole, color *QColor) {
|
2024-09-18 00:12:02 +00:00
|
|
|
C.QPalette_SetColor(this.h, (C.int)(cg), (C.int)(cr), color.cPointer())
|
2024-08-29 07:01:51 +00:00
|
|
|
}
|
|
|
|
|
2024-09-04 06:54:22 +00:00
|
|
|
func (this *QPalette) SetColor2(cr QPalette__ColorRole, color *QColor) {
|
2024-09-18 00:12:02 +00:00
|
|
|
C.QPalette_SetColor2(this.h, (C.int)(cr), color.cPointer())
|
2024-08-29 07:01:51 +00:00
|
|
|
}
|
|
|
|
|
2024-09-04 06:54:22 +00:00
|
|
|
func (this *QPalette) SetBrush(cr QPalette__ColorRole, brush *QBrush) {
|
2024-09-18 00:12:02 +00:00
|
|
|
C.QPalette_SetBrush(this.h, (C.int)(cr), brush.cPointer())
|
2024-08-29 07:01:51 +00:00
|
|
|
}
|
|
|
|
|
2024-09-04 06:54:22 +00:00
|
|
|
func (this *QPalette) IsBrushSet(cg QPalette__ColorGroup, cr QPalette__ColorRole) bool {
|
2024-09-18 00:12:02 +00:00
|
|
|
return (bool)(C.QPalette_IsBrushSet(this.h, (C.int)(cg), (C.int)(cr)))
|
2024-08-29 07:01:51 +00:00
|
|
|
}
|
|
|
|
|
2024-09-04 06:54:22 +00:00
|
|
|
func (this *QPalette) SetBrush2(cg QPalette__ColorGroup, cr QPalette__ColorRole, brush *QBrush) {
|
2024-09-18 00:12:02 +00:00
|
|
|
C.QPalette_SetBrush2(this.h, (C.int)(cg), (C.int)(cr), brush.cPointer())
|
2024-08-29 07:01:51 +00:00
|
|
|
}
|
|
|
|
|
2024-09-04 06:54:22 +00:00
|
|
|
func (this *QPalette) SetColorGroup(cr QPalette__ColorGroup, windowText *QBrush, button *QBrush, light *QBrush, dark *QBrush, mid *QBrush, text *QBrush, bright_text *QBrush, base *QBrush, window *QBrush) {
|
2024-09-18 00:12:02 +00:00
|
|
|
C.QPalette_SetColorGroup(this.h, (C.int)(cr), windowText.cPointer(), button.cPointer(), light.cPointer(), dark.cPointer(), mid.cPointer(), text.cPointer(), bright_text.cPointer(), base.cPointer(), window.cPointer())
|
2024-08-29 07:01:51 +00:00
|
|
|
}
|
|
|
|
|
2024-09-04 06:54:22 +00:00
|
|
|
func (this *QPalette) IsEqual(cr1 QPalette__ColorGroup, cr2 QPalette__ColorGroup) bool {
|
2024-09-18 00:12:02 +00:00
|
|
|
return (bool)(C.QPalette_IsEqual(this.h, (C.int)(cr1), (C.int)(cr2)))
|
2024-08-29 07:01:51 +00:00
|
|
|
}
|
|
|
|
|
2024-09-04 06:54:22 +00:00
|
|
|
func (this *QPalette) ColorWithCr(cr QPalette__ColorRole) *QColor {
|
2024-10-16 05:07:56 +00:00
|
|
|
return UnsafeNewQColor(unsafe.Pointer(C.QPalette_ColorWithCr(this.h, (C.int)(cr))))
|
2024-08-29 07:01:51 +00:00
|
|
|
}
|
|
|
|
|
2024-09-04 06:54:22 +00:00
|
|
|
func (this *QPalette) BrushWithCr(cr QPalette__ColorRole) *QBrush {
|
2024-10-16 05:07:56 +00:00
|
|
|
return UnsafeNewQBrush(unsafe.Pointer(C.QPalette_BrushWithCr(this.h, (C.int)(cr))))
|
2024-08-29 07:01:51 +00:00
|
|
|
}
|
|
|
|
|
2024-08-25 04:08:24 +00:00
|
|
|
func (this *QPalette) WindowText() *QBrush {
|
2024-10-16 05:07:56 +00:00
|
|
|
return UnsafeNewQBrush(unsafe.Pointer(C.QPalette_WindowText(this.h)))
|
2024-08-25 04:08:24 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
func (this *QPalette) Button() *QBrush {
|
2024-10-16 05:07:56 +00:00
|
|
|
return UnsafeNewQBrush(unsafe.Pointer(C.QPalette_Button(this.h)))
|
2024-08-25 04:08:24 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
func (this *QPalette) Light() *QBrush {
|
2024-10-16 05:07:56 +00:00
|
|
|
return UnsafeNewQBrush(unsafe.Pointer(C.QPalette_Light(this.h)))
|
2024-08-25 04:08:24 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
func (this *QPalette) Dark() *QBrush {
|
2024-10-16 05:07:56 +00:00
|
|
|
return UnsafeNewQBrush(unsafe.Pointer(C.QPalette_Dark(this.h)))
|
2024-08-25 04:08:24 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
func (this *QPalette) Mid() *QBrush {
|
2024-10-16 05:07:56 +00:00
|
|
|
return UnsafeNewQBrush(unsafe.Pointer(C.QPalette_Mid(this.h)))
|
2024-08-25 04:08:24 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
func (this *QPalette) Text() *QBrush {
|
2024-10-16 05:07:56 +00:00
|
|
|
return UnsafeNewQBrush(unsafe.Pointer(C.QPalette_Text(this.h)))
|
2024-08-25 04:08:24 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
func (this *QPalette) Base() *QBrush {
|
2024-10-16 05:07:56 +00:00
|
|
|
return UnsafeNewQBrush(unsafe.Pointer(C.QPalette_Base(this.h)))
|
2024-08-25 04:08:24 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
func (this *QPalette) AlternateBase() *QBrush {
|
2024-10-16 05:07:56 +00:00
|
|
|
return UnsafeNewQBrush(unsafe.Pointer(C.QPalette_AlternateBase(this.h)))
|
2024-08-25 04:08:24 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
func (this *QPalette) ToolTipBase() *QBrush {
|
2024-10-16 05:07:56 +00:00
|
|
|
return UnsafeNewQBrush(unsafe.Pointer(C.QPalette_ToolTipBase(this.h)))
|
2024-08-25 04:08:24 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
func (this *QPalette) ToolTipText() *QBrush {
|
2024-10-16 05:07:56 +00:00
|
|
|
return UnsafeNewQBrush(unsafe.Pointer(C.QPalette_ToolTipText(this.h)))
|
2024-08-25 04:08:24 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
func (this *QPalette) Window() *QBrush {
|
2024-10-16 05:07:56 +00:00
|
|
|
return UnsafeNewQBrush(unsafe.Pointer(C.QPalette_Window(this.h)))
|
2024-08-25 04:08:24 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
func (this *QPalette) Midlight() *QBrush {
|
2024-10-16 05:07:56 +00:00
|
|
|
return UnsafeNewQBrush(unsafe.Pointer(C.QPalette_Midlight(this.h)))
|
2024-08-25 04:08:24 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
func (this *QPalette) BrightText() *QBrush {
|
2024-10-16 05:07:56 +00:00
|
|
|
return UnsafeNewQBrush(unsafe.Pointer(C.QPalette_BrightText(this.h)))
|
2024-08-25 04:08:24 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
func (this *QPalette) ButtonText() *QBrush {
|
2024-10-16 05:07:56 +00:00
|
|
|
return UnsafeNewQBrush(unsafe.Pointer(C.QPalette_ButtonText(this.h)))
|
2024-08-25 04:08:24 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
func (this *QPalette) Shadow() *QBrush {
|
2024-10-16 05:07:56 +00:00
|
|
|
return UnsafeNewQBrush(unsafe.Pointer(C.QPalette_Shadow(this.h)))
|
2024-08-25 04:08:24 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
func (this *QPalette) Highlight() *QBrush {
|
2024-10-16 05:07:56 +00:00
|
|
|
return UnsafeNewQBrush(unsafe.Pointer(C.QPalette_Highlight(this.h)))
|
2024-08-25 04:08:24 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
func (this *QPalette) HighlightedText() *QBrush {
|
2024-10-16 05:07:56 +00:00
|
|
|
return UnsafeNewQBrush(unsafe.Pointer(C.QPalette_HighlightedText(this.h)))
|
2024-08-25 04:08:24 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
func (this *QPalette) Link() *QBrush {
|
2024-10-16 05:07:56 +00:00
|
|
|
return UnsafeNewQBrush(unsafe.Pointer(C.QPalette_Link(this.h)))
|
2024-08-25 04:08:24 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
func (this *QPalette) LinkVisited() *QBrush {
|
2024-10-16 05:07:56 +00:00
|
|
|
return UnsafeNewQBrush(unsafe.Pointer(C.QPalette_LinkVisited(this.h)))
|
2024-08-25 04:08:24 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
func (this *QPalette) PlaceholderText() *QBrush {
|
2024-10-16 05:07:56 +00:00
|
|
|
return UnsafeNewQBrush(unsafe.Pointer(C.QPalette_PlaceholderText(this.h)))
|
2024-08-25 04:08:24 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
func (this *QPalette) Foreground() *QBrush {
|
2024-10-16 05:07:56 +00:00
|
|
|
return UnsafeNewQBrush(unsafe.Pointer(C.QPalette_Foreground(this.h)))
|
2024-08-25 04:08:24 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
func (this *QPalette) Background() *QBrush {
|
2024-10-16 05:07:56 +00:00
|
|
|
return UnsafeNewQBrush(unsafe.Pointer(C.QPalette_Background(this.h)))
|
2024-08-25 04:08:24 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
func (this *QPalette) OperatorEqual(p *QPalette) bool {
|
2024-09-17 07:30:27 +00:00
|
|
|
return (bool)(C.QPalette_OperatorEqual(this.h, p.cPointer()))
|
2024-08-25 04:08:24 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
func (this *QPalette) OperatorNotEqual(p *QPalette) bool {
|
2024-09-17 07:30:27 +00:00
|
|
|
return (bool)(C.QPalette_OperatorNotEqual(this.h, p.cPointer()))
|
2024-08-25 04:08:24 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
func (this *QPalette) IsCopyOf(p *QPalette) bool {
|
2024-09-17 07:30:27 +00:00
|
|
|
return (bool)(C.QPalette_IsCopyOf(this.h, p.cPointer()))
|
2024-08-25 04:08:24 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
func (this *QPalette) CacheKey() int64 {
|
2024-09-17 07:30:27 +00:00
|
|
|
return (int64)(C.QPalette_CacheKey(this.h))
|
2024-08-25 04:08:24 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
func (this *QPalette) Resolve(param1 *QPalette) *QPalette {
|
2024-09-14 22:29:05 +00:00
|
|
|
_ret := C.QPalette_Resolve(this.h, param1.cPointer())
|
|
|
|
_goptr := newQPalette(_ret)
|
|
|
|
_goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer
|
|
|
|
return _goptr
|
2024-08-25 04:08:24 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
func (this *QPalette) Resolve2() uint {
|
2024-09-17 07:30:27 +00:00
|
|
|
return (uint)(C.QPalette_Resolve2(this.h))
|
2024-08-25 04:08:24 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
func (this *QPalette) ResolveWithMask(mask uint) {
|
|
|
|
C.QPalette_ResolveWithMask(this.h, (C.uint)(mask))
|
|
|
|
}
|
|
|
|
|
2024-09-14 22:29:05 +00:00
|
|
|
// Delete this object from C++ memory.
|
2024-08-25 04:08:24 +00:00
|
|
|
func (this *QPalette) Delete() {
|
2024-11-19 06:29:06 +00:00
|
|
|
C.QPalette_Delete(this.h, C.bool(this.isSubclass))
|
2024-08-25 04:08:24 +00:00
|
|
|
}
|
2024-09-14 22:29:05 +00:00
|
|
|
|
|
|
|
// GoGC adds a Go Finalizer to this pointer, so that it will be deleted
|
|
|
|
// from C++ memory once it is unreachable from Go memory.
|
|
|
|
func (this *QPalette) GoGC() {
|
|
|
|
runtime.SetFinalizer(this, func(this *QPalette) {
|
|
|
|
this.Delete()
|
|
|
|
runtime.KeepAlive(this.h)
|
|
|
|
})
|
|
|
|
}
|