2024-11-04 22:53:04 +13:00
|
|
|
package network
|
|
|
|
|
|
|
|
/*
|
|
|
|
|
|
|
|
#include "gen_qlocalserver.h"
|
|
|
|
#include <stdlib.h>
|
|
|
|
|
|
|
|
*/
|
|
|
|
import "C"
|
|
|
|
|
|
|
|
import (
|
|
|
|
"github.com/mappu/miqt/qt"
|
|
|
|
"runtime"
|
|
|
|
"runtime/cgo"
|
|
|
|
"unsafe"
|
|
|
|
)
|
|
|
|
|
|
|
|
type QLocalServer__SocketOption int
|
|
|
|
|
|
|
|
const (
|
|
|
|
QLocalServer__NoOptions QLocalServer__SocketOption = 0
|
|
|
|
QLocalServer__UserAccessOption QLocalServer__SocketOption = 1
|
|
|
|
QLocalServer__GroupAccessOption QLocalServer__SocketOption = 2
|
|
|
|
QLocalServer__OtherAccessOption QLocalServer__SocketOption = 4
|
|
|
|
QLocalServer__WorldAccessOption QLocalServer__SocketOption = 7
|
|
|
|
)
|
|
|
|
|
|
|
|
type QLocalServer struct {
|
2025-01-18 17:57:48 +13:00
|
|
|
h *C.QLocalServer
|
2024-11-04 22:53:04 +13:00
|
|
|
*qt.QObject
|
|
|
|
}
|
|
|
|
|
|
|
|
func (this *QLocalServer) cPointer() *C.QLocalServer {
|
|
|
|
if this == nil {
|
|
|
|
return nil
|
|
|
|
}
|
|
|
|
return this.h
|
|
|
|
}
|
|
|
|
|
|
|
|
func (this *QLocalServer) UnsafePointer() unsafe.Pointer {
|
|
|
|
if this == nil {
|
|
|
|
return nil
|
|
|
|
}
|
|
|
|
return unsafe.Pointer(this.h)
|
|
|
|
}
|
|
|
|
|
2024-11-19 19:29:06 +13:00
|
|
|
// newQLocalServer constructs the type using only CGO pointers.
|
2024-12-07 17:15:57 +13:00
|
|
|
func newQLocalServer(h *C.QLocalServer) *QLocalServer {
|
2024-11-04 22:53:04 +13:00
|
|
|
if h == nil {
|
|
|
|
return nil
|
|
|
|
}
|
2024-12-07 17:15:57 +13:00
|
|
|
var outptr_QObject *C.QObject = nil
|
|
|
|
C.QLocalServer_virtbase(h, &outptr_QObject)
|
|
|
|
|
2024-11-19 19:29:06 +13:00
|
|
|
return &QLocalServer{h: h,
|
2024-12-07 17:15:57 +13:00
|
|
|
QObject: qt.UnsafeNewQObject(unsafe.Pointer(outptr_QObject))}
|
2024-11-04 22:53:04 +13:00
|
|
|
}
|
|
|
|
|
2024-11-19 19:29:06 +13:00
|
|
|
// UnsafeNewQLocalServer constructs the type using only unsafe pointers.
|
2024-12-07 17:15:57 +13:00
|
|
|
func UnsafeNewQLocalServer(h unsafe.Pointer) *QLocalServer {
|
|
|
|
return newQLocalServer((*C.QLocalServer)(h))
|
2024-11-04 22:53:04 +13:00
|
|
|
}
|
|
|
|
|
|
|
|
// NewQLocalServer constructs a new QLocalServer object.
|
|
|
|
func NewQLocalServer() *QLocalServer {
|
2024-11-19 19:29:06 +13:00
|
|
|
|
2025-01-18 17:57:48 +13:00
|
|
|
return newQLocalServer(C.QLocalServer_new())
|
2024-11-04 22:53:04 +13:00
|
|
|
}
|
|
|
|
|
|
|
|
// NewQLocalServer2 constructs a new QLocalServer object.
|
|
|
|
func NewQLocalServer2(parent *qt.QObject) *QLocalServer {
|
2024-11-19 19:29:06 +13:00
|
|
|
|
2025-01-18 17:57:48 +13:00
|
|
|
return newQLocalServer(C.QLocalServer_new2((*C.QObject)(parent.UnsafePointer())))
|
2024-11-04 22:53:04 +13:00
|
|
|
}
|
|
|
|
|
|
|
|
func (this *QLocalServer) MetaObject() *qt.QMetaObject {
|
2025-02-01 13:45:16 +13:00
|
|
|
return qt.UnsafeNewQMetaObject(unsafe.Pointer(C.QLocalServer_metaObject(this.h)))
|
2024-11-04 22:53:04 +13:00
|
|
|
}
|
|
|
|
|
|
|
|
func (this *QLocalServer) Metacast(param1 string) unsafe.Pointer {
|
|
|
|
param1_Cstring := C.CString(param1)
|
|
|
|
defer C.free(unsafe.Pointer(param1_Cstring))
|
2025-02-01 13:45:16 +13:00
|
|
|
return (unsafe.Pointer)(C.QLocalServer_metacast(this.h, param1_Cstring))
|
2024-11-04 22:53:04 +13:00
|
|
|
}
|
|
|
|
|
|
|
|
func QLocalServer_Tr(s string) string {
|
|
|
|
s_Cstring := C.CString(s)
|
|
|
|
defer C.free(unsafe.Pointer(s_Cstring))
|
2025-02-01 13:45:16 +13:00
|
|
|
var _ms C.struct_miqt_string = C.QLocalServer_tr(s_Cstring)
|
2024-11-04 22:53:04 +13:00
|
|
|
_ret := C.GoStringN(_ms.data, C.int(int64(_ms.len)))
|
|
|
|
C.free(unsafe.Pointer(_ms.data))
|
|
|
|
return _ret
|
|
|
|
}
|
|
|
|
|
|
|
|
func QLocalServer_TrUtf8(s string) string {
|
|
|
|
s_Cstring := C.CString(s)
|
|
|
|
defer C.free(unsafe.Pointer(s_Cstring))
|
2025-02-01 13:45:16 +13:00
|
|
|
var _ms C.struct_miqt_string = C.QLocalServer_trUtf8(s_Cstring)
|
2024-11-04 22:53:04 +13:00
|
|
|
_ret := C.GoStringN(_ms.data, C.int(int64(_ms.len)))
|
|
|
|
C.free(unsafe.Pointer(_ms.data))
|
|
|
|
return _ret
|
|
|
|
}
|
|
|
|
|
|
|
|
func (this *QLocalServer) NewConnection() {
|
2025-02-01 13:45:16 +13:00
|
|
|
C.QLocalServer_newConnection(this.h)
|
2024-11-04 22:53:04 +13:00
|
|
|
}
|
|
|
|
func (this *QLocalServer) OnNewConnection(slot func()) {
|
2025-02-01 13:45:16 +13:00
|
|
|
C.QLocalServer_connect_newConnection(this.h, C.intptr_t(cgo.NewHandle(slot)))
|
2024-11-04 22:53:04 +13:00
|
|
|
}
|
|
|
|
|
2025-02-01 13:45:16 +13:00
|
|
|
//export miqt_exec_callback_QLocalServer_newConnection
|
|
|
|
func miqt_exec_callback_QLocalServer_newConnection(cb C.intptr_t) {
|
2024-11-04 22:53:04 +13:00
|
|
|
gofunc, ok := cgo.Handle(cb).Value().(func())
|
|
|
|
if !ok {
|
|
|
|
panic("miqt: callback of non-callback type (heap corruption?)")
|
|
|
|
}
|
|
|
|
|
|
|
|
gofunc()
|
|
|
|
}
|
|
|
|
|
|
|
|
func (this *QLocalServer) Close() {
|
2025-02-01 13:45:16 +13:00
|
|
|
C.QLocalServer_close(this.h)
|
2024-11-04 22:53:04 +13:00
|
|
|
}
|
|
|
|
|
|
|
|
func (this *QLocalServer) ErrorString() string {
|
2025-02-01 13:45:16 +13:00
|
|
|
var _ms C.struct_miqt_string = C.QLocalServer_errorString(this.h)
|
2024-11-04 22:53:04 +13:00
|
|
|
_ret := C.GoStringN(_ms.data, C.int(int64(_ms.len)))
|
|
|
|
C.free(unsafe.Pointer(_ms.data))
|
|
|
|
return _ret
|
|
|
|
}
|
|
|
|
|
|
|
|
func (this *QLocalServer) HasPendingConnections() bool {
|
2025-02-01 13:45:16 +13:00
|
|
|
return (bool)(C.QLocalServer_hasPendingConnections(this.h))
|
2024-11-04 22:53:04 +13:00
|
|
|
}
|
|
|
|
|
|
|
|
func (this *QLocalServer) IsListening() bool {
|
2025-02-01 13:45:16 +13:00
|
|
|
return (bool)(C.QLocalServer_isListening(this.h))
|
2024-11-04 22:53:04 +13:00
|
|
|
}
|
|
|
|
|
|
|
|
func (this *QLocalServer) Listen(name string) bool {
|
|
|
|
name_ms := C.struct_miqt_string{}
|
|
|
|
name_ms.data = C.CString(name)
|
|
|
|
name_ms.len = C.size_t(len(name))
|
|
|
|
defer C.free(unsafe.Pointer(name_ms.data))
|
2025-02-01 13:45:16 +13:00
|
|
|
return (bool)(C.QLocalServer_listen(this.h, name_ms))
|
2024-11-04 22:53:04 +13:00
|
|
|
}
|
|
|
|
|
|
|
|
func (this *QLocalServer) ListenWithSocketDescriptor(socketDescriptor uintptr) bool {
|
2025-02-01 13:45:16 +13:00
|
|
|
return (bool)(C.QLocalServer_listenWithSocketDescriptor(this.h, (C.intptr_t)(socketDescriptor)))
|
2024-11-04 22:53:04 +13:00
|
|
|
}
|
|
|
|
|
|
|
|
func (this *QLocalServer) MaxPendingConnections() int {
|
2025-02-01 13:45:16 +13:00
|
|
|
return (int)(C.QLocalServer_maxPendingConnections(this.h))
|
2024-11-04 22:53:04 +13:00
|
|
|
}
|
|
|
|
|
|
|
|
func (this *QLocalServer) NextPendingConnection() *QLocalSocket {
|
2025-02-01 13:45:16 +13:00
|
|
|
return newQLocalSocket(C.QLocalServer_nextPendingConnection(this.h))
|
2024-11-04 22:53:04 +13:00
|
|
|
}
|
|
|
|
|
|
|
|
func (this *QLocalServer) ServerName() string {
|
2025-02-01 13:45:16 +13:00
|
|
|
var _ms C.struct_miqt_string = C.QLocalServer_serverName(this.h)
|
2024-11-04 22:53:04 +13:00
|
|
|
_ret := C.GoStringN(_ms.data, C.int(int64(_ms.len)))
|
|
|
|
C.free(unsafe.Pointer(_ms.data))
|
|
|
|
return _ret
|
|
|
|
}
|
|
|
|
|
|
|
|
func (this *QLocalServer) FullServerName() string {
|
2025-02-01 13:45:16 +13:00
|
|
|
var _ms C.struct_miqt_string = C.QLocalServer_fullServerName(this.h)
|
2024-11-04 22:53:04 +13:00
|
|
|
_ret := C.GoStringN(_ms.data, C.int(int64(_ms.len)))
|
|
|
|
C.free(unsafe.Pointer(_ms.data))
|
|
|
|
return _ret
|
|
|
|
}
|
|
|
|
|
|
|
|
func QLocalServer_RemoveServer(name string) bool {
|
|
|
|
name_ms := C.struct_miqt_string{}
|
|
|
|
name_ms.data = C.CString(name)
|
|
|
|
name_ms.len = C.size_t(len(name))
|
|
|
|
defer C.free(unsafe.Pointer(name_ms.data))
|
2025-02-01 13:45:16 +13:00
|
|
|
return (bool)(C.QLocalServer_removeServer(name_ms))
|
2024-11-04 22:53:04 +13:00
|
|
|
}
|
|
|
|
|
|
|
|
func (this *QLocalServer) ServerError() QAbstractSocket__SocketError {
|
2025-02-01 13:45:16 +13:00
|
|
|
return (QAbstractSocket__SocketError)(C.QLocalServer_serverError(this.h))
|
2024-11-04 22:53:04 +13:00
|
|
|
}
|
|
|
|
|
|
|
|
func (this *QLocalServer) SetMaxPendingConnections(numConnections int) {
|
2025-02-01 13:45:16 +13:00
|
|
|
C.QLocalServer_setMaxPendingConnections(this.h, (C.int)(numConnections))
|
2024-11-04 22:53:04 +13:00
|
|
|
}
|
|
|
|
|
|
|
|
func (this *QLocalServer) WaitForNewConnection() bool {
|
2025-02-01 13:45:16 +13:00
|
|
|
return (bool)(C.QLocalServer_waitForNewConnection(this.h))
|
2024-11-04 22:53:04 +13:00
|
|
|
}
|
|
|
|
|
|
|
|
func (this *QLocalServer) SetSocketOptions(options QLocalServer__SocketOption) {
|
2025-02-01 13:45:16 +13:00
|
|
|
C.QLocalServer_setSocketOptions(this.h, (C.int)(options))
|
2024-11-04 22:53:04 +13:00
|
|
|
}
|
|
|
|
|
|
|
|
func (this *QLocalServer) SocketOptions() QLocalServer__SocketOption {
|
2025-02-01 13:45:16 +13:00
|
|
|
return (QLocalServer__SocketOption)(C.QLocalServer_socketOptions(this.h))
|
2024-11-04 22:53:04 +13:00
|
|
|
}
|
|
|
|
|
|
|
|
func (this *QLocalServer) SocketDescriptor() uintptr {
|
2025-02-01 13:45:16 +13:00
|
|
|
return (uintptr)(C.QLocalServer_socketDescriptor(this.h))
|
2024-11-04 22:53:04 +13:00
|
|
|
}
|
|
|
|
|
|
|
|
func QLocalServer_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))
|
2025-02-01 13:45:16 +13:00
|
|
|
var _ms C.struct_miqt_string = C.QLocalServer_tr2(s_Cstring, c_Cstring)
|
2024-11-04 22:53:04 +13:00
|
|
|
_ret := C.GoStringN(_ms.data, C.int(int64(_ms.len)))
|
|
|
|
C.free(unsafe.Pointer(_ms.data))
|
|
|
|
return _ret
|
|
|
|
}
|
|
|
|
|
|
|
|
func QLocalServer_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))
|
2025-02-01 13:45:16 +13:00
|
|
|
var _ms C.struct_miqt_string = C.QLocalServer_tr3(s_Cstring, c_Cstring, (C.int)(n))
|
2024-11-04 22:53:04 +13:00
|
|
|
_ret := C.GoStringN(_ms.data, C.int(int64(_ms.len)))
|
|
|
|
C.free(unsafe.Pointer(_ms.data))
|
|
|
|
return _ret
|
|
|
|
}
|
|
|
|
|
|
|
|
func QLocalServer_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))
|
2025-02-01 13:45:16 +13:00
|
|
|
var _ms C.struct_miqt_string = C.QLocalServer_trUtf82(s_Cstring, c_Cstring)
|
2024-11-04 22:53:04 +13:00
|
|
|
_ret := C.GoStringN(_ms.data, C.int(int64(_ms.len)))
|
|
|
|
C.free(unsafe.Pointer(_ms.data))
|
|
|
|
return _ret
|
|
|
|
}
|
|
|
|
|
|
|
|
func QLocalServer_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))
|
2025-02-01 13:45:16 +13:00
|
|
|
var _ms C.struct_miqt_string = C.QLocalServer_trUtf83(s_Cstring, c_Cstring, (C.int)(n))
|
2024-11-04 22:53:04 +13:00
|
|
|
_ret := C.GoStringN(_ms.data, C.int(int64(_ms.len)))
|
|
|
|
C.free(unsafe.Pointer(_ms.data))
|
|
|
|
return _ret
|
|
|
|
}
|
|
|
|
|
|
|
|
func (this *QLocalServer) WaitForNewConnection1(msec int) bool {
|
2025-02-01 13:45:16 +13:00
|
|
|
return (bool)(C.QLocalServer_waitForNewConnection1(this.h, (C.int)(msec)))
|
2024-11-04 22:53:04 +13:00
|
|
|
}
|
|
|
|
|
|
|
|
func (this *QLocalServer) WaitForNewConnection2(msec int, timedOut *bool) bool {
|
2025-02-01 13:45:16 +13:00
|
|
|
return (bool)(C.QLocalServer_waitForNewConnection2(this.h, (C.int)(msec), (*C.bool)(unsafe.Pointer(timedOut))))
|
2024-11-04 22:53:04 +13:00
|
|
|
}
|
|
|
|
|
2024-11-19 19:29:06 +13:00
|
|
|
func (this *QLocalServer) callVirtualBase_HasPendingConnections() bool {
|
|
|
|
|
2025-02-01 13:45:16 +13:00
|
|
|
return (bool)(C.QLocalServer_virtualbase_hasPendingConnections(unsafe.Pointer(this.h)))
|
2024-11-19 19:29:06 +13:00
|
|
|
|
|
|
|
}
|
2025-02-01 13:45:16 +13:00
|
|
|
func (this *QLocalServer) OnhasPendingConnections(slot func(super func() bool) bool) {
|
|
|
|
ok := C.QLocalServer_override_virtual_hasPendingConnections(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot)))
|
2025-01-18 17:57:48 +13:00
|
|
|
if !ok {
|
2024-12-07 14:43:28 +13:00
|
|
|
panic("miqt: can only override virtual methods for directly constructed types")
|
|
|
|
}
|
2024-11-19 19:29:06 +13:00
|
|
|
}
|
|
|
|
|
2025-02-01 13:45:16 +13:00
|
|
|
//export miqt_exec_callback_QLocalServer_hasPendingConnections
|
|
|
|
func miqt_exec_callback_QLocalServer_hasPendingConnections(self *C.QLocalServer, cb C.intptr_t) C.bool {
|
2024-11-19 19:29:06 +13:00
|
|
|
gofunc, ok := cgo.Handle(cb).Value().(func(super func() bool) bool)
|
|
|
|
if !ok {
|
|
|
|
panic("miqt: callback of non-callback type (heap corruption?)")
|
|
|
|
}
|
|
|
|
|
|
|
|
virtualReturn := gofunc((&QLocalServer{h: self}).callVirtualBase_HasPendingConnections)
|
|
|
|
|
|
|
|
return (C.bool)(virtualReturn)
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
func (this *QLocalServer) callVirtualBase_NextPendingConnection() *QLocalSocket {
|
|
|
|
|
2025-02-01 13:45:16 +13:00
|
|
|
return newQLocalSocket(C.QLocalServer_virtualbase_nextPendingConnection(unsafe.Pointer(this.h)))
|
2024-12-07 15:02:06 +13:00
|
|
|
|
2024-11-19 19:29:06 +13:00
|
|
|
}
|
2025-02-01 13:45:16 +13:00
|
|
|
func (this *QLocalServer) OnnextPendingConnection(slot func(super func() *QLocalSocket) *QLocalSocket) {
|
|
|
|
ok := C.QLocalServer_override_virtual_nextPendingConnection(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot)))
|
2025-01-18 17:57:48 +13:00
|
|
|
if !ok {
|
2024-12-07 14:43:28 +13:00
|
|
|
panic("miqt: can only override virtual methods for directly constructed types")
|
|
|
|
}
|
2024-11-19 19:29:06 +13:00
|
|
|
}
|
|
|
|
|
2025-02-01 13:45:16 +13:00
|
|
|
//export miqt_exec_callback_QLocalServer_nextPendingConnection
|
|
|
|
func miqt_exec_callback_QLocalServer_nextPendingConnection(self *C.QLocalServer, cb C.intptr_t) *C.QLocalSocket {
|
2024-11-19 19:29:06 +13:00
|
|
|
gofunc, ok := cgo.Handle(cb).Value().(func(super func() *QLocalSocket) *QLocalSocket)
|
|
|
|
if !ok {
|
|
|
|
panic("miqt: callback of non-callback type (heap corruption?)")
|
|
|
|
}
|
|
|
|
|
|
|
|
virtualReturn := gofunc((&QLocalServer{h: self}).callVirtualBase_NextPendingConnection)
|
|
|
|
|
|
|
|
return virtualReturn.cPointer()
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
func (this *QLocalServer) callVirtualBase_IncomingConnection(socketDescriptor uintptr) {
|
|
|
|
|
2025-02-01 13:45:16 +13:00
|
|
|
C.QLocalServer_virtualbase_incomingConnection(unsafe.Pointer(this.h), (C.uintptr_t)(socketDescriptor))
|
2024-11-19 19:29:06 +13:00
|
|
|
|
|
|
|
}
|
2025-02-01 13:45:16 +13:00
|
|
|
func (this *QLocalServer) OnincomingConnection(slot func(super func(socketDescriptor uintptr), socketDescriptor uintptr)) {
|
|
|
|
ok := C.QLocalServer_override_virtual_incomingConnection(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot)))
|
2025-01-18 17:57:48 +13:00
|
|
|
if !ok {
|
2024-12-07 14:43:28 +13:00
|
|
|
panic("miqt: can only override virtual methods for directly constructed types")
|
|
|
|
}
|
2024-11-19 19:29:06 +13:00
|
|
|
}
|
|
|
|
|
2025-02-01 13:45:16 +13:00
|
|
|
//export miqt_exec_callback_QLocalServer_incomingConnection
|
|
|
|
func miqt_exec_callback_QLocalServer_incomingConnection(self *C.QLocalServer, cb C.intptr_t, socketDescriptor C.uintptr_t) {
|
2024-11-19 19:29:06 +13:00
|
|
|
gofunc, ok := cgo.Handle(cb).Value().(func(super func(socketDescriptor uintptr), socketDescriptor uintptr))
|
|
|
|
if !ok {
|
|
|
|
panic("miqt: callback of non-callback type (heap corruption?)")
|
|
|
|
}
|
|
|
|
|
|
|
|
// Convert all CABI parameters to Go parameters
|
|
|
|
slotval1 := (uintptr)(socketDescriptor)
|
|
|
|
|
|
|
|
gofunc((&QLocalServer{h: self}).callVirtualBase_IncomingConnection, slotval1)
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
func (this *QLocalServer) callVirtualBase_Event(event *qt.QEvent) bool {
|
|
|
|
|
2025-02-01 13:45:16 +13:00
|
|
|
return (bool)(C.QLocalServer_virtualbase_event(unsafe.Pointer(this.h), (*C.QEvent)(event.UnsafePointer())))
|
2024-11-19 19:29:06 +13:00
|
|
|
|
|
|
|
}
|
2025-02-01 13:45:16 +13:00
|
|
|
func (this *QLocalServer) Onevent(slot func(super func(event *qt.QEvent) bool, event *qt.QEvent) bool) {
|
|
|
|
ok := C.QLocalServer_override_virtual_event(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot)))
|
2025-01-18 17:57:48 +13:00
|
|
|
if !ok {
|
2024-12-07 14:43:28 +13:00
|
|
|
panic("miqt: can only override virtual methods for directly constructed types")
|
|
|
|
}
|
2024-11-19 19:29:06 +13:00
|
|
|
}
|
|
|
|
|
2025-02-01 13:45:16 +13:00
|
|
|
//export miqt_exec_callback_QLocalServer_event
|
|
|
|
func miqt_exec_callback_QLocalServer_event(self *C.QLocalServer, cb C.intptr_t, event *C.QEvent) C.bool {
|
2024-11-19 19:29:06 +13:00
|
|
|
gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *qt.QEvent) bool, event *qt.QEvent) bool)
|
|
|
|
if !ok {
|
|
|
|
panic("miqt: callback of non-callback type (heap corruption?)")
|
|
|
|
}
|
|
|
|
|
|
|
|
// Convert all CABI parameters to Go parameters
|
|
|
|
slotval1 := qt.UnsafeNewQEvent(unsafe.Pointer(event))
|
|
|
|
|
|
|
|
virtualReturn := gofunc((&QLocalServer{h: self}).callVirtualBase_Event, slotval1)
|
|
|
|
|
|
|
|
return (C.bool)(virtualReturn)
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
func (this *QLocalServer) callVirtualBase_EventFilter(watched *qt.QObject, event *qt.QEvent) bool {
|
|
|
|
|
2025-02-01 13:45:16 +13:00
|
|
|
return (bool)(C.QLocalServer_virtualbase_eventFilter(unsafe.Pointer(this.h), (*C.QObject)(watched.UnsafePointer()), (*C.QEvent)(event.UnsafePointer())))
|
2024-11-19 19:29:06 +13:00
|
|
|
|
|
|
|
}
|
2025-02-01 13:45:16 +13:00
|
|
|
func (this *QLocalServer) OneventFilter(slot func(super func(watched *qt.QObject, event *qt.QEvent) bool, watched *qt.QObject, event *qt.QEvent) bool) {
|
|
|
|
ok := C.QLocalServer_override_virtual_eventFilter(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot)))
|
2025-01-18 17:57:48 +13:00
|
|
|
if !ok {
|
2024-12-07 14:43:28 +13:00
|
|
|
panic("miqt: can only override virtual methods for directly constructed types")
|
|
|
|
}
|
2024-11-19 19:29:06 +13:00
|
|
|
}
|
|
|
|
|
2025-02-01 13:45:16 +13:00
|
|
|
//export miqt_exec_callback_QLocalServer_eventFilter
|
|
|
|
func miqt_exec_callback_QLocalServer_eventFilter(self *C.QLocalServer, cb C.intptr_t, watched *C.QObject, event *C.QEvent) C.bool {
|
2024-11-19 19:29:06 +13:00
|
|
|
gofunc, ok := cgo.Handle(cb).Value().(func(super func(watched *qt.QObject, event *qt.QEvent) bool, watched *qt.QObject, event *qt.QEvent) bool)
|
|
|
|
if !ok {
|
|
|
|
panic("miqt: callback of non-callback type (heap corruption?)")
|
|
|
|
}
|
|
|
|
|
|
|
|
// Convert all CABI parameters to Go parameters
|
|
|
|
slotval1 := qt.UnsafeNewQObject(unsafe.Pointer(watched))
|
2024-12-07 15:02:06 +13:00
|
|
|
|
2024-11-19 19:29:06 +13:00
|
|
|
slotval2 := qt.UnsafeNewQEvent(unsafe.Pointer(event))
|
|
|
|
|
|
|
|
virtualReturn := gofunc((&QLocalServer{h: self}).callVirtualBase_EventFilter, slotval1, slotval2)
|
|
|
|
|
|
|
|
return (C.bool)(virtualReturn)
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
func (this *QLocalServer) callVirtualBase_TimerEvent(event *qt.QTimerEvent) {
|
|
|
|
|
2025-02-01 13:45:16 +13:00
|
|
|
C.QLocalServer_virtualbase_timerEvent(unsafe.Pointer(this.h), (*C.QTimerEvent)(event.UnsafePointer()))
|
2024-11-19 19:29:06 +13:00
|
|
|
|
|
|
|
}
|
2025-02-01 13:45:16 +13:00
|
|
|
func (this *QLocalServer) OntimerEvent(slot func(super func(event *qt.QTimerEvent), event *qt.QTimerEvent)) {
|
|
|
|
ok := C.QLocalServer_override_virtual_timerEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot)))
|
2025-01-18 17:57:48 +13:00
|
|
|
if !ok {
|
2024-12-07 14:43:28 +13:00
|
|
|
panic("miqt: can only override virtual methods for directly constructed types")
|
|
|
|
}
|
2024-11-19 19:29:06 +13:00
|
|
|
}
|
|
|
|
|
2025-02-01 13:45:16 +13:00
|
|
|
//export miqt_exec_callback_QLocalServer_timerEvent
|
|
|
|
func miqt_exec_callback_QLocalServer_timerEvent(self *C.QLocalServer, cb C.intptr_t, event *C.QTimerEvent) {
|
2024-11-19 19:29:06 +13:00
|
|
|
gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *qt.QTimerEvent), event *qt.QTimerEvent))
|
|
|
|
if !ok {
|
|
|
|
panic("miqt: callback of non-callback type (heap corruption?)")
|
|
|
|
}
|
|
|
|
|
|
|
|
// Convert all CABI parameters to Go parameters
|
2024-12-07 17:15:57 +13:00
|
|
|
slotval1 := qt.UnsafeNewQTimerEvent(unsafe.Pointer(event))
|
2024-11-19 19:29:06 +13:00
|
|
|
|
|
|
|
gofunc((&QLocalServer{h: self}).callVirtualBase_TimerEvent, slotval1)
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
func (this *QLocalServer) callVirtualBase_ChildEvent(event *qt.QChildEvent) {
|
|
|
|
|
2025-02-01 13:45:16 +13:00
|
|
|
C.QLocalServer_virtualbase_childEvent(unsafe.Pointer(this.h), (*C.QChildEvent)(event.UnsafePointer()))
|
2024-11-19 19:29:06 +13:00
|
|
|
|
|
|
|
}
|
2025-02-01 13:45:16 +13:00
|
|
|
func (this *QLocalServer) OnchildEvent(slot func(super func(event *qt.QChildEvent), event *qt.QChildEvent)) {
|
|
|
|
ok := C.QLocalServer_override_virtual_childEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot)))
|
2025-01-18 17:57:48 +13:00
|
|
|
if !ok {
|
2024-12-07 14:43:28 +13:00
|
|
|
panic("miqt: can only override virtual methods for directly constructed types")
|
|
|
|
}
|
2024-11-19 19:29:06 +13:00
|
|
|
}
|
|
|
|
|
2025-02-01 13:45:16 +13:00
|
|
|
//export miqt_exec_callback_QLocalServer_childEvent
|
|
|
|
func miqt_exec_callback_QLocalServer_childEvent(self *C.QLocalServer, cb C.intptr_t, event *C.QChildEvent) {
|
2024-11-19 19:29:06 +13:00
|
|
|
gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *qt.QChildEvent), event *qt.QChildEvent))
|
|
|
|
if !ok {
|
|
|
|
panic("miqt: callback of non-callback type (heap corruption?)")
|
|
|
|
}
|
|
|
|
|
|
|
|
// Convert all CABI parameters to Go parameters
|
2024-12-07 17:15:57 +13:00
|
|
|
slotval1 := qt.UnsafeNewQChildEvent(unsafe.Pointer(event))
|
2024-11-19 19:29:06 +13:00
|
|
|
|
|
|
|
gofunc((&QLocalServer{h: self}).callVirtualBase_ChildEvent, slotval1)
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
func (this *QLocalServer) callVirtualBase_CustomEvent(event *qt.QEvent) {
|
|
|
|
|
2025-02-01 13:45:16 +13:00
|
|
|
C.QLocalServer_virtualbase_customEvent(unsafe.Pointer(this.h), (*C.QEvent)(event.UnsafePointer()))
|
2024-11-19 19:29:06 +13:00
|
|
|
|
|
|
|
}
|
2025-02-01 13:45:16 +13:00
|
|
|
func (this *QLocalServer) OncustomEvent(slot func(super func(event *qt.QEvent), event *qt.QEvent)) {
|
|
|
|
ok := C.QLocalServer_override_virtual_customEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot)))
|
2025-01-18 17:57:48 +13:00
|
|
|
if !ok {
|
2024-12-07 14:43:28 +13:00
|
|
|
panic("miqt: can only override virtual methods for directly constructed types")
|
|
|
|
}
|
2024-11-19 19:29:06 +13:00
|
|
|
}
|
|
|
|
|
2025-02-01 13:45:16 +13:00
|
|
|
//export miqt_exec_callback_QLocalServer_customEvent
|
|
|
|
func miqt_exec_callback_QLocalServer_customEvent(self *C.QLocalServer, cb C.intptr_t, event *C.QEvent) {
|
2024-11-19 19:29:06 +13:00
|
|
|
gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *qt.QEvent), event *qt.QEvent))
|
|
|
|
if !ok {
|
|
|
|
panic("miqt: callback of non-callback type (heap corruption?)")
|
|
|
|
}
|
|
|
|
|
|
|
|
// Convert all CABI parameters to Go parameters
|
|
|
|
slotval1 := qt.UnsafeNewQEvent(unsafe.Pointer(event))
|
|
|
|
|
|
|
|
gofunc((&QLocalServer{h: self}).callVirtualBase_CustomEvent, slotval1)
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
func (this *QLocalServer) callVirtualBase_ConnectNotify(signal *qt.QMetaMethod) {
|
|
|
|
|
2025-02-01 13:45:16 +13:00
|
|
|
C.QLocalServer_virtualbase_connectNotify(unsafe.Pointer(this.h), (*C.QMetaMethod)(signal.UnsafePointer()))
|
2024-11-19 19:29:06 +13:00
|
|
|
|
|
|
|
}
|
2025-02-01 13:45:16 +13:00
|
|
|
func (this *QLocalServer) OnconnectNotify(slot func(super func(signal *qt.QMetaMethod), signal *qt.QMetaMethod)) {
|
|
|
|
ok := C.QLocalServer_override_virtual_connectNotify(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot)))
|
2025-01-18 17:57:48 +13:00
|
|
|
if !ok {
|
2024-12-07 14:43:28 +13:00
|
|
|
panic("miqt: can only override virtual methods for directly constructed types")
|
|
|
|
}
|
2024-11-19 19:29:06 +13:00
|
|
|
}
|
|
|
|
|
2025-02-01 13:45:16 +13:00
|
|
|
//export miqt_exec_callback_QLocalServer_connectNotify
|
|
|
|
func miqt_exec_callback_QLocalServer_connectNotify(self *C.QLocalServer, cb C.intptr_t, signal *C.QMetaMethod) {
|
2024-11-19 19:29:06 +13:00
|
|
|
gofunc, ok := cgo.Handle(cb).Value().(func(super func(signal *qt.QMetaMethod), signal *qt.QMetaMethod))
|
|
|
|
if !ok {
|
|
|
|
panic("miqt: callback of non-callback type (heap corruption?)")
|
|
|
|
}
|
|
|
|
|
|
|
|
// Convert all CABI parameters to Go parameters
|
|
|
|
slotval1 := qt.UnsafeNewQMetaMethod(unsafe.Pointer(signal))
|
|
|
|
|
|
|
|
gofunc((&QLocalServer{h: self}).callVirtualBase_ConnectNotify, slotval1)
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
func (this *QLocalServer) callVirtualBase_DisconnectNotify(signal *qt.QMetaMethod) {
|
|
|
|
|
2025-02-01 13:45:16 +13:00
|
|
|
C.QLocalServer_virtualbase_disconnectNotify(unsafe.Pointer(this.h), (*C.QMetaMethod)(signal.UnsafePointer()))
|
2024-11-19 19:29:06 +13:00
|
|
|
|
|
|
|
}
|
2025-02-01 13:45:16 +13:00
|
|
|
func (this *QLocalServer) OndisconnectNotify(slot func(super func(signal *qt.QMetaMethod), signal *qt.QMetaMethod)) {
|
|
|
|
ok := C.QLocalServer_override_virtual_disconnectNotify(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot)))
|
2025-01-18 17:57:48 +13:00
|
|
|
if !ok {
|
2024-12-07 14:43:28 +13:00
|
|
|
panic("miqt: can only override virtual methods for directly constructed types")
|
|
|
|
}
|
2024-11-19 19:29:06 +13:00
|
|
|
}
|
|
|
|
|
2025-02-01 13:45:16 +13:00
|
|
|
//export miqt_exec_callback_QLocalServer_disconnectNotify
|
|
|
|
func miqt_exec_callback_QLocalServer_disconnectNotify(self *C.QLocalServer, cb C.intptr_t, signal *C.QMetaMethod) {
|
2024-11-19 19:29:06 +13:00
|
|
|
gofunc, ok := cgo.Handle(cb).Value().(func(super func(signal *qt.QMetaMethod), signal *qt.QMetaMethod))
|
|
|
|
if !ok {
|
|
|
|
panic("miqt: callback of non-callback type (heap corruption?)")
|
|
|
|
}
|
|
|
|
|
|
|
|
// Convert all CABI parameters to Go parameters
|
|
|
|
slotval1 := qt.UnsafeNewQMetaMethod(unsafe.Pointer(signal))
|
|
|
|
|
|
|
|
gofunc((&QLocalServer{h: self}).callVirtualBase_DisconnectNotify, slotval1)
|
|
|
|
|
|
|
|
}
|
|
|
|
|
2024-11-04 22:53:04 +13:00
|
|
|
// Delete this object from C++ memory.
|
|
|
|
func (this *QLocalServer) Delete() {
|
2025-02-01 13:45:16 +13:00
|
|
|
C.QLocalServer_delete(this.h)
|
2024-11-04 22:53:04 +13: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 *QLocalServer) GoGC() {
|
|
|
|
runtime.SetFinalizer(this, func(this *QLocalServer) {
|
|
|
|
this.Delete()
|
|
|
|
runtime.KeepAlive(this.h)
|
|
|
|
})
|
|
|
|
}
|