2024-08-25 04:08:24 +00:00
|
|
|
package qt
|
|
|
|
|
|
|
|
/*
|
|
|
|
|
|
|
|
#include "gen_qgenericpluginfactory.h"
|
|
|
|
#include <stdlib.h>
|
|
|
|
|
|
|
|
*/
|
|
|
|
import "C"
|
|
|
|
|
|
|
|
import (
|
2024-09-14 22:29:05 +00:00
|
|
|
"runtime"
|
2024-08-25 04:08:24 +00:00
|
|
|
"unsafe"
|
|
|
|
)
|
|
|
|
|
|
|
|
type QGenericPluginFactory struct {
|
2024-11-19 06:29:06 +00:00
|
|
|
h *C.QGenericPluginFactory
|
|
|
|
isSubclass bool
|
2024-08-25 04:08:24 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
func (this *QGenericPluginFactory) cPointer() *C.QGenericPluginFactory {
|
|
|
|
if this == nil {
|
|
|
|
return nil
|
|
|
|
}
|
|
|
|
return this.h
|
|
|
|
}
|
|
|
|
|
2024-10-16 05:07:56 +00:00
|
|
|
func (this *QGenericPluginFactory) UnsafePointer() unsafe.Pointer {
|
|
|
|
if this == nil {
|
|
|
|
return nil
|
|
|
|
}
|
|
|
|
return unsafe.Pointer(this.h)
|
|
|
|
}
|
|
|
|
|
2024-11-19 06:29:06 +00:00
|
|
|
// newQGenericPluginFactory constructs the type using only CGO pointers.
|
2024-08-25 04:08:24 +00:00
|
|
|
func newQGenericPluginFactory(h *C.QGenericPluginFactory) *QGenericPluginFactory {
|
2024-09-01 02:23:55 +00:00
|
|
|
if h == nil {
|
|
|
|
return nil
|
|
|
|
}
|
2024-12-07 04:15:57 +00:00
|
|
|
|
2024-08-25 04:08:24 +00:00
|
|
|
return &QGenericPluginFactory{h: h}
|
|
|
|
}
|
|
|
|
|
2024-11-19 06:29:06 +00:00
|
|
|
// UnsafeNewQGenericPluginFactory constructs the type using only unsafe pointers.
|
2024-10-16 05:07:56 +00:00
|
|
|
func UnsafeNewQGenericPluginFactory(h unsafe.Pointer) *QGenericPluginFactory {
|
2024-12-07 04:15:57 +00:00
|
|
|
return newQGenericPluginFactory((*C.QGenericPluginFactory)(h))
|
2024-08-25 04:08:24 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
func QGenericPluginFactory_Keys() []string {
|
2024-11-04 07:18:27 +00:00
|
|
|
var _ma C.struct_miqt_array = C.QGenericPluginFactory_Keys()
|
2024-09-14 22:29:05 +00:00
|
|
|
_ret := make([]string, int(_ma.len))
|
2024-10-18 23:53:33 +00:00
|
|
|
_outCast := (*[0xffff]C.struct_miqt_string)(unsafe.Pointer(_ma.data)) // hey ya
|
2024-09-14 22:29:05 +00:00
|
|
|
for i := 0; i < int(_ma.len); i++ {
|
2024-10-18 23:53:33 +00:00
|
|
|
var _lv_ms C.struct_miqt_string = _outCast[i]
|
|
|
|
_lv_ret := C.GoStringN(_lv_ms.data, C.int(int64(_lv_ms.len)))
|
|
|
|
C.free(unsafe.Pointer(_lv_ms.data))
|
2024-09-17 07:30:27 +00:00
|
|
|
_ret[i] = _lv_ret
|
2024-08-25 04:08:24 +00:00
|
|
|
}
|
2024-09-14 22:29:05 +00:00
|
|
|
return _ret
|
2024-08-25 04:08:24 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
func QGenericPluginFactory_Create(param1 string, param2 string) *QObject {
|
2024-10-18 23:53:33 +00:00
|
|
|
param1_ms := C.struct_miqt_string{}
|
|
|
|
param1_ms.data = C.CString(param1)
|
|
|
|
param1_ms.len = C.size_t(len(param1))
|
|
|
|
defer C.free(unsafe.Pointer(param1_ms.data))
|
|
|
|
param2_ms := C.struct_miqt_string{}
|
|
|
|
param2_ms.data = C.CString(param2)
|
|
|
|
param2_ms.len = C.size_t(len(param2))
|
|
|
|
defer C.free(unsafe.Pointer(param2_ms.data))
|
2024-12-07 02:02:06 +00:00
|
|
|
return newQObject(C.QGenericPluginFactory_Create(param1_ms, param2_ms))
|
2024-08-25 04:08:24 +00:00
|
|
|
}
|
|
|
|
|
2024-09-14 22:29:05 +00:00
|
|
|
// Delete this object from C++ memory.
|
2024-08-25 04:08:24 +00:00
|
|
|
func (this *QGenericPluginFactory) Delete() {
|
2024-11-19 06:29:06 +00:00
|
|
|
C.QGenericPluginFactory_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 *QGenericPluginFactory) GoGC() {
|
|
|
|
runtime.SetFinalizer(this, func(this *QGenericPluginFactory) {
|
|
|
|
this.Delete()
|
|
|
|
runtime.KeepAlive(this.h)
|
|
|
|
})
|
|
|
|
}
|