2024-08-25 04:08:24 +00:00
|
|
|
package qt
|
|
|
|
|
|
|
|
/*
|
|
|
|
|
|
|
|
#include "gen_qiodevice.h"
|
|
|
|
#include <stdlib.h>
|
|
|
|
|
|
|
|
*/
|
|
|
|
import "C"
|
|
|
|
|
|
|
|
import (
|
|
|
|
"runtime"
|
|
|
|
"runtime/cgo"
|
|
|
|
"unsafe"
|
|
|
|
)
|
|
|
|
|
2024-09-04 06:54:22 +00:00
|
|
|
type QIODevice__OpenModeFlag int
|
|
|
|
|
|
|
|
const (
|
2024-09-20 07:13:26 +00:00
|
|
|
QIODevice__NotOpen QIODevice__OpenModeFlag = 0
|
|
|
|
QIODevice__ReadOnly QIODevice__OpenModeFlag = 1
|
|
|
|
QIODevice__WriteOnly QIODevice__OpenModeFlag = 2
|
|
|
|
QIODevice__ReadWrite QIODevice__OpenModeFlag = 3
|
|
|
|
QIODevice__Append QIODevice__OpenModeFlag = 4
|
|
|
|
QIODevice__Truncate QIODevice__OpenModeFlag = 8
|
|
|
|
QIODevice__Text QIODevice__OpenModeFlag = 16
|
|
|
|
QIODevice__Unbuffered QIODevice__OpenModeFlag = 32
|
|
|
|
QIODevice__NewOnly QIODevice__OpenModeFlag = 64
|
|
|
|
QIODevice__ExistingOnly QIODevice__OpenModeFlag = 128
|
2024-09-04 06:54:22 +00:00
|
|
|
)
|
|
|
|
|
2024-08-25 04:08:24 +00:00
|
|
|
type QIODevice struct {
|
2024-11-19 06:29:06 +00:00
|
|
|
h *C.QIODevice
|
|
|
|
isSubclass bool
|
2024-08-25 04:08:24 +00:00
|
|
|
*QObject
|
|
|
|
}
|
|
|
|
|
|
|
|
func (this *QIODevice) cPointer() *C.QIODevice {
|
|
|
|
if this == nil {
|
|
|
|
return nil
|
|
|
|
}
|
|
|
|
return this.h
|
|
|
|
}
|
|
|
|
|
2024-10-16 05:07:56 +00:00
|
|
|
func (this *QIODevice) UnsafePointer() unsafe.Pointer {
|
|
|
|
if this == nil {
|
|
|
|
return nil
|
|
|
|
}
|
|
|
|
return unsafe.Pointer(this.h)
|
|
|
|
}
|
|
|
|
|
2024-11-19 06:29:06 +00:00
|
|
|
// newQIODevice constructs the type using only CGO pointers.
|
|
|
|
func newQIODevice(h *C.QIODevice, h_QObject *C.QObject) *QIODevice {
|
2024-09-01 02:23:55 +00:00
|
|
|
if h == nil {
|
|
|
|
return nil
|
|
|
|
}
|
2024-11-19 06:29:06 +00:00
|
|
|
return &QIODevice{h: h,
|
|
|
|
QObject: newQObject(h_QObject)}
|
2024-08-25 04:08:24 +00:00
|
|
|
}
|
|
|
|
|
2024-11-19 06:29:06 +00:00
|
|
|
// UnsafeNewQIODevice constructs the type using only unsafe pointers.
|
|
|
|
func UnsafeNewQIODevice(h unsafe.Pointer, h_QObject unsafe.Pointer) *QIODevice {
|
|
|
|
if h == nil {
|
|
|
|
return nil
|
|
|
|
}
|
|
|
|
|
|
|
|
return &QIODevice{h: (*C.QIODevice)(h),
|
|
|
|
QObject: UnsafeNewQObject(h_QObject)}
|
2024-08-25 04:08:24 +00:00
|
|
|
}
|
|
|
|
|
2024-11-23 06:34:52 +00:00
|
|
|
// NewQIODevice constructs a new QIODevice object.
|
|
|
|
func NewQIODevice() *QIODevice {
|
|
|
|
var outptr_QIODevice *C.QIODevice = nil
|
|
|
|
var outptr_QObject *C.QObject = nil
|
|
|
|
|
|
|
|
C.QIODevice_new(&outptr_QIODevice, &outptr_QObject)
|
|
|
|
ret := newQIODevice(outptr_QIODevice, outptr_QObject)
|
|
|
|
ret.isSubclass = true
|
|
|
|
return ret
|
|
|
|
}
|
|
|
|
|
|
|
|
// NewQIODevice2 constructs a new QIODevice object.
|
|
|
|
func NewQIODevice2(parent *QObject) *QIODevice {
|
|
|
|
var outptr_QIODevice *C.QIODevice = nil
|
|
|
|
var outptr_QObject *C.QObject = nil
|
|
|
|
|
|
|
|
C.QIODevice_new2(parent.cPointer(), &outptr_QIODevice, &outptr_QObject)
|
|
|
|
ret := newQIODevice(outptr_QIODevice, outptr_QObject)
|
|
|
|
ret.isSubclass = true
|
|
|
|
return ret
|
|
|
|
}
|
|
|
|
|
2024-08-25 04:08:24 +00:00
|
|
|
func (this *QIODevice) MetaObject() *QMetaObject {
|
2024-10-16 05:07:56 +00:00
|
|
|
return UnsafeNewQMetaObject(unsafe.Pointer(C.QIODevice_MetaObject(this.h)))
|
2024-08-25 04:08:24 +00:00
|
|
|
}
|
|
|
|
|
2024-09-20 22:32:57 +00:00
|
|
|
func (this *QIODevice) Metacast(param1 string) unsafe.Pointer {
|
|
|
|
param1_Cstring := C.CString(param1)
|
|
|
|
defer C.free(unsafe.Pointer(param1_Cstring))
|
2024-10-18 23:53:33 +00:00
|
|
|
return (unsafe.Pointer)(C.QIODevice_Metacast(this.h, param1_Cstring))
|
2024-09-20 22:32:57 +00:00
|
|
|
}
|
|
|
|
|
2024-08-25 04:08:24 +00:00
|
|
|
func QIODevice_Tr(s string) string {
|
|
|
|
s_Cstring := C.CString(s)
|
|
|
|
defer C.free(unsafe.Pointer(s_Cstring))
|
2024-10-18 23:53:33 +00:00
|
|
|
var _ms C.struct_miqt_string = C.QIODevice_Tr(s_Cstring)
|
|
|
|
_ret := C.GoStringN(_ms.data, C.int(int64(_ms.len)))
|
|
|
|
C.free(unsafe.Pointer(_ms.data))
|
2024-09-14 22:29:05 +00:00
|
|
|
return _ret
|
2024-08-25 04:08:24 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
func QIODevice_TrUtf8(s string) string {
|
|
|
|
s_Cstring := C.CString(s)
|
|
|
|
defer C.free(unsafe.Pointer(s_Cstring))
|
2024-10-18 23:53:33 +00:00
|
|
|
var _ms C.struct_miqt_string = C.QIODevice_TrUtf8(s_Cstring)
|
|
|
|
_ret := C.GoStringN(_ms.data, C.int(int64(_ms.len)))
|
|
|
|
C.free(unsafe.Pointer(_ms.data))
|
2024-09-14 22:29:05 +00:00
|
|
|
return _ret
|
2024-08-25 04:08:24 +00:00
|
|
|
}
|
|
|
|
|
2024-09-20 06:40:03 +00:00
|
|
|
func (this *QIODevice) OpenMode() QIODevice__OpenModeFlag {
|
|
|
|
return (QIODevice__OpenModeFlag)(C.QIODevice_OpenMode(this.h))
|
2024-08-29 07:01:51 +00:00
|
|
|
}
|
|
|
|
|
2024-08-25 04:08:24 +00:00
|
|
|
func (this *QIODevice) SetTextModeEnabled(enabled bool) {
|
|
|
|
C.QIODevice_SetTextModeEnabled(this.h, (C.bool)(enabled))
|
|
|
|
}
|
|
|
|
|
|
|
|
func (this *QIODevice) IsTextModeEnabled() bool {
|
2024-09-17 07:30:27 +00:00
|
|
|
return (bool)(C.QIODevice_IsTextModeEnabled(this.h))
|
2024-08-25 04:08:24 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
func (this *QIODevice) IsOpen() bool {
|
2024-09-17 07:30:27 +00:00
|
|
|
return (bool)(C.QIODevice_IsOpen(this.h))
|
2024-08-25 04:08:24 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
func (this *QIODevice) IsReadable() bool {
|
2024-09-17 07:30:27 +00:00
|
|
|
return (bool)(C.QIODevice_IsReadable(this.h))
|
2024-08-25 04:08:24 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
func (this *QIODevice) IsWritable() bool {
|
2024-09-17 07:30:27 +00:00
|
|
|
return (bool)(C.QIODevice_IsWritable(this.h))
|
2024-08-25 04:08:24 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
func (this *QIODevice) IsSequential() bool {
|
2024-09-17 07:30:27 +00:00
|
|
|
return (bool)(C.QIODevice_IsSequential(this.h))
|
2024-08-25 04:08:24 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
func (this *QIODevice) ReadChannelCount() int {
|
2024-09-17 07:30:27 +00:00
|
|
|
return (int)(C.QIODevice_ReadChannelCount(this.h))
|
2024-08-25 04:08:24 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
func (this *QIODevice) WriteChannelCount() int {
|
2024-09-17 07:30:27 +00:00
|
|
|
return (int)(C.QIODevice_WriteChannelCount(this.h))
|
2024-08-25 04:08:24 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
func (this *QIODevice) CurrentReadChannel() int {
|
2024-09-17 07:30:27 +00:00
|
|
|
return (int)(C.QIODevice_CurrentReadChannel(this.h))
|
2024-08-25 04:08:24 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
func (this *QIODevice) SetCurrentReadChannel(channel int) {
|
|
|
|
C.QIODevice_SetCurrentReadChannel(this.h, (C.int)(channel))
|
|
|
|
}
|
|
|
|
|
|
|
|
func (this *QIODevice) CurrentWriteChannel() int {
|
2024-09-17 07:30:27 +00:00
|
|
|
return (int)(C.QIODevice_CurrentWriteChannel(this.h))
|
2024-08-25 04:08:24 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
func (this *QIODevice) SetCurrentWriteChannel(channel int) {
|
|
|
|
C.QIODevice_SetCurrentWriteChannel(this.h, (C.int)(channel))
|
|
|
|
}
|
|
|
|
|
2024-09-20 06:40:03 +00:00
|
|
|
func (this *QIODevice) Open(mode QIODevice__OpenModeFlag) bool {
|
2024-09-18 01:33:50 +00:00
|
|
|
return (bool)(C.QIODevice_Open(this.h, (C.int)(mode)))
|
2024-08-29 07:01:51 +00:00
|
|
|
}
|
|
|
|
|
2024-08-25 04:08:24 +00:00
|
|
|
func (this *QIODevice) Close() {
|
|
|
|
C.QIODevice_Close(this.h)
|
|
|
|
}
|
|
|
|
|
|
|
|
func (this *QIODevice) Pos() int64 {
|
2024-09-17 07:30:27 +00:00
|
|
|
return (int64)(C.QIODevice_Pos(this.h))
|
2024-08-25 04:08:24 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
func (this *QIODevice) Size() int64 {
|
2024-09-17 07:30:27 +00:00
|
|
|
return (int64)(C.QIODevice_Size(this.h))
|
2024-08-25 04:08:24 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
func (this *QIODevice) Seek(pos int64) bool {
|
2024-09-17 07:30:27 +00:00
|
|
|
return (bool)(C.QIODevice_Seek(this.h, (C.longlong)(pos)))
|
2024-08-25 04:08:24 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
func (this *QIODevice) AtEnd() bool {
|
2024-09-17 07:30:27 +00:00
|
|
|
return (bool)(C.QIODevice_AtEnd(this.h))
|
2024-08-25 04:08:24 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
func (this *QIODevice) Reset() bool {
|
2024-09-17 07:30:27 +00:00
|
|
|
return (bool)(C.QIODevice_Reset(this.h))
|
2024-08-25 04:08:24 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
func (this *QIODevice) BytesAvailable() int64 {
|
2024-09-17 07:30:27 +00:00
|
|
|
return (int64)(C.QIODevice_BytesAvailable(this.h))
|
2024-08-25 04:08:24 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
func (this *QIODevice) BytesToWrite() int64 {
|
2024-09-17 07:30:27 +00:00
|
|
|
return (int64)(C.QIODevice_BytesToWrite(this.h))
|
2024-08-25 04:08:24 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
func (this *QIODevice) Read(data string, maxlen int64) int64 {
|
|
|
|
data_Cstring := C.CString(data)
|
|
|
|
defer C.free(unsafe.Pointer(data_Cstring))
|
2024-09-17 07:30:27 +00:00
|
|
|
return (int64)(C.QIODevice_Read(this.h, data_Cstring, (C.longlong)(maxlen)))
|
2024-08-25 04:08:24 +00:00
|
|
|
}
|
|
|
|
|
2024-10-18 23:53:33 +00:00
|
|
|
func (this *QIODevice) ReadWithMaxlen(maxlen int64) []byte {
|
|
|
|
var _bytearray C.struct_miqt_string = C.QIODevice_ReadWithMaxlen(this.h, (C.longlong)(maxlen))
|
|
|
|
_ret := C.GoBytes(unsafe.Pointer(_bytearray.data), C.int(int64(_bytearray.len)))
|
|
|
|
C.free(unsafe.Pointer(_bytearray.data))
|
|
|
|
return _ret
|
2024-08-25 04:08:24 +00:00
|
|
|
}
|
|
|
|
|
2024-10-18 23:53:33 +00:00
|
|
|
func (this *QIODevice) ReadAll() []byte {
|
|
|
|
var _bytearray C.struct_miqt_string = C.QIODevice_ReadAll(this.h)
|
|
|
|
_ret := C.GoBytes(unsafe.Pointer(_bytearray.data), C.int(int64(_bytearray.len)))
|
|
|
|
C.free(unsafe.Pointer(_bytearray.data))
|
|
|
|
return _ret
|
2024-08-25 04:08:24 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
func (this *QIODevice) ReadLine(data string, maxlen int64) int64 {
|
|
|
|
data_Cstring := C.CString(data)
|
|
|
|
defer C.free(unsafe.Pointer(data_Cstring))
|
2024-09-17 07:30:27 +00:00
|
|
|
return (int64)(C.QIODevice_ReadLine(this.h, data_Cstring, (C.longlong)(maxlen)))
|
2024-08-25 04:08:24 +00:00
|
|
|
}
|
|
|
|
|
2024-10-18 23:53:33 +00:00
|
|
|
func (this *QIODevice) ReadLine2() []byte {
|
|
|
|
var _bytearray C.struct_miqt_string = C.QIODevice_ReadLine2(this.h)
|
|
|
|
_ret := C.GoBytes(unsafe.Pointer(_bytearray.data), C.int(int64(_bytearray.len)))
|
|
|
|
C.free(unsafe.Pointer(_bytearray.data))
|
|
|
|
return _ret
|
2024-08-25 04:08:24 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
func (this *QIODevice) CanReadLine() bool {
|
2024-09-17 07:30:27 +00:00
|
|
|
return (bool)(C.QIODevice_CanReadLine(this.h))
|
2024-08-25 04:08:24 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
func (this *QIODevice) StartTransaction() {
|
|
|
|
C.QIODevice_StartTransaction(this.h)
|
|
|
|
}
|
|
|
|
|
|
|
|
func (this *QIODevice) CommitTransaction() {
|
|
|
|
C.QIODevice_CommitTransaction(this.h)
|
|
|
|
}
|
|
|
|
|
|
|
|
func (this *QIODevice) RollbackTransaction() {
|
|
|
|
C.QIODevice_RollbackTransaction(this.h)
|
|
|
|
}
|
|
|
|
|
|
|
|
func (this *QIODevice) IsTransactionStarted() bool {
|
2024-09-17 07:30:27 +00:00
|
|
|
return (bool)(C.QIODevice_IsTransactionStarted(this.h))
|
2024-08-25 04:08:24 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
func (this *QIODevice) Write(data string, lenVal int64) int64 {
|
|
|
|
data_Cstring := C.CString(data)
|
|
|
|
defer C.free(unsafe.Pointer(data_Cstring))
|
2024-09-17 07:30:27 +00:00
|
|
|
return (int64)(C.QIODevice_Write(this.h, data_Cstring, (C.longlong)(lenVal)))
|
2024-08-25 04:08:24 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
func (this *QIODevice) WriteWithData(data string) int64 {
|
|
|
|
data_Cstring := C.CString(data)
|
|
|
|
defer C.free(unsafe.Pointer(data_Cstring))
|
2024-09-17 07:30:27 +00:00
|
|
|
return (int64)(C.QIODevice_WriteWithData(this.h, data_Cstring))
|
2024-08-25 04:08:24 +00:00
|
|
|
}
|
|
|
|
|
2024-10-18 23:53:33 +00:00
|
|
|
func (this *QIODevice) Write2(data []byte) int64 {
|
|
|
|
data_alias := C.struct_miqt_string{}
|
|
|
|
data_alias.data = (*C.char)(unsafe.Pointer(&data[0]))
|
|
|
|
data_alias.len = C.size_t(len(data))
|
|
|
|
return (int64)(C.QIODevice_Write2(this.h, data_alias))
|
2024-08-25 04:08:24 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
func (this *QIODevice) Peek(data string, maxlen int64) int64 {
|
|
|
|
data_Cstring := C.CString(data)
|
|
|
|
defer C.free(unsafe.Pointer(data_Cstring))
|
2024-09-17 07:30:27 +00:00
|
|
|
return (int64)(C.QIODevice_Peek(this.h, data_Cstring, (C.longlong)(maxlen)))
|
2024-08-25 04:08:24 +00:00
|
|
|
}
|
|
|
|
|
2024-10-18 23:53:33 +00:00
|
|
|
func (this *QIODevice) PeekWithMaxlen(maxlen int64) []byte {
|
|
|
|
var _bytearray C.struct_miqt_string = C.QIODevice_PeekWithMaxlen(this.h, (C.longlong)(maxlen))
|
|
|
|
_ret := C.GoBytes(unsafe.Pointer(_bytearray.data), C.int(int64(_bytearray.len)))
|
|
|
|
C.free(unsafe.Pointer(_bytearray.data))
|
|
|
|
return _ret
|
2024-08-25 04:08:24 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
func (this *QIODevice) Skip(maxSize int64) int64 {
|
2024-09-17 07:30:27 +00:00
|
|
|
return (int64)(C.QIODevice_Skip(this.h, (C.longlong)(maxSize)))
|
2024-08-25 04:08:24 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
func (this *QIODevice) WaitForReadyRead(msecs int) bool {
|
2024-09-17 07:30:27 +00:00
|
|
|
return (bool)(C.QIODevice_WaitForReadyRead(this.h, (C.int)(msecs)))
|
2024-08-25 04:08:24 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
func (this *QIODevice) WaitForBytesWritten(msecs int) bool {
|
2024-09-17 07:30:27 +00:00
|
|
|
return (bool)(C.QIODevice_WaitForBytesWritten(this.h, (C.int)(msecs)))
|
2024-08-25 04:08:24 +00:00
|
|
|
}
|
|
|
|
|
2024-10-11 05:43:04 +00:00
|
|
|
func (this *QIODevice) UngetChar(c int8) {
|
2024-08-25 04:08:24 +00:00
|
|
|
C.QIODevice_UngetChar(this.h, (C.char)(c))
|
|
|
|
}
|
|
|
|
|
2024-10-11 05:43:04 +00:00
|
|
|
func (this *QIODevice) PutChar(c int8) bool {
|
2024-09-17 07:30:27 +00:00
|
|
|
return (bool)(C.QIODevice_PutChar(this.h, (C.char)(c)))
|
2024-08-25 04:08:24 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
func (this *QIODevice) GetChar(c string) bool {
|
|
|
|
c_Cstring := C.CString(c)
|
|
|
|
defer C.free(unsafe.Pointer(c_Cstring))
|
2024-09-17 07:30:27 +00:00
|
|
|
return (bool)(C.QIODevice_GetChar(this.h, c_Cstring))
|
2024-08-25 04:08:24 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
func (this *QIODevice) ErrorString() string {
|
2024-10-18 23:53:33 +00:00
|
|
|
var _ms C.struct_miqt_string = C.QIODevice_ErrorString(this.h)
|
|
|
|
_ret := C.GoStringN(_ms.data, C.int(int64(_ms.len)))
|
|
|
|
C.free(unsafe.Pointer(_ms.data))
|
2024-09-14 22:29:05 +00:00
|
|
|
return _ret
|
2024-08-25 04:08:24 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
func (this *QIODevice) ReadyRead() {
|
|
|
|
C.QIODevice_ReadyRead(this.h)
|
|
|
|
}
|
|
|
|
func (this *QIODevice) OnReadyRead(slot func()) {
|
2024-10-13 06:06:06 +00:00
|
|
|
C.QIODevice_connect_ReadyRead(this.h, C.intptr_t(cgo.NewHandle(slot)))
|
2024-09-14 22:29:05 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
//export miqt_exec_callback_QIODevice_ReadyRead
|
2024-10-13 06:06:06 +00:00
|
|
|
func miqt_exec_callback_QIODevice_ReadyRead(cb C.intptr_t) {
|
|
|
|
gofunc, ok := cgo.Handle(cb).Value().(func())
|
2024-09-14 22:29:05 +00:00
|
|
|
if !ok {
|
|
|
|
panic("miqt: callback of non-callback type (heap corruption?)")
|
2024-08-25 04:08:24 +00:00
|
|
|
}
|
|
|
|
|
2024-09-14 22:29:05 +00:00
|
|
|
gofunc()
|
2024-08-25 04:08:24 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
func (this *QIODevice) ChannelReadyRead(channel int) {
|
|
|
|
C.QIODevice_ChannelReadyRead(this.h, (C.int)(channel))
|
|
|
|
}
|
2024-09-14 22:29:05 +00:00
|
|
|
func (this *QIODevice) OnChannelReadyRead(slot func(channel int)) {
|
2024-10-13 06:06:06 +00:00
|
|
|
C.QIODevice_connect_ChannelReadyRead(this.h, C.intptr_t(cgo.NewHandle(slot)))
|
2024-09-14 22:29:05 +00:00
|
|
|
}
|
2024-08-25 04:08:24 +00:00
|
|
|
|
2024-09-14 22:29:05 +00:00
|
|
|
//export miqt_exec_callback_QIODevice_ChannelReadyRead
|
2024-10-13 06:06:06 +00:00
|
|
|
func miqt_exec_callback_QIODevice_ChannelReadyRead(cb C.intptr_t, channel C.int) {
|
|
|
|
gofunc, ok := cgo.Handle(cb).Value().(func(channel int))
|
2024-09-14 22:29:05 +00:00
|
|
|
if !ok {
|
|
|
|
panic("miqt: callback of non-callback type (heap corruption?)")
|
2024-08-25 04:08:24 +00:00
|
|
|
}
|
|
|
|
|
2024-09-14 22:29:05 +00:00
|
|
|
// Convert all CABI parameters to Go parameters
|
2024-09-17 07:30:27 +00:00
|
|
|
slotval1 := (int)(channel)
|
2024-09-14 22:29:05 +00:00
|
|
|
|
|
|
|
gofunc(slotval1)
|
2024-08-25 04:08:24 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
func (this *QIODevice) BytesWritten(bytes int64) {
|
2024-08-29 07:01:51 +00:00
|
|
|
C.QIODevice_BytesWritten(this.h, (C.longlong)(bytes))
|
2024-08-25 04:08:24 +00:00
|
|
|
}
|
2024-09-14 22:29:05 +00:00
|
|
|
func (this *QIODevice) OnBytesWritten(slot func(bytes int64)) {
|
2024-10-13 06:06:06 +00:00
|
|
|
C.QIODevice_connect_BytesWritten(this.h, C.intptr_t(cgo.NewHandle(slot)))
|
2024-09-14 22:29:05 +00:00
|
|
|
}
|
2024-08-25 04:08:24 +00:00
|
|
|
|
2024-09-14 22:29:05 +00:00
|
|
|
//export miqt_exec_callback_QIODevice_BytesWritten
|
2024-10-13 06:06:06 +00:00
|
|
|
func miqt_exec_callback_QIODevice_BytesWritten(cb C.intptr_t, bytes C.longlong) {
|
|
|
|
gofunc, ok := cgo.Handle(cb).Value().(func(bytes int64))
|
2024-09-14 22:29:05 +00:00
|
|
|
if !ok {
|
|
|
|
panic("miqt: callback of non-callback type (heap corruption?)")
|
2024-08-25 04:08:24 +00:00
|
|
|
}
|
|
|
|
|
2024-09-14 22:29:05 +00:00
|
|
|
// Convert all CABI parameters to Go parameters
|
2024-09-17 07:30:27 +00:00
|
|
|
slotval1 := (int64)(bytes)
|
2024-09-14 22:29:05 +00:00
|
|
|
|
|
|
|
gofunc(slotval1)
|
2024-08-25 04:08:24 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
func (this *QIODevice) ChannelBytesWritten(channel int, bytes int64) {
|
2024-08-29 07:01:51 +00:00
|
|
|
C.QIODevice_ChannelBytesWritten(this.h, (C.int)(channel), (C.longlong)(bytes))
|
2024-08-25 04:08:24 +00:00
|
|
|
}
|
2024-09-14 22:29:05 +00:00
|
|
|
func (this *QIODevice) OnChannelBytesWritten(slot func(channel int, bytes int64)) {
|
2024-10-13 06:06:06 +00:00
|
|
|
C.QIODevice_connect_ChannelBytesWritten(this.h, C.intptr_t(cgo.NewHandle(slot)))
|
2024-09-14 22:29:05 +00:00
|
|
|
}
|
2024-08-25 04:08:24 +00:00
|
|
|
|
2024-09-14 22:29:05 +00:00
|
|
|
//export miqt_exec_callback_QIODevice_ChannelBytesWritten
|
2024-10-13 06:06:06 +00:00
|
|
|
func miqt_exec_callback_QIODevice_ChannelBytesWritten(cb C.intptr_t, channel C.int, bytes C.longlong) {
|
|
|
|
gofunc, ok := cgo.Handle(cb).Value().(func(channel int, bytes int64))
|
2024-09-14 22:29:05 +00:00
|
|
|
if !ok {
|
|
|
|
panic("miqt: callback of non-callback type (heap corruption?)")
|
2024-08-25 04:08:24 +00:00
|
|
|
}
|
|
|
|
|
2024-09-14 22:29:05 +00:00
|
|
|
// Convert all CABI parameters to Go parameters
|
2024-09-17 07:30:27 +00:00
|
|
|
slotval1 := (int)(channel)
|
2024-09-14 22:29:05 +00:00
|
|
|
|
2024-09-17 07:30:27 +00:00
|
|
|
slotval2 := (int64)(bytes)
|
2024-09-14 22:29:05 +00:00
|
|
|
|
|
|
|
gofunc(slotval1, slotval2)
|
2024-08-25 04:08:24 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
func (this *QIODevice) AboutToClose() {
|
|
|
|
C.QIODevice_AboutToClose(this.h)
|
|
|
|
}
|
|
|
|
func (this *QIODevice) OnAboutToClose(slot func()) {
|
2024-10-13 06:06:06 +00:00
|
|
|
C.QIODevice_connect_AboutToClose(this.h, C.intptr_t(cgo.NewHandle(slot)))
|
2024-09-14 22:29:05 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
//export miqt_exec_callback_QIODevice_AboutToClose
|
2024-10-13 06:06:06 +00:00
|
|
|
func miqt_exec_callback_QIODevice_AboutToClose(cb C.intptr_t) {
|
|
|
|
gofunc, ok := cgo.Handle(cb).Value().(func())
|
2024-09-14 22:29:05 +00:00
|
|
|
if !ok {
|
|
|
|
panic("miqt: callback of non-callback type (heap corruption?)")
|
2024-08-25 04:08:24 +00:00
|
|
|
}
|
|
|
|
|
2024-09-14 22:29:05 +00:00
|
|
|
gofunc()
|
2024-08-25 04:08:24 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
func (this *QIODevice) ReadChannelFinished() {
|
|
|
|
C.QIODevice_ReadChannelFinished(this.h)
|
|
|
|
}
|
|
|
|
func (this *QIODevice) OnReadChannelFinished(slot func()) {
|
2024-10-13 06:06:06 +00:00
|
|
|
C.QIODevice_connect_ReadChannelFinished(this.h, C.intptr_t(cgo.NewHandle(slot)))
|
2024-09-14 22:29:05 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
//export miqt_exec_callback_QIODevice_ReadChannelFinished
|
2024-10-13 06:06:06 +00:00
|
|
|
func miqt_exec_callback_QIODevice_ReadChannelFinished(cb C.intptr_t) {
|
|
|
|
gofunc, ok := cgo.Handle(cb).Value().(func())
|
2024-09-14 22:29:05 +00:00
|
|
|
if !ok {
|
|
|
|
panic("miqt: callback of non-callback type (heap corruption?)")
|
2024-08-25 04:08:24 +00:00
|
|
|
}
|
|
|
|
|
2024-09-14 22:29:05 +00:00
|
|
|
gofunc()
|
2024-08-25 04:08:24 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
func QIODevice_Tr2(s string, c string) string {
|
|
|
|
s_Cstring := C.CString(s)
|
|
|
|
defer C.free(unsafe.Pointer(s_Cstring))
|
|
|
|
c_Cstring := C.CString(c)
|
|
|
|
defer C.free(unsafe.Pointer(c_Cstring))
|
2024-10-18 23:53:33 +00:00
|
|
|
var _ms C.struct_miqt_string = C.QIODevice_Tr2(s_Cstring, c_Cstring)
|
|
|
|
_ret := C.GoStringN(_ms.data, C.int(int64(_ms.len)))
|
|
|
|
C.free(unsafe.Pointer(_ms.data))
|
2024-09-14 22:29:05 +00:00
|
|
|
return _ret
|
2024-08-25 04:08:24 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
func QIODevice_Tr3(s string, c string, n int) string {
|
|
|
|
s_Cstring := C.CString(s)
|
|
|
|
defer C.free(unsafe.Pointer(s_Cstring))
|
|
|
|
c_Cstring := C.CString(c)
|
|
|
|
defer C.free(unsafe.Pointer(c_Cstring))
|
2024-10-18 23:53:33 +00:00
|
|
|
var _ms C.struct_miqt_string = C.QIODevice_Tr3(s_Cstring, c_Cstring, (C.int)(n))
|
|
|
|
_ret := C.GoStringN(_ms.data, C.int(int64(_ms.len)))
|
|
|
|
C.free(unsafe.Pointer(_ms.data))
|
2024-09-14 22:29:05 +00:00
|
|
|
return _ret
|
2024-08-25 04:08:24 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
func QIODevice_TrUtf82(s string, c string) string {
|
|
|
|
s_Cstring := C.CString(s)
|
|
|
|
defer C.free(unsafe.Pointer(s_Cstring))
|
|
|
|
c_Cstring := C.CString(c)
|
|
|
|
defer C.free(unsafe.Pointer(c_Cstring))
|
2024-10-18 23:53:33 +00:00
|
|
|
var _ms C.struct_miqt_string = C.QIODevice_TrUtf82(s_Cstring, c_Cstring)
|
|
|
|
_ret := C.GoStringN(_ms.data, C.int(int64(_ms.len)))
|
|
|
|
C.free(unsafe.Pointer(_ms.data))
|
2024-09-14 22:29:05 +00:00
|
|
|
return _ret
|
2024-08-25 04:08:24 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
func QIODevice_TrUtf83(s string, c string, n int) string {
|
|
|
|
s_Cstring := C.CString(s)
|
|
|
|
defer C.free(unsafe.Pointer(s_Cstring))
|
|
|
|
c_Cstring := C.CString(c)
|
|
|
|
defer C.free(unsafe.Pointer(c_Cstring))
|
2024-10-18 23:53:33 +00:00
|
|
|
var _ms C.struct_miqt_string = C.QIODevice_TrUtf83(s_Cstring, c_Cstring, (C.int)(n))
|
|
|
|
_ret := C.GoStringN(_ms.data, C.int(int64(_ms.len)))
|
|
|
|
C.free(unsafe.Pointer(_ms.data))
|
2024-09-14 22:29:05 +00:00
|
|
|
return _ret
|
2024-08-25 04:08:24 +00:00
|
|
|
}
|
|
|
|
|
2024-10-18 23:53:33 +00:00
|
|
|
func (this *QIODevice) ReadLine1(maxlen int64) []byte {
|
|
|
|
var _bytearray C.struct_miqt_string = C.QIODevice_ReadLine1(this.h, (C.longlong)(maxlen))
|
|
|
|
_ret := C.GoBytes(unsafe.Pointer(_bytearray.data), C.int(int64(_bytearray.len)))
|
|
|
|
C.free(unsafe.Pointer(_bytearray.data))
|
|
|
|
return _ret
|
2024-08-25 04:08:24 +00:00
|
|
|
}
|
|
|
|
|
2024-11-23 06:34:52 +00:00
|
|
|
func (this *QIODevice) callVirtualBase_IsSequential() bool {
|
|
|
|
|
|
|
|
return (bool)(C.QIODevice_virtualbase_IsSequential(unsafe.Pointer(this.h)))
|
|
|
|
|
|
|
|
}
|
|
|
|
func (this *QIODevice) OnIsSequential(slot func(super func() bool) bool) {
|
|
|
|
C.QIODevice_override_virtual_IsSequential(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot)))
|
|
|
|
}
|
|
|
|
|
|
|
|
//export miqt_exec_callback_QIODevice_IsSequential
|
|
|
|
func miqt_exec_callback_QIODevice_IsSequential(self *C.QIODevice, cb C.intptr_t) C.bool {
|
|
|
|
gofunc, ok := cgo.Handle(cb).Value().(func(super func() bool) bool)
|
|
|
|
if !ok {
|
|
|
|
panic("miqt: callback of non-callback type (heap corruption?)")
|
|
|
|
}
|
|
|
|
|
|
|
|
virtualReturn := gofunc((&QIODevice{h: self}).callVirtualBase_IsSequential)
|
|
|
|
|
|
|
|
return (C.bool)(virtualReturn)
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
func (this *QIODevice) callVirtualBase_Open(mode QIODevice__OpenModeFlag) bool {
|
|
|
|
|
|
|
|
return (bool)(C.QIODevice_virtualbase_Open(unsafe.Pointer(this.h), (C.int)(mode)))
|
|
|
|
|
|
|
|
}
|
|
|
|
func (this *QIODevice) OnOpen(slot func(super func(mode QIODevice__OpenModeFlag) bool, mode QIODevice__OpenModeFlag) bool) {
|
|
|
|
C.QIODevice_override_virtual_Open(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot)))
|
|
|
|
}
|
|
|
|
|
|
|
|
//export miqt_exec_callback_QIODevice_Open
|
|
|
|
func miqt_exec_callback_QIODevice_Open(self *C.QIODevice, cb C.intptr_t, mode C.int) C.bool {
|
|
|
|
gofunc, ok := cgo.Handle(cb).Value().(func(super func(mode QIODevice__OpenModeFlag) bool, mode QIODevice__OpenModeFlag) bool)
|
|
|
|
if !ok {
|
|
|
|
panic("miqt: callback of non-callback type (heap corruption?)")
|
|
|
|
}
|
|
|
|
|
|
|
|
// Convert all CABI parameters to Go parameters
|
|
|
|
slotval1 := (QIODevice__OpenModeFlag)(mode)
|
|
|
|
|
|
|
|
virtualReturn := gofunc((&QIODevice{h: self}).callVirtualBase_Open, slotval1)
|
|
|
|
|
|
|
|
return (C.bool)(virtualReturn)
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
func (this *QIODevice) callVirtualBase_Close() {
|
|
|
|
|
|
|
|
C.QIODevice_virtualbase_Close(unsafe.Pointer(this.h))
|
|
|
|
|
|
|
|
}
|
|
|
|
func (this *QIODevice) OnClose(slot func(super func())) {
|
|
|
|
C.QIODevice_override_virtual_Close(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot)))
|
|
|
|
}
|
|
|
|
|
|
|
|
//export miqt_exec_callback_QIODevice_Close
|
|
|
|
func miqt_exec_callback_QIODevice_Close(self *C.QIODevice, cb C.intptr_t) {
|
|
|
|
gofunc, ok := cgo.Handle(cb).Value().(func(super func()))
|
|
|
|
if !ok {
|
|
|
|
panic("miqt: callback of non-callback type (heap corruption?)")
|
|
|
|
}
|
|
|
|
|
|
|
|
gofunc((&QIODevice{h: self}).callVirtualBase_Close)
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
func (this *QIODevice) callVirtualBase_Pos() int64 {
|
|
|
|
|
|
|
|
return (int64)(C.QIODevice_virtualbase_Pos(unsafe.Pointer(this.h)))
|
|
|
|
|
|
|
|
}
|
|
|
|
func (this *QIODevice) OnPos(slot func(super func() int64) int64) {
|
|
|
|
C.QIODevice_override_virtual_Pos(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot)))
|
|
|
|
}
|
|
|
|
|
|
|
|
//export miqt_exec_callback_QIODevice_Pos
|
|
|
|
func miqt_exec_callback_QIODevice_Pos(self *C.QIODevice, cb C.intptr_t) C.longlong {
|
|
|
|
gofunc, ok := cgo.Handle(cb).Value().(func(super func() int64) int64)
|
|
|
|
if !ok {
|
|
|
|
panic("miqt: callback of non-callback type (heap corruption?)")
|
|
|
|
}
|
|
|
|
|
|
|
|
virtualReturn := gofunc((&QIODevice{h: self}).callVirtualBase_Pos)
|
|
|
|
|
|
|
|
return (C.longlong)(virtualReturn)
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
func (this *QIODevice) callVirtualBase_Size() int64 {
|
|
|
|
|
|
|
|
return (int64)(C.QIODevice_virtualbase_Size(unsafe.Pointer(this.h)))
|
|
|
|
|
|
|
|
}
|
|
|
|
func (this *QIODevice) OnSize(slot func(super func() int64) int64) {
|
|
|
|
C.QIODevice_override_virtual_Size(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot)))
|
|
|
|
}
|
|
|
|
|
|
|
|
//export miqt_exec_callback_QIODevice_Size
|
|
|
|
func miqt_exec_callback_QIODevice_Size(self *C.QIODevice, cb C.intptr_t) C.longlong {
|
|
|
|
gofunc, ok := cgo.Handle(cb).Value().(func(super func() int64) int64)
|
|
|
|
if !ok {
|
|
|
|
panic("miqt: callback of non-callback type (heap corruption?)")
|
|
|
|
}
|
|
|
|
|
|
|
|
virtualReturn := gofunc((&QIODevice{h: self}).callVirtualBase_Size)
|
|
|
|
|
|
|
|
return (C.longlong)(virtualReturn)
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
func (this *QIODevice) callVirtualBase_Seek(pos int64) bool {
|
|
|
|
|
|
|
|
return (bool)(C.QIODevice_virtualbase_Seek(unsafe.Pointer(this.h), (C.longlong)(pos)))
|
|
|
|
|
|
|
|
}
|
|
|
|
func (this *QIODevice) OnSeek(slot func(super func(pos int64) bool, pos int64) bool) {
|
|
|
|
C.QIODevice_override_virtual_Seek(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot)))
|
|
|
|
}
|
|
|
|
|
|
|
|
//export miqt_exec_callback_QIODevice_Seek
|
|
|
|
func miqt_exec_callback_QIODevice_Seek(self *C.QIODevice, cb C.intptr_t, pos C.longlong) C.bool {
|
|
|
|
gofunc, ok := cgo.Handle(cb).Value().(func(super func(pos int64) bool, pos int64) bool)
|
|
|
|
if !ok {
|
|
|
|
panic("miqt: callback of non-callback type (heap corruption?)")
|
|
|
|
}
|
|
|
|
|
|
|
|
// Convert all CABI parameters to Go parameters
|
|
|
|
slotval1 := (int64)(pos)
|
|
|
|
|
|
|
|
virtualReturn := gofunc((&QIODevice{h: self}).callVirtualBase_Seek, slotval1)
|
|
|
|
|
|
|
|
return (C.bool)(virtualReturn)
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
func (this *QIODevice) callVirtualBase_AtEnd() bool {
|
|
|
|
|
|
|
|
return (bool)(C.QIODevice_virtualbase_AtEnd(unsafe.Pointer(this.h)))
|
|
|
|
|
|
|
|
}
|
|
|
|
func (this *QIODevice) OnAtEnd(slot func(super func() bool) bool) {
|
|
|
|
C.QIODevice_override_virtual_AtEnd(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot)))
|
|
|
|
}
|
|
|
|
|
|
|
|
//export miqt_exec_callback_QIODevice_AtEnd
|
|
|
|
func miqt_exec_callback_QIODevice_AtEnd(self *C.QIODevice, cb C.intptr_t) C.bool {
|
|
|
|
gofunc, ok := cgo.Handle(cb).Value().(func(super func() bool) bool)
|
|
|
|
if !ok {
|
|
|
|
panic("miqt: callback of non-callback type (heap corruption?)")
|
|
|
|
}
|
|
|
|
|
|
|
|
virtualReturn := gofunc((&QIODevice{h: self}).callVirtualBase_AtEnd)
|
|
|
|
|
|
|
|
return (C.bool)(virtualReturn)
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
func (this *QIODevice) callVirtualBase_Reset() bool {
|
|
|
|
|
|
|
|
return (bool)(C.QIODevice_virtualbase_Reset(unsafe.Pointer(this.h)))
|
|
|
|
|
|
|
|
}
|
|
|
|
func (this *QIODevice) OnReset(slot func(super func() bool) bool) {
|
|
|
|
C.QIODevice_override_virtual_Reset(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot)))
|
|
|
|
}
|
|
|
|
|
|
|
|
//export miqt_exec_callback_QIODevice_Reset
|
|
|
|
func miqt_exec_callback_QIODevice_Reset(self *C.QIODevice, cb C.intptr_t) C.bool {
|
|
|
|
gofunc, ok := cgo.Handle(cb).Value().(func(super func() bool) bool)
|
|
|
|
if !ok {
|
|
|
|
panic("miqt: callback of non-callback type (heap corruption?)")
|
|
|
|
}
|
|
|
|
|
|
|
|
virtualReturn := gofunc((&QIODevice{h: self}).callVirtualBase_Reset)
|
|
|
|
|
|
|
|
return (C.bool)(virtualReturn)
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
func (this *QIODevice) callVirtualBase_BytesAvailable() int64 {
|
|
|
|
|
|
|
|
return (int64)(C.QIODevice_virtualbase_BytesAvailable(unsafe.Pointer(this.h)))
|
|
|
|
|
|
|
|
}
|
|
|
|
func (this *QIODevice) OnBytesAvailable(slot func(super func() int64) int64) {
|
|
|
|
C.QIODevice_override_virtual_BytesAvailable(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot)))
|
|
|
|
}
|
|
|
|
|
|
|
|
//export miqt_exec_callback_QIODevice_BytesAvailable
|
|
|
|
func miqt_exec_callback_QIODevice_BytesAvailable(self *C.QIODevice, cb C.intptr_t) C.longlong {
|
|
|
|
gofunc, ok := cgo.Handle(cb).Value().(func(super func() int64) int64)
|
|
|
|
if !ok {
|
|
|
|
panic("miqt: callback of non-callback type (heap corruption?)")
|
|
|
|
}
|
|
|
|
|
|
|
|
virtualReturn := gofunc((&QIODevice{h: self}).callVirtualBase_BytesAvailable)
|
|
|
|
|
|
|
|
return (C.longlong)(virtualReturn)
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
func (this *QIODevice) callVirtualBase_BytesToWrite() int64 {
|
|
|
|
|
|
|
|
return (int64)(C.QIODevice_virtualbase_BytesToWrite(unsafe.Pointer(this.h)))
|
|
|
|
|
|
|
|
}
|
|
|
|
func (this *QIODevice) OnBytesToWrite(slot func(super func() int64) int64) {
|
|
|
|
C.QIODevice_override_virtual_BytesToWrite(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot)))
|
|
|
|
}
|
|
|
|
|
|
|
|
//export miqt_exec_callback_QIODevice_BytesToWrite
|
|
|
|
func miqt_exec_callback_QIODevice_BytesToWrite(self *C.QIODevice, cb C.intptr_t) C.longlong {
|
|
|
|
gofunc, ok := cgo.Handle(cb).Value().(func(super func() int64) int64)
|
|
|
|
if !ok {
|
|
|
|
panic("miqt: callback of non-callback type (heap corruption?)")
|
|
|
|
}
|
|
|
|
|
|
|
|
virtualReturn := gofunc((&QIODevice{h: self}).callVirtualBase_BytesToWrite)
|
|
|
|
|
|
|
|
return (C.longlong)(virtualReturn)
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
func (this *QIODevice) callVirtualBase_CanReadLine() bool {
|
|
|
|
|
|
|
|
return (bool)(C.QIODevice_virtualbase_CanReadLine(unsafe.Pointer(this.h)))
|
|
|
|
|
|
|
|
}
|
|
|
|
func (this *QIODevice) OnCanReadLine(slot func(super func() bool) bool) {
|
|
|
|
C.QIODevice_override_virtual_CanReadLine(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot)))
|
|
|
|
}
|
|
|
|
|
|
|
|
//export miqt_exec_callback_QIODevice_CanReadLine
|
|
|
|
func miqt_exec_callback_QIODevice_CanReadLine(self *C.QIODevice, cb C.intptr_t) C.bool {
|
|
|
|
gofunc, ok := cgo.Handle(cb).Value().(func(super func() bool) bool)
|
|
|
|
if !ok {
|
|
|
|
panic("miqt: callback of non-callback type (heap corruption?)")
|
|
|
|
}
|
|
|
|
|
|
|
|
virtualReturn := gofunc((&QIODevice{h: self}).callVirtualBase_CanReadLine)
|
|
|
|
|
|
|
|
return (C.bool)(virtualReturn)
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
func (this *QIODevice) callVirtualBase_WaitForReadyRead(msecs int) bool {
|
|
|
|
|
|
|
|
return (bool)(C.QIODevice_virtualbase_WaitForReadyRead(unsafe.Pointer(this.h), (C.int)(msecs)))
|
|
|
|
|
|
|
|
}
|
|
|
|
func (this *QIODevice) OnWaitForReadyRead(slot func(super func(msecs int) bool, msecs int) bool) {
|
|
|
|
C.QIODevice_override_virtual_WaitForReadyRead(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot)))
|
|
|
|
}
|
|
|
|
|
|
|
|
//export miqt_exec_callback_QIODevice_WaitForReadyRead
|
|
|
|
func miqt_exec_callback_QIODevice_WaitForReadyRead(self *C.QIODevice, cb C.intptr_t, msecs C.int) C.bool {
|
|
|
|
gofunc, ok := cgo.Handle(cb).Value().(func(super func(msecs int) bool, msecs int) bool)
|
|
|
|
if !ok {
|
|
|
|
panic("miqt: callback of non-callback type (heap corruption?)")
|
|
|
|
}
|
|
|
|
|
|
|
|
// Convert all CABI parameters to Go parameters
|
|
|
|
slotval1 := (int)(msecs)
|
|
|
|
|
|
|
|
virtualReturn := gofunc((&QIODevice{h: self}).callVirtualBase_WaitForReadyRead, slotval1)
|
|
|
|
|
|
|
|
return (C.bool)(virtualReturn)
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
func (this *QIODevice) callVirtualBase_WaitForBytesWritten(msecs int) bool {
|
|
|
|
|
|
|
|
return (bool)(C.QIODevice_virtualbase_WaitForBytesWritten(unsafe.Pointer(this.h), (C.int)(msecs)))
|
|
|
|
|
|
|
|
}
|
|
|
|
func (this *QIODevice) OnWaitForBytesWritten(slot func(super func(msecs int) bool, msecs int) bool) {
|
|
|
|
C.QIODevice_override_virtual_WaitForBytesWritten(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot)))
|
|
|
|
}
|
|
|
|
|
|
|
|
//export miqt_exec_callback_QIODevice_WaitForBytesWritten
|
|
|
|
func miqt_exec_callback_QIODevice_WaitForBytesWritten(self *C.QIODevice, cb C.intptr_t, msecs C.int) C.bool {
|
|
|
|
gofunc, ok := cgo.Handle(cb).Value().(func(super func(msecs int) bool, msecs int) bool)
|
|
|
|
if !ok {
|
|
|
|
panic("miqt: callback of non-callback type (heap corruption?)")
|
|
|
|
}
|
|
|
|
|
|
|
|
// Convert all CABI parameters to Go parameters
|
|
|
|
slotval1 := (int)(msecs)
|
|
|
|
|
|
|
|
virtualReturn := gofunc((&QIODevice{h: self}).callVirtualBase_WaitForBytesWritten, slotval1)
|
|
|
|
|
|
|
|
return (C.bool)(virtualReturn)
|
|
|
|
|
|
|
|
}
|
|
|
|
func (this *QIODevice) OnReadData(slot func(data string, maxlen int64) int64) {
|
|
|
|
C.QIODevice_override_virtual_ReadData(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot)))
|
|
|
|
}
|
|
|
|
|
|
|
|
//export miqt_exec_callback_QIODevice_ReadData
|
|
|
|
func miqt_exec_callback_QIODevice_ReadData(self *C.QIODevice, cb C.intptr_t, data *C.char, maxlen C.longlong) C.longlong {
|
|
|
|
gofunc, ok := cgo.Handle(cb).Value().(func(data string, maxlen int64) int64)
|
|
|
|
if !ok {
|
|
|
|
panic("miqt: callback of non-callback type (heap corruption?)")
|
|
|
|
}
|
|
|
|
|
|
|
|
// Convert all CABI parameters to Go parameters
|
|
|
|
data_ret := data
|
|
|
|
slotval1 := C.GoString(data_ret)
|
|
|
|
|
|
|
|
slotval2 := (int64)(maxlen)
|
|
|
|
|
|
|
|
virtualReturn := gofunc(slotval1, slotval2)
|
|
|
|
|
|
|
|
return (C.longlong)(virtualReturn)
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
func (this *QIODevice) callVirtualBase_ReadLineData(data string, maxlen int64) int64 {
|
|
|
|
data_Cstring := C.CString(data)
|
|
|
|
defer C.free(unsafe.Pointer(data_Cstring))
|
|
|
|
|
|
|
|
return (int64)(C.QIODevice_virtualbase_ReadLineData(unsafe.Pointer(this.h), data_Cstring, (C.longlong)(maxlen)))
|
|
|
|
|
|
|
|
}
|
|
|
|
func (this *QIODevice) OnReadLineData(slot func(super func(data string, maxlen int64) int64, data string, maxlen int64) int64) {
|
|
|
|
C.QIODevice_override_virtual_ReadLineData(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot)))
|
|
|
|
}
|
|
|
|
|
|
|
|
//export miqt_exec_callback_QIODevice_ReadLineData
|
|
|
|
func miqt_exec_callback_QIODevice_ReadLineData(self *C.QIODevice, cb C.intptr_t, data *C.char, maxlen C.longlong) C.longlong {
|
|
|
|
gofunc, ok := cgo.Handle(cb).Value().(func(super func(data string, maxlen int64) int64, data string, maxlen int64) int64)
|
|
|
|
if !ok {
|
|
|
|
panic("miqt: callback of non-callback type (heap corruption?)")
|
|
|
|
}
|
|
|
|
|
|
|
|
// Convert all CABI parameters to Go parameters
|
|
|
|
data_ret := data
|
|
|
|
slotval1 := C.GoString(data_ret)
|
|
|
|
|
|
|
|
slotval2 := (int64)(maxlen)
|
|
|
|
|
|
|
|
virtualReturn := gofunc((&QIODevice{h: self}).callVirtualBase_ReadLineData, slotval1, slotval2)
|
|
|
|
|
|
|
|
return (C.longlong)(virtualReturn)
|
|
|
|
|
|
|
|
}
|
|
|
|
func (this *QIODevice) OnWriteData(slot func(data string, lenVal int64) int64) {
|
|
|
|
C.QIODevice_override_virtual_WriteData(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot)))
|
|
|
|
}
|
|
|
|
|
|
|
|
//export miqt_exec_callback_QIODevice_WriteData
|
|
|
|
func miqt_exec_callback_QIODevice_WriteData(self *C.QIODevice, cb C.intptr_t, data *C.const_char, lenVal C.longlong) C.longlong {
|
|
|
|
gofunc, ok := cgo.Handle(cb).Value().(func(data string, lenVal int64) int64)
|
|
|
|
if !ok {
|
|
|
|
panic("miqt: callback of non-callback type (heap corruption?)")
|
|
|
|
}
|
|
|
|
|
|
|
|
// Convert all CABI parameters to Go parameters
|
|
|
|
data_ret := data
|
|
|
|
slotval1 := C.GoString(data_ret)
|
|
|
|
|
|
|
|
slotval2 := (int64)(lenVal)
|
|
|
|
|
|
|
|
virtualReturn := gofunc(slotval1, slotval2)
|
|
|
|
|
|
|
|
return (C.longlong)(virtualReturn)
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
func (this *QIODevice) callVirtualBase_Event(event *QEvent) bool {
|
|
|
|
|
|
|
|
return (bool)(C.QIODevice_virtualbase_Event(unsafe.Pointer(this.h), event.cPointer()))
|
|
|
|
|
|
|
|
}
|
|
|
|
func (this *QIODevice) OnEvent(slot func(super func(event *QEvent) bool, event *QEvent) bool) {
|
|
|
|
C.QIODevice_override_virtual_Event(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot)))
|
|
|
|
}
|
|
|
|
|
|
|
|
//export miqt_exec_callback_QIODevice_Event
|
|
|
|
func miqt_exec_callback_QIODevice_Event(self *C.QIODevice, cb C.intptr_t, event *C.QEvent) C.bool {
|
|
|
|
gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *QEvent) bool, event *QEvent) bool)
|
|
|
|
if !ok {
|
|
|
|
panic("miqt: callback of non-callback type (heap corruption?)")
|
|
|
|
}
|
|
|
|
|
|
|
|
// Convert all CABI parameters to Go parameters
|
|
|
|
slotval1 := UnsafeNewQEvent(unsafe.Pointer(event))
|
|
|
|
|
|
|
|
virtualReturn := gofunc((&QIODevice{h: self}).callVirtualBase_Event, slotval1)
|
|
|
|
|
|
|
|
return (C.bool)(virtualReturn)
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
func (this *QIODevice) callVirtualBase_EventFilter(watched *QObject, event *QEvent) bool {
|
|
|
|
|
|
|
|
return (bool)(C.QIODevice_virtualbase_EventFilter(unsafe.Pointer(this.h), watched.cPointer(), event.cPointer()))
|
|
|
|
|
|
|
|
}
|
|
|
|
func (this *QIODevice) OnEventFilter(slot func(super func(watched *QObject, event *QEvent) bool, watched *QObject, event *QEvent) bool) {
|
|
|
|
C.QIODevice_override_virtual_EventFilter(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot)))
|
|
|
|
}
|
|
|
|
|
|
|
|
//export miqt_exec_callback_QIODevice_EventFilter
|
|
|
|
func miqt_exec_callback_QIODevice_EventFilter(self *C.QIODevice, cb C.intptr_t, watched *C.QObject, event *C.QEvent) C.bool {
|
|
|
|
gofunc, ok := cgo.Handle(cb).Value().(func(super func(watched *QObject, event *QEvent) bool, watched *QObject, event *QEvent) bool)
|
|
|
|
if !ok {
|
|
|
|
panic("miqt: callback of non-callback type (heap corruption?)")
|
|
|
|
}
|
|
|
|
|
|
|
|
// Convert all CABI parameters to Go parameters
|
|
|
|
slotval1 := UnsafeNewQObject(unsafe.Pointer(watched))
|
|
|
|
slotval2 := UnsafeNewQEvent(unsafe.Pointer(event))
|
|
|
|
|
|
|
|
virtualReturn := gofunc((&QIODevice{h: self}).callVirtualBase_EventFilter, slotval1, slotval2)
|
|
|
|
|
|
|
|
return (C.bool)(virtualReturn)
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
func (this *QIODevice) callVirtualBase_TimerEvent(event *QTimerEvent) {
|
|
|
|
|
|
|
|
C.QIODevice_virtualbase_TimerEvent(unsafe.Pointer(this.h), event.cPointer())
|
|
|
|
|
|
|
|
}
|
|
|
|
func (this *QIODevice) OnTimerEvent(slot func(super func(event *QTimerEvent), event *QTimerEvent)) {
|
|
|
|
C.QIODevice_override_virtual_TimerEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot)))
|
|
|
|
}
|
|
|
|
|
|
|
|
//export miqt_exec_callback_QIODevice_TimerEvent
|
|
|
|
func miqt_exec_callback_QIODevice_TimerEvent(self *C.QIODevice, cb C.intptr_t, event *C.QTimerEvent) {
|
|
|
|
gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *QTimerEvent), event *QTimerEvent))
|
|
|
|
if !ok {
|
|
|
|
panic("miqt: callback of non-callback type (heap corruption?)")
|
|
|
|
}
|
|
|
|
|
|
|
|
// Convert all CABI parameters to Go parameters
|
|
|
|
slotval1 := UnsafeNewQTimerEvent(unsafe.Pointer(event), nil)
|
|
|
|
|
|
|
|
gofunc((&QIODevice{h: self}).callVirtualBase_TimerEvent, slotval1)
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
func (this *QIODevice) callVirtualBase_ChildEvent(event *QChildEvent) {
|
|
|
|
|
|
|
|
C.QIODevice_virtualbase_ChildEvent(unsafe.Pointer(this.h), event.cPointer())
|
|
|
|
|
|
|
|
}
|
|
|
|
func (this *QIODevice) OnChildEvent(slot func(super func(event *QChildEvent), event *QChildEvent)) {
|
|
|
|
C.QIODevice_override_virtual_ChildEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot)))
|
|
|
|
}
|
|
|
|
|
|
|
|
//export miqt_exec_callback_QIODevice_ChildEvent
|
|
|
|
func miqt_exec_callback_QIODevice_ChildEvent(self *C.QIODevice, cb C.intptr_t, event *C.QChildEvent) {
|
|
|
|
gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *QChildEvent), event *QChildEvent))
|
|
|
|
if !ok {
|
|
|
|
panic("miqt: callback of non-callback type (heap corruption?)")
|
|
|
|
}
|
|
|
|
|
|
|
|
// Convert all CABI parameters to Go parameters
|
|
|
|
slotval1 := UnsafeNewQChildEvent(unsafe.Pointer(event), nil)
|
|
|
|
|
|
|
|
gofunc((&QIODevice{h: self}).callVirtualBase_ChildEvent, slotval1)
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
func (this *QIODevice) callVirtualBase_CustomEvent(event *QEvent) {
|
|
|
|
|
|
|
|
C.QIODevice_virtualbase_CustomEvent(unsafe.Pointer(this.h), event.cPointer())
|
|
|
|
|
|
|
|
}
|
|
|
|
func (this *QIODevice) OnCustomEvent(slot func(super func(event *QEvent), event *QEvent)) {
|
|
|
|
C.QIODevice_override_virtual_CustomEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot)))
|
|
|
|
}
|
|
|
|
|
|
|
|
//export miqt_exec_callback_QIODevice_CustomEvent
|
|
|
|
func miqt_exec_callback_QIODevice_CustomEvent(self *C.QIODevice, cb C.intptr_t, event *C.QEvent) {
|
|
|
|
gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *QEvent), event *QEvent))
|
|
|
|
if !ok {
|
|
|
|
panic("miqt: callback of non-callback type (heap corruption?)")
|
|
|
|
}
|
|
|
|
|
|
|
|
// Convert all CABI parameters to Go parameters
|
|
|
|
slotval1 := UnsafeNewQEvent(unsafe.Pointer(event))
|
|
|
|
|
|
|
|
gofunc((&QIODevice{h: self}).callVirtualBase_CustomEvent, slotval1)
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
func (this *QIODevice) callVirtualBase_ConnectNotify(signal *QMetaMethod) {
|
|
|
|
|
|
|
|
C.QIODevice_virtualbase_ConnectNotify(unsafe.Pointer(this.h), signal.cPointer())
|
|
|
|
|
|
|
|
}
|
|
|
|
func (this *QIODevice) OnConnectNotify(slot func(super func(signal *QMetaMethod), signal *QMetaMethod)) {
|
|
|
|
C.QIODevice_override_virtual_ConnectNotify(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot)))
|
|
|
|
}
|
|
|
|
|
|
|
|
//export miqt_exec_callback_QIODevice_ConnectNotify
|
|
|
|
func miqt_exec_callback_QIODevice_ConnectNotify(self *C.QIODevice, cb C.intptr_t, signal *C.QMetaMethod) {
|
|
|
|
gofunc, ok := cgo.Handle(cb).Value().(func(super func(signal *QMetaMethod), signal *QMetaMethod))
|
|
|
|
if !ok {
|
|
|
|
panic("miqt: callback of non-callback type (heap corruption?)")
|
|
|
|
}
|
|
|
|
|
|
|
|
// Convert all CABI parameters to Go parameters
|
|
|
|
slotval1 := UnsafeNewQMetaMethod(unsafe.Pointer(signal))
|
|
|
|
|
|
|
|
gofunc((&QIODevice{h: self}).callVirtualBase_ConnectNotify, slotval1)
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
func (this *QIODevice) callVirtualBase_DisconnectNotify(signal *QMetaMethod) {
|
|
|
|
|
|
|
|
C.QIODevice_virtualbase_DisconnectNotify(unsafe.Pointer(this.h), signal.cPointer())
|
|
|
|
|
|
|
|
}
|
|
|
|
func (this *QIODevice) OnDisconnectNotify(slot func(super func(signal *QMetaMethod), signal *QMetaMethod)) {
|
|
|
|
C.QIODevice_override_virtual_DisconnectNotify(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot)))
|
|
|
|
}
|
|
|
|
|
|
|
|
//export miqt_exec_callback_QIODevice_DisconnectNotify
|
|
|
|
func miqt_exec_callback_QIODevice_DisconnectNotify(self *C.QIODevice, cb C.intptr_t, signal *C.QMetaMethod) {
|
|
|
|
gofunc, ok := cgo.Handle(cb).Value().(func(super func(signal *QMetaMethod), signal *QMetaMethod))
|
|
|
|
if !ok {
|
|
|
|
panic("miqt: callback of non-callback type (heap corruption?)")
|
|
|
|
}
|
|
|
|
|
|
|
|
// Convert all CABI parameters to Go parameters
|
|
|
|
slotval1 := UnsafeNewQMetaMethod(unsafe.Pointer(signal))
|
|
|
|
|
|
|
|
gofunc((&QIODevice{h: self}).callVirtualBase_DisconnectNotify, slotval1)
|
|
|
|
|
|
|
|
}
|
|
|
|
|
2024-09-14 22:29:05 +00:00
|
|
|
// Delete this object from C++ memory.
|
2024-08-25 04:08:24 +00:00
|
|
|
func (this *QIODevice) Delete() {
|
2024-11-19 06:29:06 +00:00
|
|
|
C.QIODevice_Delete(this.h, C.bool(this.isSubclass))
|
2024-08-25 04:08:24 +00:00
|
|
|
}
|
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 *QIODevice) GoGC() {
|
|
|
|
runtime.SetFinalizer(this, func(this *QIODevice) {
|
|
|
|
this.Delete()
|
|
|
|
runtime.KeepAlive(this.h)
|
|
|
|
})
|
|
|
|
}
|