miqt/qt/gen_qpaintdevicewindow.go

153 lines
4.3 KiB
Go
Raw Normal View History

package qt
/*
#include "gen_qpaintdevicewindow.h"
#include <stdlib.h>
*/
import "C"
import (
"runtime"
"unsafe"
)
type QPaintDeviceWindow struct {
2024-11-19 06:29:06 +00:00
h *C.QPaintDeviceWindow
isSubclass bool
*QWindow
*QPaintDevice
}
func (this *QPaintDeviceWindow) cPointer() *C.QPaintDeviceWindow {
if this == nil {
return nil
}
return this.h
}
func (this *QPaintDeviceWindow) UnsafePointer() unsafe.Pointer {
if this == nil {
return nil
}
return unsafe.Pointer(this.h)
}
2024-11-19 06:29:06 +00:00
// newQPaintDeviceWindow constructs the type using only CGO pointers.
2024-12-07 04:15:57 +00:00
func newQPaintDeviceWindow(h *C.QPaintDeviceWindow) *QPaintDeviceWindow {
2024-09-01 02:23:55 +00:00
if h == nil {
return nil
}
2024-12-07 04:15:57 +00:00
var outptr_QWindow *C.QWindow = nil
var outptr_QPaintDevice *C.QPaintDevice = nil
C.QPaintDeviceWindow_virtbase(h, &outptr_QWindow, &outptr_QPaintDevice)
2024-11-19 06:29:06 +00:00
return &QPaintDeviceWindow{h: h,
2024-12-07 04:15:57 +00:00
QWindow: newQWindow(outptr_QWindow),
QPaintDevice: newQPaintDevice(outptr_QPaintDevice)}
}
2024-11-19 06:29:06 +00:00
// UnsafeNewQPaintDeviceWindow constructs the type using only unsafe pointers.
2024-12-07 04:15:57 +00:00
func UnsafeNewQPaintDeviceWindow(h unsafe.Pointer) *QPaintDeviceWindow {
return newQPaintDeviceWindow((*C.QPaintDeviceWindow)(h))
}
func (this *QPaintDeviceWindow) MetaObject() *QMetaObject {
return newQMetaObject(C.QPaintDeviceWindow_MetaObject(this.h))
}
func (this *QPaintDeviceWindow) Metacast(param1 string) unsafe.Pointer {
param1_Cstring := C.CString(param1)
defer C.free(unsafe.Pointer(param1_Cstring))
return (unsafe.Pointer)(C.QPaintDeviceWindow_Metacast(this.h, param1_Cstring))
}
func QPaintDeviceWindow_Tr(s string) string {
s_Cstring := C.CString(s)
defer C.free(unsafe.Pointer(s_Cstring))
var _ms C.struct_miqt_string = C.QPaintDeviceWindow_Tr(s_Cstring)
_ret := C.GoStringN(_ms.data, C.int(int64(_ms.len)))
C.free(unsafe.Pointer(_ms.data))
return _ret
}
func QPaintDeviceWindow_TrUtf8(s string) string {
s_Cstring := C.CString(s)
defer C.free(unsafe.Pointer(s_Cstring))
var _ms C.struct_miqt_string = C.QPaintDeviceWindow_TrUtf8(s_Cstring)
_ret := C.GoStringN(_ms.data, C.int(int64(_ms.len)))
C.free(unsafe.Pointer(_ms.data))
return _ret
}
func (this *QPaintDeviceWindow) Update(rect *QRect) {
C.QPaintDeviceWindow_Update(this.h, rect.cPointer())
}
func (this *QPaintDeviceWindow) UpdateWithRegion(region *QRegion) {
C.QPaintDeviceWindow_UpdateWithRegion(this.h, region.cPointer())
}
func (this *QPaintDeviceWindow) Update2() {
C.QPaintDeviceWindow_Update2(this.h)
}
func QPaintDeviceWindow_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))
var _ms C.struct_miqt_string = C.QPaintDeviceWindow_Tr2(s_Cstring, c_Cstring)
_ret := C.GoStringN(_ms.data, C.int(int64(_ms.len)))
C.free(unsafe.Pointer(_ms.data))
return _ret
}
func QPaintDeviceWindow_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))
var _ms C.struct_miqt_string = C.QPaintDeviceWindow_Tr3(s_Cstring, c_Cstring, (C.int)(n))
_ret := C.GoStringN(_ms.data, C.int(int64(_ms.len)))
C.free(unsafe.Pointer(_ms.data))
return _ret
}
func QPaintDeviceWindow_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))
var _ms C.struct_miqt_string = C.QPaintDeviceWindow_TrUtf82(s_Cstring, c_Cstring)
_ret := C.GoStringN(_ms.data, C.int(int64(_ms.len)))
C.free(unsafe.Pointer(_ms.data))
return _ret
}
func QPaintDeviceWindow_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))
var _ms C.struct_miqt_string = C.QPaintDeviceWindow_TrUtf83(s_Cstring, c_Cstring, (C.int)(n))
_ret := C.GoStringN(_ms.data, C.int(int64(_ms.len)))
C.free(unsafe.Pointer(_ms.data))
return _ret
}
// Delete this object from C++ memory.
func (this *QPaintDeviceWindow) Delete() {
2024-11-19 06:29:06 +00:00
C.QPaintDeviceWindow_Delete(this.h, C.bool(this.isSubclass))
}
// 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 *QPaintDeviceWindow) GoGC() {
runtime.SetFinalizer(this, func(this *QPaintDeviceWindow) {
this.Delete()
runtime.KeepAlive(this.h)
})
}