miqt/qt6/gen_qstringconverter_base.go

236 lines
6.8 KiB
Go
Raw Normal View History

2024-10-20 05:21:03 +00:00
package qt6
/*
#include "gen_qstringconverter_base.h"
#include <stdlib.h>
*/
import "C"
import (
"runtime"
"unsafe"
)
type QStringConverterBase__Flag int
const (
QStringConverterBase__Default QStringConverterBase__Flag = 0
QStringConverterBase__Stateless QStringConverterBase__Flag = 1
QStringConverterBase__ConvertInvalidToNull QStringConverterBase__Flag = 2
QStringConverterBase__WriteBom QStringConverterBase__Flag = 4
QStringConverterBase__ConvertInitialBom QStringConverterBase__Flag = 8
QStringConverterBase__UsesIcu QStringConverterBase__Flag = 16
)
type QStringConverter__Encoding int
const (
QStringConverter__Utf8 QStringConverter__Encoding = 0
QStringConverter__Utf16 QStringConverter__Encoding = 1
QStringConverter__Utf16LE QStringConverter__Encoding = 2
QStringConverter__Utf16BE QStringConverter__Encoding = 3
QStringConverter__Utf32 QStringConverter__Encoding = 4
QStringConverter__Utf32LE QStringConverter__Encoding = 5
QStringConverter__Utf32BE QStringConverter__Encoding = 6
QStringConverter__Latin1 QStringConverter__Encoding = 7
QStringConverter__System QStringConverter__Encoding = 8
QStringConverter__LastEncoding QStringConverter__Encoding = 8
)
type QStringConverterBase struct {
2024-11-19 06:29:06 +00:00
h *C.QStringConverterBase
isSubclass bool
2024-10-20 05:21:03 +00:00
}
func (this *QStringConverterBase) cPointer() *C.QStringConverterBase {
if this == nil {
return nil
}
return this.h
}
func (this *QStringConverterBase) UnsafePointer() unsafe.Pointer {
if this == nil {
return nil
}
return unsafe.Pointer(this.h)
}
2024-11-19 06:29:06 +00:00
// newQStringConverterBase constructs the type using only CGO pointers.
2024-10-20 05:21:03 +00:00
func newQStringConverterBase(h *C.QStringConverterBase) *QStringConverterBase {
if h == nil {
return nil
}
return &QStringConverterBase{h: h}
}
2024-11-19 06:29:06 +00:00
// UnsafeNewQStringConverterBase constructs the type using only unsafe pointers.
2024-10-20 05:21:03 +00:00
func UnsafeNewQStringConverterBase(h unsafe.Pointer) *QStringConverterBase {
2024-11-19 06:29:06 +00:00
if h == nil {
return nil
}
return &QStringConverterBase{h: (*C.QStringConverterBase)(h)}
2024-10-20 05:21:03 +00:00
}
// NewQStringConverterBase constructs a new QStringConverterBase object.
func NewQStringConverterBase(param1 *QStringConverterBase) *QStringConverterBase {
2024-11-19 06:29:06 +00:00
var outptr_QStringConverterBase *C.QStringConverterBase = nil
C.QStringConverterBase_new(param1.cPointer(), &outptr_QStringConverterBase)
ret := newQStringConverterBase(outptr_QStringConverterBase)
ret.isSubclass = true
return ret
2024-10-20 05:21:03 +00:00
}
// NewQStringConverterBase2 constructs a new QStringConverterBase object.
func NewQStringConverterBase2() *QStringConverterBase {
2024-11-19 06:29:06 +00:00
var outptr_QStringConverterBase *C.QStringConverterBase = nil
C.QStringConverterBase_new2(&outptr_QStringConverterBase)
ret := newQStringConverterBase(outptr_QStringConverterBase)
ret.isSubclass = true
return ret
2024-10-20 05:21:03 +00:00
}
type QStringConverter struct {
2024-11-19 06:29:06 +00:00
h *C.QStringConverter
isSubclass bool
2024-10-20 05:21:03 +00:00
*QStringConverterBase
}
func (this *QStringConverter) cPointer() *C.QStringConverter {
if this == nil {
return nil
}
return this.h
}
func (this *QStringConverter) UnsafePointer() unsafe.Pointer {
if this == nil {
return nil
}
return unsafe.Pointer(this.h)
}
2024-11-19 06:29:06 +00:00
// newQStringConverter constructs the type using only CGO pointers.
func newQStringConverter(h *C.QStringConverter, h_QStringConverterBase *C.QStringConverterBase) *QStringConverter {
2024-10-20 05:21:03 +00:00
if h == nil {
return nil
}
2024-11-19 06:29:06 +00:00
return &QStringConverter{h: h,
QStringConverterBase: newQStringConverterBase(h_QStringConverterBase)}
2024-10-20 05:21:03 +00:00
}
2024-11-19 06:29:06 +00:00
// UnsafeNewQStringConverter constructs the type using only unsafe pointers.
func UnsafeNewQStringConverter(h unsafe.Pointer, h_QStringConverterBase unsafe.Pointer) *QStringConverter {
if h == nil {
return nil
}
return &QStringConverter{h: (*C.QStringConverter)(h),
QStringConverterBase: UnsafeNewQStringConverterBase(h_QStringConverterBase)}
2024-10-20 05:21:03 +00:00
}
func (this *QStringConverter) IsValid() bool {
return (bool)(C.QStringConverter_IsValid(this.h))
}
func (this *QStringConverter) ResetState() {
C.QStringConverter_ResetState(this.h)
}
func (this *QStringConverter) HasError() bool {
return (bool)(C.QStringConverter_HasError(this.h))
}
func (this *QStringConverter) Name() string {
_ret := C.QStringConverter_Name(this.h)
return C.GoString(_ret)
}
func QStringConverter_NameForEncoding(e QStringConverter__Encoding) string {
_ret := C.QStringConverter_NameForEncoding((C.int)(e))
return C.GoString(_ret)
}
type QStringConverterBase__State struct {
2024-11-19 06:29:06 +00:00
h *C.QStringConverterBase__State
isSubclass bool
2024-10-20 05:21:03 +00:00
}
func (this *QStringConverterBase__State) cPointer() *C.QStringConverterBase__State {
if this == nil {
return nil
}
return this.h
}
func (this *QStringConverterBase__State) UnsafePointer() unsafe.Pointer {
if this == nil {
return nil
}
return unsafe.Pointer(this.h)
}
2024-11-19 06:29:06 +00:00
// newQStringConverterBase__State constructs the type using only CGO pointers.
2024-10-20 05:21:03 +00:00
func newQStringConverterBase__State(h *C.QStringConverterBase__State) *QStringConverterBase__State {
if h == nil {
return nil
}
return &QStringConverterBase__State{h: h}
}
2024-11-19 06:29:06 +00:00
// UnsafeNewQStringConverterBase__State constructs the type using only unsafe pointers.
2024-10-20 05:21:03 +00:00
func UnsafeNewQStringConverterBase__State(h unsafe.Pointer) *QStringConverterBase__State {
2024-11-19 06:29:06 +00:00
if h == nil {
return nil
}
return &QStringConverterBase__State{h: (*C.QStringConverterBase__State)(h)}
2024-10-20 05:21:03 +00:00
}
// NewQStringConverterBase__State constructs a new QStringConverterBase::State object.
func NewQStringConverterBase__State() *QStringConverterBase__State {
2024-11-19 06:29:06 +00:00
var outptr_QStringConverterBase__State *C.QStringConverterBase__State = nil
C.QStringConverterBase__State_new(&outptr_QStringConverterBase__State)
ret := newQStringConverterBase__State(outptr_QStringConverterBase__State)
ret.isSubclass = true
return ret
2024-10-20 05:21:03 +00:00
}
// NewQStringConverterBase__State2 constructs a new QStringConverterBase::State object.
func NewQStringConverterBase__State2(f QStringConverterBase__Flag) *QStringConverterBase__State {
2024-11-19 06:29:06 +00:00
var outptr_QStringConverterBase__State *C.QStringConverterBase__State = nil
C.QStringConverterBase__State_new2((C.int)(f), &outptr_QStringConverterBase__State)
ret := newQStringConverterBase__State(outptr_QStringConverterBase__State)
ret.isSubclass = true
return ret
2024-10-20 05:21:03 +00:00
}
func (this *QStringConverterBase__State) Clear() {
C.QStringConverterBase__State_Clear(this.h)
}
func (this *QStringConverterBase__State) Reset() {
C.QStringConverterBase__State_Reset(this.h)
}
// Delete this object from C++ memory.
func (this *QStringConverterBase__State) Delete() {
2024-11-19 06:29:06 +00:00
C.QStringConverterBase__State_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 *QStringConverterBase__State) GoGC() {
runtime.SetFinalizer(this, func(this *QStringConverterBase__State) {
this.Delete()
runtime.KeepAlive(this.h)
})
}