miqt/qt6/gen_qdebug.go

381 lines
11 KiB
Go
Raw Normal View History

2024-10-20 05:21:03 +00:00
package qt6
/*
#include "gen_qdebug.h"
#include <stdlib.h>
*/
import "C"
import (
"runtime"
"unsafe"
)
type QDebug__VerbosityLevel int
const (
QDebug__MinimumVerbosity QDebug__VerbosityLevel = 0
QDebug__DefaultVerbosity QDebug__VerbosityLevel = 2
QDebug__MaximumVerbosity QDebug__VerbosityLevel = 7
)
type QDebug struct {
2024-11-19 06:29:06 +00:00
h *C.QDebug
isSubclass bool
2024-10-20 05:21:03 +00:00
*QIODeviceBase
}
func (this *QDebug) cPointer() *C.QDebug {
if this == nil {
return nil
}
return this.h
}
func (this *QDebug) UnsafePointer() unsafe.Pointer {
if this == nil {
return nil
}
return unsafe.Pointer(this.h)
}
2024-11-19 06:29:06 +00:00
// newQDebug constructs the type using only CGO pointers.
func newQDebug(h *C.QDebug, h_QIODeviceBase *C.QIODeviceBase) *QDebug {
2024-10-20 05:21:03 +00:00
if h == nil {
return nil
}
2024-11-19 06:29:06 +00:00
return &QDebug{h: h,
QIODeviceBase: newQIODeviceBase(h_QIODeviceBase)}
2024-10-20 05:21:03 +00:00
}
2024-11-19 06:29:06 +00:00
// UnsafeNewQDebug constructs the type using only unsafe pointers.
func UnsafeNewQDebug(h unsafe.Pointer, h_QIODeviceBase unsafe.Pointer) *QDebug {
if h == nil {
return nil
}
return &QDebug{h: (*C.QDebug)(h),
QIODeviceBase: UnsafeNewQIODeviceBase(h_QIODeviceBase)}
2024-10-20 05:21:03 +00:00
}
// NewQDebug constructs a new QDebug object.
func NewQDebug(device *QIODevice) *QDebug {
2024-11-19 06:29:06 +00:00
var outptr_QDebug *C.QDebug = nil
var outptr_QIODeviceBase *C.QIODeviceBase = nil
C.QDebug_new(device.cPointer(), &outptr_QDebug, &outptr_QIODeviceBase)
ret := newQDebug(outptr_QDebug, outptr_QIODeviceBase)
ret.isSubclass = true
return ret
2024-10-20 05:21:03 +00:00
}
// NewQDebug2 constructs a new QDebug object.
func NewQDebug2(o *QDebug) *QDebug {
2024-11-19 06:29:06 +00:00
var outptr_QDebug *C.QDebug = nil
var outptr_QIODeviceBase *C.QIODeviceBase = nil
C.QDebug_new2(o.cPointer(), &outptr_QDebug, &outptr_QIODeviceBase)
ret := newQDebug(outptr_QDebug, outptr_QIODeviceBase)
ret.isSubclass = true
return ret
2024-10-20 05:21:03 +00:00
}
func (this *QDebug) OperatorAssign(other *QDebug) {
C.QDebug_OperatorAssign(this.h, other.cPointer())
}
func (this *QDebug) Swap(other *QDebug) {
C.QDebug_Swap(this.h, other.cPointer())
}
func (this *QDebug) ResetFormat() *QDebug {
2024-11-19 06:29:06 +00:00
return UnsafeNewQDebug(unsafe.Pointer(C.QDebug_ResetFormat(this.h)), nil)
2024-10-20 05:21:03 +00:00
}
func (this *QDebug) Space() *QDebug {
2024-11-19 06:29:06 +00:00
return UnsafeNewQDebug(unsafe.Pointer(C.QDebug_Space(this.h)), nil)
2024-10-20 05:21:03 +00:00
}
func (this *QDebug) Nospace() *QDebug {
2024-11-19 06:29:06 +00:00
return UnsafeNewQDebug(unsafe.Pointer(C.QDebug_Nospace(this.h)), nil)
2024-10-20 05:21:03 +00:00
}
func (this *QDebug) MaybeSpace() *QDebug {
2024-11-19 06:29:06 +00:00
return UnsafeNewQDebug(unsafe.Pointer(C.QDebug_MaybeSpace(this.h)), nil)
2024-10-20 05:21:03 +00:00
}
func (this *QDebug) Verbosity(verbosityLevel int) *QDebug {
2024-11-19 06:29:06 +00:00
return UnsafeNewQDebug(unsafe.Pointer(C.QDebug_Verbosity(this.h, (C.int)(verbosityLevel))), nil)
2024-10-20 05:21:03 +00:00
}
func (this *QDebug) Verbosity2() int {
return (int)(C.QDebug_Verbosity2(this.h))
}
func (this *QDebug) SetVerbosity(verbosityLevel int) {
C.QDebug_SetVerbosity(this.h, (C.int)(verbosityLevel))
}
func (this *QDebug) AutoInsertSpaces() bool {
return (bool)(C.QDebug_AutoInsertSpaces(this.h))
}
func (this *QDebug) SetAutoInsertSpaces(b bool) {
C.QDebug_SetAutoInsertSpaces(this.h, (C.bool)(b))
}
func (this *QDebug) Quote() *QDebug {
2024-11-19 06:29:06 +00:00
return UnsafeNewQDebug(unsafe.Pointer(C.QDebug_Quote(this.h)), nil)
2024-10-20 05:21:03 +00:00
}
func (this *QDebug) Noquote() *QDebug {
2024-11-19 06:29:06 +00:00
return UnsafeNewQDebug(unsafe.Pointer(C.QDebug_Noquote(this.h)), nil)
2024-10-20 05:21:03 +00:00
}
func (this *QDebug) MaybeQuote() *QDebug {
2024-11-19 06:29:06 +00:00
return UnsafeNewQDebug(unsafe.Pointer(C.QDebug_MaybeQuote(this.h)), nil)
2024-10-20 05:21:03 +00:00
}
func (this *QDebug) OperatorShiftLeft(t QChar) *QDebug {
2024-11-19 06:29:06 +00:00
return UnsafeNewQDebug(unsafe.Pointer(C.QDebug_OperatorShiftLeft(this.h, t.cPointer())), nil)
2024-10-20 05:21:03 +00:00
}
func (this *QDebug) OperatorShiftLeftWithBool(t bool) *QDebug {
2024-11-19 06:29:06 +00:00
return UnsafeNewQDebug(unsafe.Pointer(C.QDebug_OperatorShiftLeftWithBool(this.h, (C.bool)(t))), nil)
2024-10-20 05:21:03 +00:00
}
func (this *QDebug) OperatorShiftLeftWithChar(t int8) *QDebug {
2024-11-19 06:29:06 +00:00
return UnsafeNewQDebug(unsafe.Pointer(C.QDebug_OperatorShiftLeftWithChar(this.h, (C.char)(t))), nil)
2024-10-20 05:21:03 +00:00
}
func (this *QDebug) OperatorShiftLeftWithShort(t int16) *QDebug {
2024-11-19 06:29:06 +00:00
return UnsafeNewQDebug(unsafe.Pointer(C.QDebug_OperatorShiftLeftWithShort(this.h, (C.int16_t)(t))), nil)
2024-10-20 05:21:03 +00:00
}
func (this *QDebug) OperatorShiftLeftWithUnsignedshort(t uint16) *QDebug {
2024-11-19 06:29:06 +00:00
return UnsafeNewQDebug(unsafe.Pointer(C.QDebug_OperatorShiftLeftWithUnsignedshort(this.h, (C.uint16_t)(t))), nil)
2024-10-20 05:21:03 +00:00
}
func (this *QDebug) OperatorShiftLeftWithInt(t int) *QDebug {
2024-11-19 06:29:06 +00:00
return UnsafeNewQDebug(unsafe.Pointer(C.QDebug_OperatorShiftLeftWithInt(this.h, (C.int)(t))), nil)
2024-10-20 05:21:03 +00:00
}
func (this *QDebug) OperatorShiftLeftWithUnsignedint(t uint) *QDebug {
2024-11-19 06:29:06 +00:00
return UnsafeNewQDebug(unsafe.Pointer(C.QDebug_OperatorShiftLeftWithUnsignedint(this.h, (C.uint)(t))), nil)
2024-10-20 05:21:03 +00:00
}
func (this *QDebug) OperatorShiftLeftWithLong(t int64) *QDebug {
2024-11-19 06:29:06 +00:00
return UnsafeNewQDebug(unsafe.Pointer(C.QDebug_OperatorShiftLeftWithLong(this.h, (C.long)(t))), nil)
2024-10-20 05:21:03 +00:00
}
func (this *QDebug) OperatorShiftLeftWithUnsignedlong(t uint64) *QDebug {
2024-11-19 06:29:06 +00:00
return UnsafeNewQDebug(unsafe.Pointer(C.QDebug_OperatorShiftLeftWithUnsignedlong(this.h, (C.ulong)(t))), nil)
2024-10-20 05:21:03 +00:00
}
func (this *QDebug) OperatorShiftLeftWithQint64(t int64) *QDebug {
2024-11-19 06:29:06 +00:00
return UnsafeNewQDebug(unsafe.Pointer(C.QDebug_OperatorShiftLeftWithQint64(this.h, (C.longlong)(t))), nil)
2024-10-20 05:21:03 +00:00
}
func (this *QDebug) OperatorShiftLeftWithQuint64(t uint64) *QDebug {
2024-11-19 06:29:06 +00:00
return UnsafeNewQDebug(unsafe.Pointer(C.QDebug_OperatorShiftLeftWithQuint64(this.h, (C.ulonglong)(t))), nil)
2024-10-20 05:21:03 +00:00
}
func (this *QDebug) OperatorShiftLeftWithFloat(t float32) *QDebug {
2024-11-19 06:29:06 +00:00
return UnsafeNewQDebug(unsafe.Pointer(C.QDebug_OperatorShiftLeftWithFloat(this.h, (C.float)(t))), nil)
2024-10-20 05:21:03 +00:00
}
func (this *QDebug) OperatorShiftLeftWithDouble(t float64) *QDebug {
2024-11-19 06:29:06 +00:00
return UnsafeNewQDebug(unsafe.Pointer(C.QDebug_OperatorShiftLeftWithDouble(this.h, (C.double)(t))), nil)
2024-10-20 05:21:03 +00:00
}
func (this *QDebug) OperatorShiftLeft2(t string) *QDebug {
t_Cstring := C.CString(t)
defer C.free(unsafe.Pointer(t_Cstring))
2024-11-19 06:29:06 +00:00
return UnsafeNewQDebug(unsafe.Pointer(C.QDebug_OperatorShiftLeft2(this.h, t_Cstring)), nil)
2024-10-20 05:21:03 +00:00
}
func (this *QDebug) OperatorShiftLeftWithQString(t string) *QDebug {
t_ms := C.struct_miqt_string{}
t_ms.data = C.CString(t)
t_ms.len = C.size_t(len(t))
defer C.free(unsafe.Pointer(t_ms.data))
2024-11-19 06:29:06 +00:00
return UnsafeNewQDebug(unsafe.Pointer(C.QDebug_OperatorShiftLeftWithQString(this.h, t_ms)), nil)
2024-10-20 05:21:03 +00:00
}
func (this *QDebug) OperatorShiftLeftWithQByteArray(t []byte) *QDebug {
t_alias := C.struct_miqt_string{}
t_alias.data = (*C.char)(unsafe.Pointer(&t[0]))
t_alias.len = C.size_t(len(t))
2024-11-19 06:29:06 +00:00
return UnsafeNewQDebug(unsafe.Pointer(C.QDebug_OperatorShiftLeftWithQByteArray(this.h, t_alias)), nil)
2024-10-20 05:21:03 +00:00
}
func (this *QDebug) OperatorShiftLeftWithQByteArrayView(t QByteArrayView) *QDebug {
2024-11-19 06:29:06 +00:00
return UnsafeNewQDebug(unsafe.Pointer(C.QDebug_OperatorShiftLeftWithQByteArrayView(this.h, t.cPointer())), nil)
2024-10-20 05:21:03 +00:00
}
func (this *QDebug) OperatorShiftLeftWithVoid(t unsafe.Pointer) *QDebug {
2024-11-19 06:29:06 +00:00
return UnsafeNewQDebug(unsafe.Pointer(C.QDebug_OperatorShiftLeftWithVoid(this.h, t)), nil)
2024-10-20 05:21:03 +00:00
}
func (this *QDebug) MaybeQuote1(c int8) *QDebug {
2024-11-19 06:29:06 +00:00
return UnsafeNewQDebug(unsafe.Pointer(C.QDebug_MaybeQuote1(this.h, (C.char)(c))), nil)
2024-10-20 05:21:03 +00:00
}
// Delete this object from C++ memory.
func (this *QDebug) Delete() {
2024-11-19 06:29:06 +00:00
C.QDebug_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 *QDebug) GoGC() {
runtime.SetFinalizer(this, func(this *QDebug) {
this.Delete()
runtime.KeepAlive(this.h)
})
}
type QDebugStateSaver struct {
2024-11-19 06:29:06 +00:00
h *C.QDebugStateSaver
isSubclass bool
2024-10-20 05:21:03 +00:00
}
func (this *QDebugStateSaver) cPointer() *C.QDebugStateSaver {
if this == nil {
return nil
}
return this.h
}
func (this *QDebugStateSaver) UnsafePointer() unsafe.Pointer {
if this == nil {
return nil
}
return unsafe.Pointer(this.h)
}
2024-11-19 06:29:06 +00:00
// newQDebugStateSaver constructs the type using only CGO pointers.
2024-10-20 05:21:03 +00:00
func newQDebugStateSaver(h *C.QDebugStateSaver) *QDebugStateSaver {
if h == nil {
return nil
}
return &QDebugStateSaver{h: h}
}
2024-11-19 06:29:06 +00:00
// UnsafeNewQDebugStateSaver constructs the type using only unsafe pointers.
2024-10-20 05:21:03 +00:00
func UnsafeNewQDebugStateSaver(h unsafe.Pointer) *QDebugStateSaver {
2024-11-19 06:29:06 +00:00
if h == nil {
return nil
}
return &QDebugStateSaver{h: (*C.QDebugStateSaver)(h)}
2024-10-20 05:21:03 +00:00
}
// NewQDebugStateSaver constructs a new QDebugStateSaver object.
func NewQDebugStateSaver(dbg *QDebug) *QDebugStateSaver {
2024-11-19 06:29:06 +00:00
var outptr_QDebugStateSaver *C.QDebugStateSaver = nil
C.QDebugStateSaver_new(dbg.cPointer(), &outptr_QDebugStateSaver)
ret := newQDebugStateSaver(outptr_QDebugStateSaver)
ret.isSubclass = true
return ret
2024-10-20 05:21:03 +00:00
}
// Delete this object from C++ memory.
func (this *QDebugStateSaver) Delete() {
2024-11-19 06:29:06 +00:00
C.QDebugStateSaver_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 *QDebugStateSaver) GoGC() {
runtime.SetFinalizer(this, func(this *QDebugStateSaver) {
this.Delete()
runtime.KeepAlive(this.h)
})
}
type QNoDebug struct {
2024-11-19 06:29:06 +00:00
h *C.QNoDebug
isSubclass bool
2024-10-20 05:21:03 +00:00
}
func (this *QNoDebug) cPointer() *C.QNoDebug {
if this == nil {
return nil
}
return this.h
}
func (this *QNoDebug) UnsafePointer() unsafe.Pointer {
if this == nil {
return nil
}
return unsafe.Pointer(this.h)
}
2024-11-19 06:29:06 +00:00
// newQNoDebug constructs the type using only CGO pointers.
2024-10-20 05:21:03 +00:00
func newQNoDebug(h *C.QNoDebug) *QNoDebug {
if h == nil {
return nil
}
return &QNoDebug{h: h}
}
2024-11-19 06:29:06 +00:00
// UnsafeNewQNoDebug constructs the type using only unsafe pointers.
2024-10-20 05:21:03 +00:00
func UnsafeNewQNoDebug(h unsafe.Pointer) *QNoDebug {
2024-11-19 06:29:06 +00:00
if h == nil {
return nil
}
return &QNoDebug{h: (*C.QNoDebug)(h)}
2024-10-20 05:21:03 +00:00
}
func (this *QNoDebug) Space() *QNoDebug {
return UnsafeNewQNoDebug(unsafe.Pointer(C.QNoDebug_Space(this.h)))
}
func (this *QNoDebug) Nospace() *QNoDebug {
return UnsafeNewQNoDebug(unsafe.Pointer(C.QNoDebug_Nospace(this.h)))
}
func (this *QNoDebug) MaybeSpace() *QNoDebug {
return UnsafeNewQNoDebug(unsafe.Pointer(C.QNoDebug_MaybeSpace(this.h)))
}
func (this *QNoDebug) Quote() *QNoDebug {
return UnsafeNewQNoDebug(unsafe.Pointer(C.QNoDebug_Quote(this.h)))
}
func (this *QNoDebug) Noquote() *QNoDebug {
return UnsafeNewQNoDebug(unsafe.Pointer(C.QNoDebug_Noquote(this.h)))
}
func (this *QNoDebug) MaybeQuote() *QNoDebug {
return UnsafeNewQNoDebug(unsafe.Pointer(C.QNoDebug_MaybeQuote(this.h)))
}
func (this *QNoDebug) Verbosity(param1 int) *QNoDebug {
return UnsafeNewQNoDebug(unsafe.Pointer(C.QNoDebug_Verbosity(this.h, (C.int)(param1))))
}
func (this *QNoDebug) MaybeQuote1(param1 int8) *QNoDebug {
return UnsafeNewQNoDebug(unsafe.Pointer(C.QNoDebug_MaybeQuote1(this.h, (C.const_char)(param1))))
}
// Delete this object from C++ memory.
func (this *QNoDebug) Delete() {
2024-11-19 06:29:06 +00:00
C.QNoDebug_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 *QNoDebug) GoGC() {
runtime.SetFinalizer(this, func(this *QNoDebug) {
this.Delete()
runtime.KeepAlive(this.h)
})
}