mirror of
https://github.com/mappu/miqt.git
synced 2024-12-23 01:18:37 +00:00
80 lines
2.3 KiB
Go
80 lines
2.3 KiB
Go
package qt
|
|
|
|
/*
|
|
|
|
#include "gen_qgesturerecognizer.h"
|
|
#include <stdlib.h>
|
|
|
|
*/
|
|
import "C"
|
|
|
|
import (
|
|
"unsafe"
|
|
)
|
|
|
|
type QGestureRecognizer__ResultFlag int
|
|
|
|
const (
|
|
QGestureRecognizer__ResultFlag__Ignore QGestureRecognizer__ResultFlag = 1
|
|
QGestureRecognizer__ResultFlag__MayBeGesture QGestureRecognizer__ResultFlag = 2
|
|
QGestureRecognizer__ResultFlag__TriggerGesture QGestureRecognizer__ResultFlag = 4
|
|
QGestureRecognizer__ResultFlag__FinishGesture QGestureRecognizer__ResultFlag = 8
|
|
QGestureRecognizer__ResultFlag__CancelGesture QGestureRecognizer__ResultFlag = 16
|
|
QGestureRecognizer__ResultFlag__ResultState_Mask QGestureRecognizer__ResultFlag = 255
|
|
QGestureRecognizer__ResultFlag__ConsumeEventHint QGestureRecognizer__ResultFlag = 256
|
|
QGestureRecognizer__ResultFlag__ResultHint_Mask QGestureRecognizer__ResultFlag = 65280
|
|
)
|
|
|
|
type QGestureRecognizer struct {
|
|
h *C.QGestureRecognizer
|
|
}
|
|
|
|
func (this *QGestureRecognizer) cPointer() *C.QGestureRecognizer {
|
|
if this == nil {
|
|
return nil
|
|
}
|
|
return this.h
|
|
}
|
|
|
|
func newQGestureRecognizer(h *C.QGestureRecognizer) *QGestureRecognizer {
|
|
if h == nil {
|
|
return nil
|
|
}
|
|
return &QGestureRecognizer{h: h}
|
|
}
|
|
|
|
func newQGestureRecognizer_U(h unsafe.Pointer) *QGestureRecognizer {
|
|
return newQGestureRecognizer((*C.QGestureRecognizer)(h))
|
|
}
|
|
|
|
func (this *QGestureRecognizer) Create(target *QObject) *QGesture {
|
|
ret := C.QGestureRecognizer_Create(this.h, target.cPointer())
|
|
return newQGesture_U(unsafe.Pointer(ret))
|
|
}
|
|
|
|
func (this *QGestureRecognizer) Recognize(state *QGesture, watched *QObject, event *QEvent) int {
|
|
ret := C.QGestureRecognizer_Recognize(this.h, state.cPointer(), watched.cPointer(), event.cPointer())
|
|
return (int)(ret)
|
|
}
|
|
|
|
func (this *QGestureRecognizer) Reset(state *QGesture) {
|
|
C.QGestureRecognizer_Reset(this.h, state.cPointer())
|
|
}
|
|
|
|
func QGestureRecognizer_RegisterRecognizer(recognizer *QGestureRecognizer) GestureType {
|
|
ret := C.QGestureRecognizer_RegisterRecognizer(recognizer.cPointer())
|
|
return (GestureType)(ret)
|
|
}
|
|
|
|
func QGestureRecognizer_UnregisterRecognizer(typeVal GestureType) {
|
|
C.QGestureRecognizer_UnregisterRecognizer((C.uintptr_t)(typeVal))
|
|
}
|
|
|
|
func (this *QGestureRecognizer) OperatorAssign(param1 *QGestureRecognizer) {
|
|
C.QGestureRecognizer_OperatorAssign(this.h, param1.cPointer())
|
|
}
|
|
|
|
func (this *QGestureRecognizer) Delete() {
|
|
C.QGestureRecognizer_Delete(this.h)
|
|
}
|