miqt/qt/gen_qscrollerproperties.go

151 lines
5.5 KiB
Go
Raw Permalink Normal View History

package qt
/*
#include "gen_qscrollerproperties.h"
#include <stdlib.h>
*/
import "C"
import (
2024-08-29 07:01:51 +00:00
"runtime"
"unsafe"
)
2024-09-04 06:54:22 +00:00
type QScrollerProperties__OvershootPolicy int
const (
2024-09-20 07:13:26 +00:00
QScrollerProperties__OvershootWhenScrollable QScrollerProperties__OvershootPolicy = 0
QScrollerProperties__OvershootAlwaysOff QScrollerProperties__OvershootPolicy = 1
QScrollerProperties__OvershootAlwaysOn QScrollerProperties__OvershootPolicy = 2
2024-09-04 06:54:22 +00:00
)
type QScrollerProperties__FrameRates int
const (
2024-09-20 07:13:26 +00:00
QScrollerProperties__Standard QScrollerProperties__FrameRates = 0
QScrollerProperties__Fps60 QScrollerProperties__FrameRates = 1
QScrollerProperties__Fps30 QScrollerProperties__FrameRates = 2
QScrollerProperties__Fps20 QScrollerProperties__FrameRates = 3
2024-09-04 06:54:22 +00:00
)
type QScrollerProperties__ScrollMetric int
const (
2024-09-20 07:13:26 +00:00
QScrollerProperties__MousePressEventDelay QScrollerProperties__ScrollMetric = 0
QScrollerProperties__DragStartDistance QScrollerProperties__ScrollMetric = 1
QScrollerProperties__DragVelocitySmoothingFactor QScrollerProperties__ScrollMetric = 2
QScrollerProperties__AxisLockThreshold QScrollerProperties__ScrollMetric = 3
QScrollerProperties__ScrollingCurve QScrollerProperties__ScrollMetric = 4
QScrollerProperties__DecelerationFactor QScrollerProperties__ScrollMetric = 5
QScrollerProperties__MinimumVelocity QScrollerProperties__ScrollMetric = 6
QScrollerProperties__MaximumVelocity QScrollerProperties__ScrollMetric = 7
QScrollerProperties__MaximumClickThroughVelocity QScrollerProperties__ScrollMetric = 8
QScrollerProperties__AcceleratingFlickMaximumTime QScrollerProperties__ScrollMetric = 9
QScrollerProperties__AcceleratingFlickSpeedupFactor QScrollerProperties__ScrollMetric = 10
QScrollerProperties__SnapPositionRatio QScrollerProperties__ScrollMetric = 11
QScrollerProperties__SnapTime QScrollerProperties__ScrollMetric = 12
QScrollerProperties__OvershootDragResistanceFactor QScrollerProperties__ScrollMetric = 13
QScrollerProperties__OvershootDragDistanceFactor QScrollerProperties__ScrollMetric = 14
QScrollerProperties__OvershootScrollDistanceFactor QScrollerProperties__ScrollMetric = 15
QScrollerProperties__OvershootScrollTime QScrollerProperties__ScrollMetric = 16
QScrollerProperties__HorizontalOvershootPolicy QScrollerProperties__ScrollMetric = 17
QScrollerProperties__VerticalOvershootPolicy QScrollerProperties__ScrollMetric = 18
QScrollerProperties__FrameRate QScrollerProperties__ScrollMetric = 19
QScrollerProperties__ScrollMetricCount QScrollerProperties__ScrollMetric = 20
2024-09-04 06:54:22 +00:00
)
type QScrollerProperties struct {
2024-11-19 06:29:06 +00:00
h *C.QScrollerProperties
isSubclass bool
}
func (this *QScrollerProperties) cPointer() *C.QScrollerProperties {
if this == nil {
return nil
}
return this.h
}
func (this *QScrollerProperties) UnsafePointer() unsafe.Pointer {
if this == nil {
return nil
}
return unsafe.Pointer(this.h)
}
2024-11-19 06:29:06 +00:00
// newQScrollerProperties constructs the type using only CGO pointers.
func newQScrollerProperties(h *C.QScrollerProperties) *QScrollerProperties {
2024-09-01 02:23:55 +00:00
if h == nil {
return nil
}
2024-12-07 04:15:57 +00:00
return &QScrollerProperties{h: h}
}
2024-11-19 06:29:06 +00:00
// UnsafeNewQScrollerProperties constructs the type using only unsafe pointers.
func UnsafeNewQScrollerProperties(h unsafe.Pointer) *QScrollerProperties {
2024-12-07 04:15:57 +00:00
return newQScrollerProperties((*C.QScrollerProperties)(h))
}
// NewQScrollerProperties constructs a new QScrollerProperties object.
func NewQScrollerProperties() *QScrollerProperties {
2024-11-19 06:29:06 +00:00
2024-12-07 04:15:57 +00:00
ret := newQScrollerProperties(C.QScrollerProperties_new())
2024-11-19 06:29:06 +00:00
ret.isSubclass = true
return ret
}
// NewQScrollerProperties2 constructs a new QScrollerProperties object.
func NewQScrollerProperties2(sp *QScrollerProperties) *QScrollerProperties {
2024-11-19 06:29:06 +00:00
2024-12-07 04:15:57 +00:00
ret := newQScrollerProperties(C.QScrollerProperties_new2(sp.cPointer()))
2024-11-19 06:29:06 +00:00
ret.isSubclass = true
return ret
}
func (this *QScrollerProperties) OperatorAssign(sp *QScrollerProperties) {
C.QScrollerProperties_OperatorAssign(this.h, sp.cPointer())
}
func (this *QScrollerProperties) OperatorEqual(sp *QScrollerProperties) bool {
return (bool)(C.QScrollerProperties_OperatorEqual(this.h, sp.cPointer()))
}
func (this *QScrollerProperties) OperatorNotEqual(sp *QScrollerProperties) bool {
return (bool)(C.QScrollerProperties_OperatorNotEqual(this.h, sp.cPointer()))
}
func QScrollerProperties_SetDefaultScrollerProperties(sp *QScrollerProperties) {
C.QScrollerProperties_SetDefaultScrollerProperties(sp.cPointer())
}
func QScrollerProperties_UnsetDefaultScrollerProperties() {
C.QScrollerProperties_UnsetDefaultScrollerProperties()
}
2024-09-04 06:54:22 +00:00
func (this *QScrollerProperties) ScrollMetric(metric QScrollerProperties__ScrollMetric) *QVariant {
_goptr := newQVariant(C.QScrollerProperties_ScrollMetric(this.h, (C.int)(metric)))
_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 *QScrollerProperties) SetScrollMetric(metric QScrollerProperties__ScrollMetric, value *QVariant) {
C.QScrollerProperties_SetScrollMetric(this.h, (C.int)(metric), value.cPointer())
2024-08-29 07:01:51 +00:00
}
// Delete this object from C++ memory.
func (this *QScrollerProperties) Delete() {
2024-11-19 06:29:06 +00:00
C.QScrollerProperties_Delete(this.h, C.bool(this.isSubclass))
}
// 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 *QScrollerProperties) GoGC() {
runtime.SetFinalizer(this, func(this *QScrollerProperties) {
this.Delete()
runtime.KeepAlive(this.h)
})
}