func (self *Widget) GetTopLevel() WidgetLike { w := C.gtk_widget_get_toplevel(self.object) if tl, err := gobject.ConvertToGo(unsafe.Pointer(&w)); err == nil { return tl.(WidgetLike) } return nil }
// GetToplevel is a wrapper around gtk_widget_get_toplevel(). func (v *Widget) GetToplevel() (*Widget, error) { c := C.gtk_widget_get_toplevel(v.native()) if c == nil { return nil, nilPtrErr } return wrapWidget(wrapObject(unsafe.Pointer(c))), nil }