func wxPtrTypeName(wxPtr C.WxObjectPtr) string { t := findWxTypeFromTypeMap(goString(C.wxObject_GetClassName(wxPtr))) if t != nil { return t.String() } return "<??>" }
func objectTypeName(ptr C.WxObjectPtr) string { if ptr == nil { return "<nil>" } t := findType(goString(C.wxObject_GetClassName(ptr))) if t != nil { return t.String() } return "<??>" }
// NewObjectFromPtr creates an Object wrapper of the wxPtr. // The concrete type of returned Object corresponds to the concrete type or // parent type of *wxPtr. func NewObjectFromPtr(wxPtr C.WxObjectPtr, hold bool) Object { if wxPtr == nil { return nil } className := goString(C.wxObject_GetClassName(wxPtr)) t := findWxTypeFromTypeMap(className) if t == nil { return nil } obj := reflect.New(t).Interface().(Object) obj.bindWxPtr(wxPtr, hold) return obj }
func wxGetClassName(wxPtr C.WxObjectPtr) string { return goString(C.wxObject_GetClassName(wxPtr)) }
func findTypeFromPtr(ptr C.WxObjectPtr) reflect.Type { className := goString(C.wxObject_GetClassName(ptr)) return findType(className) }