2024-08-25 04:08:24 +00:00
|
|
|
package qt
|
|
|
|
|
|
|
|
/*
|
|
|
|
|
|
|
|
#include "gen_qguiapplication.h"
|
|
|
|
#include <stdlib.h>
|
|
|
|
|
|
|
|
*/
|
|
|
|
import "C"
|
|
|
|
|
|
|
|
import (
|
|
|
|
"runtime"
|
|
|
|
"runtime/cgo"
|
|
|
|
"unsafe"
|
|
|
|
)
|
|
|
|
|
|
|
|
type QGuiApplication struct {
|
|
|
|
h *C.QGuiApplication
|
|
|
|
*QCoreApplication
|
|
|
|
}
|
|
|
|
|
|
|
|
func (this *QGuiApplication) cPointer() *C.QGuiApplication {
|
|
|
|
if this == nil {
|
|
|
|
return nil
|
|
|
|
}
|
|
|
|
return this.h
|
|
|
|
}
|
|
|
|
|
|
|
|
func newQGuiApplication(h *C.QGuiApplication) *QGuiApplication {
|
2024-09-01 02:23:55 +00:00
|
|
|
if h == nil {
|
|
|
|
return nil
|
|
|
|
}
|
2024-08-25 04:08:24 +00:00
|
|
|
return &QGuiApplication{h: h, QCoreApplication: newQCoreApplication_U(unsafe.Pointer(h))}
|
|
|
|
}
|
|
|
|
|
|
|
|
func newQGuiApplication_U(h unsafe.Pointer) *QGuiApplication {
|
|
|
|
return newQGuiApplication((*C.QGuiApplication)(h))
|
|
|
|
}
|
|
|
|
|
|
|
|
// NewQGuiApplication constructs a new QGuiApplication object.
|
|
|
|
func NewQGuiApplication(args []string) *QGuiApplication {
|
|
|
|
// Convert []string to long-lived int& argc, char** argv, never call free()
|
|
|
|
argc := (*C.int)(C.malloc(8))
|
|
|
|
*argc = C.int(len(args))
|
2024-09-01 05:51:28 +00:00
|
|
|
argv := (*[0xffff]*C.char)(C.malloc(C.size_t(8 * len(args))))
|
2024-08-25 04:08:24 +00:00
|
|
|
for i := range args {
|
|
|
|
argv[i] = C.CString(args[i])
|
|
|
|
}
|
|
|
|
ret := C.QGuiApplication_new(argc, &argv[0])
|
|
|
|
return newQGuiApplication(ret)
|
|
|
|
}
|
|
|
|
|
|
|
|
// NewQGuiApplication2 constructs a new QGuiApplication object.
|
|
|
|
func NewQGuiApplication2(args []string, param3 int) *QGuiApplication {
|
|
|
|
// Convert []string to long-lived int& argc, char** argv, never call free()
|
|
|
|
argc := (*C.int)(C.malloc(8))
|
|
|
|
*argc = C.int(len(args))
|
2024-09-01 05:51:28 +00:00
|
|
|
argv := (*[0xffff]*C.char)(C.malloc(C.size_t(8 * len(args))))
|
2024-08-25 04:08:24 +00:00
|
|
|
for i := range args {
|
|
|
|
argv[i] = C.CString(args[i])
|
|
|
|
}
|
|
|
|
ret := C.QGuiApplication_new2(argc, &argv[0], (C.int)(param3))
|
|
|
|
return newQGuiApplication(ret)
|
|
|
|
}
|
|
|
|
|
|
|
|
func (this *QGuiApplication) MetaObject() *QMetaObject {
|
2024-09-17 07:30:27 +00:00
|
|
|
return newQMetaObject_U(unsafe.Pointer(C.QGuiApplication_MetaObject(this.h)))
|
2024-08-25 04:08:24 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
func QGuiApplication_Tr(s string) string {
|
|
|
|
s_Cstring := C.CString(s)
|
|
|
|
defer C.free(unsafe.Pointer(s_Cstring))
|
2024-09-14 22:29:05 +00:00
|
|
|
var _ms *C.struct_miqt_string = C.QGuiApplication_Tr(s_Cstring)
|
|
|
|
_ret := C.GoStringN(&_ms.data, C.int(int64(_ms.len)))
|
|
|
|
C.free(unsafe.Pointer(_ms))
|
|
|
|
return _ret
|
2024-08-25 04:08:24 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
func QGuiApplication_TrUtf8(s string) string {
|
|
|
|
s_Cstring := C.CString(s)
|
|
|
|
defer C.free(unsafe.Pointer(s_Cstring))
|
2024-09-14 22:29:05 +00:00
|
|
|
var _ms *C.struct_miqt_string = C.QGuiApplication_TrUtf8(s_Cstring)
|
|
|
|
_ret := C.GoStringN(&_ms.data, C.int(int64(_ms.len)))
|
|
|
|
C.free(unsafe.Pointer(_ms))
|
|
|
|
return _ret
|
2024-08-25 04:08:24 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
func QGuiApplication_SetApplicationDisplayName(name string) {
|
2024-09-14 22:29:05 +00:00
|
|
|
name_ms := miqt_strdupg(name)
|
|
|
|
defer C.free(name_ms)
|
|
|
|
C.QGuiApplication_SetApplicationDisplayName((*C.struct_miqt_string)(name_ms))
|
2024-08-25 04:08:24 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
func QGuiApplication_ApplicationDisplayName() string {
|
2024-09-14 22:29:05 +00:00
|
|
|
var _ms *C.struct_miqt_string = C.QGuiApplication_ApplicationDisplayName()
|
|
|
|
_ret := C.GoStringN(&_ms.data, C.int(int64(_ms.len)))
|
|
|
|
C.free(unsafe.Pointer(_ms))
|
|
|
|
return _ret
|
2024-08-25 04:08:24 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
func QGuiApplication_SetDesktopFileName(name string) {
|
2024-09-14 22:29:05 +00:00
|
|
|
name_ms := miqt_strdupg(name)
|
|
|
|
defer C.free(name_ms)
|
|
|
|
C.QGuiApplication_SetDesktopFileName((*C.struct_miqt_string)(name_ms))
|
2024-08-25 04:08:24 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
func QGuiApplication_DesktopFileName() string {
|
2024-09-14 22:29:05 +00:00
|
|
|
var _ms *C.struct_miqt_string = C.QGuiApplication_DesktopFileName()
|
|
|
|
_ret := C.GoStringN(&_ms.data, C.int(int64(_ms.len)))
|
|
|
|
C.free(unsafe.Pointer(_ms))
|
|
|
|
return _ret
|
2024-08-25 04:08:24 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
func QGuiApplication_AllWindows() []*QWindow {
|
2024-09-14 22:29:05 +00:00
|
|
|
var _ma *C.struct_miqt_array = C.QGuiApplication_AllWindows()
|
|
|
|
_ret := make([]*QWindow, int(_ma.len))
|
2024-09-17 07:30:27 +00:00
|
|
|
_outCast := (*[0xffff]*C.QWindow)(unsafe.Pointer(_ma.data)) // hey ya
|
2024-09-14 22:29:05 +00:00
|
|
|
for i := 0; i < int(_ma.len); i++ {
|
2024-09-17 07:30:27 +00:00
|
|
|
_ret[i] = newQWindow_U(unsafe.Pointer(_outCast[i]))
|
2024-08-25 04:08:24 +00:00
|
|
|
}
|
2024-09-14 22:29:05 +00:00
|
|
|
C.free(unsafe.Pointer(_ma))
|
|
|
|
return _ret
|
2024-08-25 04:08:24 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
func QGuiApplication_TopLevelWindows() []*QWindow {
|
2024-09-14 22:29:05 +00:00
|
|
|
var _ma *C.struct_miqt_array = C.QGuiApplication_TopLevelWindows()
|
|
|
|
_ret := make([]*QWindow, int(_ma.len))
|
2024-09-17 07:30:27 +00:00
|
|
|
_outCast := (*[0xffff]*C.QWindow)(unsafe.Pointer(_ma.data)) // hey ya
|
2024-09-14 22:29:05 +00:00
|
|
|
for i := 0; i < int(_ma.len); i++ {
|
2024-09-17 07:30:27 +00:00
|
|
|
_ret[i] = newQWindow_U(unsafe.Pointer(_outCast[i]))
|
2024-08-25 04:08:24 +00:00
|
|
|
}
|
2024-09-14 22:29:05 +00:00
|
|
|
C.free(unsafe.Pointer(_ma))
|
|
|
|
return _ret
|
2024-08-25 04:08:24 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
func QGuiApplication_TopLevelAt(pos *QPoint) *QWindow {
|
2024-09-17 07:30:27 +00:00
|
|
|
return newQWindow_U(unsafe.Pointer(C.QGuiApplication_TopLevelAt(pos.cPointer())))
|
2024-08-25 04:08:24 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
func QGuiApplication_SetWindowIcon(icon *QIcon) {
|
|
|
|
C.QGuiApplication_SetWindowIcon(icon.cPointer())
|
|
|
|
}
|
|
|
|
|
|
|
|
func QGuiApplication_WindowIcon() *QIcon {
|
2024-09-14 22:29:05 +00:00
|
|
|
_ret := C.QGuiApplication_WindowIcon()
|
|
|
|
_goptr := newQIcon(_ret)
|
|
|
|
_goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer
|
|
|
|
return _goptr
|
2024-08-25 04:08:24 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
func QGuiApplication_PlatformName() string {
|
2024-09-14 22:29:05 +00:00
|
|
|
var _ms *C.struct_miqt_string = C.QGuiApplication_PlatformName()
|
|
|
|
_ret := C.GoStringN(&_ms.data, C.int(int64(_ms.len)))
|
|
|
|
C.free(unsafe.Pointer(_ms))
|
|
|
|
return _ret
|
2024-08-25 04:08:24 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
func QGuiApplication_ModalWindow() *QWindow {
|
2024-09-17 07:30:27 +00:00
|
|
|
return newQWindow_U(unsafe.Pointer(C.QGuiApplication_ModalWindow()))
|
2024-08-25 04:08:24 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
func QGuiApplication_FocusWindow() *QWindow {
|
2024-09-17 07:30:27 +00:00
|
|
|
return newQWindow_U(unsafe.Pointer(C.QGuiApplication_FocusWindow()))
|
2024-08-25 04:08:24 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
func QGuiApplication_FocusObject() *QObject {
|
2024-09-17 07:30:27 +00:00
|
|
|
return newQObject_U(unsafe.Pointer(C.QGuiApplication_FocusObject()))
|
2024-08-25 04:08:24 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
func QGuiApplication_PrimaryScreen() *QScreen {
|
2024-09-17 07:30:27 +00:00
|
|
|
return newQScreen_U(unsafe.Pointer(C.QGuiApplication_PrimaryScreen()))
|
2024-08-25 04:08:24 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
func QGuiApplication_Screens() []*QScreen {
|
2024-09-14 22:29:05 +00:00
|
|
|
var _ma *C.struct_miqt_array = C.QGuiApplication_Screens()
|
|
|
|
_ret := make([]*QScreen, int(_ma.len))
|
2024-09-17 07:30:27 +00:00
|
|
|
_outCast := (*[0xffff]*C.QScreen)(unsafe.Pointer(_ma.data)) // hey ya
|
2024-09-14 22:29:05 +00:00
|
|
|
for i := 0; i < int(_ma.len); i++ {
|
2024-09-17 07:30:27 +00:00
|
|
|
_ret[i] = newQScreen_U(unsafe.Pointer(_outCast[i]))
|
2024-08-25 04:08:24 +00:00
|
|
|
}
|
2024-09-14 22:29:05 +00:00
|
|
|
C.free(unsafe.Pointer(_ma))
|
|
|
|
return _ret
|
2024-08-25 04:08:24 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
func QGuiApplication_ScreenAt(point *QPoint) *QScreen {
|
2024-09-17 07:30:27 +00:00
|
|
|
return newQScreen_U(unsafe.Pointer(C.QGuiApplication_ScreenAt(point.cPointer())))
|
2024-08-25 04:08:24 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
func (this *QGuiApplication) DevicePixelRatio() float64 {
|
2024-09-17 07:30:27 +00:00
|
|
|
return (float64)(C.QGuiApplication_DevicePixelRatio(this.h))
|
2024-08-25 04:08:24 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
func QGuiApplication_OverrideCursor() *QCursor {
|
2024-09-17 07:30:27 +00:00
|
|
|
return newQCursor_U(unsafe.Pointer(C.QGuiApplication_OverrideCursor()))
|
2024-08-25 04:08:24 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
func QGuiApplication_SetOverrideCursor(overrideCursor *QCursor) {
|
|
|
|
C.QGuiApplication_SetOverrideCursor(overrideCursor.cPointer())
|
|
|
|
}
|
|
|
|
|
|
|
|
func QGuiApplication_ChangeOverrideCursor(param1 *QCursor) {
|
|
|
|
C.QGuiApplication_ChangeOverrideCursor(param1.cPointer())
|
|
|
|
}
|
|
|
|
|
|
|
|
func QGuiApplication_RestoreOverrideCursor() {
|
|
|
|
C.QGuiApplication_RestoreOverrideCursor()
|
|
|
|
}
|
|
|
|
|
|
|
|
func QGuiApplication_Font() *QFont {
|
2024-09-14 22:29:05 +00:00
|
|
|
_ret := C.QGuiApplication_Font()
|
|
|
|
_goptr := newQFont(_ret)
|
|
|
|
_goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer
|
|
|
|
return _goptr
|
2024-08-25 04:08:24 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
func QGuiApplication_SetFont(font *QFont) {
|
|
|
|
C.QGuiApplication_SetFont(font.cPointer())
|
|
|
|
}
|
|
|
|
|
|
|
|
func QGuiApplication_Clipboard() *QClipboard {
|
2024-09-17 07:30:27 +00:00
|
|
|
return newQClipboard_U(unsafe.Pointer(C.QGuiApplication_Clipboard()))
|
2024-08-25 04:08:24 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
func QGuiApplication_Palette() *QPalette {
|
2024-09-14 22:29:05 +00:00
|
|
|
_ret := C.QGuiApplication_Palette()
|
|
|
|
_goptr := newQPalette(_ret)
|
|
|
|
_goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer
|
|
|
|
return _goptr
|
2024-08-25 04:08:24 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
func QGuiApplication_SetPalette(pal *QPalette) {
|
|
|
|
C.QGuiApplication_SetPalette(pal.cPointer())
|
|
|
|
}
|
|
|
|
|
2024-09-20 06:40:03 +00:00
|
|
|
func QGuiApplication_KeyboardModifiers() KeyboardModifier {
|
|
|
|
return (KeyboardModifier)(C.QGuiApplication_KeyboardModifiers())
|
2024-08-29 07:01:51 +00:00
|
|
|
}
|
|
|
|
|
2024-09-20 06:40:03 +00:00
|
|
|
func QGuiApplication_QueryKeyboardModifiers() KeyboardModifier {
|
|
|
|
return (KeyboardModifier)(C.QGuiApplication_QueryKeyboardModifiers())
|
2024-08-29 07:01:51 +00:00
|
|
|
}
|
|
|
|
|
2024-09-20 06:40:03 +00:00
|
|
|
func QGuiApplication_MouseButtons() MouseButton {
|
|
|
|
return (MouseButton)(C.QGuiApplication_MouseButtons())
|
2024-08-29 07:01:51 +00:00
|
|
|
}
|
|
|
|
|
2024-09-04 06:54:22 +00:00
|
|
|
func QGuiApplication_SetLayoutDirection(direction LayoutDirection) {
|
2024-09-18 00:12:02 +00:00
|
|
|
C.QGuiApplication_SetLayoutDirection((C.int)(direction))
|
2024-08-29 07:01:51 +00:00
|
|
|
}
|
|
|
|
|
2024-09-04 06:54:22 +00:00
|
|
|
func QGuiApplication_LayoutDirection() LayoutDirection {
|
2024-09-17 07:30:27 +00:00
|
|
|
return (LayoutDirection)(C.QGuiApplication_LayoutDirection())
|
2024-08-29 07:01:51 +00:00
|
|
|
}
|
|
|
|
|
2024-08-25 04:08:24 +00:00
|
|
|
func QGuiApplication_IsRightToLeft() bool {
|
2024-09-17 07:30:27 +00:00
|
|
|
return (bool)(C.QGuiApplication_IsRightToLeft())
|
2024-08-25 04:08:24 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
func QGuiApplication_IsLeftToRight() bool {
|
2024-09-17 07:30:27 +00:00
|
|
|
return (bool)(C.QGuiApplication_IsLeftToRight())
|
2024-08-25 04:08:24 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
func QGuiApplication_StyleHints() *QStyleHints {
|
2024-09-17 07:30:27 +00:00
|
|
|
return newQStyleHints_U(unsafe.Pointer(C.QGuiApplication_StyleHints()))
|
2024-08-25 04:08:24 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
func QGuiApplication_SetDesktopSettingsAware(on bool) {
|
|
|
|
C.QGuiApplication_SetDesktopSettingsAware((C.bool)(on))
|
|
|
|
}
|
|
|
|
|
|
|
|
func QGuiApplication_DesktopSettingsAware() bool {
|
2024-09-17 07:30:27 +00:00
|
|
|
return (bool)(C.QGuiApplication_DesktopSettingsAware())
|
2024-08-25 04:08:24 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
func QGuiApplication_InputMethod() *QInputMethod {
|
2024-09-17 07:30:27 +00:00
|
|
|
return newQInputMethod_U(unsafe.Pointer(C.QGuiApplication_InputMethod()))
|
2024-08-25 04:08:24 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
func QGuiApplication_SetQuitOnLastWindowClosed(quit bool) {
|
|
|
|
C.QGuiApplication_SetQuitOnLastWindowClosed((C.bool)(quit))
|
|
|
|
}
|
|
|
|
|
|
|
|
func QGuiApplication_QuitOnLastWindowClosed() bool {
|
2024-09-17 07:30:27 +00:00
|
|
|
return (bool)(C.QGuiApplication_QuitOnLastWindowClosed())
|
2024-08-25 04:08:24 +00:00
|
|
|
}
|
|
|
|
|
2024-09-04 06:54:22 +00:00
|
|
|
func QGuiApplication_ApplicationState() ApplicationState {
|
2024-09-17 07:30:27 +00:00
|
|
|
return (ApplicationState)(C.QGuiApplication_ApplicationState())
|
2024-08-29 07:01:51 +00:00
|
|
|
}
|
|
|
|
|
2024-09-04 06:54:22 +00:00
|
|
|
func QGuiApplication_SetHighDpiScaleFactorRoundingPolicy(policy HighDpiScaleFactorRoundingPolicy) {
|
2024-09-18 00:12:02 +00:00
|
|
|
C.QGuiApplication_SetHighDpiScaleFactorRoundingPolicy((C.int)(policy))
|
2024-08-29 07:01:51 +00:00
|
|
|
}
|
|
|
|
|
2024-09-04 06:54:22 +00:00
|
|
|
func QGuiApplication_HighDpiScaleFactorRoundingPolicy() HighDpiScaleFactorRoundingPolicy {
|
2024-09-17 07:30:27 +00:00
|
|
|
return (HighDpiScaleFactorRoundingPolicy)(C.QGuiApplication_HighDpiScaleFactorRoundingPolicy())
|
2024-08-29 07:01:51 +00:00
|
|
|
}
|
|
|
|
|
2024-08-25 04:08:24 +00:00
|
|
|
func QGuiApplication_Exec() int {
|
2024-09-17 07:30:27 +00:00
|
|
|
return (int)(C.QGuiApplication_Exec())
|
2024-08-25 04:08:24 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
func (this *QGuiApplication) Notify(param1 *QObject, param2 *QEvent) bool {
|
2024-09-17 07:30:27 +00:00
|
|
|
return (bool)(C.QGuiApplication_Notify(this.h, param1.cPointer(), param2.cPointer()))
|
2024-08-25 04:08:24 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
func (this *QGuiApplication) IsSessionRestored() bool {
|
2024-09-17 07:30:27 +00:00
|
|
|
return (bool)(C.QGuiApplication_IsSessionRestored(this.h))
|
2024-08-25 04:08:24 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
func (this *QGuiApplication) SessionId() string {
|
2024-09-14 22:29:05 +00:00
|
|
|
var _ms *C.struct_miqt_string = C.QGuiApplication_SessionId(this.h)
|
|
|
|
_ret := C.GoStringN(&_ms.data, C.int(int64(_ms.len)))
|
|
|
|
C.free(unsafe.Pointer(_ms))
|
|
|
|
return _ret
|
2024-08-25 04:08:24 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
func (this *QGuiApplication) SessionKey() string {
|
2024-09-14 22:29:05 +00:00
|
|
|
var _ms *C.struct_miqt_string = C.QGuiApplication_SessionKey(this.h)
|
|
|
|
_ret := C.GoStringN(&_ms.data, C.int(int64(_ms.len)))
|
|
|
|
C.free(unsafe.Pointer(_ms))
|
|
|
|
return _ret
|
2024-08-25 04:08:24 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
func (this *QGuiApplication) IsSavingSession() bool {
|
2024-09-17 07:30:27 +00:00
|
|
|
return (bool)(C.QGuiApplication_IsSavingSession(this.h))
|
2024-08-25 04:08:24 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
func QGuiApplication_IsFallbackSessionManagementEnabled() bool {
|
2024-09-17 07:30:27 +00:00
|
|
|
return (bool)(C.QGuiApplication_IsFallbackSessionManagementEnabled())
|
2024-08-25 04:08:24 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
func QGuiApplication_SetFallbackSessionManagementEnabled(fallbackSessionManagementEnabled bool) {
|
|
|
|
C.QGuiApplication_SetFallbackSessionManagementEnabled((C.bool)(fallbackSessionManagementEnabled))
|
|
|
|
}
|
|
|
|
|
|
|
|
func QGuiApplication_Sync() {
|
|
|
|
C.QGuiApplication_Sync()
|
|
|
|
}
|
|
|
|
|
|
|
|
func (this *QGuiApplication) FontDatabaseChanged() {
|
|
|
|
C.QGuiApplication_FontDatabaseChanged(this.h)
|
|
|
|
}
|
|
|
|
func (this *QGuiApplication) OnFontDatabaseChanged(slot func()) {
|
2024-09-14 22:29:05 +00:00
|
|
|
C.QGuiApplication_connect_FontDatabaseChanged(this.h, unsafe.Pointer(uintptr(cgo.NewHandle(slot))))
|
|
|
|
}
|
|
|
|
|
|
|
|
//export miqt_exec_callback_QGuiApplication_FontDatabaseChanged
|
|
|
|
func miqt_exec_callback_QGuiApplication_FontDatabaseChanged(cb *C.void) {
|
|
|
|
gofunc, ok := (cgo.Handle(uintptr(unsafe.Pointer(cb))).Value()).(func())
|
|
|
|
if !ok {
|
|
|
|
panic("miqt: callback of non-callback type (heap corruption?)")
|
2024-08-25 04:08:24 +00:00
|
|
|
}
|
|
|
|
|
2024-09-14 22:29:05 +00:00
|
|
|
gofunc()
|
2024-08-25 04:08:24 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
func (this *QGuiApplication) ScreenAdded(screen *QScreen) {
|
|
|
|
C.QGuiApplication_ScreenAdded(this.h, screen.cPointer())
|
|
|
|
}
|
2024-09-14 22:29:05 +00:00
|
|
|
func (this *QGuiApplication) OnScreenAdded(slot func(screen *QScreen)) {
|
|
|
|
C.QGuiApplication_connect_ScreenAdded(this.h, unsafe.Pointer(uintptr(cgo.NewHandle(slot))))
|
|
|
|
}
|
2024-08-25 04:08:24 +00:00
|
|
|
|
2024-09-14 22:29:05 +00:00
|
|
|
//export miqt_exec_callback_QGuiApplication_ScreenAdded
|
|
|
|
func miqt_exec_callback_QGuiApplication_ScreenAdded(cb *C.void, screen *C.QScreen) {
|
|
|
|
gofunc, ok := (cgo.Handle(uintptr(unsafe.Pointer(cb))).Value()).(func(screen *QScreen))
|
|
|
|
if !ok {
|
|
|
|
panic("miqt: callback of non-callback type (heap corruption?)")
|
2024-08-25 04:08:24 +00:00
|
|
|
}
|
|
|
|
|
2024-09-14 22:29:05 +00:00
|
|
|
// Convert all CABI parameters to Go parameters
|
2024-09-17 07:30:27 +00:00
|
|
|
slotval1 := newQScreen_U(unsafe.Pointer(screen))
|
2024-09-14 22:29:05 +00:00
|
|
|
|
|
|
|
gofunc(slotval1)
|
2024-08-25 04:08:24 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
func (this *QGuiApplication) ScreenRemoved(screen *QScreen) {
|
|
|
|
C.QGuiApplication_ScreenRemoved(this.h, screen.cPointer())
|
|
|
|
}
|
2024-09-14 22:29:05 +00:00
|
|
|
func (this *QGuiApplication) OnScreenRemoved(slot func(screen *QScreen)) {
|
|
|
|
C.QGuiApplication_connect_ScreenRemoved(this.h, unsafe.Pointer(uintptr(cgo.NewHandle(slot))))
|
|
|
|
}
|
2024-08-25 04:08:24 +00:00
|
|
|
|
2024-09-14 22:29:05 +00:00
|
|
|
//export miqt_exec_callback_QGuiApplication_ScreenRemoved
|
|
|
|
func miqt_exec_callback_QGuiApplication_ScreenRemoved(cb *C.void, screen *C.QScreen) {
|
|
|
|
gofunc, ok := (cgo.Handle(uintptr(unsafe.Pointer(cb))).Value()).(func(screen *QScreen))
|
|
|
|
if !ok {
|
|
|
|
panic("miqt: callback of non-callback type (heap corruption?)")
|
2024-08-25 04:08:24 +00:00
|
|
|
}
|
|
|
|
|
2024-09-14 22:29:05 +00:00
|
|
|
// Convert all CABI parameters to Go parameters
|
2024-09-17 07:30:27 +00:00
|
|
|
slotval1 := newQScreen_U(unsafe.Pointer(screen))
|
2024-09-14 22:29:05 +00:00
|
|
|
|
|
|
|
gofunc(slotval1)
|
2024-08-25 04:08:24 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
func (this *QGuiApplication) PrimaryScreenChanged(screen *QScreen) {
|
|
|
|
C.QGuiApplication_PrimaryScreenChanged(this.h, screen.cPointer())
|
|
|
|
}
|
2024-09-14 22:29:05 +00:00
|
|
|
func (this *QGuiApplication) OnPrimaryScreenChanged(slot func(screen *QScreen)) {
|
|
|
|
C.QGuiApplication_connect_PrimaryScreenChanged(this.h, unsafe.Pointer(uintptr(cgo.NewHandle(slot))))
|
|
|
|
}
|
2024-08-25 04:08:24 +00:00
|
|
|
|
2024-09-14 22:29:05 +00:00
|
|
|
//export miqt_exec_callback_QGuiApplication_PrimaryScreenChanged
|
|
|
|
func miqt_exec_callback_QGuiApplication_PrimaryScreenChanged(cb *C.void, screen *C.QScreen) {
|
|
|
|
gofunc, ok := (cgo.Handle(uintptr(unsafe.Pointer(cb))).Value()).(func(screen *QScreen))
|
|
|
|
if !ok {
|
|
|
|
panic("miqt: callback of non-callback type (heap corruption?)")
|
2024-08-25 04:08:24 +00:00
|
|
|
}
|
|
|
|
|
2024-09-14 22:29:05 +00:00
|
|
|
// Convert all CABI parameters to Go parameters
|
2024-09-17 07:30:27 +00:00
|
|
|
slotval1 := newQScreen_U(unsafe.Pointer(screen))
|
2024-09-14 22:29:05 +00:00
|
|
|
|
|
|
|
gofunc(slotval1)
|
2024-08-25 04:08:24 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
func (this *QGuiApplication) LastWindowClosed() {
|
|
|
|
C.QGuiApplication_LastWindowClosed(this.h)
|
|
|
|
}
|
|
|
|
func (this *QGuiApplication) OnLastWindowClosed(slot func()) {
|
2024-09-14 22:29:05 +00:00
|
|
|
C.QGuiApplication_connect_LastWindowClosed(this.h, unsafe.Pointer(uintptr(cgo.NewHandle(slot))))
|
|
|
|
}
|
|
|
|
|
|
|
|
//export miqt_exec_callback_QGuiApplication_LastWindowClosed
|
|
|
|
func miqt_exec_callback_QGuiApplication_LastWindowClosed(cb *C.void) {
|
|
|
|
gofunc, ok := (cgo.Handle(uintptr(unsafe.Pointer(cb))).Value()).(func())
|
|
|
|
if !ok {
|
|
|
|
panic("miqt: callback of non-callback type (heap corruption?)")
|
2024-08-25 04:08:24 +00:00
|
|
|
}
|
|
|
|
|
2024-09-14 22:29:05 +00:00
|
|
|
gofunc()
|
2024-08-25 04:08:24 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
func (this *QGuiApplication) FocusObjectChanged(focusObject *QObject) {
|
|
|
|
C.QGuiApplication_FocusObjectChanged(this.h, focusObject.cPointer())
|
|
|
|
}
|
2024-09-14 22:29:05 +00:00
|
|
|
func (this *QGuiApplication) OnFocusObjectChanged(slot func(focusObject *QObject)) {
|
|
|
|
C.QGuiApplication_connect_FocusObjectChanged(this.h, unsafe.Pointer(uintptr(cgo.NewHandle(slot))))
|
|
|
|
}
|
2024-08-25 04:08:24 +00:00
|
|
|
|
2024-09-14 22:29:05 +00:00
|
|
|
//export miqt_exec_callback_QGuiApplication_FocusObjectChanged
|
|
|
|
func miqt_exec_callback_QGuiApplication_FocusObjectChanged(cb *C.void, focusObject *C.QObject) {
|
|
|
|
gofunc, ok := (cgo.Handle(uintptr(unsafe.Pointer(cb))).Value()).(func(focusObject *QObject))
|
|
|
|
if !ok {
|
|
|
|
panic("miqt: callback of non-callback type (heap corruption?)")
|
2024-08-25 04:08:24 +00:00
|
|
|
}
|
|
|
|
|
2024-09-14 22:29:05 +00:00
|
|
|
// Convert all CABI parameters to Go parameters
|
2024-09-17 07:30:27 +00:00
|
|
|
slotval1 := newQObject_U(unsafe.Pointer(focusObject))
|
2024-09-14 22:29:05 +00:00
|
|
|
|
|
|
|
gofunc(slotval1)
|
2024-08-25 04:08:24 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
func (this *QGuiApplication) FocusWindowChanged(focusWindow *QWindow) {
|
|
|
|
C.QGuiApplication_FocusWindowChanged(this.h, focusWindow.cPointer())
|
|
|
|
}
|
2024-09-14 22:29:05 +00:00
|
|
|
func (this *QGuiApplication) OnFocusWindowChanged(slot func(focusWindow *QWindow)) {
|
|
|
|
C.QGuiApplication_connect_FocusWindowChanged(this.h, unsafe.Pointer(uintptr(cgo.NewHandle(slot))))
|
|
|
|
}
|
2024-08-25 04:08:24 +00:00
|
|
|
|
2024-09-14 22:29:05 +00:00
|
|
|
//export miqt_exec_callback_QGuiApplication_FocusWindowChanged
|
|
|
|
func miqt_exec_callback_QGuiApplication_FocusWindowChanged(cb *C.void, focusWindow *C.QWindow) {
|
|
|
|
gofunc, ok := (cgo.Handle(uintptr(unsafe.Pointer(cb))).Value()).(func(focusWindow *QWindow))
|
|
|
|
if !ok {
|
|
|
|
panic("miqt: callback of non-callback type (heap corruption?)")
|
2024-08-25 04:08:24 +00:00
|
|
|
}
|
|
|
|
|
2024-09-14 22:29:05 +00:00
|
|
|
// Convert all CABI parameters to Go parameters
|
2024-09-17 07:30:27 +00:00
|
|
|
slotval1 := newQWindow_U(unsafe.Pointer(focusWindow))
|
2024-09-14 22:29:05 +00:00
|
|
|
|
|
|
|
gofunc(slotval1)
|
2024-08-25 04:08:24 +00:00
|
|
|
}
|
|
|
|
|
2024-09-04 06:54:22 +00:00
|
|
|
func (this *QGuiApplication) ApplicationStateChanged(state ApplicationState) {
|
2024-09-18 00:12:02 +00:00
|
|
|
C.QGuiApplication_ApplicationStateChanged(this.h, (C.int)(state))
|
2024-08-29 07:01:51 +00:00
|
|
|
}
|
2024-09-14 22:29:05 +00:00
|
|
|
func (this *QGuiApplication) OnApplicationStateChanged(slot func(state ApplicationState)) {
|
|
|
|
C.QGuiApplication_connect_ApplicationStateChanged(this.h, unsafe.Pointer(uintptr(cgo.NewHandle(slot))))
|
|
|
|
}
|
2024-08-29 07:01:51 +00:00
|
|
|
|
2024-09-14 22:29:05 +00:00
|
|
|
//export miqt_exec_callback_QGuiApplication_ApplicationStateChanged
|
2024-09-18 00:12:02 +00:00
|
|
|
func miqt_exec_callback_QGuiApplication_ApplicationStateChanged(cb *C.void, state C.int) {
|
2024-09-14 22:29:05 +00:00
|
|
|
gofunc, ok := (cgo.Handle(uintptr(unsafe.Pointer(cb))).Value()).(func(state ApplicationState))
|
|
|
|
if !ok {
|
|
|
|
panic("miqt: callback of non-callback type (heap corruption?)")
|
2024-08-29 07:01:51 +00:00
|
|
|
}
|
|
|
|
|
2024-09-14 22:29:05 +00:00
|
|
|
// Convert all CABI parameters to Go parameters
|
2024-09-17 07:30:27 +00:00
|
|
|
slotval1 := (ApplicationState)(state)
|
2024-09-14 22:29:05 +00:00
|
|
|
|
|
|
|
gofunc(slotval1)
|
2024-08-29 07:01:51 +00:00
|
|
|
}
|
|
|
|
|
2024-09-04 06:54:22 +00:00
|
|
|
func (this *QGuiApplication) LayoutDirectionChanged(direction LayoutDirection) {
|
2024-09-18 00:12:02 +00:00
|
|
|
C.QGuiApplication_LayoutDirectionChanged(this.h, (C.int)(direction))
|
2024-08-29 07:01:51 +00:00
|
|
|
}
|
2024-09-14 22:29:05 +00:00
|
|
|
func (this *QGuiApplication) OnLayoutDirectionChanged(slot func(direction LayoutDirection)) {
|
|
|
|
C.QGuiApplication_connect_LayoutDirectionChanged(this.h, unsafe.Pointer(uintptr(cgo.NewHandle(slot))))
|
|
|
|
}
|
2024-08-29 07:01:51 +00:00
|
|
|
|
2024-09-14 22:29:05 +00:00
|
|
|
//export miqt_exec_callback_QGuiApplication_LayoutDirectionChanged
|
2024-09-18 00:12:02 +00:00
|
|
|
func miqt_exec_callback_QGuiApplication_LayoutDirectionChanged(cb *C.void, direction C.int) {
|
2024-09-14 22:29:05 +00:00
|
|
|
gofunc, ok := (cgo.Handle(uintptr(unsafe.Pointer(cb))).Value()).(func(direction LayoutDirection))
|
|
|
|
if !ok {
|
|
|
|
panic("miqt: callback of non-callback type (heap corruption?)")
|
2024-08-29 07:01:51 +00:00
|
|
|
}
|
|
|
|
|
2024-09-14 22:29:05 +00:00
|
|
|
// Convert all CABI parameters to Go parameters
|
2024-09-17 07:30:27 +00:00
|
|
|
slotval1 := (LayoutDirection)(direction)
|
2024-09-14 22:29:05 +00:00
|
|
|
|
|
|
|
gofunc(slotval1)
|
2024-08-29 07:01:51 +00:00
|
|
|
}
|
|
|
|
|
2024-08-25 04:08:24 +00:00
|
|
|
func (this *QGuiApplication) CommitDataRequest(sessionManager *QSessionManager) {
|
|
|
|
C.QGuiApplication_CommitDataRequest(this.h, sessionManager.cPointer())
|
|
|
|
}
|
2024-09-14 22:29:05 +00:00
|
|
|
func (this *QGuiApplication) OnCommitDataRequest(slot func(sessionManager *QSessionManager)) {
|
|
|
|
C.QGuiApplication_connect_CommitDataRequest(this.h, unsafe.Pointer(uintptr(cgo.NewHandle(slot))))
|
|
|
|
}
|
2024-08-25 04:08:24 +00:00
|
|
|
|
2024-09-14 22:29:05 +00:00
|
|
|
//export miqt_exec_callback_QGuiApplication_CommitDataRequest
|
|
|
|
func miqt_exec_callback_QGuiApplication_CommitDataRequest(cb *C.void, sessionManager *C.QSessionManager) {
|
|
|
|
gofunc, ok := (cgo.Handle(uintptr(unsafe.Pointer(cb))).Value()).(func(sessionManager *QSessionManager))
|
|
|
|
if !ok {
|
|
|
|
panic("miqt: callback of non-callback type (heap corruption?)")
|
2024-08-25 04:08:24 +00:00
|
|
|
}
|
|
|
|
|
2024-09-14 22:29:05 +00:00
|
|
|
// Convert all CABI parameters to Go parameters
|
2024-09-17 07:30:27 +00:00
|
|
|
slotval1 := newQSessionManager_U(unsafe.Pointer(sessionManager))
|
2024-09-14 22:29:05 +00:00
|
|
|
|
|
|
|
gofunc(slotval1)
|
2024-08-25 04:08:24 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
func (this *QGuiApplication) SaveStateRequest(sessionManager *QSessionManager) {
|
|
|
|
C.QGuiApplication_SaveStateRequest(this.h, sessionManager.cPointer())
|
|
|
|
}
|
2024-09-14 22:29:05 +00:00
|
|
|
func (this *QGuiApplication) OnSaveStateRequest(slot func(sessionManager *QSessionManager)) {
|
|
|
|
C.QGuiApplication_connect_SaveStateRequest(this.h, unsafe.Pointer(uintptr(cgo.NewHandle(slot))))
|
|
|
|
}
|
2024-08-25 04:08:24 +00:00
|
|
|
|
2024-09-14 22:29:05 +00:00
|
|
|
//export miqt_exec_callback_QGuiApplication_SaveStateRequest
|
|
|
|
func miqt_exec_callback_QGuiApplication_SaveStateRequest(cb *C.void, sessionManager *C.QSessionManager) {
|
|
|
|
gofunc, ok := (cgo.Handle(uintptr(unsafe.Pointer(cb))).Value()).(func(sessionManager *QSessionManager))
|
|
|
|
if !ok {
|
|
|
|
panic("miqt: callback of non-callback type (heap corruption?)")
|
2024-08-25 04:08:24 +00:00
|
|
|
}
|
|
|
|
|
2024-09-14 22:29:05 +00:00
|
|
|
// Convert all CABI parameters to Go parameters
|
2024-09-17 07:30:27 +00:00
|
|
|
slotval1 := newQSessionManager_U(unsafe.Pointer(sessionManager))
|
2024-09-14 22:29:05 +00:00
|
|
|
|
|
|
|
gofunc(slotval1)
|
2024-08-25 04:08:24 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
func (this *QGuiApplication) PaletteChanged(pal *QPalette) {
|
|
|
|
C.QGuiApplication_PaletteChanged(this.h, pal.cPointer())
|
|
|
|
}
|
2024-09-14 22:29:05 +00:00
|
|
|
func (this *QGuiApplication) OnPaletteChanged(slot func(pal *QPalette)) {
|
|
|
|
C.QGuiApplication_connect_PaletteChanged(this.h, unsafe.Pointer(uintptr(cgo.NewHandle(slot))))
|
|
|
|
}
|
2024-08-25 04:08:24 +00:00
|
|
|
|
2024-09-14 22:29:05 +00:00
|
|
|
//export miqt_exec_callback_QGuiApplication_PaletteChanged
|
|
|
|
func miqt_exec_callback_QGuiApplication_PaletteChanged(cb *C.void, pal *C.QPalette) {
|
|
|
|
gofunc, ok := (cgo.Handle(uintptr(unsafe.Pointer(cb))).Value()).(func(pal *QPalette))
|
|
|
|
if !ok {
|
|
|
|
panic("miqt: callback of non-callback type (heap corruption?)")
|
2024-08-25 04:08:24 +00:00
|
|
|
}
|
|
|
|
|
2024-09-14 22:29:05 +00:00
|
|
|
// Convert all CABI parameters to Go parameters
|
2024-09-17 07:30:27 +00:00
|
|
|
slotval1 := newQPalette_U(unsafe.Pointer(pal))
|
2024-09-14 22:29:05 +00:00
|
|
|
|
|
|
|
gofunc(slotval1)
|
2024-08-25 04:08:24 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
func (this *QGuiApplication) ApplicationDisplayNameChanged() {
|
|
|
|
C.QGuiApplication_ApplicationDisplayNameChanged(this.h)
|
|
|
|
}
|
|
|
|
func (this *QGuiApplication) OnApplicationDisplayNameChanged(slot func()) {
|
2024-09-14 22:29:05 +00:00
|
|
|
C.QGuiApplication_connect_ApplicationDisplayNameChanged(this.h, unsafe.Pointer(uintptr(cgo.NewHandle(slot))))
|
|
|
|
}
|
|
|
|
|
|
|
|
//export miqt_exec_callback_QGuiApplication_ApplicationDisplayNameChanged
|
|
|
|
func miqt_exec_callback_QGuiApplication_ApplicationDisplayNameChanged(cb *C.void) {
|
|
|
|
gofunc, ok := (cgo.Handle(uintptr(unsafe.Pointer(cb))).Value()).(func())
|
|
|
|
if !ok {
|
|
|
|
panic("miqt: callback of non-callback type (heap corruption?)")
|
2024-08-25 04:08:24 +00:00
|
|
|
}
|
|
|
|
|
2024-09-14 22:29:05 +00:00
|
|
|
gofunc()
|
2024-08-25 04:08:24 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
func (this *QGuiApplication) FontChanged(font *QFont) {
|
|
|
|
C.QGuiApplication_FontChanged(this.h, font.cPointer())
|
|
|
|
}
|
2024-09-14 22:29:05 +00:00
|
|
|
func (this *QGuiApplication) OnFontChanged(slot func(font *QFont)) {
|
|
|
|
C.QGuiApplication_connect_FontChanged(this.h, unsafe.Pointer(uintptr(cgo.NewHandle(slot))))
|
|
|
|
}
|
2024-08-25 04:08:24 +00:00
|
|
|
|
2024-09-14 22:29:05 +00:00
|
|
|
//export miqt_exec_callback_QGuiApplication_FontChanged
|
|
|
|
func miqt_exec_callback_QGuiApplication_FontChanged(cb *C.void, font *C.QFont) {
|
|
|
|
gofunc, ok := (cgo.Handle(uintptr(unsafe.Pointer(cb))).Value()).(func(font *QFont))
|
|
|
|
if !ok {
|
|
|
|
panic("miqt: callback of non-callback type (heap corruption?)")
|
2024-08-25 04:08:24 +00:00
|
|
|
}
|
|
|
|
|
2024-09-14 22:29:05 +00:00
|
|
|
// Convert all CABI parameters to Go parameters
|
2024-09-17 07:30:27 +00:00
|
|
|
slotval1 := newQFont_U(unsafe.Pointer(font))
|
2024-09-14 22:29:05 +00:00
|
|
|
|
|
|
|
gofunc(slotval1)
|
2024-08-25 04:08:24 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
func QGuiApplication_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))
|
2024-09-14 22:29:05 +00:00
|
|
|
var _ms *C.struct_miqt_string = C.QGuiApplication_Tr2(s_Cstring, c_Cstring)
|
|
|
|
_ret := C.GoStringN(&_ms.data, C.int(int64(_ms.len)))
|
|
|
|
C.free(unsafe.Pointer(_ms))
|
|
|
|
return _ret
|
2024-08-25 04:08:24 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
func QGuiApplication_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))
|
2024-09-14 22:29:05 +00:00
|
|
|
var _ms *C.struct_miqt_string = C.QGuiApplication_Tr3(s_Cstring, c_Cstring, (C.int)(n))
|
|
|
|
_ret := C.GoStringN(&_ms.data, C.int(int64(_ms.len)))
|
|
|
|
C.free(unsafe.Pointer(_ms))
|
|
|
|
return _ret
|
2024-08-25 04:08:24 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
func QGuiApplication_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))
|
2024-09-14 22:29:05 +00:00
|
|
|
var _ms *C.struct_miqt_string = C.QGuiApplication_TrUtf82(s_Cstring, c_Cstring)
|
|
|
|
_ret := C.GoStringN(&_ms.data, C.int(int64(_ms.len)))
|
|
|
|
C.free(unsafe.Pointer(_ms))
|
|
|
|
return _ret
|
2024-08-25 04:08:24 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
func QGuiApplication_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))
|
2024-09-14 22:29:05 +00:00
|
|
|
var _ms *C.struct_miqt_string = C.QGuiApplication_TrUtf83(s_Cstring, c_Cstring, (C.int)(n))
|
|
|
|
_ret := C.GoStringN(&_ms.data, C.int(int64(_ms.len)))
|
|
|
|
C.free(unsafe.Pointer(_ms))
|
|
|
|
return _ret
|
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 *QGuiApplication) Delete() {
|
|
|
|
C.QGuiApplication_Delete(this.h)
|
|
|
|
}
|
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 *QGuiApplication) GoGC() {
|
|
|
|
runtime.SetFinalizer(this, func(this *QGuiApplication) {
|
|
|
|
this.Delete()
|
|
|
|
runtime.KeepAlive(this.h)
|
|
|
|
})
|
|
|
|
}
|