2024-08-25 04:08:24 +00:00
|
|
|
package qt
|
|
|
|
|
|
|
|
/*
|
|
|
|
|
|
|
|
#include "gen_qsize.h"
|
|
|
|
#include <stdlib.h>
|
|
|
|
|
|
|
|
*/
|
|
|
|
import "C"
|
|
|
|
|
|
|
|
import (
|
|
|
|
"runtime"
|
|
|
|
"unsafe"
|
|
|
|
)
|
|
|
|
|
|
|
|
type QSize struct {
|
|
|
|
h *C.QSize
|
|
|
|
}
|
|
|
|
|
|
|
|
func (this *QSize) cPointer() *C.QSize {
|
|
|
|
if this == nil {
|
|
|
|
return nil
|
|
|
|
}
|
|
|
|
return this.h
|
|
|
|
}
|
|
|
|
|
2024-10-16 05:07:56 +00:00
|
|
|
func (this *QSize) UnsafePointer() unsafe.Pointer {
|
|
|
|
if this == nil {
|
|
|
|
return nil
|
|
|
|
}
|
|
|
|
return unsafe.Pointer(this.h)
|
|
|
|
}
|
|
|
|
|
2024-08-25 04:08:24 +00:00
|
|
|
func newQSize(h *C.QSize) *QSize {
|
2024-09-01 02:23:55 +00:00
|
|
|
if h == nil {
|
|
|
|
return nil
|
|
|
|
}
|
2024-08-25 04:08:24 +00:00
|
|
|
return &QSize{h: h}
|
|
|
|
}
|
|
|
|
|
2024-10-16 05:07:56 +00:00
|
|
|
func UnsafeNewQSize(h unsafe.Pointer) *QSize {
|
2024-08-25 04:08:24 +00:00
|
|
|
return newQSize((*C.QSize)(h))
|
|
|
|
}
|
|
|
|
|
|
|
|
// NewQSize constructs a new QSize object.
|
|
|
|
func NewQSize() *QSize {
|
|
|
|
ret := C.QSize_new()
|
|
|
|
return newQSize(ret)
|
|
|
|
}
|
|
|
|
|
|
|
|
// NewQSize2 constructs a new QSize object.
|
|
|
|
func NewQSize2(w int, h int) *QSize {
|
|
|
|
ret := C.QSize_new2((C.int)(w), (C.int)(h))
|
|
|
|
return newQSize(ret)
|
|
|
|
}
|
|
|
|
|
|
|
|
// NewQSize3 constructs a new QSize object.
|
|
|
|
func NewQSize3(param1 *QSize) *QSize {
|
|
|
|
ret := C.QSize_new3(param1.cPointer())
|
|
|
|
return newQSize(ret)
|
|
|
|
}
|
|
|
|
|
|
|
|
func (this *QSize) IsNull() bool {
|
2024-09-17 07:30:27 +00:00
|
|
|
return (bool)(C.QSize_IsNull(this.h))
|
2024-08-25 04:08:24 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
func (this *QSize) IsEmpty() bool {
|
2024-09-17 07:30:27 +00:00
|
|
|
return (bool)(C.QSize_IsEmpty(this.h))
|
2024-08-25 04:08:24 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
func (this *QSize) IsValid() bool {
|
2024-09-17 07:30:27 +00:00
|
|
|
return (bool)(C.QSize_IsValid(this.h))
|
2024-08-25 04:08:24 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
func (this *QSize) Width() int {
|
2024-09-17 07:30:27 +00:00
|
|
|
return (int)(C.QSize_Width(this.h))
|
2024-08-25 04:08:24 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
func (this *QSize) Height() int {
|
2024-09-17 07:30:27 +00:00
|
|
|
return (int)(C.QSize_Height(this.h))
|
2024-08-25 04:08:24 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
func (this *QSize) SetWidth(w int) {
|
|
|
|
C.QSize_SetWidth(this.h, (C.int)(w))
|
|
|
|
}
|
|
|
|
|
|
|
|
func (this *QSize) SetHeight(h int) {
|
|
|
|
C.QSize_SetHeight(this.h, (C.int)(h))
|
|
|
|
}
|
|
|
|
|
|
|
|
func (this *QSize) Transpose() {
|
|
|
|
C.QSize_Transpose(this.h)
|
|
|
|
}
|
|
|
|
|
|
|
|
func (this *QSize) Transposed() *QSize {
|
2024-09-14 22:29:05 +00:00
|
|
|
_ret := C.QSize_Transposed(this.h)
|
|
|
|
_goptr := newQSize(_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
|
|
|
}
|
|
|
|
|
2024-09-04 06:54:22 +00:00
|
|
|
func (this *QSize) Scale(w int, h int, mode AspectRatioMode) {
|
2024-09-18 00:12:02 +00:00
|
|
|
C.QSize_Scale(this.h, (C.int)(w), (C.int)(h), (C.int)(mode))
|
2024-08-29 07:01:51 +00:00
|
|
|
}
|
|
|
|
|
2024-09-04 06:54:22 +00:00
|
|
|
func (this *QSize) Scale2(s *QSize, mode AspectRatioMode) {
|
2024-09-18 00:12:02 +00:00
|
|
|
C.QSize_Scale2(this.h, s.cPointer(), (C.int)(mode))
|
2024-08-29 07:01:51 +00:00
|
|
|
}
|
|
|
|
|
2024-09-04 06:54:22 +00:00
|
|
|
func (this *QSize) Scaled(w int, h int, mode AspectRatioMode) *QSize {
|
2024-09-18 00:12:02 +00:00
|
|
|
_ret := C.QSize_Scaled(this.h, (C.int)(w), (C.int)(h), (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 *QSize) Scaled2(s *QSize, mode AspectRatioMode) *QSize {
|
2024-09-18 00:12:02 +00:00
|
|
|
_ret := C.QSize_Scaled2(this.h, s.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-08-25 04:08:24 +00:00
|
|
|
func (this *QSize) ExpandedTo(param1 *QSize) *QSize {
|
2024-09-14 22:29:05 +00:00
|
|
|
_ret := C.QSize_ExpandedTo(this.h, param1.cPointer())
|
|
|
|
_goptr := newQSize(_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 *QSize) BoundedTo(param1 *QSize) *QSize {
|
2024-09-14 22:29:05 +00:00
|
|
|
_ret := C.QSize_BoundedTo(this.h, param1.cPointer())
|
|
|
|
_goptr := newQSize(_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 *QSize) GrownBy(m QMargins) *QSize {
|
2024-09-14 22:29:05 +00:00
|
|
|
_ret := C.QSize_GrownBy(this.h, m.cPointer())
|
|
|
|
_goptr := newQSize(_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 *QSize) ShrunkBy(m QMargins) *QSize {
|
2024-09-14 22:29:05 +00:00
|
|
|
_ret := C.QSize_ShrunkBy(this.h, m.cPointer())
|
|
|
|
_goptr := newQSize(_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 *QSize) OperatorPlusAssign(param1 *QSize) *QSize {
|
2024-10-16 05:07:56 +00:00
|
|
|
return UnsafeNewQSize(unsafe.Pointer(C.QSize_OperatorPlusAssign(this.h, param1.cPointer())))
|
2024-08-25 04:08:24 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
func (this *QSize) OperatorMinusAssign(param1 *QSize) *QSize {
|
2024-10-16 05:07:56 +00:00
|
|
|
return UnsafeNewQSize(unsafe.Pointer(C.QSize_OperatorMinusAssign(this.h, param1.cPointer())))
|
2024-08-25 04:08:24 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
func (this *QSize) OperatorMultiplyAssign(c float64) *QSize {
|
2024-10-16 05:07:56 +00:00
|
|
|
return UnsafeNewQSize(unsafe.Pointer(C.QSize_OperatorMultiplyAssign(this.h, (C.double)(c))))
|
2024-08-25 04:08:24 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
func (this *QSize) OperatorDivideAssign(c float64) *QSize {
|
2024-10-16 05:07:56 +00:00
|
|
|
return UnsafeNewQSize(unsafe.Pointer(C.QSize_OperatorDivideAssign(this.h, (C.double)(c))))
|
2024-08-25 04:08:24 +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 *QSize) Delete() {
|
|
|
|
C.QSize_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 *QSize) GoGC() {
|
|
|
|
runtime.SetFinalizer(this, func(this *QSize) {
|
|
|
|
this.Delete()
|
|
|
|
runtime.KeepAlive(this.h)
|
|
|
|
})
|
|
|
|
}
|
|
|
|
|
2024-08-25 04:08:24 +00:00
|
|
|
type QSizeF struct {
|
|
|
|
h *C.QSizeF
|
|
|
|
}
|
|
|
|
|
|
|
|
func (this *QSizeF) cPointer() *C.QSizeF {
|
|
|
|
if this == nil {
|
|
|
|
return nil
|
|
|
|
}
|
|
|
|
return this.h
|
|
|
|
}
|
|
|
|
|
2024-10-16 05:07:56 +00:00
|
|
|
func (this *QSizeF) UnsafePointer() unsafe.Pointer {
|
|
|
|
if this == nil {
|
|
|
|
return nil
|
|
|
|
}
|
|
|
|
return unsafe.Pointer(this.h)
|
|
|
|
}
|
|
|
|
|
2024-08-25 04:08:24 +00:00
|
|
|
func newQSizeF(h *C.QSizeF) *QSizeF {
|
2024-09-01 02:23:55 +00:00
|
|
|
if h == nil {
|
|
|
|
return nil
|
|
|
|
}
|
2024-08-25 04:08:24 +00:00
|
|
|
return &QSizeF{h: h}
|
|
|
|
}
|
|
|
|
|
2024-10-16 05:07:56 +00:00
|
|
|
func UnsafeNewQSizeF(h unsafe.Pointer) *QSizeF {
|
2024-08-25 04:08:24 +00:00
|
|
|
return newQSizeF((*C.QSizeF)(h))
|
|
|
|
}
|
|
|
|
|
|
|
|
// NewQSizeF constructs a new QSizeF object.
|
|
|
|
func NewQSizeF() *QSizeF {
|
|
|
|
ret := C.QSizeF_new()
|
|
|
|
return newQSizeF(ret)
|
|
|
|
}
|
|
|
|
|
|
|
|
// NewQSizeF2 constructs a new QSizeF object.
|
|
|
|
func NewQSizeF2(sz *QSize) *QSizeF {
|
|
|
|
ret := C.QSizeF_new2(sz.cPointer())
|
|
|
|
return newQSizeF(ret)
|
|
|
|
}
|
|
|
|
|
|
|
|
// NewQSizeF3 constructs a new QSizeF object.
|
|
|
|
func NewQSizeF3(w float64, h float64) *QSizeF {
|
|
|
|
ret := C.QSizeF_new3((C.double)(w), (C.double)(h))
|
|
|
|
return newQSizeF(ret)
|
|
|
|
}
|
|
|
|
|
|
|
|
// NewQSizeF4 constructs a new QSizeF object.
|
|
|
|
func NewQSizeF4(param1 *QSizeF) *QSizeF {
|
|
|
|
ret := C.QSizeF_new4(param1.cPointer())
|
|
|
|
return newQSizeF(ret)
|
|
|
|
}
|
|
|
|
|
|
|
|
func (this *QSizeF) IsNull() bool {
|
2024-09-17 07:30:27 +00:00
|
|
|
return (bool)(C.QSizeF_IsNull(this.h))
|
2024-08-25 04:08:24 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
func (this *QSizeF) IsEmpty() bool {
|
2024-09-17 07:30:27 +00:00
|
|
|
return (bool)(C.QSizeF_IsEmpty(this.h))
|
2024-08-25 04:08:24 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
func (this *QSizeF) IsValid() bool {
|
2024-09-17 07:30:27 +00:00
|
|
|
return (bool)(C.QSizeF_IsValid(this.h))
|
2024-08-25 04:08:24 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
func (this *QSizeF) Width() float64 {
|
2024-09-17 07:30:27 +00:00
|
|
|
return (float64)(C.QSizeF_Width(this.h))
|
2024-08-25 04:08:24 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
func (this *QSizeF) Height() float64 {
|
2024-09-17 07:30:27 +00:00
|
|
|
return (float64)(C.QSizeF_Height(this.h))
|
2024-08-25 04:08:24 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
func (this *QSizeF) SetWidth(w float64) {
|
|
|
|
C.QSizeF_SetWidth(this.h, (C.double)(w))
|
|
|
|
}
|
|
|
|
|
|
|
|
func (this *QSizeF) SetHeight(h float64) {
|
|
|
|
C.QSizeF_SetHeight(this.h, (C.double)(h))
|
|
|
|
}
|
|
|
|
|
|
|
|
func (this *QSizeF) Transpose() {
|
|
|
|
C.QSizeF_Transpose(this.h)
|
|
|
|
}
|
|
|
|
|
|
|
|
func (this *QSizeF) Transposed() *QSizeF {
|
2024-09-14 22:29:05 +00:00
|
|
|
_ret := C.QSizeF_Transposed(this.h)
|
|
|
|
_goptr := newQSizeF(_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
|
|
|
}
|
|
|
|
|
2024-09-04 06:54:22 +00:00
|
|
|
func (this *QSizeF) Scale(w float64, h float64, mode AspectRatioMode) {
|
2024-09-18 00:12:02 +00:00
|
|
|
C.QSizeF_Scale(this.h, (C.double)(w), (C.double)(h), (C.int)(mode))
|
2024-08-29 07:01:51 +00:00
|
|
|
}
|
|
|
|
|
2024-09-04 06:54:22 +00:00
|
|
|
func (this *QSizeF) Scale2(s *QSizeF, mode AspectRatioMode) {
|
2024-09-18 00:12:02 +00:00
|
|
|
C.QSizeF_Scale2(this.h, s.cPointer(), (C.int)(mode))
|
2024-08-29 07:01:51 +00:00
|
|
|
}
|
|
|
|
|
2024-09-04 06:54:22 +00:00
|
|
|
func (this *QSizeF) Scaled(w float64, h float64, mode AspectRatioMode) *QSizeF {
|
2024-09-18 00:12:02 +00:00
|
|
|
_ret := C.QSizeF_Scaled(this.h, (C.double)(w), (C.double)(h), (C.int)(mode))
|
2024-09-14 22:29:05 +00:00
|
|
|
_goptr := newQSizeF(_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 *QSizeF) Scaled2(s *QSizeF, mode AspectRatioMode) *QSizeF {
|
2024-09-18 00:12:02 +00:00
|
|
|
_ret := C.QSizeF_Scaled2(this.h, s.cPointer(), (C.int)(mode))
|
2024-09-14 22:29:05 +00:00
|
|
|
_goptr := newQSizeF(_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 *QSizeF) ExpandedTo(param1 *QSizeF) *QSizeF {
|
2024-09-14 22:29:05 +00:00
|
|
|
_ret := C.QSizeF_ExpandedTo(this.h, param1.cPointer())
|
|
|
|
_goptr := newQSizeF(_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 *QSizeF) BoundedTo(param1 *QSizeF) *QSizeF {
|
2024-09-14 22:29:05 +00:00
|
|
|
_ret := C.QSizeF_BoundedTo(this.h, param1.cPointer())
|
|
|
|
_goptr := newQSizeF(_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 *QSizeF) GrownBy(m QMarginsF) *QSizeF {
|
2024-09-14 22:29:05 +00:00
|
|
|
_ret := C.QSizeF_GrownBy(this.h, m.cPointer())
|
|
|
|
_goptr := newQSizeF(_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 *QSizeF) ShrunkBy(m QMarginsF) *QSizeF {
|
2024-09-14 22:29:05 +00:00
|
|
|
_ret := C.QSizeF_ShrunkBy(this.h, m.cPointer())
|
|
|
|
_goptr := newQSizeF(_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 *QSizeF) OperatorPlusAssign(param1 *QSizeF) *QSizeF {
|
2024-10-16 05:07:56 +00:00
|
|
|
return UnsafeNewQSizeF(unsafe.Pointer(C.QSizeF_OperatorPlusAssign(this.h, param1.cPointer())))
|
2024-08-25 04:08:24 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
func (this *QSizeF) OperatorMinusAssign(param1 *QSizeF) *QSizeF {
|
2024-10-16 05:07:56 +00:00
|
|
|
return UnsafeNewQSizeF(unsafe.Pointer(C.QSizeF_OperatorMinusAssign(this.h, param1.cPointer())))
|
2024-08-25 04:08:24 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
func (this *QSizeF) OperatorMultiplyAssign(c float64) *QSizeF {
|
2024-10-16 05:07:56 +00:00
|
|
|
return UnsafeNewQSizeF(unsafe.Pointer(C.QSizeF_OperatorMultiplyAssign(this.h, (C.double)(c))))
|
2024-08-25 04:08:24 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
func (this *QSizeF) OperatorDivideAssign(c float64) *QSizeF {
|
2024-10-16 05:07:56 +00:00
|
|
|
return UnsafeNewQSizeF(unsafe.Pointer(C.QSizeF_OperatorDivideAssign(this.h, (C.double)(c))))
|
2024-08-25 04:08:24 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
func (this *QSizeF) ToSize() *QSize {
|
2024-09-14 22:29:05 +00:00
|
|
|
_ret := C.QSizeF_ToSize(this.h)
|
|
|
|
_goptr := newQSize(_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
|
|
|
}
|
|
|
|
|
2024-09-14 22:29:05 +00:00
|
|
|
// Delete this object from C++ memory.
|
2024-08-25 04:08:24 +00:00
|
|
|
func (this *QSizeF) Delete() {
|
|
|
|
C.QSizeF_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 *QSizeF) GoGC() {
|
|
|
|
runtime.SetFinalizer(this, func(this *QSizeF) {
|
|
|
|
this.Delete()
|
|
|
|
runtime.KeepAlive(this.h)
|
|
|
|
})
|
|
|
|
}
|