miqt/qt6/gen_qeventpoint.go

344 lines
10 KiB
Go
Raw Permalink Normal View History

2024-10-20 05:21:03 +00:00
package qt6
/*
#include "gen_qeventpoint.h"
#include <stdlib.h>
*/
import "C"
import (
"runtime"
"unsafe"
)
type QEventPoint__State byte
const (
QEventPoint__Unknown QEventPoint__State = 0
QEventPoint__Stationary QEventPoint__State = 4
QEventPoint__Pressed QEventPoint__State = 1
QEventPoint__Updated QEventPoint__State = 2
QEventPoint__Released QEventPoint__State = 8
)
type QEventPoint struct {
2024-11-19 06:29:06 +00:00
h *C.QEventPoint
isSubclass bool
2024-10-20 05:21:03 +00:00
}
func (this *QEventPoint) cPointer() *C.QEventPoint {
if this == nil {
return nil
}
return this.h
}
func (this *QEventPoint) UnsafePointer() unsafe.Pointer {
if this == nil {
return nil
}
return unsafe.Pointer(this.h)
}
2024-11-19 06:29:06 +00:00
// newQEventPoint constructs the type using only CGO pointers.
2024-10-20 05:21:03 +00:00
func newQEventPoint(h *C.QEventPoint) *QEventPoint {
if h == nil {
return nil
}
2024-12-07 04:15:57 +00:00
2024-10-20 05:21:03 +00:00
return &QEventPoint{h: h}
}
2024-11-19 06:29:06 +00:00
// UnsafeNewQEventPoint constructs the type using only unsafe pointers.
2024-10-20 05:21:03 +00:00
func UnsafeNewQEventPoint(h unsafe.Pointer) *QEventPoint {
2024-12-07 04:15:57 +00:00
return newQEventPoint((*C.QEventPoint)(h))
2024-10-20 05:21:03 +00:00
}
// NewQEventPoint constructs a new QEventPoint object.
func NewQEventPoint() *QEventPoint {
2024-11-19 06:29:06 +00:00
2024-12-07 04:15:57 +00:00
ret := newQEventPoint(C.QEventPoint_new())
2024-11-19 06:29:06 +00:00
ret.isSubclass = true
return ret
2024-10-20 05:21:03 +00:00
}
// NewQEventPoint2 constructs a new QEventPoint object.
func NewQEventPoint2(pointId int, state QEventPoint__State, scenePosition *QPointF, globalPosition *QPointF) *QEventPoint {
2024-11-19 06:29:06 +00:00
2024-12-07 04:15:57 +00:00
ret := newQEventPoint(C.QEventPoint_new2((C.int)(pointId), (C.uint8_t)(state), scenePosition.cPointer(), globalPosition.cPointer()))
2024-11-19 06:29:06 +00:00
ret.isSubclass = true
return ret
2024-10-20 05:21:03 +00:00
}
// NewQEventPoint3 constructs a new QEventPoint object.
func NewQEventPoint3(other *QEventPoint) *QEventPoint {
2024-11-19 06:29:06 +00:00
2024-12-07 04:15:57 +00:00
ret := newQEventPoint(C.QEventPoint_new3(other.cPointer()))
2024-11-19 06:29:06 +00:00
ret.isSubclass = true
return ret
2024-10-20 05:21:03 +00:00
}
// NewQEventPoint4 constructs a new QEventPoint object.
func NewQEventPoint4(id int) *QEventPoint {
2024-11-19 06:29:06 +00:00
2024-12-07 04:15:57 +00:00
ret := newQEventPoint(C.QEventPoint_new4((C.int)(id)))
2024-11-19 06:29:06 +00:00
ret.isSubclass = true
return ret
2024-10-20 05:21:03 +00:00
}
// NewQEventPoint5 constructs a new QEventPoint object.
func NewQEventPoint5(id int, device *QPointingDevice) *QEventPoint {
2024-11-19 06:29:06 +00:00
2024-12-07 04:15:57 +00:00
ret := newQEventPoint(C.QEventPoint_new5((C.int)(id), device.cPointer()))
2024-11-19 06:29:06 +00:00
ret.isSubclass = true
return ret
2024-10-20 05:21:03 +00:00
}
func (this *QEventPoint) OperatorAssign(other *QEventPoint) {
C.QEventPoint_OperatorAssign(this.h, other.cPointer())
}
func (this *QEventPoint) OperatorEqual(other *QEventPoint) bool {
return (bool)(C.QEventPoint_OperatorEqual(this.h, other.cPointer()))
}
func (this *QEventPoint) OperatorNotEqual(other *QEventPoint) bool {
return (bool)(C.QEventPoint_OperatorNotEqual(this.h, other.cPointer()))
}
func (this *QEventPoint) Swap(other *QEventPoint) {
C.QEventPoint_Swap(this.h, other.cPointer())
}
func (this *QEventPoint) Position() *QPointF {
_goptr := newQPointF(C.QEventPoint_Position(this.h))
2024-10-20 05:21:03 +00:00
_goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer
return _goptr
}
func (this *QEventPoint) PressPosition() *QPointF {
_goptr := newQPointF(C.QEventPoint_PressPosition(this.h))
2024-10-20 05:21:03 +00:00
_goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer
return _goptr
}
func (this *QEventPoint) GrabPosition() *QPointF {
_goptr := newQPointF(C.QEventPoint_GrabPosition(this.h))
2024-10-20 05:21:03 +00:00
_goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer
return _goptr
}
func (this *QEventPoint) LastPosition() *QPointF {
_goptr := newQPointF(C.QEventPoint_LastPosition(this.h))
2024-10-20 05:21:03 +00:00
_goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer
return _goptr
}
func (this *QEventPoint) ScenePosition() *QPointF {
_goptr := newQPointF(C.QEventPoint_ScenePosition(this.h))
2024-10-20 05:21:03 +00:00
_goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer
return _goptr
}
func (this *QEventPoint) ScenePressPosition() *QPointF {
_goptr := newQPointF(C.QEventPoint_ScenePressPosition(this.h))
2024-10-20 05:21:03 +00:00
_goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer
return _goptr
}
func (this *QEventPoint) SceneGrabPosition() *QPointF {
_goptr := newQPointF(C.QEventPoint_SceneGrabPosition(this.h))
2024-10-20 05:21:03 +00:00
_goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer
return _goptr
}
func (this *QEventPoint) SceneLastPosition() *QPointF {
_goptr := newQPointF(C.QEventPoint_SceneLastPosition(this.h))
2024-10-20 05:21:03 +00:00
_goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer
return _goptr
}
func (this *QEventPoint) GlobalPosition() *QPointF {
_goptr := newQPointF(C.QEventPoint_GlobalPosition(this.h))
2024-10-20 05:21:03 +00:00
_goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer
return _goptr
}
func (this *QEventPoint) GlobalPressPosition() *QPointF {
_goptr := newQPointF(C.QEventPoint_GlobalPressPosition(this.h))
2024-10-20 05:21:03 +00:00
_goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer
return _goptr
}
func (this *QEventPoint) GlobalGrabPosition() *QPointF {
_goptr := newQPointF(C.QEventPoint_GlobalGrabPosition(this.h))
2024-10-20 05:21:03 +00:00
_goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer
return _goptr
}
func (this *QEventPoint) GlobalLastPosition() *QPointF {
_goptr := newQPointF(C.QEventPoint_GlobalLastPosition(this.h))
2024-10-20 05:21:03 +00:00
_goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer
return _goptr
}
func (this *QEventPoint) NormalizedPosition() *QPointF {
_goptr := newQPointF(C.QEventPoint_NormalizedPosition(this.h))
2024-10-20 05:21:03 +00:00
_goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer
return _goptr
}
func (this *QEventPoint) Pos() *QPointF {
_goptr := newQPointF(C.QEventPoint_Pos(this.h))
2024-10-20 05:21:03 +00:00
_goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer
return _goptr
}
func (this *QEventPoint) StartPos() *QPointF {
_goptr := newQPointF(C.QEventPoint_StartPos(this.h))
2024-10-20 05:21:03 +00:00
_goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer
return _goptr
}
func (this *QEventPoint) ScenePos() *QPointF {
_goptr := newQPointF(C.QEventPoint_ScenePos(this.h))
2024-10-20 05:21:03 +00:00
_goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer
return _goptr
}
func (this *QEventPoint) StartScenePos() *QPointF {
_goptr := newQPointF(C.QEventPoint_StartScenePos(this.h))
2024-10-20 05:21:03 +00:00
_goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer
return _goptr
}
func (this *QEventPoint) ScreenPos() *QPointF {
_goptr := newQPointF(C.QEventPoint_ScreenPos(this.h))
2024-10-20 05:21:03 +00:00
_goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer
return _goptr
}
func (this *QEventPoint) StartScreenPos() *QPointF {
_goptr := newQPointF(C.QEventPoint_StartScreenPos(this.h))
2024-10-20 05:21:03 +00:00
_goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer
return _goptr
}
func (this *QEventPoint) StartNormalizedPos() *QPointF {
_goptr := newQPointF(C.QEventPoint_StartNormalizedPos(this.h))
2024-10-20 05:21:03 +00:00
_goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer
return _goptr
}
func (this *QEventPoint) NormalizedPos() *QPointF {
_goptr := newQPointF(C.QEventPoint_NormalizedPos(this.h))
2024-10-20 05:21:03 +00:00
_goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer
return _goptr
}
func (this *QEventPoint) LastPos() *QPointF {
_goptr := newQPointF(C.QEventPoint_LastPos(this.h))
2024-10-20 05:21:03 +00:00
_goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer
return _goptr
}
func (this *QEventPoint) LastScenePos() *QPointF {
_goptr := newQPointF(C.QEventPoint_LastScenePos(this.h))
2024-10-20 05:21:03 +00:00
_goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer
return _goptr
}
func (this *QEventPoint) LastScreenPos() *QPointF {
_goptr := newQPointF(C.QEventPoint_LastScreenPos(this.h))
2024-10-20 05:21:03 +00:00
_goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer
return _goptr
}
func (this *QEventPoint) LastNormalizedPos() *QPointF {
_goptr := newQPointF(C.QEventPoint_LastNormalizedPos(this.h))
2024-10-20 05:21:03 +00:00
_goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer
return _goptr
}
func (this *QEventPoint) Velocity() *QVector2D {
_goptr := newQVector2D(C.QEventPoint_Velocity(this.h))
2024-10-20 05:21:03 +00:00
_goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer
return _goptr
}
func (this *QEventPoint) State() QEventPoint__State {
return (QEventPoint__State)(C.QEventPoint_State(this.h))
}
func (this *QEventPoint) Device() *QPointingDevice {
2024-12-07 04:15:57 +00:00
return newQPointingDevice(C.QEventPoint_Device(this.h))
2024-10-20 05:21:03 +00:00
}
func (this *QEventPoint) Id() int {
return (int)(C.QEventPoint_Id(this.h))
}
func (this *QEventPoint) UniqueId() *QPointingDeviceUniqueId {
_goptr := newQPointingDeviceUniqueId(C.QEventPoint_UniqueId(this.h))
2024-10-20 05:21:03 +00:00
_goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer
return _goptr
}
func (this *QEventPoint) Timestamp() uint64 {
return (uint64)(C.QEventPoint_Timestamp(this.h))
}
func (this *QEventPoint) LastTimestamp() uint64 {
return (uint64)(C.QEventPoint_LastTimestamp(this.h))
}
func (this *QEventPoint) PressTimestamp() uint64 {
return (uint64)(C.QEventPoint_PressTimestamp(this.h))
}
func (this *QEventPoint) TimeHeld() float64 {
return (float64)(C.QEventPoint_TimeHeld(this.h))
}
func (this *QEventPoint) Pressure() float64 {
return (float64)(C.QEventPoint_Pressure(this.h))
}
func (this *QEventPoint) Rotation() float64 {
return (float64)(C.QEventPoint_Rotation(this.h))
}
func (this *QEventPoint) EllipseDiameters() *QSizeF {
_goptr := newQSizeF(C.QEventPoint_EllipseDiameters(this.h))
2024-10-20 05:21:03 +00:00
_goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer
return _goptr
}
func (this *QEventPoint) IsAccepted() bool {
return (bool)(C.QEventPoint_IsAccepted(this.h))
}
func (this *QEventPoint) SetAccepted() {
C.QEventPoint_SetAccepted(this.h)
}
func (this *QEventPoint) SetAccepted1(accepted bool) {
C.QEventPoint_SetAccepted1(this.h, (C.bool)(accepted))
}
// Delete this object from C++ memory.
func (this *QEventPoint) Delete() {
2024-11-19 06:29:06 +00:00
C.QEventPoint_Delete(this.h, C.bool(this.isSubclass))
2024-10-20 05:21:03 +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 *QEventPoint) GoGC() {
runtime.SetFinalizer(this, func(this *QEventPoint) {
this.Delete()
runtime.KeepAlive(this.h)
})
}