2024-08-25 04:08:24 +00:00
|
|
|
package qt
|
|
|
|
|
|
|
|
/*
|
|
|
|
|
|
|
|
#include "gen_qicon.h"
|
|
|
|
#include <stdlib.h>
|
|
|
|
|
|
|
|
*/
|
|
|
|
import "C"
|
|
|
|
|
|
|
|
import (
|
|
|
|
"runtime"
|
|
|
|
"unsafe"
|
|
|
|
)
|
|
|
|
|
2024-09-04 06:54:22 +00:00
|
|
|
type QIcon__Mode int
|
|
|
|
|
|
|
|
const (
|
|
|
|
QIcon__Mode__Normal QIcon__Mode = 0
|
|
|
|
QIcon__Mode__Disabled QIcon__Mode = 1
|
|
|
|
QIcon__Mode__Active QIcon__Mode = 2
|
|
|
|
QIcon__Mode__Selected QIcon__Mode = 3
|
|
|
|
)
|
|
|
|
|
|
|
|
type QIcon__State int
|
|
|
|
|
|
|
|
const (
|
|
|
|
QIcon__State__On QIcon__State = 0
|
|
|
|
QIcon__State__Off QIcon__State = 1
|
|
|
|
)
|
|
|
|
|
2024-08-25 04:08:24 +00:00
|
|
|
type QIcon struct {
|
|
|
|
h *C.QIcon
|
|
|
|
}
|
|
|
|
|
|
|
|
func (this *QIcon) cPointer() *C.QIcon {
|
|
|
|
if this == nil {
|
|
|
|
return nil
|
|
|
|
}
|
|
|
|
return this.h
|
|
|
|
}
|
|
|
|
|
|
|
|
func newQIcon(h *C.QIcon) *QIcon {
|
2024-09-01 02:23:55 +00:00
|
|
|
if h == nil {
|
|
|
|
return nil
|
|
|
|
}
|
2024-08-25 04:08:24 +00:00
|
|
|
return &QIcon{h: h}
|
|
|
|
}
|
|
|
|
|
|
|
|
func newQIcon_U(h unsafe.Pointer) *QIcon {
|
|
|
|
return newQIcon((*C.QIcon)(h))
|
|
|
|
}
|
|
|
|
|
|
|
|
// NewQIcon constructs a new QIcon object.
|
|
|
|
func NewQIcon() *QIcon {
|
|
|
|
ret := C.QIcon_new()
|
|
|
|
return newQIcon(ret)
|
|
|
|
}
|
|
|
|
|
|
|
|
// NewQIcon2 constructs a new QIcon object.
|
|
|
|
func NewQIcon2(pixmap *QPixmap) *QIcon {
|
|
|
|
ret := C.QIcon_new2(pixmap.cPointer())
|
|
|
|
return newQIcon(ret)
|
|
|
|
}
|
|
|
|
|
|
|
|
// NewQIcon3 constructs a new QIcon object.
|
|
|
|
func NewQIcon3(other *QIcon) *QIcon {
|
|
|
|
ret := C.QIcon_new3(other.cPointer())
|
|
|
|
return newQIcon(ret)
|
|
|
|
}
|
|
|
|
|
|
|
|
// NewQIcon4 constructs a new QIcon object.
|
|
|
|
func NewQIcon4(fileName string) *QIcon {
|
2024-09-14 22:29:05 +00:00
|
|
|
fileName_ms := miqt_strdupg(fileName)
|
|
|
|
defer C.free(fileName_ms)
|
|
|
|
ret := C.QIcon_new4((*C.struct_miqt_string)(fileName_ms))
|
2024-08-25 04:08:24 +00:00
|
|
|
return newQIcon(ret)
|
|
|
|
}
|
|
|
|
|
|
|
|
// NewQIcon5 constructs a new QIcon object.
|
|
|
|
func NewQIcon5(engine *QIconEngine) *QIcon {
|
|
|
|
ret := C.QIcon_new5(engine.cPointer())
|
|
|
|
return newQIcon(ret)
|
|
|
|
}
|
|
|
|
|
|
|
|
func (this *QIcon) OperatorAssign(other *QIcon) {
|
|
|
|
C.QIcon_OperatorAssign(this.h, other.cPointer())
|
|
|
|
}
|
|
|
|
|
|
|
|
func (this *QIcon) Swap(other *QIcon) {
|
|
|
|
C.QIcon_Swap(this.h, other.cPointer())
|
|
|
|
}
|
|
|
|
|
2024-08-29 07:01:51 +00:00
|
|
|
func (this *QIcon) Pixmap(size *QSize) *QPixmap {
|
2024-09-14 22:29:05 +00:00
|
|
|
_ret := C.QIcon_Pixmap(this.h, size.cPointer())
|
|
|
|
_goptr := newQPixmap(_ret)
|
|
|
|
_goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer
|
|
|
|
return _goptr
|
2024-08-29 07:01:51 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
func (this *QIcon) Pixmap2(w int, h int) *QPixmap {
|
2024-09-14 22:29:05 +00:00
|
|
|
_ret := C.QIcon_Pixmap2(this.h, (C.int)(w), (C.int)(h))
|
|
|
|
_goptr := newQPixmap(_ret)
|
|
|
|
_goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer
|
|
|
|
return _goptr
|
2024-08-29 07:01:51 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
func (this *QIcon) PixmapWithExtent(extent int) *QPixmap {
|
2024-09-14 22:29:05 +00:00
|
|
|
_ret := C.QIcon_PixmapWithExtent(this.h, (C.int)(extent))
|
|
|
|
_goptr := newQPixmap(_ret)
|
|
|
|
_goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer
|
|
|
|
return _goptr
|
2024-08-29 07:01:51 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
func (this *QIcon) Pixmap3(window *QWindow, size *QSize) *QPixmap {
|
2024-09-14 22:29:05 +00:00
|
|
|
_ret := C.QIcon_Pixmap3(this.h, window.cPointer(), size.cPointer())
|
|
|
|
_goptr := newQPixmap(_ret)
|
|
|
|
_goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer
|
|
|
|
return _goptr
|
2024-08-29 07:01:51 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
func (this *QIcon) ActualSize(size *QSize) *QSize {
|
2024-09-14 22:29:05 +00:00
|
|
|
_ret := C.QIcon_ActualSize(this.h, size.cPointer())
|
|
|
|
_goptr := newQSize(_ret)
|
|
|
|
_goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer
|
|
|
|
return _goptr
|
2024-08-29 07:01:51 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
func (this *QIcon) ActualSize2(window *QWindow, size *QSize) *QSize {
|
2024-09-14 22:29:05 +00:00
|
|
|
_ret := C.QIcon_ActualSize2(this.h, window.cPointer(), size.cPointer())
|
|
|
|
_goptr := newQSize(_ret)
|
|
|
|
_goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer
|
|
|
|
return _goptr
|
2024-08-29 07:01:51 +00:00
|
|
|
}
|
|
|
|
|
2024-08-25 04:08:24 +00:00
|
|
|
func (this *QIcon) Name() string {
|
2024-09-14 22:29:05 +00:00
|
|
|
var _ms *C.struct_miqt_string = C.QIcon_Name(this.h)
|
|
|
|
_ret := C.GoStringN(&_ms.data, C.int(int64(_ms.len)))
|
|
|
|
C.free(unsafe.Pointer(_ms))
|
|
|
|
return _ret
|
2024-08-25 04:08:24 +00:00
|
|
|
}
|
|
|
|
|
2024-08-29 07:01:51 +00:00
|
|
|
func (this *QIcon) Paint(painter *QPainter, rect *QRect) {
|
|
|
|
C.QIcon_Paint(this.h, painter.cPointer(), rect.cPointer())
|
|
|
|
}
|
|
|
|
|
|
|
|
func (this *QIcon) Paint2(painter *QPainter, x int, y int, w int, h int) {
|
|
|
|
C.QIcon_Paint2(this.h, painter.cPointer(), (C.int)(x), (C.int)(y), (C.int)(w), (C.int)(h))
|
|
|
|
}
|
|
|
|
|
2024-08-25 04:08:24 +00:00
|
|
|
func (this *QIcon) IsNull() bool {
|
2024-09-17 07:30:27 +00:00
|
|
|
return (bool)(C.QIcon_IsNull(this.h))
|
2024-08-25 04:08:24 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
func (this *QIcon) IsDetached() bool {
|
2024-09-17 07:30:27 +00:00
|
|
|
return (bool)(C.QIcon_IsDetached(this.h))
|
2024-08-25 04:08:24 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
func (this *QIcon) Detach() {
|
|
|
|
C.QIcon_Detach(this.h)
|
|
|
|
}
|
|
|
|
|
|
|
|
func (this *QIcon) CacheKey() int64 {
|
2024-09-17 07:30:27 +00:00
|
|
|
return (int64)(C.QIcon_CacheKey(this.h))
|
2024-08-25 04:08:24 +00:00
|
|
|
}
|
|
|
|
|
2024-08-29 07:01:51 +00:00
|
|
|
func (this *QIcon) AddPixmap(pixmap *QPixmap) {
|
|
|
|
C.QIcon_AddPixmap(this.h, pixmap.cPointer())
|
|
|
|
}
|
|
|
|
|
|
|
|
func (this *QIcon) AddFile(fileName string) {
|
2024-09-14 22:29:05 +00:00
|
|
|
fileName_ms := miqt_strdupg(fileName)
|
|
|
|
defer C.free(fileName_ms)
|
|
|
|
C.QIcon_AddFile(this.h, (*C.struct_miqt_string)(fileName_ms))
|
2024-08-29 07:01:51 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
func (this *QIcon) AvailableSizes() []QSize {
|
2024-09-14 22:29:05 +00:00
|
|
|
var _ma *C.struct_miqt_array = C.QIcon_AvailableSizes(this.h)
|
|
|
|
_ret := make([]QSize, int(_ma.len))
|
2024-09-17 07:30:27 +00:00
|
|
|
_outCast := (*[0xffff]*C.QSize)(unsafe.Pointer(_ma.data)) // hey ya
|
2024-09-14 22:29:05 +00:00
|
|
|
for i := 0; i < int(_ma.len); i++ {
|
2024-09-17 07:30:27 +00:00
|
|
|
_lv_ret := _outCast[i]
|
|
|
|
_lv_goptr := newQSize(_lv_ret)
|
|
|
|
_lv_goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer
|
|
|
|
_ret[i] = *_lv_goptr
|
2024-08-29 07:01:51 +00:00
|
|
|
}
|
2024-09-14 22:29:05 +00:00
|
|
|
C.free(unsafe.Pointer(_ma))
|
|
|
|
return _ret
|
2024-08-29 07:01:51 +00:00
|
|
|
}
|
|
|
|
|
2024-08-25 04:08:24 +00:00
|
|
|
func (this *QIcon) SetIsMask(isMask bool) {
|
|
|
|
C.QIcon_SetIsMask(this.h, (C.bool)(isMask))
|
|
|
|
}
|
|
|
|
|
|
|
|
func (this *QIcon) IsMask() bool {
|
2024-09-17 07:30:27 +00:00
|
|
|
return (bool)(C.QIcon_IsMask(this.h))
|
2024-08-25 04:08:24 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
func QIcon_FromTheme(name string) *QIcon {
|
2024-09-14 22:29:05 +00:00
|
|
|
name_ms := miqt_strdupg(name)
|
|
|
|
defer C.free(name_ms)
|
|
|
|
_ret := C.QIcon_FromTheme((*C.struct_miqt_string)(name_ms))
|
|
|
|
_goptr := newQIcon(_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 QIcon_FromTheme2(name string, fallback *QIcon) *QIcon {
|
2024-09-14 22:29:05 +00:00
|
|
|
name_ms := miqt_strdupg(name)
|
|
|
|
defer C.free(name_ms)
|
|
|
|
_ret := C.QIcon_FromTheme2((*C.struct_miqt_string)(name_ms), fallback.cPointer())
|
|
|
|
_goptr := newQIcon(_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 QIcon_HasThemeIcon(name string) bool {
|
2024-09-14 22:29:05 +00:00
|
|
|
name_ms := miqt_strdupg(name)
|
|
|
|
defer C.free(name_ms)
|
2024-09-17 07:30:27 +00:00
|
|
|
return (bool)(C.QIcon_HasThemeIcon((*C.struct_miqt_string)(name_ms)))
|
2024-08-25 04:08:24 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
func QIcon_ThemeSearchPaths() []string {
|
2024-09-14 22:29:05 +00:00
|
|
|
var _ma *C.struct_miqt_array = C.QIcon_ThemeSearchPaths()
|
|
|
|
_ret := make([]string, int(_ma.len))
|
|
|
|
_outCast := (*[0xffff]*C.struct_miqt_string)(unsafe.Pointer(_ma.data)) // hey ya
|
|
|
|
for i := 0; i < int(_ma.len); i++ {
|
2024-09-17 07:30:27 +00:00
|
|
|
var _lv_ms *C.struct_miqt_string = _outCast[i]
|
|
|
|
_lv_ret := C.GoStringN(&_lv_ms.data, C.int(int64(_lv_ms.len)))
|
|
|
|
C.free(unsafe.Pointer(_lv_ms))
|
|
|
|
_ret[i] = _lv_ret
|
2024-08-25 04:08:24 +00:00
|
|
|
}
|
2024-09-14 22:29:05 +00:00
|
|
|
C.free(unsafe.Pointer(_ma))
|
|
|
|
return _ret
|
2024-08-25 04:08:24 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
func QIcon_SetThemeSearchPaths(searchpath []string) {
|
2024-09-17 07:30:27 +00:00
|
|
|
// For the C ABI, malloc a C array of raw pointers
|
2024-09-14 22:29:05 +00:00
|
|
|
searchpath_CArray := (*[0xffff]*C.struct_miqt_string)(C.malloc(C.size_t(8 * len(searchpath))))
|
2024-08-25 04:08:24 +00:00
|
|
|
defer C.free(unsafe.Pointer(searchpath_CArray))
|
|
|
|
for i := range searchpath {
|
2024-09-17 07:30:27 +00:00
|
|
|
searchpath_i_ms := miqt_strdupg(searchpath[i])
|
|
|
|
defer C.free(searchpath_i_ms)
|
|
|
|
searchpath_CArray[i] = (*C.struct_miqt_string)(searchpath_i_ms)
|
2024-08-25 04:08:24 +00:00
|
|
|
}
|
2024-09-14 22:29:05 +00:00
|
|
|
searchpath_ma := &C.struct_miqt_array{len: C.size_t(len(searchpath)), data: unsafe.Pointer(searchpath_CArray)}
|
|
|
|
defer runtime.KeepAlive(unsafe.Pointer(searchpath_ma))
|
|
|
|
C.QIcon_SetThemeSearchPaths(searchpath_ma)
|
2024-08-25 04:08:24 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
func QIcon_FallbackSearchPaths() []string {
|
2024-09-14 22:29:05 +00:00
|
|
|
var _ma *C.struct_miqt_array = C.QIcon_FallbackSearchPaths()
|
|
|
|
_ret := make([]string, int(_ma.len))
|
|
|
|
_outCast := (*[0xffff]*C.struct_miqt_string)(unsafe.Pointer(_ma.data)) // hey ya
|
|
|
|
for i := 0; i < int(_ma.len); i++ {
|
2024-09-17 07:30:27 +00:00
|
|
|
var _lv_ms *C.struct_miqt_string = _outCast[i]
|
|
|
|
_lv_ret := C.GoStringN(&_lv_ms.data, C.int(int64(_lv_ms.len)))
|
|
|
|
C.free(unsafe.Pointer(_lv_ms))
|
|
|
|
_ret[i] = _lv_ret
|
2024-08-25 04:08:24 +00:00
|
|
|
}
|
2024-09-14 22:29:05 +00:00
|
|
|
C.free(unsafe.Pointer(_ma))
|
|
|
|
return _ret
|
2024-08-25 04:08:24 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
func QIcon_SetFallbackSearchPaths(paths []string) {
|
2024-09-17 07:30:27 +00:00
|
|
|
// For the C ABI, malloc a C array of raw pointers
|
2024-09-14 22:29:05 +00:00
|
|
|
paths_CArray := (*[0xffff]*C.struct_miqt_string)(C.malloc(C.size_t(8 * len(paths))))
|
2024-08-25 04:08:24 +00:00
|
|
|
defer C.free(unsafe.Pointer(paths_CArray))
|
|
|
|
for i := range paths {
|
2024-09-17 07:30:27 +00:00
|
|
|
paths_i_ms := miqt_strdupg(paths[i])
|
|
|
|
defer C.free(paths_i_ms)
|
|
|
|
paths_CArray[i] = (*C.struct_miqt_string)(paths_i_ms)
|
2024-08-25 04:08:24 +00:00
|
|
|
}
|
2024-09-14 22:29:05 +00:00
|
|
|
paths_ma := &C.struct_miqt_array{len: C.size_t(len(paths)), data: unsafe.Pointer(paths_CArray)}
|
|
|
|
defer runtime.KeepAlive(unsafe.Pointer(paths_ma))
|
|
|
|
C.QIcon_SetFallbackSearchPaths(paths_ma)
|
2024-08-25 04:08:24 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
func QIcon_ThemeName() string {
|
2024-09-14 22:29:05 +00:00
|
|
|
var _ms *C.struct_miqt_string = C.QIcon_ThemeName()
|
|
|
|
_ret := C.GoStringN(&_ms.data, C.int(int64(_ms.len)))
|
|
|
|
C.free(unsafe.Pointer(_ms))
|
|
|
|
return _ret
|
2024-08-25 04:08:24 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
func QIcon_SetThemeName(path string) {
|
2024-09-14 22:29:05 +00:00
|
|
|
path_ms := miqt_strdupg(path)
|
|
|
|
defer C.free(path_ms)
|
|
|
|
C.QIcon_SetThemeName((*C.struct_miqt_string)(path_ms))
|
2024-08-25 04:08:24 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
func QIcon_FallbackThemeName() string {
|
2024-09-14 22:29:05 +00:00
|
|
|
var _ms *C.struct_miqt_string = C.QIcon_FallbackThemeName()
|
|
|
|
_ret := C.GoStringN(&_ms.data, C.int(int64(_ms.len)))
|
|
|
|
C.free(unsafe.Pointer(_ms))
|
|
|
|
return _ret
|
2024-08-25 04:08:24 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
func QIcon_SetFallbackThemeName(name string) {
|
2024-09-14 22:29:05 +00:00
|
|
|
name_ms := miqt_strdupg(name)
|
|
|
|
defer C.free(name_ms)
|
|
|
|
C.QIcon_SetFallbackThemeName((*C.struct_miqt_string)(name_ms))
|
2024-08-25 04:08:24 +00:00
|
|
|
}
|
|
|
|
|
2024-09-04 06:54:22 +00:00
|
|
|
func (this *QIcon) Pixmap22(size *QSize, mode QIcon__Mode) *QPixmap {
|
2024-09-18 00:12:02 +00:00
|
|
|
_ret := C.QIcon_Pixmap22(this.h, size.cPointer(), (C.int)(mode))
|
2024-09-14 22:29:05 +00:00
|
|
|
_goptr := newQPixmap(_ret)
|
|
|
|
_goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer
|
|
|
|
return _goptr
|
2024-08-29 07:01:51 +00:00
|
|
|
}
|
|
|
|
|
2024-09-04 06:54:22 +00:00
|
|
|
func (this *QIcon) Pixmap32(size *QSize, mode QIcon__Mode, state QIcon__State) *QPixmap {
|
2024-09-18 00:12:02 +00:00
|
|
|
_ret := C.QIcon_Pixmap32(this.h, size.cPointer(), (C.int)(mode), (C.int)(state))
|
2024-09-14 22:29:05 +00:00
|
|
|
_goptr := newQPixmap(_ret)
|
|
|
|
_goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer
|
|
|
|
return _goptr
|
2024-08-29 07:01:51 +00:00
|
|
|
}
|
|
|
|
|
2024-09-04 06:54:22 +00:00
|
|
|
func (this *QIcon) Pixmap33(w int, h int, mode QIcon__Mode) *QPixmap {
|
2024-09-18 00:12:02 +00:00
|
|
|
_ret := C.QIcon_Pixmap33(this.h, (C.int)(w), (C.int)(h), (C.int)(mode))
|
2024-09-14 22:29:05 +00:00
|
|
|
_goptr := newQPixmap(_ret)
|
|
|
|
_goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer
|
|
|
|
return _goptr
|
2024-08-29 07:01:51 +00:00
|
|
|
}
|
|
|
|
|
2024-09-04 06:54:22 +00:00
|
|
|
func (this *QIcon) Pixmap4(w int, h int, mode QIcon__Mode, state QIcon__State) *QPixmap {
|
2024-09-18 00:12:02 +00:00
|
|
|
_ret := C.QIcon_Pixmap4(this.h, (C.int)(w), (C.int)(h), (C.int)(mode), (C.int)(state))
|
2024-09-14 22:29:05 +00:00
|
|
|
_goptr := newQPixmap(_ret)
|
|
|
|
_goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer
|
|
|
|
return _goptr
|
2024-08-29 07:01:51 +00:00
|
|
|
}
|
|
|
|
|
2024-09-04 06:54:22 +00:00
|
|
|
func (this *QIcon) Pixmap23(extent int, mode QIcon__Mode) *QPixmap {
|
2024-09-18 00:12:02 +00:00
|
|
|
_ret := C.QIcon_Pixmap23(this.h, (C.int)(extent), (C.int)(mode))
|
2024-09-14 22:29:05 +00:00
|
|
|
_goptr := newQPixmap(_ret)
|
|
|
|
_goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer
|
|
|
|
return _goptr
|
2024-08-29 07:01:51 +00:00
|
|
|
}
|
|
|
|
|
2024-09-04 06:54:22 +00:00
|
|
|
func (this *QIcon) Pixmap34(extent int, mode QIcon__Mode, state QIcon__State) *QPixmap {
|
2024-09-18 00:12:02 +00:00
|
|
|
_ret := C.QIcon_Pixmap34(this.h, (C.int)(extent), (C.int)(mode), (C.int)(state))
|
2024-09-14 22:29:05 +00:00
|
|
|
_goptr := newQPixmap(_ret)
|
|
|
|
_goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer
|
|
|
|
return _goptr
|
2024-08-29 07:01:51 +00:00
|
|
|
}
|
|
|
|
|
2024-09-04 06:54:22 +00:00
|
|
|
func (this *QIcon) Pixmap35(window *QWindow, size *QSize, mode QIcon__Mode) *QPixmap {
|
2024-09-18 00:12:02 +00:00
|
|
|
_ret := C.QIcon_Pixmap35(this.h, window.cPointer(), size.cPointer(), (C.int)(mode))
|
2024-09-14 22:29:05 +00:00
|
|
|
_goptr := newQPixmap(_ret)
|
|
|
|
_goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer
|
|
|
|
return _goptr
|
2024-08-29 07:01:51 +00:00
|
|
|
}
|
|
|
|
|
2024-09-04 06:54:22 +00:00
|
|
|
func (this *QIcon) Pixmap42(window *QWindow, size *QSize, mode QIcon__Mode, state QIcon__State) *QPixmap {
|
2024-09-18 00:12:02 +00:00
|
|
|
_ret := C.QIcon_Pixmap42(this.h, window.cPointer(), size.cPointer(), (C.int)(mode), (C.int)(state))
|
2024-09-14 22:29:05 +00:00
|
|
|
_goptr := newQPixmap(_ret)
|
|
|
|
_goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer
|
|
|
|
return _goptr
|
2024-08-29 07:01:51 +00:00
|
|
|
}
|
|
|
|
|
2024-09-04 06:54:22 +00:00
|
|
|
func (this *QIcon) ActualSize22(size *QSize, mode QIcon__Mode) *QSize {
|
2024-09-18 00:12:02 +00:00
|
|
|
_ret := C.QIcon_ActualSize22(this.h, size.cPointer(), (C.int)(mode))
|
2024-09-14 22:29:05 +00:00
|
|
|
_goptr := newQSize(_ret)
|
|
|
|
_goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer
|
|
|
|
return _goptr
|
2024-08-29 07:01:51 +00:00
|
|
|
}
|
|
|
|
|
2024-09-04 06:54:22 +00:00
|
|
|
func (this *QIcon) ActualSize3(size *QSize, mode QIcon__Mode, state QIcon__State) *QSize {
|
2024-09-18 00:12:02 +00:00
|
|
|
_ret := C.QIcon_ActualSize3(this.h, size.cPointer(), (C.int)(mode), (C.int)(state))
|
2024-09-14 22:29:05 +00:00
|
|
|
_goptr := newQSize(_ret)
|
|
|
|
_goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer
|
|
|
|
return _goptr
|
2024-08-29 07:01:51 +00:00
|
|
|
}
|
|
|
|
|
2024-09-04 06:54:22 +00:00
|
|
|
func (this *QIcon) ActualSize32(window *QWindow, size *QSize, mode QIcon__Mode) *QSize {
|
2024-09-18 00:12:02 +00:00
|
|
|
_ret := C.QIcon_ActualSize32(this.h, window.cPointer(), size.cPointer(), (C.int)(mode))
|
2024-09-14 22:29:05 +00:00
|
|
|
_goptr := newQSize(_ret)
|
|
|
|
_goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer
|
|
|
|
return _goptr
|
2024-08-29 07:01:51 +00:00
|
|
|
}
|
|
|
|
|
2024-09-04 06:54:22 +00:00
|
|
|
func (this *QIcon) ActualSize4(window *QWindow, size *QSize, mode QIcon__Mode, state QIcon__State) *QSize {
|
2024-09-18 00:12:02 +00:00
|
|
|
_ret := C.QIcon_ActualSize4(this.h, window.cPointer(), size.cPointer(), (C.int)(mode), (C.int)(state))
|
2024-09-14 22:29:05 +00:00
|
|
|
_goptr := newQSize(_ret)
|
|
|
|
_goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer
|
|
|
|
return _goptr
|
2024-08-29 07:01:51 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
func (this *QIcon) Paint3(painter *QPainter, rect *QRect, alignment int) {
|
2024-09-18 00:12:02 +00:00
|
|
|
C.QIcon_Paint3(this.h, painter.cPointer(), rect.cPointer(), alignment)
|
2024-08-29 07:01:51 +00:00
|
|
|
}
|
|
|
|
|
2024-09-04 06:54:22 +00:00
|
|
|
func (this *QIcon) Paint4(painter *QPainter, rect *QRect, alignment int, mode QIcon__Mode) {
|
2024-09-18 00:12:02 +00:00
|
|
|
C.QIcon_Paint4(this.h, painter.cPointer(), rect.cPointer(), alignment, (C.int)(mode))
|
2024-08-29 07:01:51 +00:00
|
|
|
}
|
|
|
|
|
2024-09-04 06:54:22 +00:00
|
|
|
func (this *QIcon) Paint5(painter *QPainter, rect *QRect, alignment int, mode QIcon__Mode, state QIcon__State) {
|
2024-09-18 00:12:02 +00:00
|
|
|
C.QIcon_Paint5(this.h, painter.cPointer(), rect.cPointer(), alignment, (C.int)(mode), (C.int)(state))
|
2024-08-29 07:01:51 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
func (this *QIcon) Paint6(painter *QPainter, x int, y int, w int, h int, alignment int) {
|
2024-09-18 00:12:02 +00:00
|
|
|
C.QIcon_Paint6(this.h, painter.cPointer(), (C.int)(x), (C.int)(y), (C.int)(w), (C.int)(h), alignment)
|
2024-08-29 07:01:51 +00:00
|
|
|
}
|
|
|
|
|
2024-09-04 06:54:22 +00:00
|
|
|
func (this *QIcon) Paint7(painter *QPainter, x int, y int, w int, h int, alignment int, mode QIcon__Mode) {
|
2024-09-18 00:12:02 +00:00
|
|
|
C.QIcon_Paint7(this.h, painter.cPointer(), (C.int)(x), (C.int)(y), (C.int)(w), (C.int)(h), alignment, (C.int)(mode))
|
2024-08-29 07:01:51 +00:00
|
|
|
}
|
|
|
|
|
2024-09-04 06:54:22 +00:00
|
|
|
func (this *QIcon) Paint8(painter *QPainter, x int, y int, w int, h int, alignment int, mode QIcon__Mode, state QIcon__State) {
|
2024-09-18 00:12:02 +00:00
|
|
|
C.QIcon_Paint8(this.h, painter.cPointer(), (C.int)(x), (C.int)(y), (C.int)(w), (C.int)(h), alignment, (C.int)(mode), (C.int)(state))
|
2024-08-29 07:01:51 +00:00
|
|
|
}
|
|
|
|
|
2024-09-04 06:54:22 +00:00
|
|
|
func (this *QIcon) AddPixmap2(pixmap *QPixmap, mode QIcon__Mode) {
|
2024-09-18 00:12:02 +00:00
|
|
|
C.QIcon_AddPixmap2(this.h, pixmap.cPointer(), (C.int)(mode))
|
2024-08-29 07:01:51 +00:00
|
|
|
}
|
|
|
|
|
2024-09-04 06:54:22 +00:00
|
|
|
func (this *QIcon) AddPixmap3(pixmap *QPixmap, mode QIcon__Mode, state QIcon__State) {
|
2024-09-18 00:12:02 +00:00
|
|
|
C.QIcon_AddPixmap3(this.h, pixmap.cPointer(), (C.int)(mode), (C.int)(state))
|
2024-08-29 07:01:51 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
func (this *QIcon) AddFile2(fileName string, size *QSize) {
|
2024-09-14 22:29:05 +00:00
|
|
|
fileName_ms := miqt_strdupg(fileName)
|
|
|
|
defer C.free(fileName_ms)
|
|
|
|
C.QIcon_AddFile2(this.h, (*C.struct_miqt_string)(fileName_ms), size.cPointer())
|
2024-08-29 07:01:51 +00:00
|
|
|
}
|
|
|
|
|
2024-09-04 06:54:22 +00:00
|
|
|
func (this *QIcon) AddFile3(fileName string, size *QSize, mode QIcon__Mode) {
|
2024-09-14 22:29:05 +00:00
|
|
|
fileName_ms := miqt_strdupg(fileName)
|
|
|
|
defer C.free(fileName_ms)
|
2024-09-18 00:12:02 +00:00
|
|
|
C.QIcon_AddFile3(this.h, (*C.struct_miqt_string)(fileName_ms), size.cPointer(), (C.int)(mode))
|
2024-08-29 07:01:51 +00:00
|
|
|
}
|
|
|
|
|
2024-09-04 06:54:22 +00:00
|
|
|
func (this *QIcon) AddFile4(fileName string, size *QSize, mode QIcon__Mode, state QIcon__State) {
|
2024-09-14 22:29:05 +00:00
|
|
|
fileName_ms := miqt_strdupg(fileName)
|
|
|
|
defer C.free(fileName_ms)
|
2024-09-18 00:12:02 +00:00
|
|
|
C.QIcon_AddFile4(this.h, (*C.struct_miqt_string)(fileName_ms), size.cPointer(), (C.int)(mode), (C.int)(state))
|
2024-08-29 07:01:51 +00:00
|
|
|
}
|
|
|
|
|
2024-09-04 06:54:22 +00:00
|
|
|
func (this *QIcon) AvailableSizes1(mode QIcon__Mode) []QSize {
|
2024-09-18 00:12:02 +00:00
|
|
|
var _ma *C.struct_miqt_array = C.QIcon_AvailableSizes1(this.h, (C.int)(mode))
|
2024-09-14 22:29:05 +00:00
|
|
|
_ret := make([]QSize, int(_ma.len))
|
2024-09-17 07:30:27 +00:00
|
|
|
_outCast := (*[0xffff]*C.QSize)(unsafe.Pointer(_ma.data)) // hey ya
|
2024-09-14 22:29:05 +00:00
|
|
|
for i := 0; i < int(_ma.len); i++ {
|
2024-09-17 07:30:27 +00:00
|
|
|
_lv_ret := _outCast[i]
|
|
|
|
_lv_goptr := newQSize(_lv_ret)
|
|
|
|
_lv_goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer
|
|
|
|
_ret[i] = *_lv_goptr
|
2024-08-29 07:01:51 +00:00
|
|
|
}
|
2024-09-14 22:29:05 +00:00
|
|
|
C.free(unsafe.Pointer(_ma))
|
|
|
|
return _ret
|
2024-08-29 07:01:51 +00:00
|
|
|
}
|
|
|
|
|
2024-09-04 06:54:22 +00:00
|
|
|
func (this *QIcon) AvailableSizes2(mode QIcon__Mode, state QIcon__State) []QSize {
|
2024-09-18 00:12:02 +00:00
|
|
|
var _ma *C.struct_miqt_array = C.QIcon_AvailableSizes2(this.h, (C.int)(mode), (C.int)(state))
|
2024-09-14 22:29:05 +00:00
|
|
|
_ret := make([]QSize, int(_ma.len))
|
2024-09-17 07:30:27 +00:00
|
|
|
_outCast := (*[0xffff]*C.QSize)(unsafe.Pointer(_ma.data)) // hey ya
|
2024-09-14 22:29:05 +00:00
|
|
|
for i := 0; i < int(_ma.len); i++ {
|
2024-09-17 07:30:27 +00:00
|
|
|
_lv_ret := _outCast[i]
|
|
|
|
_lv_goptr := newQSize(_lv_ret)
|
|
|
|
_lv_goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer
|
|
|
|
_ret[i] = *_lv_goptr
|
2024-08-29 07:01:51 +00:00
|
|
|
}
|
2024-09-14 22:29:05 +00:00
|
|
|
C.free(unsafe.Pointer(_ma))
|
|
|
|
return _ret
|
2024-08-29 07:01:51 +00:00
|
|
|
}
|
|
|
|
|
2024-09-14 22:29:05 +00:00
|
|
|
// Delete this object from C++ memory.
|
2024-08-25 04:08:24 +00:00
|
|
|
func (this *QIcon) Delete() {
|
|
|
|
C.QIcon_Delete(this.h)
|
|
|
|
}
|
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 *QIcon) GoGC() {
|
|
|
|
runtime.SetFinalizer(this, func(this *QIcon) {
|
|
|
|
this.Delete()
|
|
|
|
runtime.KeepAlive(this.h)
|
|
|
|
})
|
|
|
|
}
|