2024-10-20 04:59:23 +00:00
|
|
|
package qscintilla
|
|
|
|
|
|
|
|
/*
|
|
|
|
|
|
|
|
#include "gen_qscidocument.h"
|
|
|
|
#include <stdlib.h>
|
|
|
|
|
|
|
|
*/
|
|
|
|
import "C"
|
|
|
|
|
|
|
|
import (
|
|
|
|
"runtime"
|
|
|
|
"unsafe"
|
|
|
|
)
|
|
|
|
|
|
|
|
type QsciDocument struct {
|
2024-11-19 06:29:06 +00:00
|
|
|
h *C.QsciDocument
|
|
|
|
isSubclass bool
|
2024-10-20 04:59:23 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
func (this *QsciDocument) cPointer() *C.QsciDocument {
|
|
|
|
if this == nil {
|
|
|
|
return nil
|
|
|
|
}
|
|
|
|
return this.h
|
|
|
|
}
|
|
|
|
|
|
|
|
func (this *QsciDocument) UnsafePointer() unsafe.Pointer {
|
|
|
|
if this == nil {
|
|
|
|
return nil
|
|
|
|
}
|
|
|
|
return unsafe.Pointer(this.h)
|
|
|
|
}
|
|
|
|
|
2024-11-19 06:29:06 +00:00
|
|
|
// newQsciDocument constructs the type using only CGO pointers.
|
2024-10-20 04:59:23 +00:00
|
|
|
func newQsciDocument(h *C.QsciDocument) *QsciDocument {
|
|
|
|
if h == nil {
|
|
|
|
return nil
|
|
|
|
}
|
|
|
|
return &QsciDocument{h: h}
|
|
|
|
}
|
|
|
|
|
2024-11-19 06:29:06 +00:00
|
|
|
// UnsafeNewQsciDocument constructs the type using only unsafe pointers.
|
2024-10-20 04:59:23 +00:00
|
|
|
func UnsafeNewQsciDocument(h unsafe.Pointer) *QsciDocument {
|
2024-11-19 06:29:06 +00:00
|
|
|
if h == nil {
|
|
|
|
return nil
|
|
|
|
}
|
|
|
|
|
|
|
|
return &QsciDocument{h: (*C.QsciDocument)(h)}
|
2024-10-20 04:59:23 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
// NewQsciDocument constructs a new QsciDocument object.
|
|
|
|
func NewQsciDocument() *QsciDocument {
|
2024-11-19 06:29:06 +00:00
|
|
|
var outptr_QsciDocument *C.QsciDocument = nil
|
|
|
|
|
|
|
|
C.QsciDocument_new(&outptr_QsciDocument)
|
|
|
|
ret := newQsciDocument(outptr_QsciDocument)
|
|
|
|
ret.isSubclass = true
|
|
|
|
return ret
|
2024-10-20 04:59:23 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
// NewQsciDocument2 constructs a new QsciDocument object.
|
|
|
|
func NewQsciDocument2(param1 *QsciDocument) *QsciDocument {
|
2024-11-19 06:29:06 +00:00
|
|
|
var outptr_QsciDocument *C.QsciDocument = nil
|
|
|
|
|
|
|
|
C.QsciDocument_new2(param1.cPointer(), &outptr_QsciDocument)
|
|
|
|
ret := newQsciDocument(outptr_QsciDocument)
|
|
|
|
ret.isSubclass = true
|
|
|
|
return ret
|
2024-10-20 04:59:23 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
func (this *QsciDocument) OperatorAssign(param1 *QsciDocument) {
|
|
|
|
C.QsciDocument_OperatorAssign(this.h, param1.cPointer())
|
|
|
|
}
|
|
|
|
|
|
|
|
// Delete this object from C++ memory.
|
|
|
|
func (this *QsciDocument) Delete() {
|
2024-11-19 06:29:06 +00:00
|
|
|
C.QsciDocument_Delete(this.h, C.bool(this.isSubclass))
|
2024-10-20 04:59:23 +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 *QsciDocument) GoGC() {
|
|
|
|
runtime.SetFinalizer(this, func(this *QsciDocument) {
|
|
|
|
this.Delete()
|
|
|
|
runtime.KeepAlive(this.h)
|
|
|
|
})
|
|
|
|
}
|