miqt/qt/gen_qtouchdevice.go

101 lines
2.2 KiB
Go

package qt
/*
#include "gen_qtouchdevice.h"
#include <stdlib.h>
*/
import "C"
import (
"unsafe"
)
type QTouchDevice struct {
h *C.QTouchDevice
}
func (this *QTouchDevice) cPointer() *C.QTouchDevice {
if this == nil {
return nil
}
return this.h
}
func newQTouchDevice(h *C.QTouchDevice) *QTouchDevice {
if h == nil {
return nil
}
return &QTouchDevice{h: h}
}
func newQTouchDevice_U(h unsafe.Pointer) *QTouchDevice {
return newQTouchDevice((*C.QTouchDevice)(h))
}
// NewQTouchDevice constructs a new QTouchDevice object.
func NewQTouchDevice() *QTouchDevice {
ret := C.QTouchDevice_new()
return newQTouchDevice(ret)
}
func QTouchDevice_Devices() []*QTouchDevice {
var _out **C.QTouchDevice = nil
var _out_len C.size_t = 0
C.QTouchDevice_Devices(&_out, &_out_len)
ret := make([]*QTouchDevice, int(_out_len))
_outCast := (*[0xffff]*C.QTouchDevice)(unsafe.Pointer(_out)) // so fresh so clean
for i := 0; i < int(_out_len); i++ {
ret[i] = newQTouchDevice(_outCast[i])
}
C.free(unsafe.Pointer(_out))
return ret
}
func (this *QTouchDevice) Name() string {
var _out *C.char = nil
var _out_Strlen C.int = 0
C.QTouchDevice_Name(this.h, &_out, &_out_Strlen)
ret := C.GoStringN(_out, _out_Strlen)
C.free(unsafe.Pointer(_out))
return ret
}
func (this *QTouchDevice) Type() uintptr {
ret := C.QTouchDevice_Type(this.h)
return (uintptr)(ret)
}
func (this *QTouchDevice) Capabilities() int {
ret := C.QTouchDevice_Capabilities(this.h)
return (int)(ret)
}
func (this *QTouchDevice) MaximumTouchPoints() int {
ret := C.QTouchDevice_MaximumTouchPoints(this.h)
return (int)(ret)
}
func (this *QTouchDevice) SetName(name string) {
name_Cstring := C.CString(name)
defer C.free(unsafe.Pointer(name_Cstring))
C.QTouchDevice_SetName(this.h, name_Cstring, C.ulong(len(name)))
}
func (this *QTouchDevice) SetType(devType uintptr) {
C.QTouchDevice_SetType(this.h, (C.uintptr_t)(devType))
}
func (this *QTouchDevice) SetCapabilities(caps int) {
C.QTouchDevice_SetCapabilities(this.h, (C.int)(caps))
}
func (this *QTouchDevice) SetMaximumTouchPoints(max int) {
C.QTouchDevice_SetMaximumTouchPoints(this.h, (C.int)(max))
}
func (this *QTouchDevice) Delete() {
C.QTouchDevice_Delete(this.h)
}