package qt /* #include "gen_qsizegrip.h" #include */ import "C" import ( "runtime" "unsafe" ) type QSizeGrip struct { h *C.QSizeGrip *QWidget } func (this *QSizeGrip) cPointer() *C.QSizeGrip { if this == nil { return nil } return this.h } func newQSizeGrip(h *C.QSizeGrip) *QSizeGrip { if h == nil { return nil } return &QSizeGrip{h: h, QWidget: newQWidget_U(unsafe.Pointer(h))} } func newQSizeGrip_U(h unsafe.Pointer) *QSizeGrip { return newQSizeGrip((*C.QSizeGrip)(h)) } // NewQSizeGrip constructs a new QSizeGrip object. func NewQSizeGrip(parent *QWidget) *QSizeGrip { ret := C.QSizeGrip_new(parent.cPointer()) return newQSizeGrip(ret) } func (this *QSizeGrip) MetaObject() *QMetaObject { ret := C.QSizeGrip_MetaObject(this.h) return newQMetaObject_U(unsafe.Pointer(ret)) } func QSizeGrip_Tr(s string) string { s_Cstring := C.CString(s) defer C.free(unsafe.Pointer(s_Cstring)) var _out *C.char = nil var _out_Strlen C.int = 0 C.QSizeGrip_Tr(s_Cstring, &_out, &_out_Strlen) ret := C.GoStringN(_out, _out_Strlen) C.free(unsafe.Pointer(_out)) return ret } func QSizeGrip_TrUtf8(s string) string { s_Cstring := C.CString(s) defer C.free(unsafe.Pointer(s_Cstring)) var _out *C.char = nil var _out_Strlen C.int = 0 C.QSizeGrip_TrUtf8(s_Cstring, &_out, &_out_Strlen) ret := C.GoStringN(_out, _out_Strlen) C.free(unsafe.Pointer(_out)) return ret } func (this *QSizeGrip) SizeHint() *QSize { ret := C.QSizeGrip_SizeHint(this.h) // Qt uses pass-by-value semantics for this type. Mimic with finalizer ret1 := newQSize(ret) runtime.SetFinalizer(ret1, func(ret2 *QSize) { ret2.Delete() runtime.KeepAlive(ret2.h) }) return ret1 } func (this *QSizeGrip) SetVisible(visible bool) { C.QSizeGrip_SetVisible(this.h, (C.bool)(visible)) } func QSizeGrip_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 _out *C.char = nil var _out_Strlen C.int = 0 C.QSizeGrip_Tr2(s_Cstring, c_Cstring, &_out, &_out_Strlen) ret := C.GoStringN(_out, _out_Strlen) C.free(unsafe.Pointer(_out)) return ret } func QSizeGrip_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 _out *C.char = nil var _out_Strlen C.int = 0 C.QSizeGrip_Tr3(s_Cstring, c_Cstring, (C.int)(n), &_out, &_out_Strlen) ret := C.GoStringN(_out, _out_Strlen) C.free(unsafe.Pointer(_out)) return ret } func QSizeGrip_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 _out *C.char = nil var _out_Strlen C.int = 0 C.QSizeGrip_TrUtf82(s_Cstring, c_Cstring, &_out, &_out_Strlen) ret := C.GoStringN(_out, _out_Strlen) C.free(unsafe.Pointer(_out)) return ret } func QSizeGrip_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 _out *C.char = nil var _out_Strlen C.int = 0 C.QSizeGrip_TrUtf83(s_Cstring, c_Cstring, (C.int)(n), &_out, &_out_Strlen) ret := C.GoStringN(_out, _out_Strlen) C.free(unsafe.Pointer(_out)) return ret } func (this *QSizeGrip) Delete() { C.QSizeGrip_Delete(this.h) }