//gtk_popover_new() func PopoverNew(relative IWidget) (*Popover, error) { //Takes relative to widget var c *C.struct__GtkWidget if relative == nil { c = C.gtk_popover_new(nil) } else { c = C.gtk_popover_new(relative.toWidget()) } if c == nil { return nil, nilPtrErr } return wrapPopover(wrapObject(unsafe.Pointer(c))), nil }
// PopoverNew is a wrapper around gtk_popover_new(). func PopoverNew(relativeTo IWidget) (*Popover, error) { c := C.gtk_popover_new(relativeTo.toWidget()) if c == nil { return nil, nilPtrErr } obj := &glib.Object{glib.ToGObject(unsafe.Pointer(c))} a := wrapPopover(obj) obj.RefSink() runtime.SetFinalizer(obj, (*glib.Object).Unref) return a, nil }